X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Fvfc%2Fcharts%2Fvfc-catalog%2Ftemplates%2Fdeployment.yaml;h=8e5d097e40da45c600e24d49e479d40c33f1d560;hb=a1f85b8cf2438c8096de910687a4621b94df3165;hp=3b6f00bf36ffd7a9305d04ed837c6c5427d03124;hpb=50accc82ad5fbec81c63d015b8b45263cf74ee59;p=oom.git diff --git a/kubernetes/vfc/charts/vfc-catalog/templates/deployment.yaml b/kubernetes/vfc/charts/vfc-catalog/templates/deployment.yaml index 3b6f00bf36..8e5d097e40 100644 --- a/kubernetes/vfc/charts/vfc-catalog/templates/deployment.yaml +++ b/kubernetes/vfc/charts/vfc-catalog/templates/deployment.yaml @@ -20,7 +20,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 }} @@ -28,24 +28,25 @@ spec: metadata: labels: app: {{ include "common.name" . }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} + annotations: + sidecar.istio.io/inject: "{{.Values.istioSidecar}}" spec: initContainers: -#Example init container for dependency checking -# - command: -# - /root/ready.py -# args: -# - --container-name -# - mariadb -# env: -# - name: NAMESPACE -# valueFrom: -# fieldRef: -# apiVersion: v1 -# fieldPath: metadata.namespace -# image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" -# imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} -# name: {{ include "common.name" . }}-readiness + - command: + - /root/ready.py + args: + - --container-name + - vfc-mariadb + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + name: {{ include "common.name" . }}-readiness containers: - name: {{ include "common.name" . }} image: "{{ include "common.repository" . }}/{{ .Values.image }}" @@ -67,9 +68,21 @@ spec: initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} periodSeconds: {{ .Values.readiness.periodSeconds }} env: + - name: MSB_PROTO + value: "{{ .Values.global.config.msbprotocol }}" + - name: SSL_ENABLED + value: "{{ .Values.global.config.ssl_enabled }}" - name: MSB_ADDR - value: "{{ .Release.Name }}-msb-iag.{{ include "common.namespace" . }}:{{ .Values.config.msbPort }}" + value: "{{ .Values.global.config.msbServiceName }}:{{ .Values.global.config.msbPort }}" + - name: MYSQL_ADDR + value: "{{ .Values.global.config.dbServiceName }}:{{ .Values.global.config.dbPort }}" + - name: MYSQL_AUTH + value: "{{ .Values.global.config.dbUser }}:{{ .Values.global.config.mariadbRootPassword }}" + - name: REDIS_ADDR + value: "{{ .Values.global.config.redisServiceName }}:{{ .Values.global.config.redisPort }}" volumeMounts: + - name: {{ include "common.fullname" . }}-catalog + mountPath: /service/vfc/nfvo/catalog/static - name: {{ include "common.fullname" . }}-localtime mountPath: /etc/localtime readOnly: true @@ -79,7 +92,7 @@ spec: mountPath: /opt/vfc/catalog/config/log.yml subPath: log.yml resources: -{{ toYaml .Values.resources | indent 12 }} +{{ include "common.resources" . | indent 12 }} {{- if .Values.nodeSelector }} nodeSelector: {{ toYaml .Values.nodeSelector | indent 10 }} @@ -103,6 +116,13 @@ spec: mountPath: /usr/share/filebeat/data volumes: + - name: {{ include "common.fullname" . }}-catalog + {{- if .Values.persistence.enabled }} + persistentVolumeClaim: + claimName: {{ include "common.fullname" . }} + {{- else }} + emptyDir: {} + {{- end }} - name: {{ include "common.fullname" . }}-localtime hostPath: path: /etc/localtime @@ -114,7 +134,7 @@ spec: - name: {{ include "common.fullname" . }}-filebeat-conf configMap: - name: {{ .Release.Name }}-vfc-filebeat-configmap + name: {{ include "common.release" . }}-vfc-filebeat-configmap - name: {{ include "common.fullname" . }}-data-filebeat emptyDir: {} imagePullSecrets: