AAI Rolling upgrade using helm hooks
[oom.git] / kubernetes / aai / charts / aai-resources / templates / deployment.yaml
index 8d7b740..d530c3d 100644 (file)
@@ -70,6 +70,39 @@ spec:
               "visualRange": "1",
               "path": "/aai/v13/cloud-infrastructure"
           },
+          {
+              "serviceName": "_aai-cloudInfrastructure",
+              "version": "v14",
+              "url": "/aai/v14/cloud-infrastructure",
+              "protocol": "REST",
+              "port": "8447",
+              "enable_ssl": true,
+              "lb_policy":"ip_hash",
+              "visualRange": "1",
+              "path": "/aai/v14/cloud-infrastructure"
+          },
+          {
+              "serviceName": "_aai-cloudInfrastructure",
+              "version": "v15",
+              "url": "/aai/v15/cloud-infrastructure",
+              "protocol": "REST",
+              "port": "8447",
+              "enable_ssl": true,
+              "lb_policy":"ip_hash",
+              "visualRange": "1",
+              "path": "/aai/v15/cloud-infrastructure"
+          },
+          {
+              "serviceName": "_aai-cloudInfrastructure",
+              "version": "v16",
+              "url": "/aai/v16/cloud-infrastructure",
+              "protocol": "REST",
+              "port": "8447",
+              "enable_ssl": true,
+              "lb_policy":"ip_hash",
+              "visualRange": "1",
+              "path": "/aai/v16/cloud-infrastructure"
+          },
           {
               "serviceName": "_aai-business",
               "version": "v11",
@@ -103,6 +136,39 @@ spec:
               "visualRange": "1",
               "path": "/aai/v13/business"
           },
+          {
+              "serviceName": "_aai-business",
+              "version": "v14",
+              "url": "/aai/v14/business",
+              "protocol": "REST",
+              "port": "8447",
+              "enable_ssl": true,
+              "lb_policy":"ip_hash",
+              "visualRange": "1",
+              "path": "/aai/v14/business"
+          },
+          {
+              "serviceName": "_aai-business",
+              "version": "v15",
+              "url": "/aai/v15/business",
+              "protocol": "REST",
+              "port": "8447",
+              "enable_ssl": true,
+              "lb_policy":"ip_hash",
+              "visualRange": "1",
+              "path": "/aai/v15/business"
+          },
+          {
+              "serviceName": "_aai-business",
+              "version": "v16",
+              "url": "/aai/v16/business",
+              "protocol": "REST",
+              "port": "8447",
+              "enable_ssl": true,
+              "lb_policy":"ip_hash",
+              "visualRange": "1",
+              "path": "/aai/v16/business"
+          },
           {
               "serviceName": "_aai-actions",
               "version": "v11",
@@ -136,6 +202,39 @@ spec:
               "visualRange": "1",
               "path": "/aai/v13/actions"
           },
+          {
+              "serviceName": "_aai-actions",
+              "version": "v14",
+              "url": "/aai/v14/actions",
+              "protocol": "REST",
+              "port": "8447",
+              "enable_ssl": true,
+              "lb_policy":"ip_hash",
+              "visualRange": "1",
+              "path": "/aai/v14/actions"
+          },
+          {
+              "serviceName": "_aai-actions",
+              "version": "v15",
+              "url": "/aai/v15/actions",
+              "protocol": "REST",
+              "port": "8447",
+              "enable_ssl": true,
+              "lb_policy":"ip_hash",
+              "visualRange": "1",
+              "path": "/aai/v15/actions"
+          },
+          {
+              "serviceName": "_aai-actions",
+              "version": "v16",
+              "url": "/aai/v16/actions",
+              "protocol": "REST",
+              "port": "8447",
+              "enable_ssl": true,
+              "lb_policy":"ip_hash",
+              "visualRange": "1",
+              "path": "/aai/v16/actions"
+          },
           {
               "serviceName": "_aai-service-design-and-creation",
               "version": "v11",
@@ -169,6 +268,39 @@ spec:
               "visualRange": "1",
               "path": "/aai/v13/service-design-and-creation"
           },
+          {
+              "serviceName": "_aai-service-design-and-creation",
+              "version": "v14",
+              "url": "/aai/v14/service-design-and-creation",
+              "protocol": "REST",
+              "port": "8447",
+              "enable_ssl": true,
+              "lb_policy":"ip_hash",
+              "visualRange": "1",
+              "path": "/aai/v14/service-design-and-creation"
+          },
+           {
+              "serviceName": "_aai-service-design-and-creation",
+              "version": "v15",
+              "url": "/aai/v15/service-design-and-creation",
+              "protocol": "REST",
+              "port": "8447",
+              "enable_ssl": true,
+              "lb_policy":"ip_hash",
+              "visualRange": "1",
+              "path": "/aai/v15/service-design-and-creation"
+          },
+          {
+              "serviceName": "_aai-service-design-and-creation",
+              "version": "v16",
+              "url": "/aai/v16/service-design-and-creation",
+              "protocol": "REST",
+              "port": "8447",
+              "enable_ssl": true,
+              "lb_policy":"ip_hash",
+              "visualRange": "1",
+              "path": "/aai/v16/service-design-and-creation"
+          },
           {
               "serviceName": "_aai-network",
               "version": "v11",
@@ -202,6 +334,39 @@ spec:
               "visualRange": "1",
               "path": "/aai/v13/network"
           },
+          {
+              "serviceName": "_aai-network",
+              "version": "v14",
+              "url": "/aai/v14/network",
+              "protocol": "REST",
+              "port": "8447",
+              "enable_ssl": true,
+              "lb_policy":"ip_hash",
+              "visualRange": "1",
+              "path": "/aai/v14/network"
+          },
+          {
+              "serviceName": "_aai-network",
+              "version": "v15",
+              "url": "/aai/v15/network",
+              "protocol": "REST",
+              "port": "8447",
+              "enable_ssl": true,
+              "lb_policy":"ip_hash",
+              "visualRange": "1",
+              "path": "/aai/v15/network"
+          },
+          {
+              "serviceName": "_aai-network",
+              "version": "v16",
+              "url": "/aai/v16/network",
+              "protocol": "REST",
+              "port": "8447",
+              "enable_ssl": true,
+              "lb_policy":"ip_hash",
+              "visualRange": "1",
+              "path": "/aai/v16/network"
+          },
           {
               "serviceName": "_aai-externalSystem",
               "version": "v11",
@@ -212,7 +377,7 @@ spec:
               "lb_policy":"ip_hash",
               "visualRange": "1",
               "path": "/aai/v11/external-system"
-          },      
+          },
           {
               "serviceName": "_aai-externalSystem",
               "version": "v12",
@@ -223,7 +388,7 @@ spec:
               "lb_policy":"ip_hash",
               "visualRange": "1",
               "path": "/aai/v12/external-system"
-          },      
+          },
           {
               "serviceName": "_aai-externalSystem",
               "version": "v13",
@@ -235,6 +400,39 @@ spec:
               "visualRange": "1",
               "path": "/aai/v13/external-system"
           },
+          {
+              "serviceName": "_aai-externalSystem",
+              "version": "v14",
+              "url": "/aai/v14/external-system",
+              "protocol": "REST",
+              "port": "8447",
+              "enable_ssl": true,
+              "lb_policy":"ip_hash",
+              "visualRange": "1",
+              "path": "/aai/v14/external-system"
+          },
+          {
+              "serviceName": "_aai-externalSystem",
+              "version": "v15",
+              "url": "/aai/v15/external-system",
+              "protocol": "REST",
+              "port": "8447",
+              "enable_ssl": true,
+              "lb_policy":"ip_hash",
+              "visualRange": "1",
+              "path": "/aai/v15/external-system"
+          },
+          {
+              "serviceName": "_aai-externalSystem",
+              "version": "v16",
+              "url": "/aai/v16/external-system",
+              "protocol": "REST",
+              "port": "8447",
+              "enable_ssl": true,
+              "lb_policy":"ip_hash",
+              "visualRange": "1",
+              "path": "/aai/v16/external-system"
+          },
           {
               "serviceName": "aai-cloudInfrastructure",
               "version": "v11",
@@ -265,6 +463,36 @@ spec:
               "lb_policy":"ip_hash",
               "visualRange": "1"
           },
+          {
+              "serviceName": "aai-cloudInfrastructure",
+              "version": "v14",
+              "url": "/aai/v14/cloud-infrastructure",
+              "protocol": "REST",
+              "port": "8447",
+              "enable_ssl": true,
+              "lb_policy":"ip_hash",
+              "visualRange": "1"
+          },
+          {
+              "serviceName": "aai-cloudInfrastructure",
+              "version": "v15",
+              "url": "/aai/v15/cloud-infrastructure",
+              "protocol": "REST",
+              "port": "8447",
+              "enable_ssl": true,
+              "lb_policy":"ip_hash",
+              "visualRange": "1"
+          },
+          {
+              "serviceName": "aai-cloudInfrastructure",
+              "version": "v16",
+              "url": "/aai/v16/cloud-infrastructure",
+              "protocol": "REST",
+              "port": "8447",
+              "enable_ssl": true,
+              "lb_policy":"ip_hash",
+              "visualRange": "1"
+          },
           {
               "serviceName": "aai-business",
               "version": "v11",
@@ -295,6 +523,36 @@ spec:
               "lb_policy":"ip_hash",
               "visualRange": "1"
           },
+          {
+              "serviceName": "aai-business",
+              "version": "v14",
+              "url": "/aai/v14/business",
+              "protocol": "REST",
+              "port": "8447",
+              "enable_ssl": true,
+              "lb_policy":"ip_hash",
+              "visualRange": "1"
+          },
+          {
+              "serviceName": "aai-business",
+              "version": "v15",
+              "url": "/aai/v15/business",
+              "protocol": "REST",
+              "port": "8447",
+              "enable_ssl": true,
+              "lb_policy":"ip_hash",
+              "visualRange": "1"
+          },
+          {
+              "serviceName": "aai-business",
+              "version": "v16",
+              "url": "/aai/v16/business",
+              "protocol": "REST",
+              "port": "8447",
+              "enable_ssl": true,
+              "lb_policy":"ip_hash",
+              "visualRange": "1"
+          },
           {
               "serviceName": "aai-actions",
               "version": "v11",
@@ -325,6 +583,36 @@ spec:
               "lb_policy":"ip_hash",
               "visualRange": "1"
           },
+          {
+              "serviceName": "aai-actions",
+              "version": "v14",
+              "url": "/aai/v14/actions",
+              "protocol": "REST",
+              "port": "8447",
+              "enable_ssl": true,
+              "lb_policy":"ip_hash",
+              "visualRange": "1"
+          },
+          {
+              "serviceName": "aai-actions",
+              "version": "v15",
+              "url": "/aai/v15/actions",
+              "protocol": "REST",
+              "port": "8447",
+              "enable_ssl": true,
+              "lb_policy":"ip_hash",
+              "visualRange": "1"
+          },
+          {
+              "serviceName": "aai-actions",
+              "version": "v16",
+              "url": "/aai/v16/actions",
+              "protocol": "REST",
+              "port": "8447",
+              "enable_ssl": true,
+              "lb_policy":"ip_hash",
+              "visualRange": "1"
+          },
           {
               "serviceName": "aai-service-design-and-creation",
               "version": "v11",
@@ -355,6 +643,36 @@ spec:
               "lb_policy":"ip_hash",
               "visualRange": "1"
           },
+          {
+              "serviceName": "aai-service-design-and-creation",
+              "version": "v14",
+              "url": "/aai/v14/service-design-and-creation",
+              "protocol": "REST",
+              "port": "8447",
+              "enable_ssl": true,
+              "lb_policy":"ip_hash",
+              "visualRange": "1"
+          },
+          {
+              "serviceName": "aai-service-design-and-creation",
+              "version": "v15",
+              "url": "/aai/v15/service-design-and-creation",
+              "protocol": "REST",
+              "port": "8447",
+              "enable_ssl": true,
+              "lb_policy":"ip_hash",
+              "visualRange": "1"
+          },
+          {
+              "serviceName": "aai-service-design-and-creation",
+              "version": "v16",
+              "url": "/aai/v16/service-design-and-creation",
+              "protocol": "REST",
+              "port": "8447",
+              "enable_ssl": true,
+              "lb_policy":"ip_hash",
+              "visualRange": "1"
+          },
           {
               "serviceName": "aai-network",
               "version": "v11",
@@ -385,6 +703,36 @@ spec:
               "lb_policy":"ip_hash",
               "visualRange": "1"
           },
+          {
+              "serviceName": "aai-network",
+              "version": "v14",
+              "url": "/aai/v14/network",
+              "protocol": "REST",
+              "port": "8447",
+              "enable_ssl": true,
+              "lb_policy":"ip_hash",
+              "visualRange": "1"
+          },
+          {
+              "serviceName": "aai-network",
+              "version": "v15",
+              "url": "/aai/v15/network",
+              "protocol": "REST",
+              "port": "8447",
+              "enable_ssl": true,
+              "lb_policy":"ip_hash",
+              "visualRange": "1"
+          },
+          {
+              "serviceName": "aai-network",
+              "version": "v16",
+              "url": "/aai/v16/network",
+              "protocol": "REST",
+              "port": "8447",
+              "enable_ssl": true,
+              "lb_policy":"ip_hash",
+              "visualRange": "1"
+          },
           {
               "serviceName": "aai-externalSystem",
               "version": "v11",
@@ -394,7 +742,7 @@ spec:
               "enable_ssl": true,
               "lb_policy":"ip_hash",
               "visualRange": "1"
-          },      
+          },
           {
               "serviceName": "aai-externalSystem",
               "version": "v12",
@@ -404,7 +752,7 @@ spec:
               "enable_ssl": true,
               "lb_policy":"ip_hash",
               "visualRange": "1"
-          },      
+          },
           {
               "serviceName": "aai-externalSystem",
               "version": "v13",
@@ -414,6 +762,36 @@ spec:
               "enable_ssl": true,
               "lb_policy":"ip_hash",
               "visualRange": "1"
+          },
+          {
+              "serviceName": "aai-externalSystem",
+              "version": "v14",
+              "url": "/aai/v14/external-system",
+              "protocol": "REST",
+              "port": "8447",
+              "enable_ssl": true,
+              "lb_policy":"ip_hash",
+              "visualRange": "1"
+          },
+          {
+              "serviceName": "aai-externalSystem",
+              "version": "v15",
+              "url": "/aai/v15/external-system",
+              "protocol": "REST",
+              "port": "8447",
+              "enable_ssl": true,
+              "lb_policy":"ip_hash",
+              "visualRange": "1"
+          },
+          {
+              "serviceName": "aai-externalSystem",
+              "version": "v16",
+              "url": "/aai/v16/external-system",
+              "protocol": "REST",
+              "port": "8447",
+              "enable_ssl": true,
+              "lb_policy":"ip_hash",
+              "visualRange": "1"
           }
           ]'
     spec:
@@ -427,7 +805,12 @@ spec:
       {{ end }}
       initContainers:
       - command:
-      {{  if .Values.global.jobs.createSchema.enabled  }}
+      {{ if .Values.global.jobs.migration.enabled }}
+        - /root/job_complete.py
+        args:
+        - --job-name
+        - {{ .Release.Name }}-aai-graphadmin-migration
+      {{  else if .Values.global.jobs.createSchema.enabled  }}
         - /root/job_complete.py
         args:
         - --job-name
@@ -436,7 +819,13 @@ spec:
         - /root/ready.py
         args:
         - --container-name
+        {{- if .Values.global.cassandra.localCluster }}
         - aai-cassandra
+        {{- else }}
+        - cassandra
+        {{- end }}
+        - --container-name
+        - aai-schema-service
       {{  end  }}
         env:
         - name: NAMESPACE
@@ -469,24 +858,24 @@ spec:
           name: localtime
           readOnly: true
         - mountPath: /opt/app/aai-resources/resources/etc/appprops/janusgraph-realtime.properties
-          name: {{ include "common.fullname" . }}-db-real-conf
+          name: {{ include "common.fullname" . }}-config
           subPath: janusgraph-realtime.properties
         - mountPath: /opt/app/aai-resources/resources/etc/appprops/janusgraph-cached.properties
-          name: {{ include "common.fullname" . }}-db-cached-conf
+          name: {{ include "common.fullname" . }}-config
           subPath: janusgraph-cached.properties
         - mountPath: /opt/app/aai-resources/resources/etc/appprops/aaiconfig.properties
-          name: {{ include "common.fullname" . }}-aaiconfig-conf
+          name: {{ include "common.fullname" . }}-config
           subPath: aaiconfig.properties
         - mountPath: /opt/aai/logroot/AAI-RES
           name: {{ include "common.fullname" . }}-logs
         - mountPath: /opt/app/aai-resources/resources/logback.xml
-          name: {{ include "common.fullname" . }}-log-conf
+          name: {{ include "common.fullname" . }}-config
           subPath: logback.xml
         - mountPath: /opt/app/aai-resources/resources/localhost-access-logback.xml
-          name: {{ include "common.fullname" . }}-localhost-access-log-conf
+          name: {{ include "common.fullname" . }}-config
           subPath: localhost-access-logback.xml
         - mountPath: /opt/app/aai-resources/resources/etc/auth/realm.properties
-          name: {{ include "common.fullname" . }}-realm-conf
+          name: {{ include "common.fullname" . }}-config
           subPath: realm.properties
         {{ if .Values.global.installSidecarSecurity }}
         - mountPath: /opt/app/aai-resources/resources/etc/auth/aai_policy.json
@@ -515,10 +904,10 @@ spec:
           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
+          name: aai-common-aai-auth-mount
           subPath: truststoreONAPall.jks
         - mountPath: /opt/app/aai-resources/resources/application.properties
-          name: {{ include "common.fullname" . }}-springapp-conf
+          name: {{ include "common.fullname" . }}-config
           subPath: application.properties
           {{ $global := . }}
           {{ range $job := .Values.global.config.auth.files }}
@@ -544,7 +933,7 @@ spec:
           initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
           periodSeconds: {{ .Values.readiness.periodSeconds }}
         resources:
-{{ include "common.resources" . | indent 12 }}
+{{ include "common.resources" . }}
       {{- if .Values.nodeSelector }}
       nodeSelector:
 {{ toYaml .Values.nodeSelector | indent 8 }}
@@ -566,6 +955,8 @@ spec:
           name: {{ include "common.fullname" . }}-logs
         - mountPath: /usr/share/filebeat/data
           name: {{ include "common.fullname" . }}-filebeat
+        resources:
+{{ include "common.resources" . }}
     {{ if .Values.global.installSidecarSecurity }}
       - name: {{ .Values.global.rproxy.name }}
         image: "{{ include "common.repository" . }}/{{ .Values.global.rproxy.image }}"
@@ -593,15 +984,15 @@ spec:
         - name: {{ include "common.fullname" . }}-rproxy-log-config
           mountPath: /opt/app/rproxy/config/logback-spring.xml
           subPath: logback-spring.xml
+        - name: {{ include "common.fullname" . }}-rproxy-uri-auth-config
+          mountPath: /opt/app/rproxy/config/auth/uri-authorization.json
+          subPath: uri-authorization.json
         - name: {{ include "common.fullname" . }}-rproxy-auth-config
           mountPath: /opt/app/rproxy/config/auth/tomcat_keystore
           subPath: tomcat_keystore
         - name: {{ include "common.fullname" . }}-rproxy-auth-config
           mountPath: /opt/app/rproxy/config/auth/client-cert.p12
           subPath: client-cert.p12
-        - name: {{ include "common.fullname" . }}-rproxy-auth-config
-          mountPath: /opt/app/rproxy/config/auth/uri-authorization.json
-          subPath: uri-authorization.json
         - name: {{ include "common.fullname" . }}-rproxy-auth-config
           mountPath: /opt/app/rproxy/config/auth/aaf_truststore.jks
           subPath: aaf_truststore.jks
@@ -647,6 +1038,9 @@ spec:
     {{ end }}
 
       volumes:
+      - name: aai-common-aai-auth-mount
+        secret:
+          secretName: aai-common-aai-auth
       - name: localtime
         hostPath:
           path: /etc/localtime
@@ -657,36 +1051,18 @@ spec:
         emptyDir: {}
       - name: {{ include "common.fullname" . }}-filebeat
         emptyDir: {}
-      - name: {{ include "common.fullname" . }}-log-conf
-        configMap:
-         name: {{ include "common.fullname" . }}-log
-      - name: {{ include "common.fullname" . }}-localhost-access-log-conf
-        configMap:
-         name: {{ include "common.fullname" . }}-localhost-access-log-configmap
-      - name: {{ include "common.fullname" . }}-db-real-conf
-        configMap:
-         name: {{ include "common.fullname" . }}-db-real-configmap
-      - name: {{ include "common.fullname" . }}-db-cached-conf
+      - name: {{ include "common.fullname" . }}-config
         configMap:
-         name: {{ include "common.fullname" . }}-db-cached-configmap
-      - name: {{ include "common.fullname" . }}-aaiconfig-conf
-        configMap:
-         name: {{ include "common.fullname" . }}-aaiconfig-configmap
+         name: {{ include "common.fullname" . }}-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-truststore-sec
         secret:
-         secretName: aai-auth-truststore-secret
+         secretName: aai-common-truststore
          items:
           {{ range $job := .Values.global.config.auth.files }}
            - key: {{ . }}
@@ -702,6 +1078,9 @@ spec:
       - name: {{ include "common.fullname" . }}-rproxy-log-config
         configMap:
          name: {{ include "common.fullname" . }}-rproxy-log-config
+      - name: {{ include "common.fullname" . }}-rproxy-uri-auth-config
+        configMap:
+         name: {{ include "common.fullname" . }}-rproxy-uri-auth-config
       - name: {{ include "common.fullname" . }}-rproxy-auth-config
         secret:
          secretName: {{ include "common.fullname" . }}-rproxy-auth-config