X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Faai%2Fcharts%2Faai-traversal%2Ftemplates%2Fjob.yaml;h=a018ede1a39d8d3ac8155f3d7feef5ae8e3b2ab3;hb=00107b55f9b831b6bd5834bea34ea7df330e1f30;hp=c15c05398f2e6f102ec12e951ac4600da6944676;hpb=b2e4ea650381d9e109c23a9fe51980655500fb29;p=oom.git diff --git a/kubernetes/aai/charts/aai-traversal/templates/job.yaml b/kubernetes/aai/charts/aai-traversal/templates/job.yaml index c15c05398f..a018ede1a3 100644 --- a/kubernetes/aai/charts/aai-traversal/templates/job.yaml +++ b/kubernetes/aai/charts/aai-traversal/templates/job.yaml @@ -1,4 +1,5 @@ # Copyright © 2017-2018 AT&T +# 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. @@ -12,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +{{ if .Values.global.jobs.updateQueryData.enabled }} + apiVersion: batch/v1 kind: Job metadata: @@ -47,7 +50,7 @@ spec: name: {{ include "common.name" . }}-readiness containers: - name: {{ include "common.name" . }}-job - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} command: - bash @@ -58,9 +61,9 @@ spec: bash -x /opt/app/aai-traversal/docker-entrypoint.sh install/updateQueryData.sh env: - name: LOCAL_USER_ID - value: "1000" + value: {{ .Values.global.config.userId | quote }} - name: LOCAL_GROUP_ID - value: "1000" + value: {{ .Values.global.config.groupId | quote }} volumeMounts: - mountPath: /etc/localtime name: localtime @@ -85,19 +88,14 @@ spec: - mountPath: /opt/app/aai-traversal/resources/application.properties name: {{ include "common.fullname" . }}-springapp-conf subPath: application.properties - - mountPath: /opt/app/aai-traversal/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-traversal/resources/etc/auth/{{ . }} + name: {{ include "common.fullname" $global }}-auth-truststore-sec + subPath: {{ . }} + {{ end }} # disable liveness probe when breakpoints set in debugger # so K8s doesn't restart unresponsive container - volumeMounts: - - mountPath: /usr/share/filebeat/filebeat.yml - subPath: filebeat.yml - name: filebeat-conf - - mountPath: /opt/aai/logroot/AAI-GQ - name: {{ include "common.fullname" . }}-logs - - mountPath: /usr/share/filebeat/data - name: {{ include "common.fullname" . }}-filebeat volumes: - name: localtime hostPath: @@ -107,7 +105,7 @@ spec: name: aai-filebeat - name: {{ include "common.fullname" . }}-logs hostPath: - path: {{ .Values.persistence.mountPath }}/{{ include "common.namespace" . }}/{{ .Values.persistence.mountSubPath }}-update-query + path: {{ .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}-update-query - name: {{ include "common.fullname" . }}-filebeat emptyDir: {} - name: {{ include "common.fullname" . }}-log-conf @@ -131,9 +129,15 @@ spec: - 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: {{ include "common.fullname" . }}-auth-secret + secretName: aai-auth-truststore-secret + items: + {{ range $job := .Values.global.config.auth.files }} + - key: {{ . }} + path: {{ . }} + {{ end }} restartPolicy: OnFailure imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" +{{ end }}