forked from stakater/StakaterNordmart
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpostgresql.yaml
More file actions
175 lines (154 loc) · 4.02 KB
/
postgresql.yaml
File metadata and controls
175 lines (154 loc) · 4.02 KB
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
---
# Source: postgresql/templates/svc-headless.yaml
apiVersion: v1
kind: Service
metadata:
name: NAMESPACE_NAME-postgresql-headless
labels:
app: postgresql
chart: postgresql-6.3.6
release: "NAMESPACE_NAME-postgresql"
heritage: "Tiller"
spec:
type: ClusterIP
clusterIP: None
ports:
- name: postgresql
port: 5432
targetPort: postgresql
selector:
app: postgresql
release: "NAMESPACE_NAME-postgresql"
---
# Source: postgresql/templates/svc.yaml
apiVersion: v1
kind: Service
metadata:
name: NAMESPACE_NAME-postgresql
labels:
app: postgresql
chart: postgresql-6.3.6
release: "NAMESPACE_NAME-postgresql"
heritage: "Tiller"
spec:
type: ClusterIP
ports:
- name: postgresql
port: 5432
targetPort: postgresql
selector:
app: postgresql
release: "NAMESPACE_NAME-postgresql"
role: master
---
# Source: postgresql/templates/statefulset.yaml
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: NAMESPACE_NAME-postgresql-postgresql
labels:
app: postgresql
chart: postgresql-6.3.6
release: "NAMESPACE_NAME-postgresql"
heritage: "Tiller"
spec:
serviceName: NAMESPACE_NAME-postgresql-headless
replicas: 1
updateStrategy:
type: RollingUpdate
selector:
matchLabels:
app: postgresql
release: "NAMESPACE_NAME-postgresql"
role: master
template:
metadata:
name: NAMESPACE_NAME-postgresql
labels:
app: postgresql
chart: postgresql-6.3.6
release: "NAMESPACE_NAME-postgresql"
heritage: "Tiller"
role: master
category: datasource
spec:
containers:
- name: NAMESPACE_NAME-postgresql
image: docker.io/bitnami/postgresql:11.5.0-debian-9-r26
imagePullPolicy: "Always"
resources:
limits:
cpu: 250m
memory: 256Mi
requests:
cpu: 250m
memory: 256Mi
env:
- name: BITNAMI_DEBUG
value: "false"
- name: POSTGRESQL_PORT_NUMBER
value: "5432"
- name: POSTGRESQL_VOLUME_DIR
value: "/bitnami/postgresql"
- name: PGDATA
value: "/bitnami/postgresql/data"
- name: POSTGRES_USER
value: "keycloak"
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: postgres-secret
key: postgresql-password
- name: POSTGRES_DB
value: "keycloak-db"
ports:
- name: postgresql
containerPort: 5432
livenessProbe:
exec:
command:
- sh
- -c
- exec pg_isready -U "keycloak" -d "keycloak-db" -h 127.0.0.1 -p 5432
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 6
readinessProbe:
exec:
command:
- sh
- -c
- |
pg_isready -U "keycloak" -d "keycloak-db" -h 127.0.0.1 -p 5432
[ -f /opt/bitnami/postgresql/tmp/.initialized ]
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 6
volumeMounts:
volumes:
- name: data
emptyDir: {}
---
# Source: postgresql/templates/configmap.yaml
---
# Source: postgresql/templates/extended-config-configmap.yaml
---
# Source: postgresql/templates/initialization-configmap.yaml
---
# Source: postgresql/templates/metrics-svc.yaml
---
# Source: postgresql/templates/networkpolicy.yaml
---
# Source: postgresql/templates/secrets.yaml
---
# Source: postgresql/templates/serviceaccount.yaml
---
# Source: postgresql/templates/servicemonitor.yaml
---
# Source: postgresql/templates/statefulset-slaves.yaml
---
# Source: postgresql/templates/svc-read.yaml