X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Fmodeling%2Fcharts%2Fmodeling-etsicatalog%2Ftemplates%2Fdeployment.yaml;h=52d675a39e933a14bf42bf6412b85632a4effc12;hb=9ca9753f16d9f1fbea0f8178ac0f8cecd437aa62;hp=08d5e139b11f930501cf434e0797f8875bd352ee;hpb=efa45c96126380016456fb2ae4f9acdc4166751b;p=oom.git diff --git a/kubernetes/modeling/charts/modeling-etsicatalog/templates/deployment.yaml b/kubernetes/modeling/charts/modeling-etsicatalog/templates/deployment.yaml index 08d5e139b1..52d675a39e 100644 --- a/kubernetes/modeling/charts/modeling-etsicatalog/templates/deployment.yaml +++ b/kubernetes/modeling/charts/modeling-etsicatalog/templates/deployment.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "common.fullname" . }} @@ -20,33 +20,47 @@ 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" . }} annotations: sidecar.istio.io/inject: "{{.Values.istioSidecar}}" spec: initContainers: - command: - - /root/ready.py + - /app/ready.py args: - - --container-name - - modeling-mariadb + - -j + - "{{ include "common.release" . }}-{{ include "common.name" . }}-config-job" env: - name: NAMESPACE valueFrom: fieldRef: apiVersion: v1 fieldPath: metadata.namespace - image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} - name: {{ include "common.name" . }}-readiness + name: {{ include "common.name" . }}-job-readiness + {{ include "common.readinessCheck.waitFor" (dict "dot" . "wait_for" .Values.readinessCheck.wait_for.msb ) | indent 6 | trim }} + - command: + - /bin/sh + - -c + - chown -R 1000:1000 /service/modeling/etsicatalog/static + image: "{{ include "common.repository" . }}/{{ .Values.initImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + name: {{ include "common.name" . }}-init + volumeMounts: + - name: {{ include "common.fullname" . }}-etsicatalog + mountPath: /service/modeling/etsicatalog/static containers: - name: {{ include "common.name" . }} image: "{{ include "common.repository" . }}/{{ .Values.image }}" @@ -68,14 +82,20 @@ spec: initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} periodSeconds: {{ .Values.readiness.periodSeconds }} 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 }}" + - name: MSB_ADDR + value: "{{ .Values.config.msbProtocol }}://{{ .Values.config.msbServiceName }}:{{ .Values.config.msbPort }}" + - name: SSL_ENABLED + value: "{{ .Values.config.ssl_enabled }}" + - name: MSB_ENABLED + value: "{{ .Values.config.msb_enabled }}" + - name: DB_IP + value: "{{ include "common.mariadbService" . }}" + - name: DB_PORT + value: "{{ include "common.mariadbPort" . }}" + - name: DB_USER + {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "modeling-db-secret" "key" "login") | indent 12 }} + - name: DB_PASSWD + {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "modeling-db-secret" "key" "password") | indent 12 }} volumeMounts: - name: {{ include "common.fullname" . }}-etsicatalog mountPath: /service/modeling/etsicatalog/static @@ -130,7 +150,7 @@ spec: - name: {{ include "common.fullname" . }}-filebeat-conf configMap: - name: {{ .Release.Name }}-modeling-filebeat-configmap + name: {{ include "common.release" . }}-modeling-filebeat-configmap - name: {{ include "common.fullname" . }}-data-filebeat emptyDir: {} imagePullSecrets: