Skip to content

Commit c00ff8e

Browse files
committed
templates: use pg_isready as liveness probe
Resolves: #195
1 parent 036810a commit c00ff8e

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

Diff for: examples/postgresql-ephemeral-template.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,11 @@
127127
}
128128
},
129129
"livenessProbe": {
130+
"exec": {
131+
"command": [ "/bin/sh", "-i", "-c", "pg_isready -h 127.0.0.1 -p 5432" ]
132+
},
130133
"timeoutSeconds": 1,
131-
"initialDelaySeconds": 30,
132-
"tcpSocket": {
133-
"port": 5432
134-
}
134+
"initialDelaySeconds": 30
135135
},
136136
"env": [
137137
{

Diff for: examples/postgresql-persistent-template.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,11 @@
144144
}
145145
},
146146
"livenessProbe": {
147+
"exec": {
148+
"command": [ "/bin/sh", "-i", "-c", "pg_isready -h 127.0.0.1 -p 5432" ]
149+
},
147150
"timeoutSeconds": 1,
148-
"initialDelaySeconds": 30,
149-
"tcpSocket": {
150-
"port": 5432
151-
}
151+
"initialDelaySeconds": 30
152152
},
153153
"env": [
154154
{

Diff for: examples/replica/postgresql_replica.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -211,11 +211,11 @@
211211
}
212212
},
213213
"livenessProbe": {
214+
"exec": {
215+
"command": [ "/bin/sh", "-i", "-c", "pg_isready -h 127.0.0.1 -p 5432" ]
216+
},
214217
"timeoutSeconds": 1,
215-
"initialDelaySeconds": 30,
216-
"tcpSocket": {
217-
"port": 5432
218-
}
218+
"initialDelaySeconds": 30
219219
},
220220
"env": [
221221
{
@@ -322,11 +322,11 @@
322322
}
323323
},
324324
"livenessProbe": {
325+
"exec": {
326+
"command": [ "/bin/sh", "-i", "-c", "pg_isready -h 127.0.0.1 -p 5432" ]
327+
},
325328
"timeoutSeconds": 1,
326-
"initialDelaySeconds": 30,
327-
"tcpSocket": {
328-
"port": 5432
329-
}
329+
"initialDelaySeconds": 30
330330
},
331331
"env": [
332332
{

0 commit comments

Comments
 (0)