Skip to content

Commit

Permalink
fix: added preStop hook for nats-leafnode-sidecar
Browse files Browse the repository at this point in the history
  • Loading branch information
siredmar committed Dec 8, 2022
1 parent 82b76d0 commit e245798
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
9 changes: 8 additions & 1 deletion cue/traits/edge-network-participant-trait.cue
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ template: {
},
{
"name": "nats-leafnode-sidecar",
"image": "ghcr.io/edgefarm/nats-leafnode-client:pr-28",
"image": "ghcr.io/edgefarm/nats-leafnode-client:0.2.0-beta.2",
"command": ["/bin/sh", "-c", "env && echo $REMOTE && /client --remote $REMOTE --natsuri nats://172.17.0.1:4222 --creds /creds --component "+context.name],
"env": [
{
Expand All @@ -112,6 +112,13 @@ template: {
}
}
],
"lifecycle": {
"preStop": {
"exec": {
"command": ["/bin/sh", "-c", "kill -SIGUSR1 1"]
}
}
},
"volumeMounts": [
{
"name": "creds",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ spec:
},
{
name: "nats-leafnode-sidecar"
image: "ghcr.io/edgefarm/nats-leafnode-client:pr-28"
image: "ghcr.io/edgefarm/nats-leafnode-client:0.2.0-beta.2"
command: ["/bin/sh", "-c", "env && echo $REMOTE && /client --remote $REMOTE --natsuri nats://172.17.0.1:4222 --creds /creds --component " + context.name]
env: [
{
Expand All @@ -101,6 +101,7 @@ spec:
}
},
]
lifecycle: preStop: exec: command: ["/bin/sh", "-c", "kill -SIGUSR1 1"]
volumeMounts: [
{
name: "creds"
Expand Down

0 comments on commit e245798

Please sign in to comment.