Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(kubernetes): make preStop command work with busybox #3568

Merged
merged 2 commits into from
Jan 31, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion core/src/plugins/kubernetes/container/build/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ export function getUtilContainer(authSecretName: string, provider: KubernetesPro
command: [
"/bin/sh",
"-c",
"until test $(pgrep -fc '^[^ ]+rsync') = 1; do echo waiting for rsync to finish...; sleep 1; done",
"until pgrep -f '^[^ ]+rsync' > /dev/null; do echo waiting for rsync to finish...; sleep 1; done",
stefreak marked this conversation as resolved.
Show resolved Hide resolved
],
},
},
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/kubernetes/hot-reload/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export function configureHotReload({
command: [
"/bin/sh",
"-c",
"until test $(pgrep -fc '^[^ ]+rsync') = 1; do echo waiting for rsync to finish...; sleep 1; done",
"until pgrep -f '^[^ ]+rsync' > /dev/null; do echo waiting for rsync to finish...; sleep 1; done",
],
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ describe("buildkit build", () => {
command: [
"/bin/sh",
"-c",
"until test $(pgrep -fc '^[^ ]+rsync') = 1; do echo waiting for rsync to finish...; sleep 1; done",
"until pgrep -f '^[^ ]+rsync' > /dev/null; do echo waiting for rsync to finish...; sleep 1; done",
],
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ describe("common build", () => {
command: [
"/bin/sh",
"-c",
"until test $(pgrep -fc '^[^ ]+rsync') = 1; do echo waiting for rsync to finish...; sleep 1; done",
"until pgrep -f '^[^ ]+rsync' > /dev/null; do echo waiting for rsync to finish...; sleep 1; done",
],
},
},
Expand Down
4 changes: 2 additions & 2 deletions core/test/unit/src/plugins/kubernetes/hot-reload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ describe("configureHotReload", () => {
command: [
"/bin/sh",
"-c",
"until test $(pgrep -fc '^[^ ]+rsync') = 1; do echo waiting for rsync to finish...; sleep 1; done",
"until pgrep -f '^[^ ]+rsync' > /dev/null; do echo waiting for rsync to finish...; sleep 1; done",
],
},
},
Expand Down Expand Up @@ -240,7 +240,7 @@ describe("configureHotReload", () => {
command: [
"/bin/sh",
"-c",
"until test $(pgrep -fc '^[^ ]+rsync') = 1; do echo waiting for rsync to finish...; sleep 1; done",
"until pgrep -f '^[^ ]+rsync' > /dev/null; do echo waiting for rsync to finish...; sleep 1; done",
],
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ spec:
# actually killing the pod. If the transfer takes more than 30 seconds, which is unlikely, the pod
# will be killed anyway. The command works by counting the number of rsync processes. This works
# because rsync forks for every connection.
command: ["/bin/sh", "-c", "until test $(pgrep -fc '^[^ ]+rsync') = 1; do echo waiting for rsync to finish...; sleep 1; done"]
command: ["/bin/sh", "-c", "until pgrep -f '^[^ ]+rsync' > /dev/null; do echo waiting for rsync to finish...; sleep 1; done"]
volumeMounts:
- mountPath: /data
name: garden-build-sync
Expand Down