Skip to content

Commit

Permalink
Fixed a missing RegisterOrDie call and removed references to EKS Serv…
Browse files Browse the repository at this point in the history
…ice account in Makefile
  • Loading branch information
ellistarn committed Jun 17, 2021
1 parent 10f5634 commit 1a82558
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ apply: ## Deploy the controller into your ~/.kube/config cluster
$(HELM_OPTS) \
--set controller.image=ko://github.com/awslabs/karpenter/cmd/controller \
--set webhook.image=ko://github.com/awslabs/karpenter/cmd/webhook \
--set serviceAccount.annotations.'eks\.amazonaws\.com/role-arn'=\"$$(kubectl get configmaps aws-auth -n kube-system -ojsonpath='{.data.mapRoles}' | grep KarpenterNodeRole | head -1 | cut -d ' ' -f3)\" \
| $(WITH_GOFLAGS) ko apply -B -f -

delete: ## Delete the controller from your ~/.kube/config cluster
Expand Down
2 changes: 1 addition & 1 deletion pkg/cloudprovider/registry/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ import (
"github.com/awslabs/karpenter/pkg/cloudprovider/aws"
)

func NewCloudProvider(options cloudprovider.Options) cloudprovider.CloudProvider {
func newCloudProvider(options cloudprovider.Options) cloudprovider.CloudProvider {
return aws.NewCloudProvider(options)
}
2 changes: 1 addition & 1 deletion pkg/cloudprovider/registry/fake.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ import (
"github.com/awslabs/karpenter/pkg/cloudprovider/fake"
)

func NewCloudProvider(cloudprovider.Options) cloudprovider.CloudProvider {
func newCloudProvider(cloudprovider.Options) cloudprovider.CloudProvider {
return &fake.CloudProvider{}
}
6 changes: 6 additions & 0 deletions pkg/cloudprovider/registry/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ import (
"knative.dev/pkg/apis"
)

func NewCloudProvider(options cloudprovider.Options) cloudprovider.CloudProvider {
cloudProvider := newCloudProvider(options)
RegisterOrDie(cloudProvider)
return cloudProvider
}

// RegisterOrDie populates supported instance types, zones, operating systems,
// architectures, and validation logic. This operation should only be called
// once at startup time. Typically, this call is made by NewCloudProvider(), but
Expand Down

0 comments on commit 1a82558

Please sign in to comment.