From 3c7db932c5968ee682b6ed5bab8e4bec00d95c59 Mon Sep 17 00:00:00 2001 From: Stan M <5880433+stxm@users.noreply.github.com> Date: Mon, 8 Apr 2024 00:34:32 +0200 Subject: [PATCH] [stable/node-local-dns]: add option to set customUpstreamsvc (#572) Co-authored-by: Max Williams <8859277+max-rocket-internet@users.noreply.github.com> --- stable/node-local-dns/Chart.yaml | 2 +- stable/node-local-dns/README.md | 3 ++- stable/node-local-dns/templates/daemonset.yaml | 4 ++++ stable/node-local-dns/templates/service-upstream.yaml | 2 ++ stable/node-local-dns/values.yaml | 3 +++ 5 files changed, 12 insertions(+), 2 deletions(-) diff --git a/stable/node-local-dns/Chart.yaml b/stable/node-local-dns/Chart.yaml index ef0c0fbc..6b4abbe7 100644 --- a/stable/node-local-dns/Chart.yaml +++ b/stable/node-local-dns/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: node-local-dns -version: 2.0.6-1 +version: 2.0.7-1 appVersion: 1.22.23 maintainers: - name: gabrieladt diff --git a/stable/node-local-dns/README.md b/stable/node-local-dns/README.md index 84200aa8..ac3a2bd7 100644 --- a/stable/node-local-dns/README.md +++ b/stable/node-local-dns/README.md @@ -1,6 +1,6 @@ # node-local-dns -![Version: 2.0.6](https://img.shields.io/badge/Version-2.0.6-informational?style=flat-square) ![AppVersion: 1.22.23](https://img.shields.io/badge/AppVersion-1.22.23-informational?style=flat-square) +![Version: 2.0.7](https://img.shields.io/badge/Version-2.0.7-informational?style=flat-square) ![AppVersion: 1.22.23](https://img.shields.io/badge/AppVersion-1.22.23-informational?style=flat-square) A chart to install node-local-dns. @@ -52,6 +52,7 @@ helm install my-release deliveryhero/node-local-dns -f values.yaml | config.bindIp | bool | `false` | | | config.commProtocol | string | `"force_tcp"` | | | config.customConfig | string | `""` | | +| config.customUpstreamsvc | string | `""` | | | config.dnsDomain | string | `"cluster.local"` | | | config.dnsServer | string | `"172.20.0.10"` | | | config.healthPort | int | `8080` | | diff --git a/stable/node-local-dns/templates/daemonset.yaml b/stable/node-local-dns/templates/daemonset.yaml index dbba55f9..53551538 100644 --- a/stable/node-local-dns/templates/daemonset.yaml +++ b/stable/node-local-dns/templates/daemonset.yaml @@ -71,7 +71,11 @@ spec: - "-conf" - "/etc/Corefile" - "-upstreamsvc" + {{- if .Values.config.customUpstreamsvc }} + - "{{ .Values.config.customUpstreamsvc }}" + {{- else }} - "{{ include "node-local-dns.fullname" . }}-upstream" + {{- end }} - "-skipteardown={{ .Values.config.skipTeardown }}" - "-setupinterface={{ .Values.config.setupInterface }}" - "-setupiptables={{ .Values.config.setupIptables }}" diff --git a/stable/node-local-dns/templates/service-upstream.yaml b/stable/node-local-dns/templates/service-upstream.yaml index 4a485cdf..d11ecc03 100644 --- a/stable/node-local-dns/templates/service-upstream.yaml +++ b/stable/node-local-dns/templates/service-upstream.yaml @@ -1,3 +1,4 @@ +{{- if not .Values.config.customUpstreamsvc -}} apiVersion: v1 kind: Service metadata: @@ -17,3 +18,4 @@ spec: targetPort: 53 selector: k8s-app: kube-dns +{{- end -}} diff --git a/stable/node-local-dns/values.yaml b/stable/node-local-dns/values.yaml index 193d310f..ec1290b0 100644 --- a/stable/node-local-dns/values.yaml +++ b/stable/node-local-dns/values.yaml @@ -13,6 +13,9 @@ config: # Virtual IP to be used by ipvs mode, to be used as --cluster-dns, must not collide. localDns: "169.254.20.25" + # Use a custom upstreamsvc for -upstreamsvc + customUpstreamsvc: "" + # If true, it will bind 0.0.0.0, otherwise dnsServer and localDns will be used. https://github.com/bottlerocket-os/bottlerocket/issues/3711#issuecomment-1907087528 bindIp: false