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 11, 2024
1 parent 283e7b2 commit 1d5d689
Show file tree
Hide file tree
Showing 21 changed files with 2,336 additions and 1,610 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"

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.

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package nodeclass
package events

import (
"fmt"
Expand Down
Loading

0 comments on commit 1d5d689

Please sign in to comment.