X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Fdcaegen2%2Fcharts%2Fdcae-cloudify-manager%2Ftemplates%2Fdeployment.yaml;h=d6c58cd75f1f05a6c93621d41827ebbd8c47d85e;hb=ecc9f60e3853fa4a15de3adb3b1823ec73f5b619;hp=acda520192b851395054ead22a5e8cbfe06abd25;hpb=a6e320f7ff89eb9c1419b2b43320c8e3e673776d;p=oom.git diff --git a/kubernetes/dcaegen2/charts/dcae-cloudify-manager/templates/deployment.yaml b/kubernetes/dcaegen2/charts/dcae-cloudify-manager/templates/deployment.yaml index acda520192..d6c58cd75f 100644 --- a/kubernetes/dcaegen2/charts/dcae-cloudify-manager/templates/deployment.yaml +++ b/kubernetes/dcaegen2/charts/dcae-cloudify-manager/templates/deployment.yaml @@ -1,7 +1,7 @@ #============LICENSE_START======================================================== # ================================================================================ # Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. -# Copyright © 2018 Amdocs, Bell Canada +# Modifications Copyright © 2018 Amdocs, Bell Canada # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -34,10 +34,22 @@ spec: app: {{ include "common.name" . }} release: {{ .Release.Name }} spec: + initContainers: + - name: {{ include "common.name" . }}-multisite-init + image: {{ include "common.repository" . }}/{{ .Values.multisiteInitImage }} + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + args: + - --namespace + - {{ include "common.namespace" . }} + - --configmap + - {{ .Values.multisiteConfigMapName }} + restartPolicy: Never containers: - name: {{ include "common.name" . }} image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + resources: +{{ include "common.resources" . | indent 12 }} ports: - containerPort: {{ .Values.service.internalPort }} # disable liveness probe when breakpoints set in debugger @@ -48,10 +60,11 @@ spec: port: {{ .Values.service.internalPort }} initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} periodSeconds: {{ .Values.liveness.periodSeconds }} - {{ end -}} + {{ end }} readinessProbe: - tcpSocket: - port: {{ .Values.service.internalPort }} + exec: + command: + - /scripts/readiness-check.sh initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} periodSeconds: {{ .Values.readiness.periodSeconds }} volumeMounts: @@ -59,6 +72,9 @@ spec: subPath: config.txt name: {{ include "common.fullname" .}}-config readOnly: true + - mountPath: /opt/onap/kube + name: {{ include "common.fullname" .}}-kubeconfig + readOnly: true - mountPath: /secret name: dcae-token readOnly: true @@ -68,22 +84,17 @@ spec: - mountPath: /etc/localtime name: localtime readOnly: true + - mountPath: /cfy-persist + name: cm-persistent securityContext: privileged: True - lifecycle: - postStart: - exec: - command: - - bash - - "-c" - - | - set -ex - mkdir -p /var/run/secrets/kubernetes.io/ - ln -s /secret /var/run/secrets/kubernetes.io/serviceaccount volumes: - name: {{ include "common.fullname" . }}-config configMap: name: {{ include "common.fullname" . }}-configmap + - name: {{ include "common.fullname" .}}-kubeconfig + configMap: + name: {{ .Values.multisiteConfigMapName }} - name: dcae-token secret: secretName: dcae-token @@ -93,5 +104,8 @@ spec: - name: localtime hostPath: path: /etc/localtime + - name: cm-persistent + persistentVolumeClaim: + claimName: {{ include "common.fullname" . }}-data imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key"