Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def test_check_default_setting(self):
assert jmespath.search("spec.template.spec.containers[0].lifecycle", doc) is None

pgbouncer_default_value = {
"exec": {"command": ["/bin/sh", "-c", "killall -INT pgbouncer && sleep 120"]}
"exec": {"command": ["/bin/sh", "-c", "sleep 10 && killall -INT pgbouncer && sleep 20"]}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"exec": {"command": ["/bin/sh", "-c", "sleep 10 && killall -INT pgbouncer && sleep 20"]}
"exec": {"command": ["/bin/sh", "-c", "sleep 10 && killall -INT pgbouncer"]}

I think that it doesn't do anything really (unless I'm missing something).

}
assert pgbouncer_default_value == jmespath.search(
"spec.template.spec.containers[0].lifecycle.preStop", docs[-1]
Expand Down
2 changes: 1 addition & 1 deletion chart/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -7827,7 +7827,7 @@
"command": [
"/bin/sh",
"-c",
"killall -INT pgbouncer && sleep 120"
"sleep 10 && killall -INT pgbouncer && sleep 20"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"sleep 10 && killall -INT pgbouncer && sleep 20"
"sleep 10 && killall -INT pgbouncer"

]
}
}
Expand Down
5 changes: 3 additions & 2 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2859,8 +2859,9 @@ pgbouncer:
containerLifecycleHooks:
preStop:
exec:
# Allow existing queries clients to complete within 120 seconds
command: ["/bin/sh", "-c", "killall -INT pgbouncer && sleep 120"]
# Sleep first to give time to Kubernetes for removing Service endpoints
# before PgBouncer stops accepting and draining existing connections.
command: ["/bin/sh", "-c", "sleep 10 && killall -INT pgbouncer && sleep 20"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
command: ["/bin/sh", "-c", "sleep 10 && killall -INT pgbouncer && sleep 20"]
command: ["/bin/sh", "-c", "sleep 10 && killall -INT pgbouncer"]


metricsExporterSidecar:
resources: {}
Expand Down