From c9dd843e80941072d7a3934a7366238b8347579c Mon Sep 17 00:00:00 2001 From: gsmith-sas <65406958+gsmith-sas@users.noreply.github.com> Date: Mon, 18 Dec 2023 17:08:28 -0500 Subject: [PATCH] Minor cleanup --- bin/common.sh | 24 +++++++++++++++--------- component_versions.env | 2 -- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/bin/common.sh b/bin/common.sh index d0c3d974..b84eeecf 100644 --- a/bin/common.sh +++ b/bin/common.sh @@ -310,16 +310,24 @@ function doitall { GLOBAL_REGISTRY_OSBUG="$AIRGAP_REGISTRY" GLOBAL_REGISTRY="$AIRGAP_REGISTRY" REGISTRY="$AIRGAP_REGISTRY" + + if [ -n "$AIRGAP_IMAGE_PULL_SECRET_NAME" ]; then + pullsecrets_text="[name: ""$AIRGAP_IMAGE_PULL_SECRET_NAME""]" + pullsecret_text="$AIRGAP_IMAGE_PULL_SECRET_NAME" + else + pullsecrets_text="[]" + pullsecret_text="null" + fi + else GLOBAL_REGISTRY="null" GLOBAL_REGISTRY_OSBUG='""' - fi - if [ "$AIRGAP_IMAGE_PULL_SECRET_NAME" ]; then - pullsecret_text="[name: ""$AIRGAP_IMAGE_PULL_SECRET_NAME""]" - else pullsecret_text="[]" + pullsecret_text="null" fi + v4m_pullPolicy=${V4M_PULL_POLICY:-"IfNotPresent"} + v4m_replace "__${prefix}GLOBAL_REGISTRY_OSBUG__" "$GLOBAL_REGISTRY_OSBUG" "$imageKeysFile" v4m_replace "__${prefix}GLOBAL_REGISTRY__" "$GLOBAL_REGISTRY" "$imageKeysFile" v4m_replace "__${prefix}IMAGE_REGISTRY__" "$REGISTRY" "$imageKeysFile" @@ -327,11 +335,9 @@ function doitall { v4m_replace "__${prefix}IMAGE_REPO_2LEVEL__" "$REPOS\/$IMAGE" "$imageKeysFile" v4m_replace "__${prefix}IMAGE__" "$IMAGE" "$imageKeysFile" v4m_replace "__${prefix}IMAGE_TAG__" "$VERSION" "$imageKeysFile" - v4m_replace "__${prefix}IMAGE_PULL_POLICY__" "IfNotPresent" "$imageKeysFile" - v4m_replace "__${prefix}IMAGE_PULL_SECRET__" "null" "$imageKeysFile" #Handle Single Image Pull Secret - #v4m_replace "__${prefix}IMAGE_PULL_SECRETS__" "[]" "$imageKeysFile" #Handle Multiple Image Pull Secrets - #v4m_replace "__${prefix}IMAGE_PULL_SECRETS__" '[name: "foo-bar-secret"]' "$imageKeysFile" #Handle Multiple Image Pull Secrets - v4m_replace "__${prefix}IMAGE_PULL_SECRETS__" "$pullsecret_text" "$imageKeysFile" #Handle Multiple Image Pull Secrets + v4m_replace "__${prefix}IMAGE_PULL_POLICY__" "$v4m_pullpolicy" "$imageKeysFile" + v4m_replace "__${prefix}IMAGE_PULL_SECRET__" "pullsecret_text" "$imageKeysFile" #Handle Charts Accepting a Single Image Pull Secret + v4m_replace "__${prefix}IMAGE_PULL_SECRETS__" "$pullsecrets_text" "$imageKeysFile" #Handle Charts Accepting Multiple Image Pull Secrets return 0 } diff --git a/component_versions.env b/component_versions.env index 8c83e0f7..0813160e 100644 --- a/component_versions.env +++ b/component_versions.env @@ -13,8 +13,6 @@ ESEXPORTER_HELM_CHART_REPO=prometheus-community ESEXPORTER_HELM_CHART_NAME=prometheus-elasticsearch-exporter ESEXPORTER_HELM_CHART_VERSION=5.3.1 ES_EXPORTER_FULL_IMAGE="quay.io/prometheuscommunity/elasticsearch-exporter:v1.6.0" -###ESEXPORTER_HELM_CHART_VERSION=5.2.0 -###ES_EXPORTER_FULL_IMAGE="quay.io/prometheuscommunity/elasticsearch-exporter:v1.5.0" #Fluent Bit FLUENTBIT_HELM_CHART_REPO=fluent