X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Faai%2Fcharts%2Faai-resources%2Ftemplates%2Fdeployment.yaml;h=7df214f321a7c6278772d0eeb1fcd104316782d3;hb=b350b9446f7ca93686b6405b13b35c49e1035698;hp=c6bb14c4a221d2d3f290e51184280622026ecb3e;hpb=a6e320f7ff89eb9c1419b2b43320c8e3e673776d;p=oom.git diff --git a/kubernetes/aai/charts/aai-resources/templates/deployment.yaml b/kubernetes/aai/charts/aai-resources/templates/deployment.yaml index c6bb14c4a2..7df214f321 100644 --- a/kubernetes/aai/charts/aai-resources/templates/deployment.yaml +++ b/kubernetes/aai/charts/aai-resources/templates/deployment.yaml @@ -1,4 +1,5 @@ # Copyright © 2017 Amdocs, Bell Canada +# Modifications Copyright © 2018 AT&T # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -417,12 +418,20 @@ spec: ]' spec: hostname: aai-resources + {{ if .Values.global.initContainers.enabled }} initContainers: - command: + {{ if .Values.global.jobs.createSchema.enabled }} + - /root/job_complete.py + args: + - --job-name + - {{ .Release.Name }}-aai-graphadmin-create-db-schema + {{ else }} - /root/ready.py args: - --container-name - aai-cassandra + {{ end }} env: - name: NAMESPACE valueFrom: @@ -432,15 +441,16 @@ spec: image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} name: {{ include "common.name" . }}-readiness + {{ end }} containers: - name: {{ include "common.name" . }} image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} env: - name: LOCAL_USER_ID - value: {{ .Values.config.userId | quote }} + value: {{ .Values.global.config.userId | quote }} - name: LOCAL_GROUP_ID - value: {{ .Values.config.groupId | quote }} + value: {{ .Values.global.config.groupId | quote }} volumeMounts: - mountPath: /etc/localtime name: localtime @@ -462,12 +472,36 @@ spec: - mountPath: /opt/app/aai-resources/resources/localhost-access-logback.xml name: {{ include "common.fullname" . }}-localhost-access-log-conf subPath: localhost-access-logback.xml + - mountPath: /opt/app/aai-resources/resources/aaf/org.onap.aai.keyfile + name: {{ include "common.fullname" . }}-aaf-certs + subPath: org.onap.aai.keyfile + - mountPath: /opt/app/aai-resources/resources/aaf/org.onap.aai.props + name: {{ include "common.fullname" . }}-aaf-properties + subPath: org.onap.aai.props + - mountPath: /opt/app/aai-resources/resources/aaf/org.osaaf.location.props + name: {{ include "common.fullname" . }}-aaf-properties + subPath: org.osaaf.location.props + - mountPath: /opt/app/aai-resources/resources/aaf/permissions.properties + name: {{ include "common.fullname" . }}-aaf-properties + subPath: permissions.properties + - mountPath: /opt/app/aai-resources/resources/cadi.properties + name: {{ include "common.fullname" . }}-aaf-properties + subPath: cadi.properties + - mountPath: /opt/app/aai-resources/resources/aaf/org.onap.aai.p12 + name: {{ include "common.fullname" . }}-aaf-certs + subPath: org.onap.aai.p12 + - mountPath: /opt/app/aai-resources/resources/aaf/truststoreONAPall.jks + name: {{ include "common.fullname" . }}-aaf-certs + subPath: truststoreONAPall.jks - mountPath: /opt/app/aai-resources/resources/application.properties name: {{ include "common.fullname" . }}-springapp-conf subPath: application.properties - - mountPath: /opt/app/aai-resources/resources/etc/auth/aai_keystore - name: {{ include "common.fullname" . }}-auth-sec - subPath: aai_keystore + {{ $global := . }} + {{ range $job := .Values.global.config.auth.files }} + - mountPath: /opt/app/aai-resources/resources/etc/auth/{{ . }} + name: {{ include "common.fullname" $global }}-auth-truststore-sec + subPath: {{ . }} + {{ end }} ports: - containerPort: {{ .Values.service.internalPort }} - containerPort: {{ .Values.service.internalPort2 }} @@ -535,15 +569,26 @@ spec: - name: {{ include "common.fullname" . }}-aaiconfig-conf configMap: name: {{ include "common.fullname" . }}-aaiconfig-configmap + - name: {{ include "common.fullname" . }}-aaf-properties + configMap: + name: {{ include "common.fullname" . }}-aaf-props + - name: {{ include "common.fullname" . }}-aaf-certs + secret: + secretName: {{ include "common.fullname" . }}-aaf-keys - name: {{ include "common.fullname" . }}-springapp-conf configMap: name: {{ include "common.fullname" . }}-springapp-configmap - name: {{ include "common.fullname" . }}-realm-conf configMap: name: {{ include "common.fullname" . }}-realm-configmap - - name: {{ include "common.fullname" . }}-auth-sec + - name: {{ include "common.fullname" . }}-auth-truststore-sec secret: - secretName: aai-auth-secret + secretName: aai-auth-truststore-secret + items: + {{ range $job := .Values.global.config.auth.files }} + - key: {{ . }} + path: {{ . }} + {{ end }} restartPolicy: {{ .Values.restartPolicy }} imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key"