Skip to content

Commit

Permalink
Override nettest and submariner-metrics-proxy
Browse files Browse the repository at this point in the history
To ensure that we're testing with the latest image, as available in
the local repository, we need to override all users of the nettest
image. Currently subctl exposes two components for that:
submariner-nettest and submariner-metrics-proxy. This patch adds
support for multiple components per image; since the project already
preloads the nettest image, this results in the correct image override
arguments being given to subctl.

Signed-off-by: Stephen Kitt <[email protected]>
  • Loading branch information
skitt committed Jun 27, 2023
1 parent f8aa769 commit d392f63
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions scripts/shared/lib/deploy_operator
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ component_by_image['submariner-operator']=submariner-operator
component_by_image['submariner-route-agent']=submariner-routeagent
component_by_image['lighthouse-agent']=submariner-lighthouse-agent
component_by_image['lighthouse-coredns']=submariner-lighthouse-coredns
component_by_image['nettest']='submariner-nettest submariner-metrics-proxy'

### Functions ###

Expand Down Expand Up @@ -66,9 +67,11 @@ function subctl_install_subm() {
[[ "$AIR_GAPPED" = true ]] && extra_flags+=(--repository "${SUBM_IMAGE_REPO}" --version "${SUBM_IMAGE_TAG}")

for image in ${PRELOAD_IMAGES}; do
local image_key="${component_by_image[$image]}"
[[ -n "${image_key}" ]] || continue
extra_flags+=(--image-override "${image_key}=${SUBM_IMAGE_REPO}/${image}:${SUBM_IMAGE_TAG}")
local image_keys="${component_by_image[$image]}"
[[ -n "${image_keys}" ]] || continue
for image_key in $image_keys; do
extra_flags+=(--image-override "${image_key}=${SUBM_IMAGE_REPO}/${image}:${SUBM_IMAGE_TAG}")
done
done
fi

Expand Down

0 comments on commit d392f63

Please sign in to comment.