Expand hostpath kyverno policies to include Persistent Volumes
Package Merge Request
Package Changes
Expand hostpath kyverno policies to include Persistent Volumes
Package MR
- https://repo1.dso.mil/platform-one/big-bang/apps/sandbox/kyverno-policies/-/merge_requests/16
- https://repo1.dso.mil/platform-one/big-bang/apps/sandbox/kyverno-policies/-/merge_requests/17
For Issue
Closes https://repo1.dso.mil/platform-one/big-bang/apps/sandbox/kyverno-policies/-/issues/5
Merge request reports
Activity
changed milestone to %1.35.0
added teamcore/security + 1 deleted label
requested review from @micah.nagel
assigned to @toladipupo
added statusreview label
removed statusreview label
- Resolved by Micah Nagel
@toladipupo I'm closing the duplicate of this - https://repo1.dso.mil/platform-one/big-bang/bigbang/-/merge_requests/1692
There seems to be an issue with the policy...it's blocking the Twistlock console PVC but the PVC doesn't use a hostpath mount?(see comment below)Kyverno error:
Warning ProvisioningFailed 118s (x5 over 8m39s) rancher.io/local-path_local-path-provisioner-6c79684f77-zhp2h_35a7f3a5-a7ab-4277-a7c9-f60af2d8002d Error creating provisioned PV object for claim twistlock/twistlock-console: admission webhook "validate.kyverno.svc-fail" denied the request: resource PersistentVolume//pvc-4cc71bd1-be17-45f9-961e-dbab5fe7c66b was blocked due to the following policies restrict-host-path-mount: restrict-hostpath-dirs: 'validation error: hostPath volume paths are restricted to the allowed list. Rule restrict-hostpath-dirs failed at path /spec/hostPath/path/' . Deleting the volume.
PVC:
apiVersion: v1 kind: PersistentVolumeClaim metadata: annotations: meta.helm.sh/release-name: twistlock-twistlock meta.helm.sh/release-namespace: twistlock volume.beta.kubernetes.io/storage-provisioner: rancher.io/local-path volume.kubernetes.io/selected-node: k3d-k3s-default-agent-1 volume.kubernetes.io/storage-provisioner: rancher.io/local-path creationTimestamp: "2022-05-25T19:21:11Z" finalizers: - kubernetes.io/pvc-protection labels: app.kubernetes.io/managed-by: Helm helm.toolkit.fluxcd.io/name: twistlock helm.toolkit.fluxcd.io/namespace: bigbang name: twistlock-console namespace: twistlock resourceVersion: "5965" uid: 4cc71bd1-be17-45f9-961e-dbab5fe7c66b spec: accessModes: - ReadWriteOnce resources: requests: storage: 100Gi storageClassName: local-path volumeMode: Filesystem status: phase: Pending
Edited by Micah Nagel
added 28 commits
-
a6d9e1ac...845bd377 - 24 commits from branch
master
- 9499b903 - Expand hostpath kyverno policies to include Persistent Volumes
- 8324f6d7 - add path exception
- d4966cad - updated developer overrides
- 56604fa3 - update draft to branch
Toggle commit list-
a6d9e1ac...845bd377 - 24 commits from branch
added 1 commit
- 4b63528c - added values for restrict-host-path-mount-pv
- Automatically resolved by Tunde Oladipupo
added 46 commits
-
8d1bf6c2...6669f696 - 44 commits from branch
master
- e1dbcc47 - Merge branch 'master' into kyerno-policies-5
- c5fc8a7e - update docs
-
8d1bf6c2...6669f696 - 44 commits from branch
added 2 commits
- Resolved by Micah Nagel
changed milestone to %1.36.0
added statusreview label
mentioned in merge request !1748 (closed)
enabled an automatic merge when the pipeline for 147871fd succeeds
- Resolved by Tunde Oladipupo
enabled an automatic merge when the pipeline for 0fb6ca54 succeeds
- Resolved by Micah Nagel
enabled an automatic merge when the pipeline for 589b69d1 succeeds
mentioned in issue #1220 (closed)
mentioned in commit 7495c9c3