Skip to content

Commit c35d92a

Browse files
committed
feat(chart): support configuring dnsConfig
Signed-off-by: Stevo Slavic <[email protected]>
1 parent 7befe4f commit c35d92a

File tree

4 files changed

+36
-0
lines changed

4 files changed

+36
-0
lines changed

helm/aws-load-balancer-controller/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ The default values set by the application itself can be confirmed [here](https:/
249249
| `envFrom` | Environment variables to set for aws-load-balancer-controller pod from configMap or Secret | None |
250250
| `envSecretName` | AWS credentials as environment variables from Secret (Secret keys `key_id` and `access_key`). | None |
251251
| `hostNetwork` | If `true`, use hostNetwork | `false` |
252+
| `dnsConfig` | Set dnsConfig if required | `{}` |
252253
| `dnsPolicy` | Set dnsPolicy if required | `ClusterFirst` |
253254
| `extraVolumeMounts` | Extra volume mounts for the pod | `[]` |
254255
| `extraVolumes` | Extra volumes for the pod | `[]` |

helm/aws-load-balancer-controller/templates/deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ spec:
5858
{{- if .Values.hostNetwork }}
5959
hostNetwork: true
6060
{{- end }}
61+
{{- with .Values.dnsConfig }}
62+
dnsConfig:
63+
{{- toYaml . | nindent 8 }}
64+
{{- end }}
6165
{{- if .Values.dnsPolicy }}
6266
dnsPolicy: {{ .Values.dnsPolicy }}
6367
{{- end }}

helm/aws-load-balancer-controller/test.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,23 @@ env:
243243
# recommended if using the Amazon VPC CNI plugin.
244244
hostNetwork: false
245245

246+
# Specifies the dnsConfig that should be used for pods in the deployment
247+
#
248+
# Tuning dnsConfig specifically ndots may be used to reduce unnecessary DNS query expansion over search domains,
249+
# e.g. reduce ndots to avoid having requests for EC2 `ec2.eu-west-2.amazonaws.com` with default ndots of 5 get expanded to
250+
# `ec2.eu-west-2.amazonaws.com.eu-west-2.compute.internal`.
251+
# See https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-config
252+
dnsConfig: {}
253+
# nameservers:
254+
# - 1.2.3.4
255+
# searches:
256+
# - ns1.svc.cluster-domain.example
257+
# - my.dns.search.suffix
258+
# options:
259+
# - name: ndots
260+
# value: "2"
261+
# - name: edns0
262+
246263
# Specifies the dnsPolicy that should be used for pods in the deployment
247264
#
248265
# This may need to be used to be changed given certain conditions. For instance, if one uses the cilium CNI

helm/aws-load-balancer-controller/values.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,20 @@ env:
308308
# recommended if using the Amazon VPC CNI plugin.
309309
hostNetwork: false
310310

311+
# Specifies the dnsConfig that should be used for pods in the deployment
312+
#
313+
# See https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-config
314+
dnsConfig: {}
315+
# nameservers:
316+
# - 1.2.3.4
317+
# searches:
318+
# - ns1.svc.cluster-domain.example
319+
# - my.dns.search.suffix
320+
# options:
321+
# - name: ndots
322+
# value: "2"
323+
# - name: edns0
324+
311325
# Specifies the dnsPolicy that should be used for pods in the deployment
312326
#
313327
# This may need to be used to be changed given certain conditions. For instance, if one uses the cilium CNI

0 commit comments

Comments
 (0)