Skip to content

Commit

Permalink
Minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
gsmith-sas committed Dec 18, 2023
1 parent 0da8269 commit c9dd843
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
24 changes: 15 additions & 9 deletions bin/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -310,28 +310,34 @@ 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"
v4m_replace "__${prefix}IMAGE_REPO_3LEVEL__" "$REGISTRY\/$REPOS\/$IMAGE" "$imageKeysFile"
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
}
Expand Down
2 changes: 0 additions & 2 deletions component_versions.env
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c9dd843

Please sign in to comment.