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

Fixed a missing RegisterOrDie call and the EKS service account in mak… #461

Merged
merged 1 commit into from
Jun 17, 2021
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
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