From a7dd50ff796825319936cb57d004d723baa037eb Mon Sep 17 00:00:00 2001 From: lostbean Date: Wed, 25 Sep 2024 17:44:20 -0300 Subject: [PATCH] inform user about gateway api install and uninstall --- kardinal-cli/deployment/deployment.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kardinal-cli/deployment/deployment.go b/kardinal-cli/deployment/deployment.go index 25ac943..2920009 100644 --- a/kardinal-cli/deployment/deployment.go +++ b/kardinal-cli/deployment/deployment.go @@ -3,6 +3,7 @@ package deployment import ( "bytes" "context" + "fmt" "io" "net/http" "text/template" @@ -12,6 +13,7 @@ import ( "kardinal.cli/kontrol" "github.com/kurtosis-tech/stacktrace" + "github.com/sirupsen/logrus" "kardinal.cli/consts" ) @@ -267,6 +269,7 @@ func installGatewayAPI(ctx context.Context, kubernetesClientObj *kubernetes.Kube return stacktrace.Propagate(err, "An error occurred while reading the response body") } + logrus.Info("ℹ️ Installing the Gateway API (https://gateway-api.sigs.k8s.io/) in the cluster.") if err := kubernetesClientObj.ApplyYamlFileContentInNamespace(ctx, kardinalNamespace, buf.Bytes()); err != nil { return stacktrace.Propagate(err, "An error occurred while applying the gateway API YAML") } @@ -290,6 +293,7 @@ func RemoveKardinalManagerFromCluster(ctx context.Context) error { if err = kubernetesClientObj.RemoveNamespaceResourcesByLabels(ctx, kardinalNamespace, labels); err != nil { return stacktrace.Propagate(err, "An error occurred while removing the kardinal-manager from the cluster using labels '%+v'", labels) } + fmt.Printf("⚠️ If you also want to unistall the Gateway API, run the following command:\nkubectl delete -f %s\n\n", gatewayAPIInstallYamlURL) return nil }