Merge "[SDC] Bring back sdc onboarding volume mount permissions"
[oom.git] / kubernetes / multicloud / charts / multicloud-k8s / templates / deployment.yaml
index 846a751..a64324a 100644 (file)
@@ -14,7 +14,7 @@
 # limitations under the License.
 */}}
 
-apiVersion: extensions/v1beta1
+apiVersion: apps/v1
 kind: Deployment
 metadata:
   name: {{ include "common.fullname" . }}
@@ -22,15 +22,18 @@ metadata:
   labels:
     app: {{ include "common.name" . }}
     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ .Release.Name }}
+    release: {{ include "common.release" . }}
     heritage: {{ .Release.Service }}
 spec:
+  selector:
+    matchLabels:
+      app: {{ include "common.name" . }}
   replicas: {{ .Values.replicaCount }}
   template:
     metadata:
       labels:
         app: {{ include "common.name" . }}
-        release: {{ .Release.Name }}
+        release: {{ include "common.release" . }}
     spec:
       containers:
       - image: "{{ include "common.repository" . }}/{{ .Values.image }}"
@@ -69,6 +72,20 @@ spec:
         affinity:
 {{ toYaml .Values.affinity | indent 10 }}
         {{- end }}
+      - image: "{{ include "common.repository" . }}/{{ .Values.global.artifactImage }}"
+        name: framework-artifactbroker
+        command: ["/opt/app/distribution/bin/artifact-dist.sh"]
+        args: ["/opt/app/distribution/etc/mounted/config.json"]
+        ports:
+        - containerPort: {{ .Values.artifactbroker.internalPort }}
+          protocol: TCP
+        volumeMounts:
+        - mountPath: /opt/app/distribution/etc/mounted/config.json
+          name: {{ include "common.name" .}}
+          subPath: config.json
+        - mountPath: /data
+          name: artifact-data
+
       volumes:
       - name: localtime
         hostPath:
@@ -76,5 +93,7 @@ spec:
       - name : {{ include "common.name" . }}
         configMap:
           name: {{ include "common.fullname" . }}
+      - name: artifact-data
+        emptyDir: {}
       imagePullSecrets:
       - name: "{{ include "common.namespace" . }}-docker-registry-key"