-
Notifications
You must be signed in to change notification settings - Fork 3
/
manifests.yaml
111 lines (111 loc) · 2.22 KB
/
manifests.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
---
apiVersion: v1
kind: Namespace
metadata:
name: enterprise-opa
---
apiVersion: v1
kind: Secret
metadata:
name: styra-enterprise-opa-license
namespace: enterprise-opa
type: Opaque
stringData:
license: changeme
---
apiVersion: v1
kind: ConfigMap
metadata:
name: styra-enterprise-opa-config
namespace: enterprise-opa
data:
config.yaml: |
decision_logs:
console: true
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: enterprise-opa
namespace: enterprise-opa
name: enterprise-opa
spec:
replicas: 1
selector:
matchLabels:
app: enterprise-opa
template:
metadata:
labels:
app: enterprise-opa
name: enterprise-opa
spec:
containers:
- name: enterprise-opa
image: ghcr.io/styrainc/enterprise-opa:latest
args:
- "run"
- "--server"
- "--addr=0.0.0.0:8181"
- "--config-file=/etc/config/config.yaml"
env:
- name: EOPA_LICENSE_KEY
valueFrom:
secretKeyRef:
name: styra-enterprise-opa-license
key: license
volumeMounts:
- name: config
mountPath: /etc/config
readinessProbe:
httpGet:
path: /health
scheme: HTTP
port: 8181
initialDelaySeconds: 3
periodSeconds: 5
livenessProbe:
httpGet:
path: /health
scheme: HTTP
port: 8181
initialDelaySeconds: 3
periodSeconds: 5
volumes:
- name: config
configMap:
name: styra-enterprise-opa-config
items:
- key: "config.yaml"
path: "config.yaml"
---
kind: Service
apiVersion: v1
metadata:
name: enterprise-opa
namespace: enterprise-opa
spec:
selector:
app: enterprise-opa
ports:
- port: 8181
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: enterprise-opa
namespace: enterprise-opa
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /$2
spec:
rules:
- http:
paths:
- pathType: Prefix
path: /enterprise-opa(/|$)(.*)
backend:
service:
name: enterprise-opa
port:
number: 8181