Merge "[AAI] Make aai log level configurable"
[oom.git] / kubernetes / cds / components / cds-sdc-listener / templates / deployment.yaml
index d08390b..6922b24 100644 (file)
 */}}
 apiVersion: apps/v1
 kind: Deployment
-metadata:
-  name: {{ include "common.fullname" . }}
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ include "common.release" . }}
-    heritage: {{ .Release.Service }}
+metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
 spec:
-  selector:
-    matchLabels:
-      app: {{ include "common.name" . }}
   replicas: {{ .Values.replicaCount }}
+  selector: {{- include "common.selectors" . | nindent 4 }}
   template:
-    metadata:
-      labels:
-        app: {{ include "common.name" . }}
-        release: {{ include "common.release" . }}
+    metadata: {{- include "common.templateMetadata" . | nindent 6 }}
     spec:
       initContainers:
         - command:
           - /app/ready.py
           args:
-            - --container-name
+            - --service-name
             - sdc-be
-            - --container-name
-            - cds-blueprints-processor
+            - --service-name
+            - cds-blueprints-processor-http
           env:
           - name: NAMESPACE
             valueFrom:
@@ -52,6 +40,13 @@ spec:
           image: {{ include "repositoryGenerator.image.readiness" . }}
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           name: {{ include "common.name" . }}-readiness
+          resources:
+            limits:
+              cpu: "100m"
+              memory: "500Mi"
+            requests:
+              cpu: "3m"
+              memory: "20Mi"
       containers:
         - name: {{ include "common.name" . }}
           image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
@@ -64,21 +59,19 @@ spec:
               secretKeyRef:
                 name: {{ include "common.name" . }}-ku
                 key: sasl.jaas.config
-          ports:
-          - containerPort: {{ .Values.service.http.internalPort }}
-            name: {{ .Values.service.http.portName }}
+          ports: {{- include "common.containerPorts" . | nindent 12 }}
           {{ if .Values.liveness.enabled }}
           livenessProbe:
             httpGet:
               path: /api/v1/sdclistener/healthcheck
-              port: {{ .Values.service.http.portName }}
+              port: {{ .Values.service.internalPort }}
             initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
             periodSeconds: {{ .Values.liveness.periodSeconds }}
           {{end}}
           readinessProbe:
             httpGet:
               path: /api/v1/sdclistener/healthcheck
-              port: {{ .Values.service.http.portName }}
+              port: {{ .Values.service.internalPort }}
             initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
             periodSeconds: {{ .Values.readiness.periodSeconds }}
           volumeMounts:
@@ -88,8 +81,7 @@ spec:
           - mountPath: {{ .Values.config.appConfigDir }}/logback.xml
             name: {{ include "common.fullname" . }}-config
             subPath: logback.xml
-          resources:
-{{ include "common.resources" . | indent 12 }}
+          resources: {{ include "common.resources" . | nindent 12 }}
         {{- if .Values.nodeSelector }}
         nodeSelector:
 {{ toYaml .Values.nodeSelector | indent 10 }}
@@ -108,5 +100,4 @@ spec:
               path: application.yaml
             - key: logback.xml
               path: logback.xml
-      imagePullSecrets:
-      - name: {{ include "common.namespace" . }}-docker-registry-key
+      {{- include "common.imagePullSecrets" . | nindent 6 }}