[AAI] Service Mesh compatibility
[oom.git] / kubernetes / common / common / templates / _serviceMesh.tpl
index 6b6a26f..d4fc182 100644 (file)
@@ -1,4 +1,4 @@
-{/*
+{{/*
 # Copyright © 2020 Amdocs, Bell Canada, Orange
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -25,3 +25,15 @@ true
 {{-     end -}}
 {{-   end -}}
 {{- end -}}
+
+{{- define "common.serviceMesh.killSidecar" -}}
+{{-   if (include "common.onServiceMesh" .) }}
+RCODE="$?";
+echo "*** script finished with exit code $RCODE" ;
+echo "*** killing service mesh sidecar" ;
+curl -sf -X POST http://127.0.0.1:15020/quitquitquit ;
+echo "" ;
+echo "*** exiting with script exit code" ;
+exit "$RCODE"
+{{-   end }}
+{{- end -}}