Skip to content

Conversation

@adrianmoisey
Copy link
Member

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

During e2e tests, we see lots of this sort of warning:

I1026 14:43:38.748445 56509 warnings.go:110] "Warning: would violate PodSecurity "restricted:latest": allowPrivilegeEscalation != false (container "hamster" must set securityContext.allowPrivilegeEscalation=false), unrestricted capabilities (container "hamster" must set securityContext.capabilities.drop=["ALL"]), runAsNonRoot != true (pod or container "hamster" must set securityContext.runAsNonRoot=true), seccompProfile (pod or container "hamster" must set securityContext.seccompProfile.type to "RuntimeDefault" or "Localhost")"

I believe it's because the current settings set the namespace labels as such:

    pod-security.kubernetes.io/audit: restricted
    pod-security.kubernetes.io/enforce: baseline
    pod-security.kubernetes.io/warn: restricted

This change will also set audit and warn to baseline:

    pod-security.kubernetes.io/audit: baseline
    pod-security.kubernetes.io/enforce: baseline
    pod-security.kubernetes.io/warn: baseline

Meaning that the warnings that we currently see won't be created, reducing the e2e log noise.

I found a similar fix in k/k: kubernetes/kubernetes#118280

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. release-note-none Denotes a PR that doesn't merit a release note. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-area labels Oct 26, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adrianmoisey

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 26, 2025
@k8s-ci-robot k8s-ci-robot added area/vertical-pod-autoscaler size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed do-not-merge/needs-area labels Oct 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/vertical-pod-autoscaler cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants