Skip to content

Commit

Permalink
BREAKING CHANGE: Refactor NodeClass controller (#5949)
Browse files Browse the repository at this point in the history
  • Loading branch information
engedaam committed Apr 13, 2024
1 parent e4bf5d7 commit 9a07a6d
Show file tree
Hide file tree
Showing 21 changed files with 2,350 additions and 1,610 deletions.
8 changes: 6 additions & 2 deletions pkg/controllers/controllers.go
Expand Up @@ -19,6 +19,9 @@ import (

"sigs.k8s.io/karpenter/pkg/cloudprovider"

nodeclasshash "github.com/aws/karpenter-provider-aws/pkg/controllers/nodeclass/hash"
nodeclassstatus "github.com/aws/karpenter-provider-aws/pkg/controllers/nodeclass/status"
nodeclasstermination "github.com/aws/karpenter-provider-aws/pkg/controllers/nodeclass/termination"
controllerspricing "github.com/aws/karpenter-provider-aws/pkg/controllers/pricing"
"github.com/aws/karpenter-provider-aws/pkg/providers/launchtemplate"

Expand All @@ -35,7 +38,6 @@ import (
"github.com/aws/karpenter-provider-aws/pkg/controllers/interruption"
nodeclaimgarbagecollection "github.com/aws/karpenter-provider-aws/pkg/controllers/nodeclaim/garbagecollection"
nodeclaimtagging "github.com/aws/karpenter-provider-aws/pkg/controllers/nodeclaim/tagging"
"github.com/aws/karpenter-provider-aws/pkg/controllers/nodeclass"
"github.com/aws/karpenter-provider-aws/pkg/operator/options"
"github.com/aws/karpenter-provider-aws/pkg/providers/amifamily"
"github.com/aws/karpenter-provider-aws/pkg/providers/instance"
Expand All @@ -52,7 +54,9 @@ func NewControllers(ctx context.Context, sess *session.Session, clk clock.Clock,
pricingProvider pricing.Provider, amiProvider amifamily.Provider, launchTemplateProvider launchtemplate.Provider) []controller.Controller {

controllers := []controller.Controller{
nodeclass.NewController(kubeClient, recorder, subnetProvider, securityGroupProvider, amiProvider, instanceProfileProvider, launchTemplateProvider),
nodeclasshash.NewController(kubeClient),
nodeclassstatus.NewController(kubeClient, subnetProvider, securityGroupProvider, amiProvider, instanceProfileProvider, launchTemplateProvider),
nodeclasstermination.NewController(kubeClient, recorder, instanceProfileProvider, launchTemplateProvider),
nodeclaimgarbagecollection.NewController(kubeClient, cloudProvider),
nodeclaimtagging.NewController(kubeClient, instanceProvider),
controllerspricing.NewController(pricingProvider),
Expand Down
316 changes: 0 additions & 316 deletions pkg/controllers/nodeclass/controller.go

This file was deleted.

0 comments on commit 9a07a6d

Please sign in to comment.