X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Fvfc%2Fcharts%2Fvfc-catalog%2Ftemplates%2Fdeployment.yaml;h=1849c46ea1fe5f2a26c7018d6a27f03ba19eeb29;hb=e9871c59fce3da4f1a8f0e83fa1b4031f47fef43;hp=084c320e319e8ea32d65dda06f86877af2005cf0;hpb=53e5783c293b768caaecec7961bfaf7d18c0a0b0;p=oom.git diff --git a/kubernetes/vfc/charts/vfc-catalog/templates/deployment.yaml b/kubernetes/vfc/charts/vfc-catalog/templates/deployment.yaml index 084c320e31..1849c46ea1 100644 --- a/kubernetes/vfc/charts/vfc-catalog/templates/deployment.yaml +++ b/kubernetes/vfc/charts/vfc-catalog/templates/deployment.yaml @@ -29,23 +29,24 @@ spec: labels: app: {{ include "common.name" . }} release: {{ .Release.Name }} + 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-db + 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 }}" @@ -69,7 +70,15 @@ spec: env: - name: MSB_ADDR 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 +88,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 +112,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