From: Lukasz Rajewski Date: Wed, 3 Apr 2024 14:12:59 +0000 (+0000) Subject: Merge "[COMMON][READINESS] Update readiness image and use service feature" X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=6d5a8690d675f65a8ec38b2c03f6fde2c2d2d9b8;hp=-c;p=oom.git Merge "[COMMON][READINESS] Update readiness image and use service feature" --- 6d5a8690d675f65a8ec38b2c03f6fde2c2d2d9b8 diff --combined kubernetes/common/dgbuilder/templates/deployment.yaml index 18963f94f0,6ece89d34a..ab0b21c5b6 --- a/kubernetes/common/dgbuilder/templates/deployment.yaml +++ b/kubernetes/common/dgbuilder/templates/deployment.yaml @@@ -61,8 -61,8 +61,8 @@@ spec - command: - /app/ready.py args: - - --app-name - - {{ .Values.config.dbPodName }} + - --service-name + - {{ .Values.config.dbServiceName }} env: - name: NAMESPACE valueFrom: @@@ -130,4 -130,5 +130,4 @@@ - name: config emptyDir: medium: Memory - imagePullSecrets: - - name: "{{ include "common.namespace" . }}-docker-registry-key" + {{- include "common.imagePullSecrets" . | nindent 6 }} diff --combined kubernetes/common/etcd-init/templates/job.yaml index 8919dc7a39,55526a34a1..f77a8ec8ba --- a/kubernetes/common/etcd-init/templates/job.yaml +++ b/kubernetes/common/etcd-init/templates/job.yaml @@@ -27,6 -27,12 +27,12 @@@ spec backoffLimit: {{ .Values.backoffLimit }} template: metadata: + annotations: + # Workarround to exclude K8S API from istio communication + # as init-container (readinessCheck) does not work with the + # Istio CNI plugin, see: + # (https://istio.io/latest/docs/setup/additional-setup/cni/#compatibility-with-application-init-containers) + traffic.sidecar.istio.io/excludeOutboundPorts: "443" labels: app: {{ include "common.name" . }} release: {{ include "common.release" . }} @@@ -37,8 -43,8 +43,8 @@@ command: - /app/ready.py args: - - --container-name - - {{ .Values.etcd.containerName }} + - --service-name + - {{ .Values.etcd.serviceName }} env: - name: NAMESPACE valueFrom: @@@ -111,4 -117,5 +117,4 @@@ hostPath: path: /etc/localtime restartPolicy: Never - imagePullSecrets: - - name: "{{ include "common.namespace" . }}-docker-registry-key" + {{- include "common.imagePullSecrets" . | nindent 6 }} diff --combined kubernetes/common/mariadb-galera/templates/backup/cronjob.yaml index 9f0a786282,1a174d1bb2..f2128693e8 --- a/kubernetes/common/mariadb-galera/templates/backup/cronjob.yaml +++ b/kubernetes/common/mariadb-galera/templates/backup/cronjob.yaml @@@ -32,6 -32,13 +32,13 @@@ spec jobTemplate: spec: template: + metadata: + annotations: + # Workarround to exclude K8S API from istio communication + # as init-container (readinessCheck) does not work with the + # Istio CNI plugin, see: + # (https://istio.io/latest/docs/setup/additional-setup/cni/#compatibility-with-application-init-containers) + traffic.sidecar.istio.io/excludeOutboundPorts: "443" spec: serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}} {{ include "common.podSecurityContext" . | indent 10 | trim}} @@@ -162,7 -169,8 +169,7 @@@ readOnly: true - name: backup-dir mountPath: /backup - imagePullSecrets: - - name: {{ include "common.namespace" . }}-docker-registry-key + {{- include "common.imagePullSecrets" . | nindent 10 }} volumes: - name: localtime hostPath: diff --combined kubernetes/common/mariadb-init/templates/job.yaml index 88ff0e09c2,2495e602f3..0edb8e936b --- a/kubernetes/common/mariadb-init/templates/job.yaml +++ b/kubernetes/common/mariadb-init/templates/job.yaml @@@ -31,25 -31,18 +31,18 @@@ spec backoffLimit: 20 template: metadata: + annotations: + # Workarround to exclude K8S API from istio communication + # as init-container (readinessCheck) does not work with the + # Istio CNI plugin, see: + # (https://istio.io/latest/docs/setup/additional-setup/cni/#compatibility-with-application-init-containers) + traffic.sidecar.istio.io/excludeOutboundPorts: "443" labels: app: {{ include "common.name" . }} release: {{ include "common.release" . }} name: {{ include "common.name" . }} spec: - initContainers: - {{- if .Values.global.mariadbGalera.localCluster }} - {{- if .Values.global.mariadbGalera.useOperator }} - {{ include "common.readinessCheck.waitFor" (dict "dot" . "wait_for" .Values.readinessCheck.wait_for_local_operator ) | indent 6 | trim }} - {{ else }} - {{ include "common.readinessCheck.waitFor" (dict "dot" . "wait_for" .Values.readinessCheck.wait_for_local ) | indent 6 | trim }} - {{- end }} - {{ else }} - {{- if .Values.global.mariadbGalera.useOperator }} - {{ include "common.readinessCheck.waitFor" (dict "dot" . "wait_for" .Values.readinessCheck.wait_for_global_operator ) | indent 6 | trim }} - {{ else }} - {{ include "common.readinessCheck.waitFor" (dict "dot" . "wait_for" .Values.readinessCheck.wait_for_global ) | indent 6 | trim }} - {{- end }} - {{- end }} + initContainers: {{ include "common.readinessCheck.waitFor" . | nindent 6 }} containers: - name: {{ include "common.name" . }} image: {{ include "repositoryGenerator.image.mariadb" . }} @@@ -120,4 -113,5 +113,4 @@@ name: {{ include "mariadbInit.configMap" . }} defaultMode: 0755 restartPolicy: Never - imagePullSecrets: - - name: "{{ include "common.namespace" . }}-docker-registry-key" + {{- include "common.imagePullSecrets" . | nindent 6 }} diff --combined kubernetes/common/postgres-init/templates/job.yaml index 6736559b81,b62bef878f..348dda517a --- a/kubernetes/common/postgres-init/templates/job.yaml +++ b/kubernetes/common/postgres-init/templates/job.yaml @@@ -28,6 -28,12 +28,12 @@@ spec backoffLimit: 20 template: metadata: + annotations: + # Workarround to exclude K8S API from istio communication + # as init-container (readinessCheck) does not work with the + # Istio CNI plugin, see: + # (https://istio.io/latest/docs/setup/additional-setup/cni/#compatibility-with-application-init-containers) + traffic.sidecar.istio.io/excludeOutboundPorts: "443" labels: app: {{ include "common.name" . }} release: {{ include "common.release" . }} @@@ -100,4 -106,5 +106,4 @@@ emptyDir: medium: Memory restartPolicy: Never - imagePullSecrets: - - name: "{{ include "common.namespace" . }}-docker-registry-key" + {{- include "common.imagePullSecrets" . | nindent 6 }} diff --combined kubernetes/onap/values.yaml index a4bf64b653,75c2dacc00..f850936b97 --- a/kubernetes/onap/values.yaml +++ b/kubernetes/onap/values.yaml @@@ -58,20 -58,6 +58,20 @@@ global # user: myuser # password: mypassord + # Default definition of the secret containing the docker image repository + # credentials. In the default ONAP deployment the secret is created by the + # repository-wrapper component, which uses the secrets defined above. + # If this is not wanted or other secrets are created, alternative secret + # names can be used + # Overrides for specific images can be done, if the "image" entry is used as + # a map and the "pullSecrets" is used, e.g. + # image: + # ... + # pullSecrets: + # - myRegistryKeySecretName + # + imagePullSecrets: + - '{{ include "common.namespace" . }}-docker-registry-key' # common global images # Busybox for simple shell manipulation @@@ -103,7 -89,7 +103,7 @@@ postgresImage: crunchydata/crunchy-postgres:centos8-13.2-4.6.1 # readiness check image - readinessImage: onap/oom/readiness:5.0.1 + readinessImage: onap/oom/readiness:6.0.2 # image pull policy pullPolicy: Always