X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Fmulticloud%2Ftemplates%2Fdeployment.yaml;h=ff9dac189804d9a6c753f9c4aa0c340156c3d934;hb=dfa23c83cc8630915824968ba7b043ef968e38b6;hp=5ae5fd9da5f40810a86ce2deb83603f3a5aa4c92;hpb=adec0ca4af857e52d689faae9520547d9ad26d73;p=oom.git diff --git a/kubernetes/multicloud/templates/deployment.yaml b/kubernetes/multicloud/templates/deployment.yaml index 5ae5fd9da5..ff9dac1898 100644 --- a/kubernetes/multicloud/templates/deployment.yaml +++ b/kubernetes/multicloud/templates/deployment.yaml @@ -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,30 +34,36 @@ 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: "{{ if (include "common.needTLS" .) }}https{{ else }}http{{ end }}" - name: MSB_ADDR - value: {{ .Values.config.msbgateway }}.{{ include "common.namespace" . }} + value: "{{ .Values.config.msbgateway }}.{{ include "common.namespace" . }}" - name: MSB_PORT - value: "{{ .Values.config.msbPort }}" + value: "{{- if (include "common.needTLS" .) }}{{ .Values.config.msbPort }}{{ else }}{{ .Values.config.msbPlainPort }}{{ end }}" - name: AAI_ADDR value: "aai.{{ include "common.namespace" . }}" - name: AAI_PORT - value: "{{ .Values.config.aai.port }}" + value: "{{- if (include "common.needTLS" .) }}{{ .Values.config.aai.aaiPort }}{{ else }}{{ .Values.config.aai.aaiPlainPort }}{{ end }}" - name: AAI_SCHEMA_VERSION value: "{{ .Values.config.aai.schemaVersion }}" - name: AAI_USERNAME value: "{{ .Values.config.aai.username }}" - name: AAI_PASSWORD value: "{{ .Values.config.aai.password }}" - image: "{{ include "common.repository" . }}/{{ .Values.image }}" + - name: SSL_ENABLED + value: "{{- if (include "common.needTLS" .) }}{{ .Values.config.ssl_enabled }}{{ else }}false{{ end }}" + resources: +{{ include "common.resources" . | indent 12 }} + image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }} imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} name: {{ include "common.name" . }} volumeMounts: - - mountPath: /var/log/onap + - mountPath: "{{ .Values.log.path }}" name: framework-log - mountPath: /opt/multivimbroker/multivimbroker/pub/config/log.yml name: framework-logconfig @@ -73,7 +80,7 @@ spec: httpGet: path: /api/multicloud/v0/swagger.json port: {{ .Values.service.internalPort }} - scheme: HTTP + scheme: "{{ if (include "common.needTLS" .) }}HTTPS{{ else }}HTTP{{ end }}" initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} periodSeconds: {{ .Values.liveness.periodSeconds }} timeoutSeconds: {{ .Values.liveness.timeoutSeconds }} @@ -82,39 +89,15 @@ spec: {{ end -}} # side car containers - - image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}" - imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} - name: filebeat-onap - volumeMounts: - - mountPath: /usr/share/filebeat/filebeat.yml - name: filebeat-conf - subPath: filebeat.yml - - mountPath: /var/log/onap - 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 }} - + {{ include "common.log.sidecar" . | nindent 5 }} + serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}} volumes: - name: framework-log emptyDir: {} - name: provider-plugin configMap: name: {{ include "common.fullname" . }}-provider-plugin-configmap - - name: framework-data-filebeat - emptyDir: {} - - name: filebeat-conf - configMap: - name: multicloud-filebeat-configmap + {{ include "common.log.volumes" . | nindent 5 }} - name: framework-logconfig configMap: name: {{ include "common.fullname" . }}-log-configmap