From 4e5218b62c3436dabe4091166e2673cf2053db18 Mon Sep 17 00:00:00 2001 From: Erik Wilson Date: Wed, 24 Feb 2021 10:31:21 -0700 Subject: [PATCH] Apply suggestions from code review Logging cleanup Co-authored-by: Brad Davidson --- pkg/server/server.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/server/server.go b/pkg/server/server.go index cce82b747a..ff681ce794 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -226,17 +226,18 @@ func stageFiles(ctx context.Context, sc *Context, controlConfig *config.Control) return deploy.WatchFiles(ctx, sc.Apply, sc.K3s.K3s().V1().Addon(), controlConfig.Disables, dataDir) } -// isHelmChartTraefikV1 checks the chart with "traefik-1." prefix. +// isHelmChartTraefikV1 checks for an existing HelmChart resource with spec.chart containing traefik-1, +// as deployed by the legacy chart (https://%{KUBERNETES_API}%/static/charts/traefik-1.81.0.tgz) func isHelmChartTraefikV1(sc *Context) bool { prefix := "traefik-1." helmChart, err := sc.Helm.Helm().V1().HelmChart().Get(metav1.NamespaceSystem, "traefik", metav1.GetOptions{}) if err != nil { - logrus.WithError(err).Info("Not find traefik") + logrus.WithError(err).Info("Failed to get existing traefik HelmChart") return false } chart := path.Base(helmChart.Spec.Chart) if strings.HasPrefix(chart, prefix) { - logrus.WithField("chart", chart).Info("Found traefik v1 running") + logrus.WithField("chart", chart).Info("Found existing traefik v1 HelmChart") return true } return false