From 2f1c02162345bcd17ba7e1ddb1ed0b8ee551635c Mon Sep 17 00:00:00 2001 From: Benjamin Schimke Date: Wed, 20 Nov 2024 22:46:12 +0100 Subject: [PATCH] Use new annotation path (#821) apiv1 is deprecated for annotations. `apiv1_annotations` is the recommended package now. --- src/k8s/pkg/k8sd/app/hooks_remove.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/k8s/pkg/k8sd/app/hooks_remove.go b/src/k8s/pkg/k8sd/app/hooks_remove.go index 86b4d6c87..04d93faf0 100644 --- a/src/k8s/pkg/k8sd/app/hooks_remove.go +++ b/src/k8s/pkg/k8sd/app/hooks_remove.go @@ -7,7 +7,6 @@ import ( "net" "os" - apiv1 "github.com/canonical/k8s-snap-api/api/v1" apiv1_annotations "github.com/canonical/k8s-snap-api/api/v1/annotations" databaseutil "github.com/canonical/k8s/pkg/k8sd/database/util" "github.com/canonical/k8s/pkg/k8sd/pki" @@ -131,7 +130,7 @@ func (a *App) onPreRemove(ctx context.Context, s state.State, force bool) (rerr log.Error(err, "failed to cleanup control plane certificates") } - if _, ok := cfg.Annotations.Get(apiv1.AnnotationSkipStopServicesOnRemove); !ok { + if _, ok := cfg.Annotations.Get(apiv1_annotations.AnnotationSkipStopServicesOnRemove); !ok { log.Info("Stopping worker services") if err := snaputil.StopWorkerServices(ctx, snap); err != nil { log.Error(err, "Failed to stop worker services")