diff options
Diffstat (limited to 'kubernetes/sdnc')
-rw-r--r-- | kubernetes/sdnc/Chart.yaml | 3 | ||||
-rwxr-xr-x | kubernetes/sdnc/templates/job.yaml | 34 | ||||
-rw-r--r-- | kubernetes/sdnc/values.yaml | 14 |
3 files changed, 30 insertions, 21 deletions
diff --git a/kubernetes/sdnc/Chart.yaml b/kubernetes/sdnc/Chart.yaml index 622991562b..4a0c9eb607 100644 --- a/kubernetes/sdnc/Chart.yaml +++ b/kubernetes/sdnc/Chart.yaml @@ -72,3 +72,6 @@ dependencies: - name: serviceAccount version: ~13.x-0 repository: '@local' + - name: readinessCheck + version: ~13.x-0 + repository: '@local' diff --git a/kubernetes/sdnc/templates/job.yaml b/kubernetes/sdnc/templates/job.yaml index 451c5b0453..db331143a9 100755 --- a/kubernetes/sdnc/templates/job.yaml +++ b/kubernetes/sdnc/templates/job.yaml @@ -76,27 +76,19 @@ spec: imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} name: {{ include "common.name" . }}-update-config - - name: {{ include "common.name" . }}-readiness - command: - - /app/ready.py - args: - - --app-name - - {{ include "common.mariadbAppName" . }} - env: - - name: NAMESPACE - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.namespace - image: {{ include "repositoryGenerator.image.readiness" . }} - imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} - resources: - limits: - cpu: "100m" - memory: "0.5Gi" - requests: - cpu: "3m" - memory: "0.02Gi" + {{- if .Values.global.mariadbGalera.localCluster }} + {{- if .Values.global.mariadbGalera.useOperator }} + {{ include "common.readinessCheck.waitFor" (dict "dot" . "wait_for" .Values.readinessCheck.wait_for_local_operator ) | indent 6 | trim }} + {{ else }} + {{ include "common.readinessCheck.waitFor" (dict "dot" . "wait_for" .Values.readinessCheck.wait_for_local ) | indent 6 | trim }} + {{- end }} + {{ else }} + {{- if .Values.global.mariadbGalera.useOperator }} + {{ include "common.readinessCheck.waitFor" (dict "dot" . "wait_for" .Values.readinessCheck.wait_for_global_operator ) | indent 6 | trim }} + {{ else }} + {{ include "common.readinessCheck.waitFor" (dict "dot" . "wait_for" .Values.readinessCheck.wait_for_global ) | indent 6 | trim }} + {{- end }} + {{- end }} containers: - name: {{ include "common.name" . }} image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }} diff --git a/kubernetes/sdnc/values.yaml b/kubernetes/sdnc/values.yaml index 55f6a1d7cd..1c7fa9eb0a 100644 --- a/kubernetes/sdnc/values.yaml +++ b/kubernetes/sdnc/values.yaml @@ -690,3 +690,17 @@ serviceAccount: #Log configuration log: path: /var/log/onap + +readinessCheck: + wait_for_global_operator: + pods: + - '{{ .Values.global.mariadbGalera.nameOverride }}-0' + wait_for_local_operator: + pods: + - '{{ index .Values "mariadb-galera" "nameOverride" }}-0' + wait_for_global: + apps: + - '{{ include "common.mariadbAppName" . }}' + wait_for_local: + apps: + - '{{ include "common.mariadbAppName" . }}' |