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

[release-0.6] [e2e] Restore the manager's image from the bash scripts. (Cherry pick #1830) #1836

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 0 additions & 2 deletions Makefile
Expand Up @@ -190,14 +190,12 @@ run-test-e2e-%: K8S_VERSION = $(@:run-test-e2e-%=%)
run-test-e2e-%: FORCE
@echo Running e2e for k8s ${K8S_VERSION}
E2E_KIND_VERSION="kindest/node:v$(K8S_VERSION)" KIND_CLUSTER_NAME=$(KIND_CLUSTER_NAME) CREATE_KIND_CLUSTER=$(CREATE_KIND_CLUSTER) ARTIFACTS="$(ARTIFACTS)/$@" IMAGE_TAG=$(IMAGE_TAG) GINKGO_ARGS="$(GINKGO_ARGS)" ./hack/e2e-test.sh
@$(call clean-manifests)

JOBSET_VERSION = $(shell $(GO_CMD) list -m -f "{{.Version}}" sigs.k8s.io/jobset)
run-test-multikueue-e2e-%: K8S_VERSION = $(@:run-test-multikueue-e2e-%=%)
run-test-multikueue-e2e-%: FORCE
@echo Running multikueue e2e for k8s ${K8S_VERSION}
E2E_KIND_VERSION="kindest/node:v$(K8S_VERSION)" KIND_CLUSTER_NAME=$(KIND_CLUSTER_NAME) CREATE_KIND_CLUSTER=$(CREATE_KIND_CLUSTER) ARTIFACTS="$(ARTIFACTS)/$@" IMAGE_TAG=$(IMAGE_TAG) GINKGO_ARGS="$(GINKGO_ARGS)" JOBSET_VERSION=$(JOBSET_VERSION) ./hack/multikueue-e2e-test.sh
@$(call clean-manifests)

.PHONY: ci-lint
ci-lint: golangci-lint
Expand Down
9 changes: 9 additions & 0 deletions hack/e2e-common.sh
Expand Up @@ -14,6 +14,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

export KUSTOMIZE="$ROOT_DIR"/bin/kustomize
export GINKGO="$ROOT_DIR"/bin/ginkgo
export KIND="$ROOT_DIR"/bin/kind
export YQ="$ROOT_DIR"/bin/yq


# $1 - cluster name
Expand Down Expand Up @@ -57,3 +61,8 @@ function cluster_kueue_deploy {
fi
}

export INITIAL_IMAGE=$($YQ '.images[] | select(.name == "controller") | [.newName, .newTag] | join(":")' config/components/manager/kustomization.yaml)

function restore_managers_image {
(cd config/components/manager && $KUSTOMIZE edit set image controller=$INITIAL_IMAGE)
}
3 changes: 2 additions & 1 deletion hack/e2e-test.sh
Expand Up @@ -35,7 +35,8 @@ function cleanup {
fi
cluster_cleanup $KIND_CLUSTER_NAME
fi
exit 0
#do the image restore here for the case when an error happened during deploy
restore_managers_image
}

function startup {
Expand Down
3 changes: 2 additions & 1 deletion hack/multikueue-e2e-test.sh
Expand Up @@ -46,7 +46,8 @@ function cleanup {
cluster_cleanup $WORKER1_KIND_CLUSTER_NAME
cluster_cleanup $WORKER2_KIND_CLUSTER_NAME
fi
exit 0
#do the image restore here for the case when an error happened during deploy
restore_managers_image
}


Expand Down