Skip to content

Commit

Permalink
refactor nodeclass controller
Browse files Browse the repository at this point in the history
  • Loading branch information
engedaam committed Apr 5, 2024
1 parent 7713f4f commit 40f1b7c
Show file tree
Hide file tree
Showing 18 changed files with 2,198 additions and 1,608 deletions.
8 changes: 6 additions & 2 deletions pkg/controllers/controllers.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ import (

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

"github.com/aws/karpenter-provider-aws/pkg/controllers/nodeclass/hash"
"github.com/aws/karpenter-provider-aws/pkg/controllers/nodeclass/status"
"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),
hash.NewController(kubeClient),
status.NewController(kubeClient, subnetProvider, securityGroupProvider, amiProvider, instanceProfileProvider),
termination.NewController(kubeClient, recorder, instanceProfileProvider, launchTemplateProvider),
nodeclaimgarbagecollection.NewController(kubeClient, cloudProvider),
nodeclaimtagging.NewController(kubeClient, instanceProvider),
controllerspricing.NewController(pricingProvider),
Expand Down
314 changes: 0 additions & 314 deletions pkg/controllers/nodeclass/controller.go

This file was deleted.

Loading

0 comments on commit 40f1b7c

Please sign in to comment.