Merge "Issue in Clamp Configuration"
[oom.git] / kubernetes / sdc / charts / sdc-be / templates / job.yaml
index 7338d2e..c2203d5 100644 (file)
@@ -1,3 +1,17 @@
+# Copyright © 2017 Amdocs, AT&T, Bell Canada
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 apiVersion: batch/v1
 kind: Job
 metadata:
@@ -9,6 +23,7 @@ metadata:
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }}
 spec:
+  backoffLimit: 20
   template:
     metadata:
       labels:
@@ -33,7 +48,7 @@ spec:
               fieldPath: metadata.namespace
       containers:
       - name: {{ include "common.name" . }}-job
-        image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.backendInitImage }}"
+        image: "{{ include "common.repository" . }}/{{ .Values.backendInitImage }}"
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         volumeMounts:
         - name: {{ include "common.fullname" . }}-environments
@@ -41,6 +56,10 @@ spec:
         env:
         - name: ENVNAME
           value: {{ .Values.global.env.name }}
+        - name: HOST_IP
+          valueFrom:
+            fieldRef:
+              fieldPath: status.podIP
       volumes:
         - name: {{ include "common.fullname" . }}-environments
           configMap: