Merge "[SO] Use readiness chart"
authorKrzysztof Opasiak <k.opasiak@samsung.com>
Thu, 5 Nov 2020 10:02:41 +0000 (10:02 +0000)
committerGerrit Code Review <gerrit@onap.org>
Thu, 5 Nov 2020 10:02:41 +0000 (10:02 +0000)
33 files changed:
kubernetes/so/components/so-bpmn-infra/requirements.yaml
kubernetes/so/components/so-bpmn-infra/templates/deployment.yaml
kubernetes/so/components/so-bpmn-infra/values.yaml
kubernetes/so/components/so-catalog-db-adapter/requirements.yaml
kubernetes/so/components/so-catalog-db-adapter/templates/deployment.yaml
kubernetes/so/components/so-catalog-db-adapter/values.yaml
kubernetes/so/components/so-cnf-adapter/requirements.yaml
kubernetes/so/components/so-cnf-adapter/templates/deployment.yaml
kubernetes/so/components/so-cnf-adapter/values.yaml
kubernetes/so/components/so-mariadb/requirements.yaml
kubernetes/so/components/so-mariadb/templates/job.yaml
kubernetes/so/components/so-mariadb/values.yaml
kubernetes/so/components/so-nssmf-adapter/requirements.yaml
kubernetes/so/components/so-nssmf-adapter/templates/deployment.yaml
kubernetes/so/components/so-nssmf-adapter/values.yaml
kubernetes/so/components/so-openstack-adapter/requirements.yaml
kubernetes/so/components/so-openstack-adapter/templates/deployment.yaml
kubernetes/so/components/so-openstack-adapter/values.yaml
kubernetes/so/components/so-request-db-adapter/requirements.yaml
kubernetes/so/components/so-request-db-adapter/templates/deployment.yaml
kubernetes/so/components/so-request-db-adapter/values.yaml
kubernetes/so/components/so-sdc-controller/requirements.yaml
kubernetes/so/components/so-sdc-controller/templates/deployment.yaml
kubernetes/so/components/so-sdc-controller/values.yaml
kubernetes/so/components/so-ve-vnfm-adapter/requirements.yaml
kubernetes/so/components/so-ve-vnfm-adapter/templates/deployment.yaml
kubernetes/so/components/so-ve-vnfm-adapter/values.yaml
kubernetes/so/components/so-vfc-adapter/requirements.yaml
kubernetes/so/components/so-vfc-adapter/templates/deployment.yaml
kubernetes/so/components/so-vfc-adapter/values.yaml
kubernetes/so/requirements.yaml
kubernetes/so/templates/deployment.yaml
kubernetes/so/values.yaml

index 1feea23..b0bda36 100755 (executable)
@@ -18,6 +18,9 @@ dependencies:
     # a part of this chart's package and will not
     # be published independently to a repo (at this point)
     repository: '@local'
+  - name: readinessCheck
+    version: ~6.x-0
+    repository: '@local'
   - name: soHelpers
     version: ~6.x-0
     repository: 'file://../soHelpers'
index 60745b1..ac335c8 100755 (executable)
@@ -39,21 +39,9 @@ spec:
         app: {{ include "common.name" . }}
         release: {{ include "common.release" . }}
     spec:
-      initContainers: {{ include "so.certificate.container_importer" . | nindent 6 }}
-      - command:
-        - /app/ready.py
-        args:
-        - --job-name
-        - {{ include "common.release" . }}-so-mariadb-config-job
-        env:
-        - name: NAMESPACE
-          valueFrom:
-            fieldRef:
-              apiVersion: v1
-              fieldPath: metadata.namespace
-        image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
-        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-        name: {{ include "common.name" . }}-readiness
+      initContainers:
+      {{ include "so.certificate.container_importer" . | indent 6 | trim }}
+      {{ include "common.readinessCheck.waitFor" . | indent 6 | trim }}
       containers:
       - name: {{ include "common.name" . }}
         image: {{ include "common.repository" . }}/{{ .Values.image }}
index dd8b04b..de0fe52 100755 (executable)
@@ -36,6 +36,10 @@ global:
     serviceName: mariadb-galera
     servicePort: '3306'
 
+readinessCheck:
+  wait_for:
+    - so-mariadb-config
+
 #################################################################
 # Secrets metaconfig
 #################################################################
index 1feea23..b0bda36 100755 (executable)
@@ -18,6 +18,9 @@ dependencies:
     # a part of this chart's package and will not
     # be published independently to a repo (at this point)
     repository: '@local'
+  - name: readinessCheck
+    version: ~6.x-0
+    repository: '@local'
   - name: soHelpers
     version: ~6.x-0
     repository: 'file://../soHelpers'
index 25a6842..0aac5f4 100755 (executable)
@@ -39,21 +39,9 @@ spec:
         app: {{ include "common.name" . }}
         release: {{ include "common.release" . }}
     spec:
-      initContainers: {{ include "so.certificate.container_importer" . | nindent 6 }}
-      - command:
-        - /app/ready.py
-        args:
-        - --job-name
-        - {{ include "common.release" . }}-so-mariadb-config-job
-        env:
-        - name: NAMESPACE
-          valueFrom:
-            fieldRef:
-              apiVersion: v1
-              fieldPath: metadata.namespace
-        image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
-        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-        name: {{ include "common.name" . }}-readiness
+      initContainers:
+      {{ include "so.certificate.container_importer" . | indent 6 | trim }}
+      {{ include "common.readinessCheck.waitFor" . | indent 6 | trim }}
       containers:
       - name: {{ include "common.name" . }}
         image: {{ include "common.repository" . }}/{{ .Values.image }}
index 3e98595..334e70e 100755 (executable)
@@ -35,6 +35,10 @@ global:
     serviceName: mariadb-galera
     servicePort: '3306'
 
+readinessCheck:
+  wait_for:
+    - so-mariadb-config
+
 #################################################################
 # Secrets metaconfig
 #################################################################
index 1feea23..b0bda36 100755 (executable)
@@ -18,6 +18,9 @@ dependencies:
     # a part of this chart's package and will not
     # be published independently to a repo (at this point)
     repository: '@local'
+  - name: readinessCheck
+    version: ~6.x-0
+    repository: '@local'
   - name: soHelpers
     version: ~6.x-0
     repository: 'file://../soHelpers'
index 8c894ad..dfff434 100755 (executable)
@@ -50,20 +50,7 @@ spec:
           volumeMounts:
             - name: encoder
               mountPath: /output
-        - name: {{ include "common.name" . }}-readiness
-          command:
-            - /app/ready.py
-          args:
-            - --job-name
-            - {{ include "common.release" . }}-so-mariadb-config-job
-          env:
-            - name: NAMESPACE
-              valueFrom:
-                fieldRef:
-                  apiVersion: v1
-                  fieldPath: metadata.namespace
-          image: {{ include "common.repository" . }}/{{ .Values.global.readinessImage }}
-          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        {{ include "common.readinessCheck.waitFor" . | indent 8 | trim }}
       containers:
         - name: {{ include "common.name" . }}
           image: {{ include "common.repository" . }}/{{ .Values.image }}
index 195d62d..66703f2 100755 (executable)
@@ -30,6 +30,10 @@ global:
     auth:
       header: ${AAF_AUTH}
 
+readinessCheck:
+  wait_for:
+    - so-mariadb-config
+
 #################################################################
 # Secrets metaconfig
 #################################################################
index 2eb32d0..22d6333 100755 (executable)
@@ -18,3 +18,6 @@ dependencies:
     # a part of this chart's package and will not
     # be published independently to a repo (at this point)
     repository: '@local'
+  - name: readinessCheck
+    version: ~6.x-0
+    repository: '@local'
index cb7fcb3..b3bacc1 100644 (file)
@@ -95,23 +95,9 @@ spec:
         release: {{ include "common.release" . }}
       name: {{ include "common.name" . }}
     spec:
-      initContainers:
-      - name: {{ include "common.name" . }}-readiness
-        command:
-        - /app/ready.py
-        args:
-        - --container-name
-        - {{ .Values.global.mariadbGalera.nameOverride }}
-        env:
-        - name: NAMESPACE
-          valueFrom:
-            fieldRef:
-              apiVersion: v1
-              fieldPath: metadata.namespace
-        image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
-        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+      initContainers: {{ include "common.readinessCheck.waitFor" . | nindent 6 }}
       containers:
-      - name: {{ include "common.name" . }}
+      - name: {{ include "common.name" . }}-config
         image: "{{ include "common.repository" . }}/{{ .Values.image }}"
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         command:
index 9ecf3b0..809dff7 100755 (executable)
@@ -24,7 +24,7 @@ global:
   readinessImage: onap/oom/readiness:3.0.1
   ubuntuInitRepository: registry.hub.docker.com
   mariadbGalera:
-    nameOverride: mariadb-galera
+    nameOverride: &mariadbName mariadb-galera
     serviceName: mariadb-galera
     servicePort: "3306"
   migration:
@@ -33,6 +33,11 @@ global:
     dbPort: 3306
     dbUser: root
     dbPassword: secretpassword
+
+readinessCheck:
+  wait_for:
+    - *mariadbName
+
 #################################################################
 # Secrets metaconfig
 #################################################################
index 1feea23..b0bda36 100755 (executable)
@@ -18,6 +18,9 @@ dependencies:
     # a part of this chart's package and will not
     # be published independently to a repo (at this point)
     repository: '@local'
+  - name: readinessCheck
+    version: ~6.x-0
+    repository: '@local'
   - name: soHelpers
     version: ~6.x-0
     repository: 'file://../soHelpers'
index c213319..3b28c5b 100755 (executable)
@@ -29,21 +29,9 @@ spec:
     metadata:
       labels: {{- include "common.labels" . | nindent 8 }}
     spec:
-      initContainers: {{ include "so.certificate.container_importer" . | nindent 8 }}
-        - name: {{ include "common.name" . }}-readiness
-          command:
-            - /app/ready.py
-          args:
-            - --job-name
-            - {{ include "common.release" . }}-so-mariadb-config-job
-          env:
-            - name: NAMESPACE
-              valueFrom:
-                fieldRef:
-                  apiVersion: v1
-                  fieldPath: metadata.namespace
-          image: {{ include "common.repository" . }}/{{ .Values.global.readinessImage }}
-          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+      initContainers:
+      {{ include "so.certificate.container_importer" . | indent 6 | trim }}
+      {{ include "common.readinessCheck.waitFor" . | indent 6 | trim }}
       containers:
         - name: {{ include "common.name" . }}
           command:
index da36e9a..753da87 100755 (executable)
@@ -33,6 +33,11 @@ global:
     serviceName: mariadb-galera
     servicePort: '3306'
 
+readinessCheck:
+  wait_for:
+    - so-mariadb-config
+
+
 #################################################################
 # Secrets metaconfig
 #################################################################
index 1feea23..b0bda36 100755 (executable)
@@ -18,6 +18,9 @@ dependencies:
     # a part of this chart's package and will not
     # be published independently to a repo (at this point)
     repository: '@local'
+  - name: readinessCheck
+    version: ~6.x-0
+    repository: '@local'
   - name: soHelpers
     version: ~6.x-0
     repository: 'file://../soHelpers'
index 60745b1..ac335c8 100755 (executable)
@@ -39,21 +39,9 @@ spec:
         app: {{ include "common.name" . }}
         release: {{ include "common.release" . }}
     spec:
-      initContainers: {{ include "so.certificate.container_importer" . | nindent 6 }}
-      - command:
-        - /app/ready.py
-        args:
-        - --job-name
-        - {{ include "common.release" . }}-so-mariadb-config-job
-        env:
-        - name: NAMESPACE
-          valueFrom:
-            fieldRef:
-              apiVersion: v1
-              fieldPath: metadata.namespace
-        image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
-        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-        name: {{ include "common.name" . }}-readiness
+      initContainers:
+      {{ include "so.certificate.container_importer" . | indent 6 | trim }}
+      {{ include "common.readinessCheck.waitFor" . | indent 6 | trim }}
       containers:
       - name: {{ include "common.name" . }}
         image: {{ include "common.repository" . }}/{{ .Values.image }}
index 41ccb95..64321f4 100755 (executable)
@@ -33,6 +33,10 @@ global:
     serviceName: mariadb-galera
     servicePort: '3306'
 
+readinessCheck:
+  wait_for:
+    - so-mariadb-config
+
 #################################################################
 # Secrets metaconfig
 #################################################################
index 1feea23..b0bda36 100755 (executable)
@@ -18,6 +18,9 @@ dependencies:
     # a part of this chart's package and will not
     # be published independently to a repo (at this point)
     repository: '@local'
+  - name: readinessCheck
+    version: ~6.x-0
+    repository: '@local'
   - name: soHelpers
     version: ~6.x-0
     repository: 'file://../soHelpers'
index 25a6842..0aac5f4 100755 (executable)
@@ -39,21 +39,9 @@ spec:
         app: {{ include "common.name" . }}
         release: {{ include "common.release" . }}
     spec:
-      initContainers: {{ include "so.certificate.container_importer" . | nindent 6 }}
-      - command:
-        - /app/ready.py
-        args:
-        - --job-name
-        - {{ include "common.release" . }}-so-mariadb-config-job
-        env:
-        - name: NAMESPACE
-          valueFrom:
-            fieldRef:
-              apiVersion: v1
-              fieldPath: metadata.namespace
-        image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
-        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-        name: {{ include "common.name" . }}-readiness
+      initContainers:
+      {{ include "so.certificate.container_importer" . | indent 6 | trim }}
+      {{ include "common.readinessCheck.waitFor" . | indent 6 | trim }}
       containers:
       - name: {{ include "common.name" . }}
         image: {{ include "common.repository" . }}/{{ .Values.image }}
index 02b382f..84d2944 100755 (executable)
@@ -33,6 +33,10 @@ global:
     serviceName: mariadb-galera
     servicePort: '3306'
 
+readinessCheck:
+  wait_for:
+    - so-mariadb-config
+
 #################################################################
 # Secrets metaconfig
 #################################################################
index 1feea23..b0bda36 100755 (executable)
@@ -18,6 +18,9 @@ dependencies:
     # a part of this chart's package and will not
     # be published independently to a repo (at this point)
     repository: '@local'
+  - name: readinessCheck
+    version: ~6.x-0
+    repository: '@local'
   - name: soHelpers
     version: ~6.x-0
     repository: 'file://../soHelpers'
index 60745b1..ac335c8 100755 (executable)
@@ -39,21 +39,9 @@ spec:
         app: {{ include "common.name" . }}
         release: {{ include "common.release" . }}
     spec:
-      initContainers: {{ include "so.certificate.container_importer" . | nindent 6 }}
-      - command:
-        - /app/ready.py
-        args:
-        - --job-name
-        - {{ include "common.release" . }}-so-mariadb-config-job
-        env:
-        - name: NAMESPACE
-          valueFrom:
-            fieldRef:
-              apiVersion: v1
-              fieldPath: metadata.namespace
-        image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
-        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-        name: {{ include "common.name" . }}-readiness
+      initContainers:
+      {{ include "so.certificate.container_importer" . | indent 6 | trim }}
+      {{ include "common.readinessCheck.waitFor" . | indent 6 | trim }}
       containers:
       - name: {{ include "common.name" . }}
         image: {{ include "common.repository" . }}/{{ .Values.image }}
index 9f858aa..8980487 100755 (executable)
@@ -33,6 +33,10 @@ global:
     serviceName: mariadb-galera
     servicePort: '3306'
 
+readinessCheck:
+  wait_for:
+    - so-mariadb-config
+
 #################################################################
 # Secrets metaconfig
 #################################################################
index 1feea23..b0bda36 100755 (executable)
@@ -18,6 +18,9 @@ dependencies:
     # a part of this chart's package and will not
     # be published independently to a repo (at this point)
     repository: '@local'
+  - name: readinessCheck
+    version: ~6.x-0
+    repository: '@local'
   - name: soHelpers
     version: ~6.x-0
     repository: 'file://../soHelpers'
index 5517703..7c528b0 100755 (executable)
@@ -24,23 +24,8 @@ spec:
     metadata:
       labels: {{- include "common.labels" . | nindent 8 }}
     spec:
-      initContainers: {{ include "so.certificate.container_importer" . | nindent 8 }}
-        - name: {{ include "common.name" . }}-readiness
-          command:
-            - /app/ready.py
-          args:
-            - --container-name
-            - aai
-            - --container-name
-            - message-router
-          env:
-            - name: NAMESPACE
-              valueFrom:
-                fieldRef:
-                  apiVersion: v1
-                  fieldPath: metadata.namespace
-          image: {{ include "common.repository" . }}/{{ .Values.global.readinessImage }}
-          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+      initContainers: {{ include "so.certificate.container_importer" . | nindent 6 }}
+      {{ include "common.readinessCheck.waitFor" . | indent 6 | trim }}
       containers:
         - name: {{ include "common.name" . }}
           envFrom:
index 6511af3..9237b99 100755 (executable)
@@ -22,6 +22,11 @@ global:
   persistence:
     mountPath: /dockerdata-nfs
 
+readinessCheck:
+  wait_for:
+    - aai
+    - message-router
+
 #################################################################
 # Application configuration defaults.
 #################################################################
index 1feea23..b0bda36 100755 (executable)
@@ -18,6 +18,9 @@ dependencies:
     # a part of this chart's package and will not
     # be published independently to a repo (at this point)
     repository: '@local'
+  - name: readinessCheck
+    version: ~6.x-0
+    repository: '@local'
   - name: soHelpers
     version: ~6.x-0
     repository: 'file://../soHelpers'
index 35ed9de..94759ce 100755 (executable)
@@ -39,21 +39,9 @@ spec:
         app: {{ include "common.name" . }}
         release: {{ include "common.release" . }}
     spec:
-      initContainers: {{ include "so.certificate.container_importer" . | nindent 6 }}
-      - command:
-        - /app/ready.py
-        args:
-        - --job-name
-        - {{ include "common.release" . }}-so-mariadb-config-job
-        env:
-        - name: NAMESPACE
-          valueFrom:
-            fieldRef:
-              apiVersion: v1
-              fieldPath: metadata.namespace
-        image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
-        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-        name: {{ include "common.name" . }}-readiness
+      initContainers:
+      {{ include "so.certificate.container_importer" . | indent 6 | trim }}
+      {{ include "common.readinessCheck.waitFor" . | indent 6 | trim }}
       containers:
       - name: {{ include "common.name" . }}
         image: {{ include "common.repository" . }}/{{ .Values.image }}
index c46f118..e4f034d 100755 (executable)
@@ -32,6 +32,10 @@ global:
     serviceName: mariadb-galera
     servicePort: '3306'
 
+readinessCheck:
+  wait_for:
+    - so-mariadb-config
+
 #################################################################
 # Secrets metaconfig
 #################################################################
index 41a781b..1728705 100755 (executable)
@@ -17,7 +17,10 @@ dependencies:
     # local reference to common chart, as it is
     # a part of this chart's package and will not
     # be published independently to a repo (at this point)
-    repository: "@local"
+    repository: '@local'
+  - name: readinessCheck
+    version: ~6.x-0
+    repository: '@local'
   - name: mariadb-galera
     version: ~6.x-0
     repository: "@local"
index f846a03..ac335c8 100755 (executable)
@@ -41,20 +41,7 @@ spec:
     spec:
       initContainers:
       {{ include "so.certificate.container_importer" . | indent 6 | trim }}
-      - name: {{ include "common.name" . }}-readiness
-        command:
-        - /app/ready.py
-        args:
-        - --job-name
-        - {{ include "common.release" . }}-so-mariadb-config-job
-        env:
-        - name: NAMESPACE
-          valueFrom:
-            fieldRef:
-              apiVersion: v1
-              fieldPath: metadata.namespace
-        image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
-        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+      {{ include "common.readinessCheck.waitFor" . | indent 6 | trim }}
       containers:
       - name: {{ include "common.name" . }}
         image: {{ include "common.repository" . }}/{{ .Values.image }}
index 4648015..8c28fa5 100755 (executable)
@@ -70,6 +70,10 @@ global:
     path: /etc/ssl/certs
     share_path: /usr/local/share/ca-certificates/
 
+readinessCheck:
+  wait_for:
+    - so-mariadb-config
+
 #################################################################
 # Secrets metaconfig
 #################################################################