From 9955c1e7cee483786a8dde26a3d4c0e6b39de469 Mon Sep 17 00:00:00 2001 From: udhos Date: Thu, 5 Dec 2024 18:58:15 -0300 Subject: [PATCH] chore: Helm chart option to set POD container name (#7384) Co-authored-by: udhos --- charts/karpenter/README.md | 1 + charts/karpenter/templates/deployment.yaml | 2 +- charts/karpenter/values.yaml | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/charts/karpenter/README.md b/charts/karpenter/README.md index 0d56bb603504..58669e7096a4 100644 --- a/charts/karpenter/README.md +++ b/charts/karpenter/README.md @@ -44,6 +44,7 @@ cosign verify public.ecr.aws/karpenter/karpenter:1.1.0 \ | additionalClusterRoleRules | list | `[]` | Specifies additional rules for the core ClusterRole. | | additionalLabels | object | `{}` | Additional labels to add into metadata. | | affinity | object | `{"nodeAffinity":{"requiredDuringSchedulingIgnoredDuringExecution":{"nodeSelectorTerms":[{"matchExpressions":[{"key":"karpenter.sh/nodepool","operator":"DoesNotExist"}]}]}},"podAntiAffinity":{"requiredDuringSchedulingIgnoredDuringExecution":[{"topologyKey":"kubernetes.io/hostname"}]}}` | Affinity rules for scheduling the pod. If an explicit label selector is not provided for pod affinity or pod anti-affinity one will be created from the pod selector labels. | +| controller.containerName | string | `"controller"` | Distinguishing container name (containerName: karpenter-controller). | | controller.env | list | `[]` | Additional environment variables for the controller pod. | | controller.envFrom | list | `[]` | | | controller.extraVolumeMounts | list | `[]` | Additional volumeMounts for the controller pod. | diff --git a/charts/karpenter/templates/deployment.yaml b/charts/karpenter/templates/deployment.yaml index f43822270dd6..990ce486292e 100644 --- a/charts/karpenter/templates/deployment.yaml +++ b/charts/karpenter/templates/deployment.yaml @@ -60,7 +60,7 @@ spec: schedulerName: {{ . | quote }} {{- end }} containers: - - name: controller + - name: {{ .Values.controller.containerName | default "controller" }} securityContext: runAsUser: 65532 runAsGroup: 65532 diff --git a/charts/karpenter/values.yaml b/charts/karpenter/values.yaml index c560190c3c4c..a1d16eb7f4d0 100644 --- a/charts/karpenter/values.yaml +++ b/charts/karpenter/values.yaml @@ -102,6 +102,8 @@ extraVolumes: [] # expirationSeconds: 86400 # path: token controller: + # -- Distinguishing container name (containerName: karpenter-controller). + containerName: controller image: # -- Repository path to the controller image. repository: public.ecr.aws/karpenter/controller