Skip to content

Commit f543305

Browse files
DrFaust92claude
andauthored
feat(atlantis): support dnsConfig.options (e.g. ndots) (#565)
The dnsConfig block only rendered `nameservers` and `searches`, silently dropping `options` — so `ndots` (and any other resolver option) could not be set. Render the whole `dnsConfig` value with `toYaml` so all PodDNSConfig fields pass through, and add `options` to the values.schema.json DnsConfig definition (which has `additionalProperties: false`, so it would otherwise reject `options`). Also fix the schema's `searches` type to `array` (the template ranges over it) and stop emitting an empty `nameservers:` key when only `options`/`searches` are set. Backward compatible: nameservers/searches render identically and an empty `dnsConfig: {}` still renders no block. Signed-off-by: Ilia <ilia.lazebnik@placer.ai> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 550cba1 commit f543305

4 files changed

Lines changed: 25 additions & 13 deletions

File tree

charts/atlantis/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: v1
33
appVersion: v0.45.0
44
description: A Helm chart for Atlantis https://www.runatlantis.io
55
name: atlantis
6-
version: 6.8.0
6+
version: 6.9.0
77
keywords:
88
- terraform
99
home: https://www.runatlantis.io

charts/atlantis/templates/statefulset.yaml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,8 @@ spec:
5050
{{- fail "dnsPolicy is set to 'None', but dnsConfig is not provided" }}
5151
{{- end }}
5252
dnsConfig:
53-
nameservers:
54-
{{- range .Values.dnsConfig.nameservers }}
55-
- {{ . }}
56-
{{- end }}
57-
{{- if .Values.dnsConfig.searches }}
58-
searches:
59-
{{- range .Values.dnsConfig.searches }}
60-
- {{ . }}
61-
{{- end }}
62-
{{- end }}
63-
{{- end }}
53+
{{- toYaml .Values.dnsConfig | nindent 8 }}
54+
{{- end }}
6455
{{- if .Values.hostAliases }}
6556
hostAliases:
6657
{{- range .Values.hostAliases }}

charts/atlantis/values.schema.json

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1521,7 +1521,25 @@
15211521
},
15221522
"searches": {
15231523
"description": "A list of DNS search domains for hostname lookup.",
1524-
"type": "string"
1524+
"items": {
1525+
"type": "string"
1526+
},
1527+
"type": "array"
1528+
},
1529+
"options": {
1530+
"description": "A list of DNS resolver options (e.g. ndots).",
1531+
"items": {
1532+
"type": "object",
1533+
"properties": {
1534+
"name": {
1535+
"type": "string"
1536+
},
1537+
"value": {
1538+
"type": "string"
1539+
}
1540+
}
1541+
},
1542+
"type": "array"
15251543
}
15261544
},
15271545
"type": "object",

charts/atlantis/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,9 @@ dnsConfig: {}
689689
# - 8.8.8.8
690690
# searches:
691691
# - mydomain.com
692+
# options:
693+
# - name: ndots
694+
# value: "3"
692695

693696
hostNetwork: false
694697

0 commit comments

Comments
 (0)