Skip to content

Commit d4e22d7

Browse files
authored
Take nodelink deployment image from intended place instead of copy from deployment (#6)
1 parent 5ef1a6e commit d4e22d7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

hack/deploy-nodelink-controller.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ set -euo pipefail
66

77

88
UPSTREAM_NODELINK_DEPLOYMENT="machine-api-controllers"
9-
UPSTREAM_MACHINE_API_OPERATOR_DEPLOYMENT="machine-api-operator"
9+
IMAGES_CONFIG_MAP="machine-api-operator-images"
10+
OPERATOR_IMAGE_KEY="machineAPIOperator"
1011

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

1617
tmpdir=$(mktemp -d)
1718

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

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

0 commit comments

Comments
 (0)