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

[nats helm] call natsbox entrypoint #883

Merged
merged 2 commits into from
Apr 1, 2024
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
4 changes: 3 additions & 1 deletion helm/charts/nats/files/nats-box/deployment/container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ command:
fi
{{- end }}
cd "$work_dir"
exec sh -ec "$0"
exec /entrypoint.sh "$0" "$@"
caleblloyd marked this conversation as resolved.
Show resolved Hide resolved
args:
- sh
- -ec
- trap true INT TERM; sleep infinity & wait
volumeMounts:
# contexts secret
Expand Down
2 changes: 2 additions & 0 deletions helm/charts/nats/templates/tests/request-reply.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
) }}
Expand Down
4 changes: 3 additions & 1 deletion helm/charts/nats/test/defaults_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand All @@ -299,7 +301,7 @@ if ! [ -f context.txt ]; then
echo -n "default" > context.txt
fi
cd "$work_dir"
exec sh -ec "$0"
exec /entrypoint.sh "$0" "$@"
`,
},
Image: dd.NatsBoxImage,
Expand Down