Merge "Fix nodeSlector and Affinity for aai charts"
[oom.git] / kubernetes / aai / charts / aai-traversal / templates / deployment.yaml
index a571e42..4f97f4a 100644 (file)
@@ -70,6 +70,17 @@ spec:
               "visualRange": "1",
               "path": "/aai/v13/search/generic-query"
           },
+          {
+              "serviceName": "_aai-generic-query",
+              "version": "v14",
+              "url": "/aai/v14/search/generic-query",
+              "protocol": "REST",
+              "port": "8446",
+              "enable_ssl": true,
+              "lb_policy":"ip_hash",
+              "visualRange": "1",
+              "path": "/aai/v14/search/generic-query"
+          },
           {
               "serviceName": "_aai-nodes-query",
               "version": "v11",
@@ -103,6 +114,17 @@ spec:
               "visualRange": "1",
               "path": "/aai/v13/search/nodes-query"
           },
+          {
+              "serviceName": "_aai-nodes-query",
+              "version": "v14",
+              "url": "/aai/v14/search/nodes-query",
+              "protocol": "REST",
+              "port": "8446",
+              "enable_ssl": true,
+              "lb_policy":"ip_hash",
+              "visualRange": "1",
+              "path": "/aai/v14/search/nodes-query"
+          },
           {
               "serviceName": "_aai-query",
               "version": "v11",
@@ -136,6 +158,17 @@ spec:
               "visualRange": "1",
               "path": "/aai/v13/query"
           },
+          {
+              "serviceName": "_aai-query",
+              "version": "v14",
+              "url": "/aai/v14/query",
+              "protocol": "REST",
+              "port": "8446",
+              "enable_ssl": true,
+              "lb_policy":"ip_hash",
+              "visualRange": "1",
+              "path": "/aai/v14/query"
+          },
           {
               "serviceName": "_aai-named-query",
               "url": "/aai/search",
@@ -176,6 +209,16 @@ spec:
               "lb_policy":"ip_hash",
               "visualRange": "1"
           },
+          {
+              "serviceName": "aai-generic-query",
+              "version": "v14",
+              "url": "/aai/v14/search/generic-query",
+              "protocol": "REST",
+              "port": "8446",
+              "enable_ssl": true,
+              "lb_policy":"ip_hash",
+              "visualRange": "1"
+          },
           {
               "serviceName": "aai-nodes-query",
               "version": "v11",
@@ -206,6 +249,16 @@ spec:
               "lb_policy":"ip_hash",
               "visualRange": "1"
           },
+          {
+              "serviceName": "aai-nodes-query",
+              "version": "v14",
+              "url": "/aai/v14/search/nodes-query",
+              "protocol": "REST",
+              "port": "8446",
+              "enable_ssl": true,
+              "lb_policy":"ip_hash",
+              "visualRange": "1"
+          },
           {
               "serviceName": "aai-query",
               "version": "v11",
@@ -236,6 +289,16 @@ spec:
               "lb_policy":"ip_hash",
               "visualRange": "1"
           },
+          {
+              "serviceName": "aai-query",
+              "version": "v14",
+              "url": "/aai/v14/query",
+              "protocol": "REST",
+              "port": "8446",
+              "enable_ssl": true,
+              "lb_policy":"ip_hash",
+              "visualRange": "1"
+          },
           {
               "serviceName": "aai-named-query",
               "url": "/aai/search",
@@ -248,14 +311,22 @@ spec:
           ]'
     spec:
       hostname: aai-traversal
+    {{ 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
         - --container-name
-        - aai-resources
+        - aai-schema-service
+      {{  end  }}
         env:
         - name: NAMESPACE
           valueFrom:
@@ -265,6 +336,7 @@ 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 }}"
@@ -273,9 +345,9 @@ spec:
         - name: DISABLE_UPDATE_QUERY
           value: {{ .Values.config.disableUpdateQuery | quote }}
         - 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
@@ -297,12 +369,42 @@ spec:
         - mountPath: /opt/app/aai-traversal/resources/localhost-access-logback.xml
           name: {{ include "common.fullname" . }}-localhost-access-log-conf
           subPath: localhost-access-logback.xml
+        - mountPath: /opt/app/aai-traversal/resources/etc/auth/realm.properties
+          name: {{ include "common.fullname" . }}-realm-conf
+          subPath: realm.properties
+        - mountPath: /opt/app/aai-traversal/resources/aaf/org.onap.aai.keyfile
+          name: {{ include "common.fullname" . }}-aaf-certs
+          subPath: org.onap.aai.keyfile
+        - mountPath: /opt/app/aai-traversal/resources/aaf/bath_config.csv
+          name: {{ include "common.fullname" . }}-aaf-certs
+          subPath: bath_config.csv
+        - mountPath: /opt/app/aai-traversal/resources/aaf/org.onap.aai.props
+          name: {{ include "common.fullname" . }}-aaf-properties
+          subPath: org.onap.aai.props
+        - mountPath: /opt/app/aai-traversal/resources/aaf/org.osaaf.location.props
+          name: {{ include "common.fullname" . }}-aaf-properties
+          subPath: org.osaaf.location.props
+        - mountPath: /opt/app/aai-traversal/resources/aaf/permissions.properties
+          name: {{ include "common.fullname" . }}-aaf-properties
+          subPath: permissions.properties
+        - mountPath: /opt/app/aai-traversal/resources/cadi.properties
+          name: {{ include "common.fullname" . }}-aaf-properties
+          subPath: cadi.properties
+        - mountPath: /opt/app/aai-traversal/resources/aaf/org.onap.aai.p12
+          name: {{ include "common.fullname" . }}-aaf-certs
+          subPath: org.onap.aai.p12
+        - mountPath: /opt/app/aai-traversal/resources/aaf/truststoreONAPall.jks
+          name: aai-common-aai-auth-mount
+          subPath: truststoreONAPall.jks
         - 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 }}
         ports:
         - containerPort: {{ .Values.service.internalPort }}
         - containerPort: {{ .Values.service.internalPort2 }}
@@ -321,7 +423,7 @@ spec:
           initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
           periodSeconds: {{ .Values.readiness.periodSeconds }}
         resources:
-{{ toYaml .Values.resources | indent 10 }}
+{{ include "common.resources" . }}
       {{- if .Values.nodeSelector }}
       nodeSelector:
 {{ toYaml .Values.nodeSelector | indent 8 }}
@@ -343,6 +445,8 @@ spec:
           name: {{ include "common.fullname" . }}-logs
         - mountPath: /usr/share/filebeat/data
           name: {{ include "common.fullname" . }}-filebeat
+        resources:
+{{ include "common.resources" . }}
       volumes:
       - name: localtime
         hostPath:
@@ -369,15 +473,29 @@ 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: aai-common-aai-auth-mount
+        secret:
+          secretName: aai-common-aai-auth
       - 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-common-truststore
+         items:
+          {{ range $job := .Values.global.config.auth.files }}
+           - key: {{ . }}
+             path: {{ . }}
+          {{ end }}
       restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }}
       imagePullSecrets:
       - name: "{{ include "common.namespace" . }}-docker-registry-key"