Skip to content

Commit

Permalink
Use new annotation path (#821)
Browse files Browse the repository at this point in the history
apiv1 is deprecated for annotations.
`apiv1_annotations` is the recommended package now.
  • Loading branch information
bschimke95 authored Nov 20, 2024
1 parent dd2cd3b commit 2f1c021
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/k8s/pkg/k8sd/app/hooks_remove.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit 2f1c021

Please sign in to comment.