From ad1866c323dbdae5b420ba363e2812e7d1c96b5c Mon Sep 17 00:00:00 2001 From: Stevo Slavic Date: Wed, 7 May 2025 17:57:42 +0200 Subject: [PATCH] feat(chart): support configuring dnsConfig Signed-off-by: Stevo Slavic --- charts/cluster-autoscaler/Chart.yaml | 2 +- charts/cluster-autoscaler/README.md | 1 + charts/cluster-autoscaler/templates/deployment.yaml | 4 ++++ charts/cluster-autoscaler/values.yaml | 12 ++++++++++++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/charts/cluster-autoscaler/Chart.yaml b/charts/cluster-autoscaler/Chart.yaml index 93542d9e4b..2534726286 100644 --- a/charts/cluster-autoscaler/Chart.yaml +++ b/charts/cluster-autoscaler/Chart.yaml @@ -11,4 +11,4 @@ name: cluster-autoscaler sources: - https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler type: application -version: 9.48.0 +version: 9.49.0 diff --git a/charts/cluster-autoscaler/README.md b/charts/cluster-autoscaler/README.md index c58411719f..4225f57b48 100644 --- a/charts/cluster-autoscaler/README.md +++ b/charts/cluster-autoscaler/README.md @@ -463,6 +463,7 @@ vpa: | containerSecurityContext | object | `{}` | [Security context for container](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) | | customArgs | list | `[]` | Additional custom container arguments. Refer to https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-the-parameters-to-ca for the full list of cluster autoscaler parameters and their default values. List of arguments as strings. | | deployment.annotations | object | `{}` | Annotations to add to the Deployment object. | +| dnsConfig | object | `{}` | [Pod's DNS Config](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-config) | | dnsPolicy | string | `"ClusterFirst"` | Defaults to `ClusterFirst`. Valid values are: `ClusterFirstWithHostNet`, `ClusterFirst`, `Default` or `None`. If autoscaler does not depend on cluster DNS, recommended to set this to `Default`. | | envFromConfigMap | string | `""` | ConfigMap name to use as envFrom. | | envFromSecret | string | `""` | Secret name to use as envFrom. | diff --git a/charts/cluster-autoscaler/templates/deployment.yaml b/charts/cluster-autoscaler/templates/deployment.yaml index 7a6b0a0474..d5fec894c4 100644 --- a/charts/cluster-autoscaler/templates/deployment.yaml +++ b/charts/cluster-autoscaler/templates/deployment.yaml @@ -40,6 +40,10 @@ spec: {{- if .Values.priorityClassName }} priorityClassName: "{{ .Values.priorityClassName }}" {{- end }} + {{- with .Values.dnsConfig }} + dnsConfig: + {{- toYaml . | nindent 8 }} + {{- end }} {{- if .Values.dnsPolicy }} dnsPolicy: "{{ .Values.dnsPolicy }}" {{- end }} diff --git a/charts/cluster-autoscaler/values.yaml b/charts/cluster-autoscaler/values.yaml index c8adf0331d..c10de52184 100644 --- a/charts/cluster-autoscaler/values.yaml +++ b/charts/cluster-autoscaler/values.yaml @@ -170,6 +170,18 @@ deployment: # deployment.annotations -- Annotations to add to the Deployment object. annotations: {} +# dnsConfig -- [Pod's DNS Config](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-config) +dnsConfig: {} + # nameservers: + # - 1.2.3.4 + # searches: + # - ns1.svc.cluster-domain.example + # - my.dns.search.suffix + # options: + # - name: ndots + # value: "2" + # - name: edns0 + # dnsPolicy -- Defaults to `ClusterFirst`. Valid values are: # `ClusterFirstWithHostNet`, `ClusterFirst`, `Default` or `None`. # If autoscaler does not depend on cluster DNS, recommended to set this to `Default`.