[MULTICLOUD] Update chart with service account
[oom.git] / kubernetes / multicloud / templates / deployment.yaml
index 5ae5fd9..34fe622 100644 (file)
@@ -1,5 +1,6 @@
 {{/*
 # Copyright © 2017 Amdocs, Bell Canada
+# Modifications Copyright © 2018 AT&T
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -14,7 +15,7 @@
 # limitations under the License.
 */}}
 
-apiVersion: extensions/v1beta1
+apiVersion: apps/v1
 kind: Deployment
 metadata:
   name: {{ include "common.fullname" . }}
@@ -22,7 +23,7 @@ metadata:
   labels:
     app: {{ include "common.name" . }}
     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ .Release.Name }}
+    release: {{ include "common.release" . }}
     heritage: {{ .Release.Service }}
 spec:
   replicas: {{ .Values.replicaCount }}
@@ -33,11 +34,13 @@ spec:
     metadata:
       labels:
         app: {{ include "common.name" . }}
-        release: {{ .Release.Name }}
+        release: {{ include "common.release" . }}
       name: {{ include "common.name" . }}
     spec:
      containers:
      - env:
+       - name: MSB_PROTO
+         value: {{ .Values.config.msbprotocol }}
        - name: MSB_ADDR
          value: {{ .Values.config.msbgateway }}.{{ include "common.namespace" . }}
        - name: MSB_PORT
@@ -52,7 +55,11 @@ spec:
          value: "{{ .Values.config.aai.username }}"
        - name: AAI_PASSWORD
          value: "{{ .Values.config.aai.password }}"
-       image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+       - name: SSL_ENABLED
+         value: "{{ .Values.config.ssl_enabled }}"
+       resources:
+{{ include "common.resources" . | indent 12 }}
+       image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
        name: {{ include "common.name" . }}
        volumeMounts:
@@ -73,7 +80,7 @@ spec:
          httpGet:
            path: /api/multicloud/v0/swagger.json
            port: {{ .Values.service.internalPort }}
-           scheme: HTTP
+           scheme: HTTPS
          initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
          periodSeconds: {{ .Values.liveness.periodSeconds }}
          timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
@@ -82,7 +89,7 @@ spec:
        {{ end -}}
 
       # side car containers
-     - image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
+     - image: {{ include "repositoryGenerator.image.logging" . }}
        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
        name: filebeat-onap
        volumeMounts:
@@ -93,17 +100,7 @@ spec:
          name: framework-log
        - mountPath: /usr/share/filebeat/data
          name: framework-data-filebeat
-       resources:
-{{ toYaml .Values.resources | indent 12 }}
-        {{- if .Values.nodeSelector }}
-     nodeSelector:
-{{ toYaml .Values.nodeSelector | indent 10 }}
-     {{- end -}}
-     {{- if .Values.affinity }}
-     affinity:
-{{ toYaml .Values.affinity | indent 10 }}
-     {{- end }}
-
+     serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
      volumes:
      - name: framework-log
        emptyDir: {}