stable/opa: Fix OPA installation script with the right authz rego. (#15222)

Signed-off-by: Xin Jin <xin@styra.com>
This commit is contained in:
Xin Jin
2019-07-06 18:52:33 -07:00
committed by Kubernetes Prow Robot
parent 063de428d8
commit 0d0646bd4e
3 changed files with 7 additions and 4 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ keywords:
- opa
- admission control
- policy
version: 1.5.0
version: 1.5.1
home: https://www.openpolicyagent.org
icon: https://raw.githubusercontent.com/open-policy-agent/opa/master/logo/logo.png
sources:
+4 -1
View File
@@ -34,9 +34,12 @@ spec:
cat > /authz/authz.rego <<EOF
package system.authz
default allow = false
# Allow anonymous access to the default policy decision.
allow { input.path = [""]; input.method = "POST" }
allow { input.path = [""]; input.method = "GET" }
allow { input.identity = "$TOKEN" }
# This is only used for health check in liveness and readiness probe
allow { input.path = ["health"]; input.method = "GET" }
allow { input.identity == "$TOKEN" }
EOF
volumeMounts:
- name: authz
+2 -2
View File
@@ -158,14 +158,14 @@ sar:
# To control the liveness and readiness probes change the fields below.
readinessProbe:
httpGet:
path: /
path: /health
scheme: HTTPS
port: 443
initialDelaySeconds: 3
periodSeconds: 5
livenessProbe:
httpGet:
path: /
path: /health
scheme: HTTPS
port: 443
initialDelaySeconds: 3