forked from open-cluster-management-io/policy-collection
-
Notifications
You must be signed in to change notification settings - Fork 0
/
policyGenerator.yaml
37 lines (37 loc) · 1 KB
/
policyGenerator.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
apiVersion: policy.open-cluster-management.io/v1
kind: PolicyGenerator
metadata:
name: demo-policy-generator
placementBindingDefaults:
name: demo-placement-binding
policyDefaults:
namespace: policies
placement:
name: demo-placement-rule
clusterSelectors:
name: local-cluster
remediationAction: inform
severity: medium
policies:
- name: policy-app
manifests:
- path: policy1_deployment
patches:
- apiVersion: apps/v1
kind: Deployment
metadata:
name: gitops-demo
namespace: gitops-demo
spec:
template:
spec:
containers:
- name: gitops-demo
image: quay.io/centos7/httpd-24-centos7:2.4
- name: policy-gatekeeper-require-labels
consolidateManifests: false
manifests:
- path: policy2_gatekeeper/gatekeeper.yaml
- name: policy-kyverno-require-labels
manifests:
- path: policy3_kyverno/kyverno.yaml