From d055a17d87b9e6bbfde51f523eea1838bc6b40dd Mon Sep 17 00:00:00 2001 From: Sylvain Desbureaux Date: Fri, 30 Oct 2020 14:32:03 +0100 Subject: [SO] Use readiness chart Some SO components are using readiness check init container. In "gating" mode, so image and readiness image are not coming from the same repository. By using readinessCheck charts, we can control that. Issue-ID: OOM-2617 Signed-off-by: Sylvain Desbureaux Change-Id: I44a4e9daf72d1a42d3d84b6d56b588cd7d44fb08 --- .../components/so-ve-vnfm-adapter/requirements.yaml | 3 +++ .../so-ve-vnfm-adapter/templates/deployment.yaml | 19 ++----------------- .../so/components/so-ve-vnfm-adapter/values.yaml | 5 +++++ 3 files changed, 10 insertions(+), 17 deletions(-) (limited to 'kubernetes/so/components/so-ve-vnfm-adapter') diff --git a/kubernetes/so/components/so-ve-vnfm-adapter/requirements.yaml b/kubernetes/so/components/so-ve-vnfm-adapter/requirements.yaml index 1feea23842..b0bda362dd 100755 --- a/kubernetes/so/components/so-ve-vnfm-adapter/requirements.yaml +++ b/kubernetes/so/components/so-ve-vnfm-adapter/requirements.yaml @@ -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' diff --git a/kubernetes/so/components/so-ve-vnfm-adapter/templates/deployment.yaml b/kubernetes/so/components/so-ve-vnfm-adapter/templates/deployment.yaml index 55177031e4..7c528b0290 100755 --- a/kubernetes/so/components/so-ve-vnfm-adapter/templates/deployment.yaml +++ b/kubernetes/so/components/so-ve-vnfm-adapter/templates/deployment.yaml @@ -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: diff --git a/kubernetes/so/components/so-ve-vnfm-adapter/values.yaml b/kubernetes/so/components/so-ve-vnfm-adapter/values.yaml index 6511af320b..9237b994ac 100755 --- a/kubernetes/so/components/so-ve-vnfm-adapter/values.yaml +++ b/kubernetes/so/components/so-ve-vnfm-adapter/values.yaml @@ -22,6 +22,11 @@ global: persistence: mountPath: /dockerdata-nfs +readinessCheck: + wait_for: + - aai + - message-router + ################################################################# # Application configuration defaults. ################################################################# -- cgit 1.2.3-korg