From b43707e7f442b5d9806cc2b3cbb3cb5cd5d96049 Mon Sep 17 00:00:00 2001 From: Ivan Vandot Date: Mon, 8 Jun 2020 16:17:58 +0200 Subject: [PATCH 1/2] add trap to catch SIGTERM and forward it to bee process --- charts/bee/templates/statefulset.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/charts/bee/templates/statefulset.yaml b/charts/bee/templates/statefulset.yaml index 4ba56e0..00ce4e4 100644 --- a/charts/bee/templates/statefulset.yaml +++ b/charts/bee/templates/statefulset.yaml @@ -65,10 +65,14 @@ spec: - bash - -ac - > + pid=; + trap '[[ $pid ]] && kill "$pid"' SIGTERM; if [ $(echo $(hostname) | rev | cut -d'-' -f 1 | rev) == 0 ]; then - bee start --config=.bee.yaml + bee start --config=.bee.yaml & pid=$!; + wait; else - bee start --config=.bee.yaml --bootnode=/ip4/${{ include "bee.fullname" . | upper | replace "-" "_" }}_0_P2P_SERVICE_HOST/tcp/7070/p2p/{{ .Values.bootnode.libp2p_underlay }} + bee start --config=.bee.yaml --bootnode=/ip4/${{ include "bee.fullname" . | upper | replace "-" "_" }}_0_P2P_SERVICE_HOST/tcp/7070/p2p/{{ .Values.bootnode.libp2p_underlay }} & pid=$!; + wait; fi; {{- else}} - bee From eb6ab065d01d181371ab7757dfb742792220c393 Mon Sep 17 00:00:00 2001 From: Ivan Vandot Date: Mon, 8 Jun 2020 16:20:52 +0200 Subject: [PATCH 2/2] bump version for bee chart --- charts/bee/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/bee/Chart.yaml b/charts/bee/Chart.yaml index 6478ae9..32834f5 100644 --- a/charts/bee/Chart.yaml +++ b/charts/bee/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 appVersion: latest name: bee -version: 0.3.1 +version: 0.3.2 description: Ethereum Swarm Bee Helm chart for Kubernetes home: https://swarm.ethereum.org icon: https://swarm-guide.readthedocs.io/en/latest/_images/swarm.png