Bug Respect DHCP option 119 for on-prem
@@ -50,7 +50,7 @@ contents:
show \
"{{ onPremPlatformAPIServerInternalIP . }}" \
"{{ onPremPlatformIngressIP . }}")
- DOMAIN="{{.DNS.Spec.BaseDomain}}"
+ DOMAINS="${IP4_DOMAINS} ${IP6_DOMAINS} {{.DNS.Spec.BaseDomain}}"
if [[ -n "$NAMESERVER_IP" ]]; then
if systemctl -q is-enabled systemd-resolved; then
>&2 echo "NM resolv-prepender: Setting up systemd-resolved for OKD domain and local IP"
@@ -58,7 +58,7 @@ contents:
>&2 echo "NM resolv-prepender: Creating /etc/systemd/resolved.conf.d/60-kni.conf"
echo "[Resolve]" > /etc/systemd/resolved.conf.d/60-kni.conf
echo "DNS=$NAMESERVER_IP" >> /etc/systemd/resolved.conf.d/60-kni.conf
- echo "Domains=$DOMAIN" >> /etc/systemd/resolved.conf.d/60-kni.conf
+ echo "Domains=$DOMAINS" >> /etc/systemd/resolved.conf.d/60-kni.conf
if systemctl -q is-active systemd-resolved; then
>&2 echo "NM resolv-prepender: restarting systemd-resolved"
systemctl restart systemd-resolved
@@ -67,7 +67,7 @@ contents:
else
>&2 echo "NM resolv-prepender: Prepending 'nameserver $NAMESERVER_IP' to /etc/resolv.conf (other nameservers from /var/run/NetworkManager/resolv.conf)"
sed -e "/^search/d" \
- -e "/Generated by/c# Generated by KNI resolv prepender NM dispatcher script\nsearch $DOMAIN\nnameserver $NAMESERVER_IP" \
+ -e "/Generated by/c# Generated by KNI resolv prepender NM dispatcher script\nsearch $DOMAINS\nnameserver $NAMESERVER_IP" \
/var/run/NetworkManager/resolv.conf > /etc/resolv.tmp
# Only leave the first 3 nameservers in /etc/resolv.conf
sed -i ':a $!{N; ba}; s/\(^\|\n\)nameserver/\n# nameserver/4g' /etc/resolv.tmp
