diff --git a/scripts/deploy-kubefed.sh b/scripts/deploy-kubefed.sh index 3a135ea556..14c204f637 100755 --- a/scripts/deploy-kubefed.sh +++ b/scripts/deploy-kubefed.sh @@ -84,6 +84,9 @@ EOF fi ${cmd} + + deployment-image-as-expected ${NS} kubefed-admission-webhook admission-webhook ${repository}/${image}:${tag} + deployment-image-as-expected ${NS} kubefed-controller-manager controller-manager ${repository}/${image}:${tag} } function helm-deploy-cmd { @@ -108,6 +111,16 @@ function kubefed-admission-webhook-ready() { [[ "${readyReplicas}" -ge "1" ]] } +function deployment-image-as-expected() { + local namespace="${1}" + local deployment="${2}" + local container="${3}" + local expected_image="${4}" + + local deployed_image="$(kubectl -n ${namespace} get deployment ${deployment} -o jsonpath='{.spec.template.spec.containers[?(@.name=="'"${container}"'")].image}')" + [[ "${deployed_image}" == "${expected_image}" ]] +} + function check-command-installed() { local cmdName="${1}"