-
Notifications
You must be signed in to change notification settings - Fork 17
/
postgres.yaml
80 lines (79 loc) · 2.03 KB
/
postgres.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
apiVersion: template.openshift.io/v1
kind: Template
metadata:
name: relationships
objects:
- apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: postgres
name: postgres
namespace: ${NAMESPACE}
spec:
selector:
matchLabels:
app: postgres
template:
metadata:
labels:
app: postgres
spec:
containers:
- env:
- name: POSTGRESQL_DATABASE
value: ${POSTGRES_DB}
- name: POSTGRESQL_USER
value: ${POSTGRES_USER}
- name: POSTGRESQL_PASSWORD
value: ${POSTGRES_PASSWORD}
- name: PGDATA
value: /temp/data
image: registry.redhat.io/rhel9/postgresql-15:1-54
imagePullPolicy: Always
name: postgres
ports:
- containerPort: 5432
protocol: TCP
resources:
limits:
cpu: 60m
memory: 256Mi
requests:
cpu: 30m
memory: 128Mi
restartPolicy: Always
- apiVersion: v1
kind: Service
metadata:
labels:
app: postgres
name: postgres
namespace: ${NAMESPACE}
spec:
ports:
- name: http
port: 5432
protocol: TCP
selector:
app: postgres
- apiVersion: v1
kind: Secret
metadata:
name: dev-spicedb-config
stringData:
preshared_key: "averysecretpresharedkey"
datastore_uri: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres.${NAMESPACE}.svc.cluster.local:5432/${POSTGRES_DB}?sslmode=disable
parameters:
- description: Namespace to deploy into
name: NAMESPACE
value: ${NAMESPACE}
- description: Postgres DB name
name: POSTGRES_DB
value: ${POSTGRES_DB}
- description: Postgres DB username
name: POSTGRES_USER
value: ${POSTGRES_USER}
- description: Postgres DB password
name: POSTGRES_PASSWORD
value: ${POSTGRES_PASSWORD}