Bug 2223948
| Summary: | PodSecurity violations messages found in virt-operator | ||
|---|---|---|---|
| Product: | Container Native Virtualization (CNV) | Reporter: | Ahmad <ahafe> |
| Component: | Installation | Assignee: | Simone Tiraboschi <stirabos> |
| Status: | POST --- | QA Contact: | Debarati Basu-Nag <dbasunag> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 4.14.0 | CC: | dbasunag, stirabos |
| Target Milestone: | --- | ||
| Target Release: | 4.14.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | Type: | Bug | |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Ahmad
2023-07-19 11:30:36 UTC
Technically this is behaving as expected from our side.
on our namespace we have:
$ oc get namespace openshift-cnv -o yaml
apiVersion: v1
kind: Namespace
metadata:
annotations:
openshift.io/node-selector: ""
openshift.io/sa.scc.mcs: s0:c27,c9
openshift.io/sa.scc.supplemental-groups: 1000720000/10000
openshift.io/sa.scc.uid-range: 1000720000/10000
creationTimestamp: "2023-07-12T11:45:57Z"
labels:
kubernetes.io/metadata.name: openshift-cnv
olm.operatorgroup.uid/1092e918-ae54-4bac-82ce-2bc3d255f802: ""
olm.operatorgroup.uid/bb0d098d-b2da-4076-a3eb-384313089ba9: ""
openshift.io/cluster-monitoring: "true"
pod-security.kubernetes.io/enforce: privileged
pod-security.kubernetes.io/enforce-version: v1.24
security.openshift.io/scc.podSecurityLabelSync: "true"
name: openshift-cnv
resourceVersion: "67019"
uid: b8c86726-d7a1-41fc-a361-135c850cd0f8
spec:
finalizers:
- kubernetes
status:
phase: Active
with `security.openshift.io/scc.podSecurityLabelSync: "true"` to let the OCP psalabelsyncer set the expected value for `pod-security.kubernetes.io/enforce` according to our SCCs and indeed it's setting `pod-security.kubernetes.io/enforce: privileged` and so our pods are correctly ammitted.
The point is that the OCP psalabelsyncer is not setting `pod-security.kubernetes.io/warn: privileged` and `pod-security.kubernetes.io/warn: audit` see: ( https://github.com/openshift/cluster-policy-controller/blob/0dff401e9819311c8f0de2792e913342c92883a1/pkg/psalabelsyncer/podsecurity_label_sync_controller.go#L257-L266 )
and the default at OCP level is now `pod-security.kubernetes.io/warn: restricted` and `pod-security.kubernetes.io/warn: restricted` and so the violations are still auted and warned although absolutely harmless.
Let's try to get this properly fixed on the OCP psalabelsyncer side.
|