Merge "[DMAAP] DMaaP ServiceMesh compatibility"
[oom.git] / kubernetes / platform / components / cmpv2-cert-provider / templates / deployment.yaml
index 8bcbc1f..ce5e410 100644 (file)
@@ -1,7 +1,7 @@
 {{ if .Values.global.cmpv2Enabled }}
 
 # ============LICENSE_START=======================================================
-# Copyright (c) 2020 Nokia
+# Copyright (c) 2020-2021 Nokia
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -32,28 +32,22 @@ spec:
     metadata:
       labels:
         control-plane: controller-manager
+      {{- if (include "common.onServiceMesh" . | nindent 6 ) }}
+      annotations:
+      {{- if eq ( .Values.global.serviceMesh.engine ) "linkerd" }}
+        linkerd.io/inject: disabled
+      {{- end }}
+      {{- if eq ( .Values.global.serviceMesh.engine ) "istio" }}
+          traffic.sidecar.istio.io/excludeInboundPorts: "8080,8443"
+          traffic.sidecar.istio.io/includeInboundPorts: '*'
+      {{- end }}
+      {{- end }}
     spec:
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
       initContainers:
       {{ include "common.readinessCheck.waitFor" . | indent 6 | trim }}
       containers:
-      - name: {{ .Values.deploymentProxy.name }}
-        image: {{ .Values.deploymentProxy.image }}
-        imagePullPolicy: {{ .Values.deploymentProxy.pullPolicy }}
-        args:
-        - --secure-listen-address=0.0.0.0:8443
-        - --upstream=http://127.0.0.1:8080/
-        - --logtostderr=true
-        - --v=10
-        ports:
-        - containerPort: 8443
-          name: https
-        resources:
-          limits:
-            cpu: {{ .Values.deploymentProxy.resources.limits.cpu }}
-            memory: {{ .Values.deploymentProxy.resources.limits.memory }}
-          requests:
-            cpu: {{ .Values.deploymentProxy.resources.requests.cpu }}
-            memory: {{ .Values.deploymentProxy.resources.requests.memory }}
       - name: provider
         image: {{ .Values.global.repository }}{{if .Values.global.repository }}/{{ end }}{{ .Values.deployment.image }}
         imagePullPolicy: {{ .Values.deployment.pullPolicy }}