Skip to content

Commit

Permalink
fix: zerodowntime (#481)
Browse files Browse the repository at this point in the history
  • Loading branch information
matmut7 authored May 28, 2024
1 parent 7f46715 commit ca8161b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 4 additions & 2 deletions plugins/contrib/patches/70-zero-downtime-readiness.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,10 @@ module.exports = function updateDeploymentManifests(manifests, options = {}) {
},
preStop: {
exec: {
// Adding a sleep of gracefulShutdownSeconds before removing the readiness file
command: [
"sh",
"-c",
`sleep ${gracefulShutdownSeconds}; rm -f /var/run/readiness-check/readiness-file`,
`rm -f /var/run/readiness-check/readiness-file; sleep ${gracefulShutdownSeconds}`,
],
},
},
Expand All @@ -69,6 +68,9 @@ module.exports = function updateDeploymentManifests(manifests, options = {}) {
})

// Ensure the volume does not conflict and is added to the pod spec
if (!manifest.spec.template.spec.volumes) {
manifest.spec.template.spec.volumes = []
}
if (
!manifest.spec.template.spec.volumes.some(
(v) => v.name === "readiness-check-volume"
Expand Down
3 changes: 1 addition & 2 deletions plugins/fabrique/kontinuous.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ dependencies:

patches:
zeroDowntimeReadiness:
# enabled: true
enabled: false
enabled: true
certs:
enabled: true
options:
Expand Down

0 comments on commit ca8161b

Please sign in to comment.