From 474330fd9be25aef4975a292d158ca7bdc312bb9 Mon Sep 17 00:00:00 2001 From: Aditya Purandare Date: Thu, 26 Oct 2023 00:01:02 +0530 Subject: [PATCH] Add ability to specify dnsConfig in helm chart (#1344) * Update values.yaml * Update deployment.yaml * Update charts/metrics-server/templates/deployment.yaml Co-authored-by: Steve Hipwell * Update helm chart README to add dnsConfig * Fix curly braces as default input for dnsConfig --------- Co-authored-by: Steve Hipwell --- charts/metrics-server/README.md | 1 + charts/metrics-server/templates/deployment.yaml | 4 ++++ charts/metrics-server/values.yaml | 2 ++ 3 files changed, 7 insertions(+) diff --git a/charts/metrics-server/README.md b/charts/metrics-server/README.md index 9b33cb7345..7de6202b03 100644 --- a/charts/metrics-server/README.md +++ b/charts/metrics-server/README.md @@ -86,3 +86,4 @@ The following table lists the configurable parameters of the _Metrics Server_ ch | `topologySpreadConstraints` | Pod Topology Spread Constraints. | `[]` | | `deploymentAnnotations` | Annotations to add to the deployment. | `{}` | | `schedulerName` | scheduler to set to the deployment. | `""` | +| `dnsConfig` | Set the dns configuration options for the deployment. | `{}` | diff --git a/charts/metrics-server/templates/deployment.yaml b/charts/metrics-server/templates/deployment.yaml index 1d656fccdd..80a6a44093 100644 --- a/charts/metrics-server/templates/deployment.yaml +++ b/charts/metrics-server/templates/deployment.yaml @@ -46,6 +46,10 @@ spec: {{- if .Values.hostNetwork.enabled }} hostNetwork: true {{- end }} + {{- with .Values.dnsConfig }} + dnsConfig: + {{- toYaml . | nindent 8 }} + {{- end }} containers: - name: metrics-server {{- with .Values.securityContext }} diff --git a/charts/metrics-server/values.yaml b/charts/metrics-server/values.yaml index fba10aaf2b..8cb1cac6ee 100644 --- a/charts/metrics-server/values.yaml +++ b/charts/metrics-server/values.yaml @@ -176,6 +176,8 @@ affinity: {} topologySpreadConstraints: [] +dnsConfig: {} + # Annotations to add to the deployment deploymentAnnotations: {}