From 90ca29c36c5f762e2db471c31029ed509f8a6b3f Mon Sep 17 00:00:00 2001 From: jun <2456868764@qq.com> Date: Wed, 8 Nov 2023 19:42:51 +0800 Subject: [PATCH] fix purge istio and gateway api resources --- pkg/cmd/hgctl/uninstall.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkg/cmd/hgctl/uninstall.go b/pkg/cmd/hgctl/uninstall.go index bcb9e1c788..61cb699435 100644 --- a/pkg/cmd/hgctl/uninstall.go +++ b/pkg/cmd/hgctl/uninstall.go @@ -82,8 +82,12 @@ func uninstall(writer io.Writer, uiArgs *uninstallArgs) error { } if profile.Global.Install == helm.InstallK8s || profile.Global.Install == helm.InstallLocalK8s { - profile.Global.EnableIstioAPI = uiArgs.purgeResources - profile.Global.EnableGatewayAPI = uiArgs.purgeResources + if profile.Global.EnableIstioAPI { + profile.Global.EnableIstioAPI = uiArgs.purgeResources + } + if profile.Global.EnableGatewayAPI { + profile.Global.EnableGatewayAPI = uiArgs.purgeResources + } } err = uninstallManifests(profile, writer, uiArgs)