Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade operator test #2

Merged
merged 26 commits into from
Dec 13, 2022
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
b2db5cc
Test operator upgrade from version x to version y
allanrogerr Dec 12, 2022
6838eb7
Setup manual workflow in Github
allanrogerr Dec 12, 2022
3182f8f
Update kubernetes-tests.yml
allanrogerr Dec 12, 2022
cc4404d
Update kubernetes-tests.yml
allanrogerr Dec 12, 2022
52b7be3
Update helm.yaml
allanrogerr Dec 12, 2022
a30efe5
Test operator upgrade from version x to version y
allanrogerr Dec 12, 2022
7c5cd4a
Test operator upgrade from version x to version y
allanrogerr Dec 12, 2022
c5ab517
Test operator upgrade from version x to version y
allanrogerr Dec 12, 2022
43edac2
Test operator upgrade from version x to version y
allanrogerr Dec 12, 2022
ca37812
Test operator upgrade from version x to version y
allanrogerr Dec 12, 2022
f13709e
Test operator upgrade from version x to version y
allanrogerr Dec 12, 2022
430c6c2
Test operator upgrade from version x to version y
allanrogerr Dec 12, 2022
535fe53
Test operator upgrade from version x to version y
allanrogerr Dec 12, 2022
0ab5514
Test operator upgrade from version x to version y
allanrogerr Dec 12, 2022
95a288a
Test operator upgrade from version x to version y
allanrogerr Dec 12, 2022
cef40a6
Test operator upgrade from version x to version y
allanrogerr Dec 12, 2022
152db99
Test operator upgrade from version x to version y
allanrogerr Dec 12, 2022
138b892
Test operator upgrade from version x to version y
allanrogerr Dec 12, 2022
8217a3f
Test operator upgrade from version x to version y
allanrogerr Dec 12, 2022
c1b6147
Test operator upgrade from version x to version y
allanrogerr Dec 13, 2022
f77a986
Merge branch 'master' into upgrade_operator_test
allanrogerr Dec 13, 2022
00f6b66
Test operator upgrade from version x to version y
allanrogerr Dec 13, 2022
3e9dd1d
Test operator upgrade from version x to version y
allanrogerr Dec 13, 2022
1452f3f
Test operator upgrade from version x to version y
allanrogerr Dec 13, 2022
eda1704
Test operator upgrade from version x to version y
allanrogerr Dec 13, 2022
85d6bd4
Test operator upgrade from version x to version y
allanrogerr Dec 13, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions testing/deploy-tenant-upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ tenant="storage-lite"
bucket="data"
dummy="dummy.data"
localport="9000"
totalwait=0
alias="minios3"

# Preparing tenant for bucket manipulation
function bootstrap_tenant() {
# Port forward
function port_forward() {
totalwait=0
echo 'Validating tenant pods are ready to serve'
for pod in `kubectl --namespace $namespace --selector=v1.min.io/tenant=$tenant get pod -o json | jq '.items[] | select(.metadata.name|contains("'$tenant'"))| .metadata.name' | sed 's/"//g'`; do
while true; do
Expand Down Expand Up @@ -61,6 +61,15 @@ function bootstrap_tenant() {
echo "Establishing port-forward"
kubectl port-forward service/$tenant-hl -n $namespace $localport:$localport &

echo 'start - wait for port-forward to be completed'
sleep 15
echo 'end - wait for port-forward to be completed'
}

# Preparing tenant for bucket manipulation
function bootstrap_tenant() {
port_forward

# Obtain root credentials
TENANT_CONFIG_SECRET=$(kubectl -n $namespace get tenants $tenant -o jsonpath="{.spec.configuration.name}")
USER=$(kubectl -n $namespace get secrets "$TENANT_CONFIG_SECRET" -o go-template='{{index .data "config.env"|base64decode }}' | grep 'export MINIO_ROOT_USER="' | sed -e 's/export MINIO_ROOT_USER="//g' | sed -e 's/"//g')
Expand All @@ -75,17 +84,21 @@ function bootstrap_tenant() {

# Upload dummy data to tenant bucket
function upload_dummy_data() {
port_forward

echo "Uploading dummy data to tenant bucket"
cp ${SCRIPT_DIR}/deploy-tenant-upgrade.sh ${SCRIPT_DIR}/$dummy
mc cp ${SCRIPT_DIR}/$dummy $alias/$bucket/$dummy --insecure
}

# Download dummy data from tenant bucket
function download_dummy_data() {
port_forward

echo "Download dummy data from tenant bucket"
mc cp $alias/$bucket/$dummy ${SCRIPT_DIR}/$dummy --insecure

if cmp -s "${SCRIPT_DIR}/deploy-tenant-upgrade.sh" "${SCRIPT_DIR}/$dummy"; then
if cmp "${SCRIPT_DIR}/deploy-tenant-upgrade.sh" "${SCRIPT_DIR}/$dummy"; then
echo "Operator upgrade test complete; no issue found"
else
echo "Operator upgrade test failed"
Expand Down