Skip to content

Commit

Permalink
Added ability to provide custom resources to the controller from Helm (
Browse files Browse the repository at this point in the history
…#882)

* Exposed resources to values.yaml

- Exposed controller resources to values.yaml
- Exposed webhook resources to values.yaml
- Copied existing resources as recommened/default resources in values.yaml

* Removed existing resources from webhook deployment

Co-authored-by: Ellis Tarn <ellistarn@gmail.com>
  • Loading branch information
prakarsh-dt and ellistarn committed Dec 2, 2021
1 parent 4f3852c commit 88a9c5a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 15 deletions.
10 changes: 3 additions & 7 deletions charts/karpenter/templates/controller/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,9 @@ spec:
containers:
- name: manager
image: {{ .Values.controller.image }}
resources:
requests:
cpu: 1
memory: 1Gi
limits:
cpu: 1
memory: 1Gi
{{- if .Values.controller.resources }}
resources: {{ toYaml .Values.controller.resources | nindent 12 }}
{{- end }}
ports:
- name: metrics
containerPort: 8080
Expand Down
10 changes: 3 additions & 7 deletions charts/karpenter/templates/webhook/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,9 @@ spec:
containers:
- name: webhook
image: {{ .Values.webhook.image }}
resources:
limits:
cpu: 100m
memory: 50Mi
requests:
cpu: 100m
memory: 50Mi
{{- if .Values.webhook.resources }}
resources: {{ toYaml .Values.webhook.resources | nindent 12 }}
{{- end }}
ports:
- name: webhook
containerPort: 8443
Expand Down
15 changes: 14 additions & 1 deletion charts/karpenter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,26 @@ controller:
image: "public.ecr.aws/karpenter/controller:v0.5.0@sha256:76fab69a5a2b1f5736c8beea349e60174d8903b26b65c4cc5009c6528f9aea72"
clusterName: ""
clusterEndpoint: ""
resources:
requests:
cpu: 1
memory: 1Gi
limits:
cpu: 1
memory: 1Gi
replicas: 1
webhook:
env: []
nodeSelector: {}
tolerations: []
affinity: {}
image: "public.ecr.aws/karpenter/webhook:v0.5.0@sha256:bc639160d55a15e1f9362a06d42e4133e692d3c81e96d87e2672bd9c53c98958"
# set to true if using custom CNI on EKS
hostNetwork: false
resources:
limits:
cpu: 100m
memory: 50Mi
requests:
cpu: 100m
memory: 50Mi
replicas: 1

0 comments on commit 88a9c5a

Please sign in to comment.