Skip to content

Commit

Permalink
Fix broken reference name to controller name when setting controller.…
Browse files Browse the repository at this point in the history
…containerName

Follow up for aws#7384
  • Loading branch information
asherf committed Dec 16, 2024
1 parent e0cd8a4 commit 4da2355
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions charts/karpenter/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{- end }}


{{/*
Container name
*/}}
{{- define "karpenter.controller.ContainerName" -}}
{{ .Values.controller.containerName | default "controller" }}
{{- end }}

{{/*
Selector labels
*/}}
Expand Down
4 changes: 2 additions & 2 deletions charts/karpenter/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ spec:
schedulerName: {{ . | quote }}
{{- end }}
containers:
- name: {{ .Values.controller.containerName | default "controller" }}
- name: {{ include "karpenter.controller.ContainerName" . }}
securityContext:
runAsUser: 65532
runAsGroup: 65532
Expand Down Expand Up @@ -102,7 +102,7 @@ spec:
- name: MEMORY_LIMIT
valueFrom:
resourceFieldRef:
containerName: controller
containerName: {{ include "karpenter.controller.ContainerName" . }}
divisor: "0"
resource: limits.memory
- name: FEATURE_GATES
Expand Down

0 comments on commit 4da2355

Please sign in to comment.