Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1265 from makkes/verify-deployment
Browse files Browse the repository at this point in the history
fix: verify deployed image
  • Loading branch information
k8s-ci-robot authored Aug 5, 2020
2 parents 32dba94 + c5fdea9 commit bb3cd73
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions scripts/deploy-kubefed.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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}"

Expand Down

0 comments on commit bb3cd73

Please sign in to comment.