Add OPA examples on pathType restrictions (#9992)
This commit is contained in:
parent
8d9210fd38
commit
897783557a
7 changed files with 132 additions and 0 deletions
|
|
@ -0,0 +1,18 @@
|
|||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: simple
|
||||
namespace: privileged
|
||||
spec:
|
||||
rules:
|
||||
- host: foo1.com
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
service:
|
||||
name: svc1
|
||||
port:
|
||||
number: 8080
|
||||
path: /bar
|
||||
pathType: ImplementationSpecific
|
||||
17
docs/examples/openpolicyagent/tests/should-allow.yaml
Normal file
17
docs/examples/openpolicyagent/tests/should-allow.yaml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: simple
|
||||
spec:
|
||||
rules:
|
||||
- host: foo.com
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
service:
|
||||
name: svc1
|
||||
port:
|
||||
number: 8080
|
||||
path: /bar
|
||||
pathType: Exact
|
||||
17
docs/examples/openpolicyagent/tests/should-deny.yaml
Normal file
17
docs/examples/openpolicyagent/tests/should-deny.yaml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: simple
|
||||
spec:
|
||||
rules:
|
||||
- host: foo2.com
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
service:
|
||||
name: svc1
|
||||
port:
|
||||
number: 8080
|
||||
path: /bar
|
||||
pathType: ImplementationSpecific
|
||||
Loading…
Add table
Add a link
Reference in a new issue