feat: Add an env to the worker to prevent mesh from checking the port (#1768)

Signed-off-by: Qi Zhang <smallqi1@163.com>
This commit is contained in:
Qi Zhang 2023-10-12 04:32:52 -05:00 committed by GitHub
parent 9735eeb979
commit bc37f891c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -275,6 +275,9 @@ func createTCPDefaultPluginContainer(as *typesv1.AppService, pluginID string, en
} }
func setSidecarContainerLifecycle(as *typesv1.AppService, con *corev1.Container, pluginConfig *api_model.ResourceSpec) { 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" { if strings.ToLower(as.ExtensionSet["disable_sidecar_check"]) != "true" {
var port int var port int
if as.ExtensionSet["sidecar_check_port"] != "" { if as.ExtensionSet["sidecar_check_port"] != "" {