-
Notifications
You must be signed in to change notification settings - Fork 40
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
fix: add test ns labels for PSA #278
Conversation
e2e/helper.go
Outdated
@@ -34,6 +34,9 @@ func createNamespace(ctx context.Context, namespace string) error { | |||
label := make(map[string]string) | |||
// label required for monitoring this namespace | |||
label["openshift.io/cluster-monitoring"] = "true" | |||
label["pod-security.kubernetes.io/enforce"] = "baseline" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should not we use privileged
@@ -52,6 +55,9 @@ func deleteNamespaceAndWait(ctx context.Context, namespace string) error { | |||
label := make(map[string]string) | |||
// label required for monitoring this namespace | |||
label["openshift.io/cluster-monitoring"] = "true" | |||
label["pod-security.kubernetes.io/enforce"] = "baseline" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deleting the namespace should not require labels, Just a name should be enough.
The PSA changes in OCP 4.12 prevent pods from starting as ns are labeled restricted by default. This commit sets the label pod-security.kubernetes.io/enforce: "privileged" on the namespaces created by the e2e tests so pods can run. This also renames a file to conform to the naming convention. Signed-off-by: N Balachandran <nibalach@redhat.com>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: iamniting, nbalacha 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:
Approvers can indicate their approval by writing |
/cherry-pick release-4.12 |
@nbalacha: new pull request created: #280 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
The PSA changes in OCP 4.12 prevent pods from starting as ns are labeled restricted by default. This commit sets the label pod-security.kubernetes.io/enforce: "baseline"
on the lvm-endtoendtest to allow the test pods to run. This also renames a file to conform to the naming convention.
Signed-off-by: N Balachandran nibalach@redhat.com