From bc37f891c4a1cd1f2b97c1a0683bbddceef1d164 Mon Sep 17 00:00:00 2001 From: Qi Zhang Date: Thu, 12 Oct 2023 04:32:52 -0500 Subject: [PATCH] feat: Add an env to the worker to prevent mesh from checking the port (#1768) Signed-off-by: Qi Zhang --- worker/appm/conversion/plugin.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/worker/appm/conversion/plugin.go b/worker/appm/conversion/plugin.go index 1bc4550bf..db2d34248 100644 --- a/worker/appm/conversion/plugin.go +++ b/worker/appm/conversion/plugin.go @@ -275,6 +275,9 @@ func createTCPDefaultPluginContainer(as *typesv1.AppService, pluginID string, en } func setSidecarContainerLifecycle(as *typesv1.AppService, con *corev1.Container, pluginConfig *api_model.ResourceSpec) { + if strings.ToLower(os.Getenv("GLOBAL_DISABLE_SIDECAR_CHECK")) == "true" { + return + } if strings.ToLower(as.ExtensionSet["disable_sidecar_check"]) != "true" { var port int if as.ExtensionSet["sidecar_check_port"] != "" {