mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 12:43:23 +00:00
Move hostdns.conf out of cni directory.
This commit is contained in:
parent
e66f4ca537
commit
ee2418c7aa
@ -878,7 +878,7 @@ function construct-windows-kubelet-flags {
|
|||||||
flags+=" --logtostderr=false"
|
flags+=" --logtostderr=false"
|
||||||
|
|
||||||
# Configure the file path for host dns configuration
|
# Configure the file path for host dns configuration
|
||||||
flags+=" --resolv-conf=${WINDOWS_CNI_CONFIG_DIR}\hostdns.conf"
|
flags+=" --resolv-conf=${WINDOWS_CNI_DIR}\hostdns.conf"
|
||||||
|
|
||||||
# Both --cgroups-per-qos and --enforce-node-allocatable should be disabled on
|
# Both --cgroups-per-qos and --enforce-node-allocatable should be disabled on
|
||||||
# windows; the latter requires the former to be enabled to work.
|
# windows; the latter requires the former to be enabled to work.
|
||||||
|
@ -1004,7 +1004,9 @@ function Configure-HostDnsConf {
|
|||||||
$conf = $conf + "nameserver $ip`r`n"
|
$conf = $conf + "nameserver $ip`r`n"
|
||||||
}
|
}
|
||||||
$conf = $conf + "search $search_list"
|
$conf = $conf + "search $search_list"
|
||||||
$hostdns_conf = "${env:CNI_CONFIG_DIR}\hostdns.conf"
|
# Do not put hostdns.conf into the CNI config directory so as to
|
||||||
|
# avoid the container runtime treating it as CNI config.
|
||||||
|
$hostdns_conf = "${env:CNI_DIR}\hostdns.conf"
|
||||||
New-Item -Force -ItemType file ${hostdns_conf} | Out-Null
|
New-Item -Force -ItemType file ${hostdns_conf} | Out-Null
|
||||||
Set-Content ${hostdns_conf} $conf
|
Set-Content ${hostdns_conf} $conf
|
||||||
Log-Output "HOST dns conf:`n$(Get-Content -Raw ${hostdns_conf})"
|
Log-Output "HOST dns conf:`n$(Get-Content -Raw ${hostdns_conf})"
|
||||||
|
Loading…
Reference in New Issue
Block a user