Skip to content

Commit 23fedc6

Browse files
mnasiadkaAlex-Welsh
authored andcommitted
coredns: Use /run/systemd/resolve/resolv.conf
In FCOS36 and later coredns started failing with loops. /etc/resolv.conf will not work with coredns (see [1]). Tested on FC35/36/37. [1]: https://github.com/coredns/coredns/blob/master/plugin/loop/README.md#troubleshooting Change-Id: I3a0700046bade7bd0b3a1b319f66b8f675f0c8fb (cherry picked from commit 037a71aaf8664a7f6a8926dceb294592d73da591) (cherry picked from commit bf99035) (cherry picked from commit 0f3ff1a) (cherry picked from commit fceb8d4) (cherry picked from commit a0b3952)
1 parent 2d38993 commit 23fedc6

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

magnum/drivers/common/templates/kubernetes/fragments/core-dns-service.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ data:
8484
fallthrough in-addr.arpa ip6.arpa
8585
}
8686
prometheus :9153
87-
forward . /etc/resolv.conf
87+
forward . /run/systemd/resolve/resolv.conf
8888
cache 30
8989
loop
9090
reload
@@ -144,6 +144,9 @@ spec:
144144
readOnly: true
145145
- name: tmp
146146
mountPath: /tmp
147+
- name: resolvconf
148+
mountPath: /run/systemd/resolve/resolv.conf
149+
readOnly: true
147150
ports:
148151
- containerPort: 53
149152
name: dns
@@ -186,6 +189,10 @@ spec:
186189
items:
187190
- key: Corefile
188191
path: Corefile
192+
- name: resolvconf
193+
hostPath:
194+
path: /run/systemd/resolve/resolv.conf
195+
type: File
189196
---
190197
apiVersion: v1
191198
kind: Service

0 commit comments

Comments
 (0)