Skip to content

Commit

Permalink
A better way to use compiled image in the tests (#2087)
Browse files Browse the repository at this point in the history
* A better way to use compiled image in test

* remove unneeded xargs

Signed-off-by: pjuarezd <pjuarezd@users.noreply.github.com>

---------

Signed-off-by: pjuarezd <pjuarezd@users.noreply.github.com>
Co-authored-by: pjuarezd <pjuarezd@users.noreply.github.com>
  • Loading branch information
cniackz and pjuarezd committed Apr 22, 2024
1 parent 4cc3123 commit cc44b65
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions testing/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -582,8 +582,20 @@ function install_operator() {
value=minio-operator
else
echo "Installing Current Operator"
# Created an overlay to use that image version from dev folder
try kubectl apply -k "${SCRIPT_DIR}/../testing/dev"
echo "When coming from the upgrade test, the operator is already installed."
operator_deployment=$(kubectl get deployment minio-operator -n minio-operator | grep -c minio-operator)
echo "Check whether we should reinstall it or simply change the images."
if [ "$operator_deployment" != 1 ]; then
echo "operator is not installed, will be installed"
try kubectl apply -k "${SCRIPT_DIR}/../resources" # we maintain just one spot, no new overlays
else
echo "Operator is not re-installed as is already installed"
fi

# and then we change the images, no need to have more overlays in different folders.
echo "changing images for console and minio-operator deployments"
try kubectl -n minio-operator set image deployment/minio-operator minio-operator="$TAG"
try kubectl -n minio-operator set image deployment/console console="$TAG"

echo "key, value for pod selector in kustomize test"
key=name
Expand Down

0 comments on commit cc44b65

Please sign in to comment.