diff options
author | 2024-03-25 11:15:11 +0100 | |
---|---|---|
committer | 2024-03-27 16:24:43 +0100 | |
commit | d518f733756ef9d9b1b7015d509906152d6a1288 (patch) | |
tree | 869a98c87ffde8f91474e11af6c6ec4a0076ca78 /kubernetes/common/readinessCheck/templates/_readinessCheck.tpl | |
parent | 148634b5a6d0d0a8abaee04f416dbae6d6814e38 (diff) |
[COMMON][READINESS] Update readiness image and use service feature
Update the ReadinessCheck (13.1.0) to support the "services" feature
of readiness image version 6.0.2 and use the feature in the charts
under common (dgbuilder, etcd-init, mariadb-galera, mariadb-init,
postgres-init)
Additional exclude K8S API port (443) from Istio Sidecar communication
to allow CNI Plugin
Issue-ID: OOM-3280
Change-Id: Ibe030aa9debfc82e88f2ce5e309dd6fa2250f211
Signed-off-by: Andreas Geissler <andreas-geissler@telekom.de>
Diffstat (limited to 'kubernetes/common/readinessCheck/templates/_readinessCheck.tpl')
-rw-r--r-- | kubernetes/common/readinessCheck/templates/_readinessCheck.tpl | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/kubernetes/common/readinessCheck/templates/_readinessCheck.tpl b/kubernetes/common/readinessCheck/templates/_readinessCheck.tpl index 879be1288f..51791fec13 100644 --- a/kubernetes/common/readinessCheck/templates/_readinessCheck.tpl +++ b/kubernetes/common/readinessCheck/templates/_readinessCheck.tpl @@ -42,6 +42,14 @@ pods: - test-pod + the powerful one allows also to wait for a service to be + available, which means all pods are deployed, which are + selected by the service definition: + wait_for: + name: myservice + services: + - mariadb-galera-service + the powerful one allows also to wait for pods with the given "app" label: wait_for: @@ -62,8 +70,8 @@ - .dot : environment (.) - .initRoot : the root dictionary of readinessCheck submodule (default to .Values.readinessCheck) - - .wait_for : list of containers / pods /apps / jobs to wait for (default to - .Values.wait_for) + - .wait_for : list of service / containers / pods /apps / jobs to wait for + (default to .Values.wait_for) Example calls: {{ include "common.readinessCheck.waitFor" . }} @@ -76,6 +84,7 @@ {{- $subchartDot := fromJson (include "common.subChartDot" (dict "dot" $dot "initRoot" $initRoot)) }} {{- $wait_for := default $initRoot.wait_for .wait_for -}} {{- $containers := index (ternary (dict "containers" $wait_for) $wait_for (kindIs "slice" $wait_for)) "containers" -}} +{{- $services := index (ternary (dict) $wait_for (kindIs "slice" $wait_for)) "services" -}} {{- $pods := index (ternary (dict) $wait_for (kindIs "slice" $wait_for)) "pods" -}} {{- $apps := index (ternary (dict) $wait_for (kindIs "slice" $wait_for)) "apps" -}} {{- $namePart := index (ternary (dict) $wait_for (kindIs "slice" $wait_for)) "name" -}} @@ -97,6 +106,10 @@ - --pod-name - {{ tpl $pod $dot }} {{- end }} + {{- range $service := default (list) $services }} + - --service-name + - {{ tpl $service $dot }} + {{- end }} {{- range $app := default (list) $apps }} - --app-name - {{ tpl $app $dot }} |