Skip to content
This repository has been archived by the owner on Jan 9, 2025. It is now read-only.

Commit

Permalink
inform user about gateway api install and uninstall
Browse files Browse the repository at this point in the history
  • Loading branch information
lostbean committed Sep 25, 2024
1 parent 531e261 commit a7dd50f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kardinal-cli/deployment/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package deployment
import (
"bytes"
"context"
"fmt"
"io"
"net/http"
"text/template"
Expand All @@ -12,6 +13,7 @@ import (
"kardinal.cli/kontrol"

"github.com/kurtosis-tech/stacktrace"
"github.com/sirupsen/logrus"
"kardinal.cli/consts"
)

Expand Down Expand Up @@ -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")
}
Expand All @@ -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
}
Expand Down

0 comments on commit a7dd50f

Please sign in to comment.