File tree Expand file tree Collapse file tree 3 files changed +35
-0
lines changed Expand file tree Collapse file tree 3 files changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ apiVersion : admissionregistration.k8s.io/v1beta1
2
+ kind : ValidatingAdmissionPolicy
3
+ metadata :
4
+ name : " clusterextensions-package-uniqueness.olm.operatorframework.io"
5
+ spec :
6
+ failurePolicy : Fail
7
+ paramKind :
8
+ apiVersion : olm.operatorframework.io/v1alpha1
9
+ kind : ClusterExtension
10
+ matchConstraints :
11
+ resourceRules :
12
+ - apiGroups : ["olm.operatorframework.io"]
13
+ apiVersions : ["v1alpha1"]
14
+ operations : ["CREATE", "UPDATE"]
15
+ resources : ["clusterextensions"]
16
+ validations :
17
+ - expression : " object.spec.packageName != params.spec.packageName"
18
+ messageExpression : " 'Package \" ' + string(object.spec.packageName) + '\" is already installed via ClusterExtension \" ' + string(params.metadata.name) + '\" '"
19
+ reason : Invalid
20
+
21
+ ---
22
+
23
+ apiVersion : admissionregistration.k8s.io/v1beta1
24
+ kind : ValidatingAdmissionPolicyBinding
25
+ metadata :
26
+ name : " clusterextensions-package-uniqueness-binding.olm.operatorframework.io"
27
+ spec :
28
+ policyName : " clusterextensions-package-uniqueness.olm.operatorframework.io"
29
+ validationActions : [Deny]
30
+ paramRef :
31
+ parameterNotFoundAction : Allow
32
+ selector : {}
Original file line number Diff line number Diff line change
1
+ resources :
2
+ - admission.yaml
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ namePrefix: operator-controller-
16
16
17
17
resources :
18
18
- ../crd
19
+ - ../admission
19
20
- ../rbac
20
21
- ../manager
21
22
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
You can’t perform that action at this time.
0 commit comments