diff --git a/helm/charts/nats/files/nats-box/deployment/container.yaml b/helm/charts/nats/files/nats-box/deployment/container.yaml index 9c99959f..aa1753b4 100644 --- a/helm/charts/nats/files/nats-box/deployment/container.yaml +++ b/helm/charts/nats/files/nats-box/deployment/container.yaml @@ -22,8 +22,11 @@ command: fi {{- end }} cd "$work_dir" - exec sh -ec "$0" + exec /entrypoint.sh "$@" +- -- args: +- sh +- -ec - trap true INT TERM; sleep infinity & wait volumeMounts: # contexts secret diff --git a/helm/charts/nats/templates/tests/request-reply.yaml b/helm/charts/nats/templates/tests/request-reply.yaml index 4ce2bf83..3e06edc0 100644 --- a/helm/charts/nats/templates/tests/request-reply.yaml +++ b/helm/charts/nats/templates/tests/request-reply.yaml @@ -7,6 +7,8 @@ kind: Pod {{- with .container }} {{- $_ := set . "merge" (dict "args" (list + "sh" + "-ec" "nats reply --echo echo & pid=\"$!\"; sleep 1; nats request echo hi > /tmp/resp; kill \"$pid\"; wait; grep -qF hi /tmp/resp" ) ) }} diff --git a/helm/charts/nats/test/defaults_test.go b/helm/charts/nats/test/defaults_test.go index 191e3596..8aaf4687 100644 --- a/helm/charts/nats/test/defaults_test.go +++ b/helm/charts/nats/test/defaults_test.go @@ -284,6 +284,8 @@ func DefaultResources(t *testing.T, test *Test) *Resources { Containers: []corev1.Container{ { Args: []string{ + "sh", + "-ec", "trap true INT TERM; sleep infinity & wait", }, Command: []string{ @@ -299,8 +301,9 @@ if ! [ -f context.txt ]; then echo -n "default" > context.txt fi cd "$work_dir" -exec sh -ec "$0" +exec /entrypoint.sh "$@" `, + "--", }, Image: dd.NatsBoxImage, Name: "nats-box",