kubernetes-retired / multi-tenancy

A working place for multi-tenancy related proposals and prototypes.
Apache License 2.0
954 stars 172 forks source link

Ensure excluded-namespaces are properly configured before e2e tests #1481

Closed yiqigao217 closed 3 years ago

yiqigao217 commented 3 years ago

Part of #1480

Force adding excluded-namespace labels to excluded namespaces before running the e2e test so that it won't break the cluster. E.g. HNC object webhook denies any object changes in namespaces without this label, it could break kube-system namespace if the label is missing.

Add test-e2e-batch target and factor out the messages before e2e tests for regular test-e2e and test-e2e-batch. Add link to excluded-namespace concept.

Tested by make test-e2e and make test-e2e-batch N=3.

Prow config is unchanged because in hack/prow-run-e2e.sh for postsubmit and periodic e2e tests, it's already using test-e2e target.

The output for make test-e2e-batch N=10 looks like this.

yiqigao217 commented 3 years ago

Hi @adrianludwin this is ready for another review.

BTW since we now force adding excluded-namespaces labels to system namespaces in the e2e test, do I still need to change the testgrid? Is it using make test-e2e target directly?

yiqigao217 commented 3 years ago

BTW since we now force adding excluded-namespaces labels to system namespaces in the e2e test, do I still need to change the testgrid? Is it using make test-e2e target directly?

hack/prow-run-e2e.sh used in postsubmit and periodic e2e tests is using test-e2e target, so no change is needed there.

k8s-ci-robot commented 3 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adrianludwin, yiqigao217

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubernetes-sigs/multi-tenancy/blob/master/OWNERS)~~ [adrianludwin,yiqigao217] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment