From c5f068acb7ea1533167041ecccbe4f2a5a52b4cd Mon Sep 17 00:00:00 2001 From: Nic Date: Wed, 28 Jan 2026 11:19:20 +0800 Subject: [PATCH] feat: add dns config to gateway chart Signed-off-by: Nic --- charts/gateway/Chart.yaml | 2 +- charts/gateway/README.md | 1 + charts/gateway/templates/_pod.tpl | 4 ++++ charts/gateway/values.yaml | 3 +++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/charts/gateway/Chart.yaml b/charts/gateway/Chart.yaml index fd45a36..2ae1e6a 100644 --- a/charts/gateway/Chart.yaml +++ b/charts/gateway/Chart.yaml @@ -14,7 +14,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.2.47 +version: 0.2.48 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/gateway/README.md b/charts/gateway/README.md index 51bf58e..e7e1e09 100644 --- a/charts/gateway/README.md +++ b/charts/gateway/README.md @@ -64,6 +64,7 @@ The command removes all the Kubernetes components associated with the chart and | apisix.customLuaSharedDicts | list | `[]` | Add custom [lua_shared_dict](https://github.com/openresty/lua-nginx-module#toc88) settings, click [here](https://github.com/apache/apisix-helm-chart/blob/master/charts/apisix/values.yaml#L27-L30) to learn the format of a shared dict | | apisix.customizedConfig | object | `{}` | If apisix.enableCustomizedConfig is true, full customized config.yaml. Please note that other settings about APISIX config will be ignored | | apisix.deleteURITailSlash | bool | `false` | Delete the '/' at the end of the URI | +| apisix.dnsConfig | object | `{}` | Custom DNS settings for the APISIX pods | | apisix.enableCustomizedConfig | bool | `false` | Enable full customized config.yaml | | apisix.enableIPv6 | bool | `true` | Enable nginx IPv6 resolver | | apisix.enableServerTokens | bool | `true` | Whether the APISIX version number should be shown in Server header | diff --git a/charts/gateway/templates/_pod.tpl b/charts/gateway/templates/_pod.tpl index b16c6fb..07c4bc4 100644 --- a/charts/gateway/templates/_pod.tpl +++ b/charts/gateway/templates/_pod.tpl @@ -236,6 +236,10 @@ spec: dnsPolicy: ClusterFirstWithHostNet {{- end }} hostNetwork: {{ .Values.apisix.hostNetwork }} + {{- with .Values.apisix.dnsConfig }} + dnsConfig: + {{- toYaml . | nindent 4 }} + {{- end }} initContainers: {{- if .Values.etcd.enabled }} - name: wait-etcd diff --git a/charts/gateway/values.yaml b/charts/gateway/values.yaml index 5b4570f..cb0bacd 100644 --- a/charts/gateway/values.yaml +++ b/charts/gateway/values.yaml @@ -195,6 +195,9 @@ apisix: # memory: 128Mi hostNetwork: false + # -- Custom DNS settings for the APISIX pods + dnsConfig: {} + # -- Node labels for API7 Gateway pod assignment nodeSelector: {} # -- List of node taints to tolerate