mirror of
https://github.com/slurm-personal/school-dev-k8s.git
synced 2026-06-27 13:50:24 +00:00
Add basic info
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
{{- if .Values.mariadb.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}-credentials-test"
|
||||
annotations:
|
||||
"helm.sh/hook": test-success
|
||||
spec:
|
||||
{{- if .Values.podSecurityContext.enabled }}
|
||||
securityContext: {{- omit .Values.podSecurityContext "enabled" | toYaml | nindent 4 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ .Release.Name }}-credentials-test
|
||||
image: {{ template "wordpress.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
{{- if .Values.containerSecurityContext.enabled }}
|
||||
securityContext: {{- omit .Values.containerSecurityContext "enabled" | toYaml | nindent 8 }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: MARIADB_HOST
|
||||
value: {{ include "wordpress.databaseHost" . | quote }}
|
||||
- name: MARIADB_PORT
|
||||
value: "3306"
|
||||
- name: WORDPRESS_DATABASE_NAME
|
||||
value: {{ default "" .Values.mariadb.auth.database | quote }}
|
||||
- name: WORDPRESS_DATABASE_USER
|
||||
value: {{ default "" .Values.mariadb.auth.username | quote }}
|
||||
- name: WORDPRESS_DATABASE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "wordpress.databaseSecretName" . }}
|
||||
key: mariadb-password
|
||||
command:
|
||||
- /bin/bash
|
||||
- -ec
|
||||
- |
|
||||
mysql --host=$MARIADB_HOST --port=$MARIADB_PORT --user=$WORDPRESS_DATABASE_USER --password=$WORDPRESS_DATABASE_PASSWORD
|
||||
restartPolicy: Never
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user