Skip to content

Commit

Permalink
Enable v1beta1 APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-innis committed Oct 3, 2023
1 parent d4d9360 commit 14ee7fe
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
6 changes: 6 additions & 0 deletions charts/karpenter/templates/aggregate-clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ rules:
- apiGroups: ["karpenter.sh"]
resources: ["provisioners", "provisioners/status", "machines", "machines/status"]
verbs: ["get", "list", "watch", "create", "delete", "patch"]
- apiGroups: ["karpenter.sh"]
resources: ["nodepools", "nodepools/status", "nodeclaims", "nodeclaims/status"]
verbs: ["get", "list", "watch", "create", "delete", "patch"]
- apiGroups: ["karpenter.k8s.aws"]
resources: ["awsnodetemplates"]
verbs: ["get", "list", "watch", "create", "delete", "patch"]
- apiGroups: ["compute.k8s.aws"]
resources: ["nodeclasses"]
verbs: ["get", "list", "watch", "create", "delete", "patch"]
9 changes: 9 additions & 0 deletions charts/karpenter/templates/clusterrole-core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ rules:
- apiGroups: ["karpenter.sh"]
resources: ["provisioners", "provisioners/status", "machines", "machines/status"]
verbs: ["get", "list", "watch"]
- apiGroups: ["karpenter.sh"]
resources: ["nodepools", "nodepools/status", "nodeclaims", "nodeclaims/status"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["pods", "nodes", "persistentvolumes", "persistentvolumeclaims", "replicationcontrollers", "namespaces"]
verbs: ["get", "list", "watch"]
Expand All @@ -56,6 +59,12 @@ rules:
- apiGroups: ["karpenter.sh"]
resources: ["provisioners", "provisioners/status"]
verbs: ["update", "patch"]
- apiGroups: ["karpenter.sh"]
resources: ["nodeclaims", "nodeclaims/status"]
verbs: ["create", "delete", "update", "patch"]
- apiGroups: ["karpenter.sh"]
resources: ["nodepools", "nodepools/status"]
verbs: ["update", "patch"]
- apiGroups: [""]
resources: ["events"]
verbs: ["create", "patch"]
Expand Down
6 changes: 3 additions & 3 deletions charts/karpenter/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ metadata:
rules:
# Read
- apiGroups: ["karpenter.k8s.aws"]
resources: ["awsnodetemplates"]
resources: ["awsnodetemplates", "ec2nodeclasses"]
verbs: ["get", "list", "watch"]
# Write
- apiGroups: ["karpenter.k8s.aws"]
resources: ["awsnodetemplates", "awsnodetemplates/status"]
resources: ["awsnodetemplates", "awsnodetemplates/status", "ec2nodeclasses", "ec2nodeclasses/status"]
verbs: ["patch", "update"]
{{- if .Values.webhook.enabled }}
- apiGroups: ["admissionregistration.k8s.io"]
Expand All @@ -45,4 +45,4 @@ rules:
resources: ["mutatingwebhookconfigurations"]
verbs: ["update"]
resourceNames: ["defaulting.webhook.karpenter.k8s.aws"]
{{- end }}
{{- end }}
1 change: 1 addition & 0 deletions pkg/controllers/controllers.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ func NewControllers(ctx context.Context, sess *session.Session, clk clock.Clock,
linkController := nodeclaimlink.NewController(kubeClient, cloudProvider)
controllers := []controller.Controller{
nodeclass.NewNodeTemplateController(kubeClient, recorder, subnetProvider, securityGroupProvider, amiProvider, instanceProfileProvider),
nodeclass.NewNodeClassController(kubeClient, recorder, subnetProvider, securityGroupProvider, amiProvider, instanceProfileProvider),
linkController,
nodeclaimgarbagecollection.NewController(kubeClient, cloudProvider, linkController),
}
Expand Down

0 comments on commit 14ee7fe

Please sign in to comment.