forked from stolostron/console
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpolicy-set-with-placement-aws-gcp.yaml
77 lines (77 loc) · 2.51 KB
/
policy-set-with-placement-aws-gcp.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
apiVersion: policy.open-cluster-management.io/v1beta1
kind: PolicySet
metadata:
name: policy-set-with-placement-aws-gcp
namespace: test
spec:
description: |
As a customer I want to place policies on my Amazon and Google clusters in my-cluster-set in regions east and west but not on my production clusters.
policies: []
---
apiVersion: cluster.open-cluster-management.io/v1beta1
kind: Placement
metadata:
name: policy-set-with-placement-aws-gcp-1
namespace: test
spec:
clusterSets:
- cluster-set
predicates:
- requiredClusterSelector:
labelSelector:
matchExpressions:
- key: cloud
operator: In
values:
- Amazon
- key: vendor
operator: In
values:
- OpenShift
- key: region
operator: In
values:
- us-east-1
- us-east-2
- us-west-1
- us-west-2
- key: environment
operator: NotIn
values:
- Production
- requiredClusterSelector:
labelSelector:
matchExpressions:
- key: cloud
operator: In
values:
- Google
- key: vendor
operator: In
values:
- OpenShift
- key: region
operator: In
values:
- us-east1
- us-east4
- us-west1
- us-west2
- key: environment
operator: NotIn
values:
- Production
---
apiVersion: policy.open-cluster-management.io/v1
kind: PlacementBinding
metadata:
name: policy-set-with-placement-aws-gcp-1
namespace: test
placementRef:
name: policy-set-with-placement-aws-gcp-1
kind: Placement
apiGroup: cluster.open-cluster-management.io
subjects:
- name: policy-set-with-placement-aws-gcp
kind: PolicySet
apiGroup: policy.open-cluster-management.io