X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Faai%2Fcharts%2Faai-traversal%2Ftemplates%2Fjob.yaml;h=e2fe395b957c84ba9e2daa56ea783cf44a97a75d;hb=4b87df1b8c54808e4bc8ccbd4bc97bb716c3f0e6;hp=46af0047f762813005dd02adb0fc0f9579f5f469;hpb=4121cae170b40fe3319974d2bcebc2d3ca507672;p=oom.git diff --git a/kubernetes/aai/charts/aai-traversal/templates/job.yaml b/kubernetes/aai/charts/aai-traversal/templates/job.yaml index 46af0047f7..e2fe395b95 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: @@ -36,6 +39,10 @@ spec: args: - --container-name - aai + {{ if eq .Values.global.aafEnabled true }} + - --container-name + - aaf-locate + {{ end }} env: - name: NAMESPACE valueFrom: @@ -55,12 +62,13 @@ spec: - | set -x mkdir -p /opt/aai/logroot/AAI-GQ/misc + until nc -w10 -z -v aai.{{.Release.Namespace}} 8443; do echo "Retrying to reach aai on port 8443"; done; 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 @@ -74,7 +82,7 @@ spec: - mountPath: /opt/app/aai-traversal/resources/etc/appprops/aaiconfig.properties name: {{ include "common.fullname" . }}-aaiconfig-conf subPath: aaiconfig.properties - - mountPath: /var/log/onap + - mountPath: /opt/aai/logroot/AAI-GQ/ name: {{ include "common.fullname" . }}-logs - mountPath: /opt/app/aai-traversal/resources/logback.xml name: {{ include "common.fullname" . }}-log-conf @@ -85,9 +93,12 @@ 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 volumes: @@ -123,9 +134,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: aai-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 }}