File tree Expand file tree Collapse file tree 3 files changed +28
-1
lines changed
examples/multi-tenacy/open-policy-agent Expand file tree Collapse file tree 3 files changed +28
-1
lines changed Original file line number Diff line number Diff line change 2727 ports :
2828 - name : https
2929 containerPort : 443
30- image : openpolicyagent/opa:0.32.0
30+ image : openpolicyagent/opa:0.32.1
3131 imagePullPolicy : IfNotPresent
3232 resources :
3333 {}
Original file line number Diff line number Diff line change @@ -9,3 +9,13 @@ resources:
99 - service.yaml
1010 - webhookconfiguration.yaml
1111 - deployment.yaml
12+
13+ configMapGenerator :
14+ - name : opa-default-system-main
15+ files :
16+ - policies/main.rego
17+
18+ generatorOptions :
19+ disableNameSuffixHash : true
20+ labels :
21+ openpolicyagent.org/policy : rego
Original file line number Diff line number Diff line change 1+ package system
2+ import data.kubernetes.admission
3+ main = {
4+ " apiVersion" : " admission.k8s.io/v1beta1" ,
5+ " kind" : " AdmissionReview" ,
6+ " response" : response,
7+ }
8+ default response = {" allowed" : true }
9+ response = {
10+ " allowed" : false ,
11+ " status" : {
12+ " reason" : reason,
13+ },
14+ } {
15+ reason = concat (" , " , admission.deny)
16+ reason != " "
17+ }
You can’t perform that action at this time.
0 commit comments