-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpsql-deploy.yml
82 lines (82 loc) · 2 KB
/
psql-deploy.yml
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
kind: Deployment
apiVersion: apps/v1
metadata:
name: psql
labels:
app: psql
part-of: authentik
annotations:
keel.sh/policy: force
keel.sh/trigger: poll
keel.sh/pollSchedule: "@hourly"
keel.sh/match-tag: true
spec:
replicas: 1
selector:
matchLabels:
app: psql
part-of: authentik
template:
metadata:
labels:
app: psql
part-of: authentik
spec:
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
preference:
matchExpressions:
- key: disktype
operator: In
values:
- ssd
serviceAccountName: authentik
containers:
- name: psql
image: postgres:latest
ports:
- name: psql
containerPort: 5432
env:
- name: POSTGRES_HOST_AUTH_METHOD
value: "trust"
- name: POSTGRES_USER
valueFrom:
secretKeyRef:
name: authentik
key: POSTGRES_USER
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: authentik
key: POSTGRES_PASSWORD
- name: POSTGRES_DB
valueFrom:
secretKeyRef:
name: authentik
key: POSTGRES_DB
- name: PGDATA
value: /var/lib/postgresql/data/pgdata
volumeMounts:
- name: authentik-psql
mountPath: /var/lib/postgresql/data
- name: authentik-secrets
mountPath: "/mnt/vault"
readOnly: true
resources:
limits:
memory: 150Mi
requests:
memory: 100Mi
volumes:
- name: authentik-psql
persistentVolumeClaim:
claimName: authentik-psql
- name: authentik-secrets
csi:
driver: "secrets-store.csi.k8s.io"
readOnly: true
volumeAttributes:
secretProviderClass: "authentik"