X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Faaf%2Fcomponents%2Faaf-cass%2Ftemplates%2Fdeployment.yaml;h=4e18b3b7462cff55fe14dd634af2fafc61f392d8;hb=8c26e59d30a185186cf33988a0dbb859409f73eb;hp=309a9f38c6d206b650f4bbbd33c48ccef46d990c;hpb=aad7c5668dd54b927c85905dc192dd56bdd85417;p=oom.git diff --git a/kubernetes/aaf/components/aaf-cass/templates/deployment.yaml b/kubernetes/aaf/components/aaf-cass/templates/deployment.yaml index 309a9f38c6..4e18b3b746 100644 --- a/kubernetes/aaf/components/aaf-cass/templates/deployment.yaml +++ b/kubernetes/aaf/components/aaf-cass/templates/deployment.yaml @@ -1,3 +1,4 @@ +{{/* # Copyright © 2017 Amdocs, Bell Canada # Modifications © 2020 Orange # @@ -12,6 +13,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +*/}} apiVersion: apps/v1 kind: Deployment @@ -29,13 +31,23 @@ spec: args: - -c - | - chown -R 1000:1000 /opt/app/aaf/status + echo "*** Move files from configmap to emptyDir" + cp -L /config-input-dats/* /config-dats/ + echo "*** set righ user to the different folders" + chown -R 1000:1000 /config-dats chown -R 1000:1000 /var/lib/cassandra - image: "{{ .Values.global.busyboxRepository }}/{{ .Values.global.busyboxImage }}" + chown -R 1000:1000 /status + image: {{ include "repositoryGenerator.image.busybox" . }} imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} volumeMounts: - mountPath: /var/lib/cassandra name: aaf-cass-vol + - mountPath: /config-input-dats + name: config-cass-init-dats + - mountPath: /config-dats + name: config-cass-dats + - mountPath: /status + name: aaf-status resources: limits: cpu: 100m @@ -45,7 +57,7 @@ spec: memory: 100Mi containers: - name: {{ include "common.name" . }} - image: {{ include "common.repository" . }}/{{ .Values.image }} + image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }} imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} # installing with cmd "onap" will not only initialize the DB, but add ONAP bootstrap data as well command: ["/bin/bash","/opt/app/aaf/cass_init/cmd.sh","onap"] @@ -79,6 +91,10 @@ spec: - mountPath: /etc/localtime name: localtime readOnly: true + - mountPath: /opt/app/aaf/cass_init/dats + name: config-cass-dats + - mountPath: /opt/app/aaf/status + name: aaf-status {{- if eq .Values.liveness.enabled true }} livenessProbe: tcpSocket: @@ -102,6 +118,8 @@ spec: - name: localtime hostPath: path: /etc/localtime + - name: aaf-status + emptyDir: {} - name: aaf-cass-vol {{- if .Values.persistence.enabled }} persistentVolumeClaim: @@ -109,5 +127,10 @@ spec: {{- else }} emptyDir: {} {{- end }} + - name: config-cass-init-dats + configMap: + name: {{ include "common.fullname" . }}-cass-init-dats + - name: config-cass-dats + emptyDir: {} imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key"