kubevirt / kubesecondarydns

DNS for KubeVirt VirtualMachines secondary interfaces
Apache License 2.0
7 stars 8 forks source link

Make secondary-dns deployment PSA ready #50

Closed AlonaKaplan closed 1 year ago

AlonaKaplan commented 1 year ago

What this PR does / why we need it: Make secondary-dns deployment PSA ready

Can be tested by - kubectl label --dry-run=server --overwrite ns secondary pod-security.kubernetes.io/enforce=restricted

Without this PR, those kind of warnings are returned -

Warning: existing pods in namespace "secondary" violate the new PodSecurity enforce level "restricted:latest"
Warning: secondary-dns-6fcbb7cf65-8qfnm: allowPrivilegeEscalation != false, unrestricted capabilities, runAsNonRoot != true, seccompProfile

https://kubernetes.io/docs/concepts/security/pod-security-admission/

Special notes for your reviewer:

Release note:

 Make secondary-dns deployment PSA ready
oshoval commented 1 year ago

What about bumping kubevirtci (to take https://github.com/kubevirt/kubevirtci/pull/915) and setting KUBEVIRT_PSA ?

AlonaKaplan commented 1 year ago

What about bumping kubevirtci (to take https://github.com/kubevirt/kubevirtci/pull/915) and setting KUBEVIRT_PSA ?

Will be done in a follow up.

oshoval commented 1 year ago

What about bumping kubevirtci (to take kubevirt/kubevirtci#915) and setting KUBEVIRT_PSA ?

Will be done in a follow up.

Why not in this PR ? It is related as it really test the changes, and a small change

oshoval commented 1 year ago

Please notify kubevirtci maintainers about the kubevirtci bug you found that the PSA is enabled even when it is false I suspect that the fact there is this line, make it restrictive even if KUBEVIRT_PSA is disabled (when the file is empty)

https://github.com/kubevirt/kubevirtci/pull/915/files#diff-154be10cebcc0882a03cece24a5be072e0a855a43960518294d9bc5561f4c33fR22

oshoval commented 1 year ago

Please check the failure here https://prow.ci.kubevirt.io/view/gs/kubevirt-prow/pr-logs/pull/kubevirt_kubesecondarydns/50/pull-kubesecondarydns-e2e-k8s/1604797935252410368

AlonaKaplan commented 1 year ago

/approve

kubevirt-bot commented 1 year ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AlonaKaplan

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/kubevirt/kubesecondarydns/blob/main/OWNERS)~~ [AlonaKaplan] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
oshoval commented 1 year ago

Can you please issue a new tag ? need for CNAO / HCO, so it will be PSA ready