Skip to content

Commit

Permalink
Use image overrides when deploying with Helm
Browse files Browse the repository at this point in the history
Similarly to using image overrides in operator based deployments -
use image overrides, based on `$PRELOAD_IMAGES`, for determining which
exact images to override.

Signed-off-by: Mike Kolesnik <[email protected]>
  • Loading branch information
mkolesnik authored and tpantelis committed Aug 31, 2022
1 parent 2b2120f commit 11c849b
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions scripts/shared/lib/deploy_helm
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,18 @@ function helm_install_subm() {
return
fi

declare -a images_flags
for image in ${PRELOAD_IMAGES}; do
if [[ "${image}" = submariner-operator ]]; then
images_flags+=(--set operator.image.repository="${SUBM_IMAGE_REPO}/submariner-operator" \
--set operator.image.tag="${SUBM_IMAGE_TAG}" \
--set operator.image.pullPolicy="IfNotPresent")
continue
fi

images_flags+=(--set "images.${image}=${SUBM_IMAGE_REPO}/${image}:${SUBM_IMAGE_TAG}")
done

echo "Installing Submariner..."
# shellcheck disable=SC2086 # Split on purpose
helm --kube-context "${cluster}" install --debug --devel submariner-operator \
Expand All @@ -61,11 +73,7 @@ function helm_install_subm() {
--set serviceAccounts.lighthouseAgent.create="${LIGHTHOUSE}" \
--set serviceAccounts.lighthouseCoreDns.create="${LIGHTHOUSE}" \
--set submariner.natEnabled="false" \
--set operator.image.repository="${SUBM_IMAGE_REPO}/submariner-operator" \
--set operator.image.tag="${SUBM_IMAGE_TAG}" \
--set operator.image.pullPolicy="IfNotPresent" \
--set submariner.images.repository="${SUBM_IMAGE_REPO}" \
--set submariner.images.tag="${SUBM_IMAGE_TAG}" \
"${images_flags[@]}" \
--set brokercrds.create="${crd_create}"
}

Expand Down

0 comments on commit 11c849b

Please sign in to comment.