rusackas commented on code in PR #41396:
URL: https://github.com/apache/superset/pull/41396#discussion_r3616389515
##########
helm/superset/templates/_helpers.tpl:
##########
@@ -685,6 +685,14 @@ TALISMAN_CONFIG = {
{{- define "superset.initScript" -}}
#!/bin/sh
set -eu
+{{- if dig "istio" "terminateSidecarOnExit" false .Values.init }}
+# Notify the Istio pilot-agent sidecar to exit when this script completes
+# (whether successfully or via `set -e`), so that the Job can reach the
+# Completed state instead of hanging on a still-running envoy-proxy.
+# See https://github.com/apache/superset/issues/25798
+ISTIO_QUIT_ENDPOINT={{ dig "istio" "quitEndpoint"
"http://localhost:15020/quitquitquit" .Values.init | replace "'" "'\\''" |
squote }}
+trap 'rc=$?; curl -fsS -m 5 -X POST "$ISTIO_QUIT_ENDPOINT" >/dev/null 2>&1 ||
true; exit $rc' EXIT
Review Comment:
Fair point that failing silently makes this hard to debug, so I added a
stderr warning when the notify curl fails (`02f62ef7`). I don't want to fail
the script on that though, the whole reason for `|| true` there is so the Job's
exit code reflects the actual init outcome and not whether we managed to poke
istio-proxy. There's actually a test in `test-istio.sh` now asserting the
original exit code survives a failed notification.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]