From 9be63471a1f10757fa1537c8a8dc98163979fb7e Mon Sep 17 00:00:00 2001 From: priyanshu Date: Wed, 13 Mar 2019 14:43:36 +0530 Subject: Support execution control of SDC Workflow init Added a flag to decide whether init job is needed. Change-Id: Ib40571048dac1d1161d756edc5d738b86aac1c7a Issue-ID: OOM-1712 Signed-off-by: priyanshua --- kubernetes/sdc/charts/sdc-wfd-be/templates/deployment.yaml | 2 ++ kubernetes/sdc/charts/sdc-wfd-be/templates/job.yaml | 2 ++ kubernetes/sdc/charts/sdc-wfd-be/values.yaml | 2 ++ 3 files changed, 6 insertions(+) (limited to 'kubernetes/sdc/charts/sdc-wfd-be') diff --git a/kubernetes/sdc/charts/sdc-wfd-be/templates/deployment.yaml b/kubernetes/sdc/charts/sdc-wfd-be/templates/deployment.yaml index 50062a1b9b..fc1538f87a 100644 --- a/kubernetes/sdc/charts/sdc-wfd-be/templates/deployment.yaml +++ b/kubernetes/sdc/charts/sdc-wfd-be/templates/deployment.yaml @@ -32,6 +32,7 @@ spec: release: {{ .Release.Name }} spec: initContainers: + {{- if .Values.global.initJob.enabled }} - name: {{ include "common.name" . }}-job-completion image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" imagePullPolicy: "{{ .Values.global.pullPolicy | default .Values.pullPolicy }}" @@ -46,6 +47,7 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.namespace + {{ end }} containers: - name: {{ include "common.name" . }} image: "{{ include "common.repository" . }}/{{ .Values.image }}" diff --git a/kubernetes/sdc/charts/sdc-wfd-be/templates/job.yaml b/kubernetes/sdc/charts/sdc-wfd-be/templates/job.yaml index 2b142533c7..98de4760bf 100644 --- a/kubernetes/sdc/charts/sdc-wfd-be/templates/job.yaml +++ b/kubernetes/sdc/charts/sdc-wfd-be/templates/job.yaml @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +{{ if .Values.global.initJob.enabled }} apiVersion: batch/v1 kind: Job metadata: @@ -66,3 +67,4 @@ spec: secretKeyRef: {name: {{ .Release.Name }}-sdc-cs-secrets, key: sdc_password} imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" +{{ end }} \ No newline at end of file diff --git a/kubernetes/sdc/charts/sdc-wfd-be/values.yaml b/kubernetes/sdc/charts/sdc-wfd-be/values.yaml index 1e0ea51764..9d1fbe65cb 100644 --- a/kubernetes/sdc/charts/sdc-wfd-be/values.yaml +++ b/kubernetes/sdc/charts/sdc-wfd-be/values.yaml @@ -22,6 +22,8 @@ global: readinessImage: readiness-check:2.0.0 loggingRepository: docker.elastic.co loggingImage: beats/filebeat:5.5.0 + initJob: + enabled: true ################################################################# # Application configuration defaults. -- cgit 1.2.3-korg