From 1f958714755be9424127940094e7bc284a54c76d Mon Sep 17 00:00:00 2001 From: Sneha Chhabria Date: Mon, 1 Nov 2021 05:58:35 -0700 Subject: [PATCH] update curl command for init containers The args for the culr job on the init containers in osm-controller and osm-injector has beeen updated to use curl params rather than bash Signed-off-by: Sneha Chhabria --- charts/osm/templates/osm-deployment.yaml | 9 +-------- charts/osm/templates/osm-injector-deployment.yaml | 9 +-------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/charts/osm/templates/osm-deployment.yaml b/charts/osm/templates/osm-deployment.yaml index e5ffc30cfa..4a4b2d84a3 100644 --- a/charts/osm/templates/osm-deployment.yaml +++ b/charts/osm/templates/osm-deployment.yaml @@ -38,14 +38,7 @@ spec: initContainers: - name: init-osm-controller image: {{ .Values.osm.curlImage }} - args: - - /bin/sh - - -c - - > - set -x; - while [ $(curl --connect-timeout 2 -sw '%{http_code}' "http://osm-bootstrap.{{ include "osm.namespace" . }}.svc.cluster.local:9095/healthz" -o /dev/null) -ne 200 ]; do - sleep 10; - done + command: ["curl", "http://osm-bootstrap.{{ include "osm.namespace" . }}.svc.cluster.local:9095/healthz", "--connect-timeout", "2", "--retry", "50", "--retry-connrefused", "--retry-delay", "5"] containers: - name: osm-controller image: "{{ include "osmController.image" . }}" diff --git a/charts/osm/templates/osm-injector-deployment.yaml b/charts/osm/templates/osm-injector-deployment.yaml index 348afc9757..729d23ea13 100644 --- a/charts/osm/templates/osm-injector-deployment.yaml +++ b/charts/osm/templates/osm-injector-deployment.yaml @@ -37,14 +37,7 @@ spec: initContainers: - name: init-osm-injector image: {{ .Values.osm.curlImage }} - args: - - /bin/sh - - -c - - > - set -x; - while [ $(curl --connect-timeout 2 -sw '%{http_code}' "http://osm-bootstrap.{{ include "osm.namespace" . }}.svc.cluster.local:9095/healthz" -o /dev/null) -ne 200 ]; do - sleep 10; - done + command: ["curl", "http://osm-bootstrap.{{ include "osm.namespace" . }}.svc.cluster.local:9095/healthz", "--connect-timeout", "2", "--retry", "50", "--retry-connrefused", "--retry-delay", "5"] containers: - name: osm-injector image: "{{ include "osmInjector.image" . }}"