Skip to content

Commit

Permalink
Take nodelink deployment image from intended place instead of copy fr…
Browse files Browse the repository at this point in the history
…om deployment (#6)
  • Loading branch information
bastjan authored Oct 22, 2024
1 parent 5ef1a6e commit d4e22d7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions hack/deploy-nodelink-controller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ set -euo pipefail


UPSTREAM_NODELINK_DEPLOYMENT="machine-api-controllers"
UPSTREAM_MACHINE_API_OPERATOR_DEPLOYMENT="machine-api-operator"
IMAGES_CONFIG_MAP="machine-api-operator-images"
OPERATOR_IMAGE_KEY="machineAPIOperator"

if kubectl get deployment "${UPSTREAM_NODELINK_DEPLOYMENT}" &> /dev/null; then
echo "Real upstream nodelink deployment already exists, skipping"
Expand All @@ -15,7 +16,7 @@ fi

tmpdir=$(mktemp -d)

image=$(kubectl get deployment "${UPSTREAM_MACHINE_API_OPERATOR_DEPLOYMENT}" -oyaml | yq '.spec.template.spec.containers | filter(.name == "machine-api-operator") | .[0].image')
image=$(kubectl get configmap "${IMAGES_CONFIG_MAP}" -oyaml | yq '.data["images.json"] | from_yaml | .["'"${OPERATOR_IMAGE_KEY}"'"]')

imageParts=(${image//@/ })

Expand Down

0 comments on commit d4e22d7

Please sign in to comment.