From 4d5f1d38ec2c474c977732c0178684c08a8c0b03 Mon Sep 17 00:00:00 2001 From: razzle Date: Thu, 19 Oct 2023 01:32:46 -0500 Subject: [PATCH] comments Signed-off-by: razzle --- src/pkg/packager/deploy.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pkg/packager/deploy.go b/src/pkg/packager/deploy.go index e1c384a529..9f7af67df4 100644 --- a/src/pkg/packager/deploy.go +++ b/src/pkg/packager/deploy.go @@ -117,7 +117,8 @@ func (p *Packager) isConnectedToCluster() bool { func (p *Packager) connectToCluster() (err error) { if p.isConnectedToCluster() { - old := p.cluster.RestConfig.ServerName + // TODO: what is the best way to handle this? + old := p.cluster.RestConfig.String() // If we are already connected to the cluster, check if the server name has changed cluster, err := cluster.NewCluster() @@ -125,7 +126,7 @@ func (p *Packager) connectToCluster() (err error) { return fmt.Errorf("unable to connect to the Kubernetes cluster: %w", err) } - if old != cluster.RestConfig.ServerName { + if old != cluster.RestConfig.String() { message.Warnf("The Kubernetes cluster has changed from %q to %q", old, cluster.RestConfig.ServerName) p.cluster = cluster