Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: order of volumesnapshot syncers #1965

Merged
merged 1 commit into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions pkg/controllers/resources/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import (
syncertypes "github.com/loft-sh/vcluster/pkg/controllers/syncer/types"
"github.com/loft-sh/vcluster/pkg/util/loghelper"
"github.com/pkg/errors"
"k8s.io/klog/v2"
)

// ExtraControllers that will be started as well
Expand Down Expand Up @@ -91,16 +90,6 @@ func BuildSyncers(ctx *synccontext.RegisterContext) ([]syncertypes.Object, error

loghelper.Infof("Created %s syncer", name)

// execute initializer
initializer, ok := syncer.(syncertypes.Initializer)
if ok {
klog.FromContext(ctx).V(1).Info("Execute syncer init", "syncer", name)
err := initializer.Init(ctx)
if err != nil {
return nil, errors.Wrapf(err, "ensure prerequisites for %s syncer", name)
}
}

// execute register indices
indexRegisterer, ok := syncer.(syncertypes.IndicesRegisterer)
if ok {
Expand Down
122 changes: 0 additions & 122 deletions pkg/controllers/resources/volumesnapshots/volumesnapshotclasses/crd.go

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
syncer "github.com/loft-sh/vcluster/pkg/controllers/syncer/types"
"github.com/loft-sh/vcluster/pkg/mappings"
"github.com/loft-sh/vcluster/pkg/patcher"
"github.com/loft-sh/vcluster/pkg/util"
utilerrors "k8s.io/apimachinery/pkg/util/errors"

volumesnapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v4/apis/volumesnapshot/v1"
Expand All @@ -26,12 +25,6 @@ type volumeSnapshotClassSyncer struct {
syncer.Translator
}

var _ syncer.Initializer = &volumeSnapshotClassSyncer{}

func (s *volumeSnapshotClassSyncer) Init(registerContext *synccontext.RegisterContext) error {
return util.EnsureCRD(registerContext.Context, registerContext.VirtualManager.GetConfig(), []byte(volumeSnapshotClassesCRD), volumesnapshotv1.SchemeGroupVersion.WithKind("VolumeSnapshotClass"))
}

var _ syncer.ToVirtualSyncer = &volumeSnapshotClassSyncer{}

func (s *volumeSnapshotClassSyncer) SyncToVirtual(ctx *synccontext.SyncContext, pObj client.Object) (ctrl.Result, error) {
Expand Down
Loading
Loading