forked from kyverno/kyverno
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: ShutingZhao <[email protected]>
- Loading branch information
1 parent
357caa7
commit 98c0ae5
Showing
4 changed files
with
46 additions
and
36 deletions.
There are no files selected for viewing
38 changes: 3 additions & 35 deletions
38
...w/mutate/clusterpolicy/standard/existing/background-false/chainsaw-step-01-apply-1-1.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,4 @@ | ||
apiVersion: kyverno.io/v1 | ||
kind: ClusterPolicy | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
annotations: | ||
kyverno.io/kubernetes-version: "1.24" | ||
kyverno.io/kyverno-version: 1.8.0 | ||
policies.kyverno.io/category: Pod Security Admission | ||
policies.kyverno.io/description: 'When Pod Security Admission is configured with | ||
a cluster-wide AdmissionConfiguration file which sets either baseline or restricted, | ||
for example in many PaaS CIS profiles, it may be necessary to relax this to | ||
privileged on a per-Namespace basis so that more granular control can be provided. | ||
This policy labels new and existing Namespaces, except that of kube-system, | ||
with the `pod-security.kubernetes.io/enforce: privileged` label. ' | ||
policies.kyverno.io/minversion: 1.7.0 | ||
policies.kyverno.io/severity: medium | ||
policies.kyverno.io/subject: Namespace | ||
policies.kyverno.io/title: Add Privileged Label to Existing Namespaces | ||
name: add-privileged-existing-namespaces | ||
spec: | ||
background: false | ||
mutateExistingOnPolicyUpdate: true | ||
rules: | ||
- match: | ||
any: | ||
- resources: | ||
kinds: | ||
- Namespace | ||
mutate: | ||
patchStrategicMerge: | ||
metadata: | ||
labels: | ||
foo: bar | ||
targets: | ||
- apiVersion: v1 | ||
kind: Namespace | ||
name: label-privileged-namespaces | ||
name: background-false-ns |
39 changes: 39 additions & 0 deletions
39
...w/mutate/clusterpolicy/standard/existing/background-false/chainsaw-step-01-apply-1-2.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
apiVersion: kyverno.io/v1 | ||
kind: ClusterPolicy | ||
metadata: | ||
annotations: | ||
kyverno.io/kubernetes-version: "1.24" | ||
kyverno.io/kyverno-version: 1.8.0 | ||
policies.kyverno.io/category: Pod Security Admission | ||
policies.kyverno.io/description: 'When Pod Security Admission is configured with | ||
a cluster-wide AdmissionConfiguration file which sets either baseline or restricted, | ||
for example in many PaaS CIS profiles, it may be necessary to relax this to | ||
privileged on a per-Namespace basis so that more granular control can be provided. | ||
This policy labels new and existing Namespaces, except that of kube-system, | ||
with the `pod-security.kubernetes.io/enforce: privileged` label. ' | ||
policies.kyverno.io/minversion: 1.7.0 | ||
policies.kyverno.io/severity: medium | ||
policies.kyverno.io/subject: Namespace | ||
policies.kyverno.io/title: Add Privileged Label to Existing Namespaces | ||
name: add-privileged-existing-namespaces | ||
spec: | ||
background: false | ||
mutateExistingOnPolicyUpdate: true | ||
rules: | ||
- match: | ||
any: | ||
- resources: | ||
kinds: | ||
- Namespace | ||
names: | ||
- background-false-ns | ||
mutate: | ||
patchStrategicMerge: | ||
metadata: | ||
labels: | ||
foo: bar | ||
targets: | ||
- apiVersion: v1 | ||
kind: Namespace | ||
name: background-false-ns | ||
name: label-privileged-namespaces |
2 changes: 1 addition & 1 deletion
2
.../mutate/clusterpolicy/standard/existing/background-false/chainsaw-step-03-assert-1-1.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: background-false-ns | ||
labels: | ||
foo: bar | ||
name: default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters