fix(common): try to fix "did not find expected "-" indicator (#2275)
* fix(common): try to fix "did not find expected "-" indicator * fix mariadbinit command and bump version
This commit is contained in:
@@ -2,21 +2,20 @@
|
||||
This template ensures pods with postgresql dependency have a delayed start
|
||||
*/}}
|
||||
{{- define "common.dependencies.mariadb.init" -}}
|
||||
{{- $pghost := printf "%v-%v" .Release.Name "mariadb" }}
|
||||
{{- if .Values.mariadb.enabled }}
|
||||
- name: mariadb-init
|
||||
image: "{{ .Values.mariadbImage.repository}}:{{ .Values.mariadbImage.tag }}"
|
||||
env:
|
||||
- name: MARIADB_HOST
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: mariadbcreds
|
||||
key: plainhost
|
||||
- name: MARIADB_ROOT_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: mariadbcreds
|
||||
key: mariadb-root-password
|
||||
- name: MARIADB_HOST
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: mariadbcreds
|
||||
key: plainhost
|
||||
- name: MARIADB_ROOT_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: mariadbcreds
|
||||
key: mariadb-root-password
|
||||
securityContext:
|
||||
capabilities:
|
||||
drop:
|
||||
@@ -25,10 +24,14 @@ This template ensures pods with postgresql dependency have a delayed start
|
||||
{{- with .Values.resources }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
command:
|
||||
- "bash"
|
||||
- "-ec"
|
||||
- "until mysqladmin -uroot -h"${MARIADB_HOST}" -p"${MARIADB_ROOT_PASSWORD}" ping && mysqladmin -uroot -h"${MARIADB_HOST}" -p"${MARIADB_ROOT_PASSWORD}" status; do sleep 2; done"
|
||||
command: ["bash", "-ec"]
|
||||
args:
|
||||
- >
|
||||
until
|
||||
mysqladmin -uroot -h"${MARIADB_HOST}" -p"${MARIADB_ROOT_PASSWORD}" ping \
|
||||
&& mysqladmin -uroot -h"${MARIADB_HOST}" -p"${MARIADB_ROOT_PASSWORD}" status;
|
||||
do sleep 2;
|
||||
done
|
||||
imagePullPolicy: IfNotPresent
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
Reference in New Issue
Block a user