[GENERAL] Use readiness container v3.0.1
[oom.git] / kubernetes / cds / charts / cds-sdc-listener / templates / deployment.yaml
index 3e71181..4d70c4a 100644 (file)
@@ -12,7 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-apiVersion: extensions/v1beta1
+apiVersion: apps/v1
 kind: Deployment
 metadata:
   name: {{ include "common.fullname" . }}
@@ -23,6 +23,9 @@ metadata:
     release: {{ include "common.release" . }}
     heritage: {{ .Release.Service }}
 spec:
+  selector:
+    matchLabels:
+      app: {{ include "common.name" . }}
   replicas: {{ .Values.replicaCount }}
   template:
     metadata:
@@ -32,7 +35,7 @@ spec:
     spec:
       initContainers:
         - command:
-          - /root/ready.py
+          - /app/ready.py
           args:
             - --container-name
             - sdc-be
@@ -46,7 +49,7 @@ spec:
               fieldRef:
                 apiVersion: v1
                 fieldPath: metadata.namespace
-          image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
+          image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           name: {{ include "common.name" . }}-readiness
       containers:
@@ -99,4 +102,4 @@ spec:
             - key: logback.xml
               path: logback.xml
       imagePullSecrets:
-      - name: {{ include "common.namespace" . }}-docker-registry-key
\ No newline at end of file
+      - name: {{ include "common.namespace" . }}-docker-registry-key