Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Commit

Permalink
feat: cherry pick changes from master to support kubernetes 1.18.1/1.…
Browse files Browse the repository at this point in the history
…18.2 (#3194)

* feat: add support for single stack IPv6 (#2781)

(cherry picked from commit 1b9beb4)

* feat: allow iptables mode for dualstack 1.18+ (#2882)


(cherry picked from commit ff5362e)

* chore: update cluster-autoscaler for k8s 1.18 (#2901)

See https://github.com/kubernetes/autoscaler/releases/tag/cluster-autoscaler-1.18.0

(cherry picked from commit 0cc985d)

* feat: installing csi-proxy for windows at node deployment time (#2930)

(cherry picked from commit 13e72f2)

* feat: add support for Kubernetes 1.18.0 (#2957)

See https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.18.md

(cherry picked from commit 6dadaf0)

* fix: make build with go 1.14 (#3005)

(cherry picked from commit 509bc9c)

* feat: add support for Kubernetes 1.18.1 (#3045)

* feat: add support for Kubernetes 1.18.1

See https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.18.md#changelog-since-v1180

* ci: test PRs with k8s 1.18

(cherry picked from commit 66ff61c)

* feat: add support for Kubernetes 1.18.2 (#3089)

See https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.18.md#changelog-since-v1181

(cherry picked from commit 8ebece1)

* Revert "Revert windowszip path"

This reverts commit 8db438e.

* Update KubeBinariesSASURLBase to new path.

Co-authored-by: Anish Ramasekar <anish.ramasekar@gmail.com>
Co-authored-by: Matt Boersma <Matt.Boersma@microsoft.com>
Co-authored-by: Mark Rossetti <marosset@microsoft.com>
Co-authored-by: Sertaç Özercan <852750+sozercan@users.noreply.github.com>
  • Loading branch information
5 people committed May 5, 2020
1 parent c22aad4 commit efff5c0
Show file tree
Hide file tree
Showing 70 changed files with 2,778 additions and 265 deletions.
2 changes: 2 additions & 0 deletions docs/topics/clusterdefinitions.md
Expand Up @@ -674,6 +674,8 @@ https://{keyvaultname}.vault.azure.net:443/secrets/{secretName}/{version}
| ----------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| adminUsername | yes | Username for the Windows adminstrator account created on each Windows node |
| adminPassword | yes | Password for the Windows adminstrator account created on each Windows node |
| csiProxyURL | no | Path to a package containing csi proxy binaries for Windows. |
| enableCSIProxy | no | If set to `true` the csi-proxy specified by `windowsProfile.csiProxyURL` will get installed during node provisioning. See [Windows Csi Proxy](csi-proxy-windows.md) for more details. |
| windowsPublisher | no | Publisher used to find Windows VM to deploy from marketplace. Default: `microsoft-aks` |
| windowsOffer | no | Offer used to find Windows VM to deploy from marketplace. Default: `aks-windows` |
| windowsSku | no | SKU usedto find Windows VM to deploy from marketplace. Default: `2019-datacenter-core-smalldisk` |
Expand Down
31 changes: 31 additions & 0 deletions docs/topics/csi-proxy-windows.md
@@ -0,0 +1,31 @@
# CSI Proxy for Windows

CSI Proxy for Windows enables support for CSI Plugins on Kubernetes nodes running Windows.

More info can be found in the following places:

- <https://github.com/kubernetes/enhancements/blob/master/keps/sig-windows/20190714-windows-csi-support.md>
- <https://github.com/kubernetes-csi/csi-proxy>

## Requirements

- CSI Proxy for Windows requires Kubernetes version 1.18.0 or greater.

## Usage

### Enable in aks-engine

Add the following fields to `windowsProfile`:

```json
"windowsProfile": {
...
"enableCSIProxy": true,
"csiProxyURL": "<Path to a package containing Windows csi proxy binaries>"
...
}
```

For testing purposes the following csi-proxy binary may be used:

- https://kubernetesartifacts.azureedge.net/csi-proxy/master/binaries/csi-proxy.tar.gz
14 changes: 14 additions & 0 deletions examples/dualstack/README.md
Expand Up @@ -14,6 +14,20 @@ This example shows you how to configure a dual stack cluster:

1. **kubernetes.json** - deploying and using [Kubernetes](kubernetes.json).

**Note**

When using kubernetes version 1.16, the IPv6 cluster subnet needs to be /8 as the default node CIDR mask size for IPv6 is /24

For kubernetes version 1.17+, the default node CIDR mask size for IPv6 is /64 and the default clusters subnet is `fc00::/48`. In 1.17+ node CIDR mask size can be configured by

```
"controllerManagerConfig" : {
"--node-cidr-mask-size-ipv6": <value>
}
```

**The difference between node CIDR mask size and cluster subnet mask size can't be > 16**

Things to try out after the cluster is deployed -

- Nodes are Kubernetes version 1.16.0 or later
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Expand Up @@ -47,7 +47,7 @@ require (
github.com/spf13/cobra v0.0.3
github.com/spf13/pflag v1.0.3
github.com/x-cray/logrus-prefixed-formatter v0.5.2
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
golang.org/x/crypto v0.0.0-20191105034135-c7e5f84aec59
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 // indirect
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4
golang.org/x/sys v0.0.0-20191104094858-e8c54fb511f6 // indirect
Expand Down
5 changes: 5 additions & 0 deletions go.sum
Expand Up @@ -136,11 +136,15 @@ github.com/x-cray/logrus-prefixed-formatter v0.5.2 h1:00txxvfBM9muc0jiLIEAkAcIMJ
github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191105034135-c7e5f84aec59 h1:PyXRxSVbvzDGuqYXjHndV7xDzJ7w2K8KD9Ef8GB7KOE=
golang.org/x/crypto v0.0.0-20191105034135-c7e5f84aec59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190311183353-d8887717615a h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand All @@ -149,6 +153,7 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191008105621-543471e840be h1:QAcqgptGM8IQBC9K/RC4o+O9YmqEm0diQn9QmZw/0mU=
golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191104094858-e8c54fb511f6 h1:ZJUmhYTp8GbGC0ViZRc2U+MIYQ8xx9MscsdXnclfIhw=
Expand Down
Expand Up @@ -9,6 +9,15 @@ data:
kubeconfig: /var/lib/kubelet/kubeconfig
clusterCIDR: "{{ContainerConfig "cluster-cidr"}}"
mode: "{{ContainerConfig "proxy-mode"}}"
{{- if ContainerConfig "bind-address"}}
bindAddress: "{{ContainerConfig "bind-address"}}"
{{end}}
{{- if ContainerConfig "healthz-bind-address"}}
healthzBindAddress: "{{ContainerConfig "healthz-bind-address"}}"
{{end}}
{{- if ContainerConfig "metrics-bind-address"}}
metricsBindAddress: "{{ContainerConfig "metrics-bind-address"}}"
{{end}}
featureGates:
{{ContainerConfig "featureGates"}}
metadata:
Expand Down
6 changes: 6 additions & 0 deletions parts/k8s/addons/coredns.yaml
Expand Up @@ -155,6 +155,9 @@ spec:
effect: NoSchedule
nodeSelector:
beta.kubernetes.io/os: linux
{{- if ContainerConfig "use-host-network"}}
kubernetes.azure.com/role: agent
{{end}}
containers:
- name: coredns
image: {{ContainerImage "coredns"}}
Expand Down Expand Up @@ -206,6 +209,9 @@ spec:
- all
readOnlyRootFilesystem: true
dnsPolicy: Default
{{- if ContainerConfig "use-host-network"}}
hostNetwork: {{ContainerConfig "use-host-network"}}
{{end}}
volumes:
- name: config-volume
configMap:
Expand Down
2 changes: 1 addition & 1 deletion parts/k8s/cloud-init/artifacts/cse_config.sh
Expand Up @@ -295,7 +295,7 @@ ensureKMS() {
}
{{end}}

{{if IsIPv6DualStackFeatureEnabled}}
{{if IsIPv6Enabled}}
ensureDHCPv6() {
wait_for_file 3600 1 {{GetDHCPv6ServiceCSEScriptFilepath}} || exit $ERR_FILE_WATCH_TIMEOUT
wait_for_file 3600 1 {{GetDHCPv6ConfigCSEScriptFilepath}} || exit $ERR_FILE_WATCH_TIMEOUT
Expand Down
4 changes: 2 additions & 2 deletions parts/k8s/cloud-init/artifacts/cse_main.sh
Expand Up @@ -187,8 +187,8 @@ if [[ -n "${MASTER_NODE}" && "${KMS_PROVIDER_VAULT_NAME}" != "" ]]; then
fi
{{end}}

{{/* configure and enable dhcpv6 for dual stack feature */}}
{{- if IsIPv6DualStackFeatureEnabled}}
{{/* configure and enable dhcpv6 for ipv6 features */}}
{{- if IsIPv6Enabled}}
ensureDHCPv6
{{end}}

Expand Down
2 changes: 1 addition & 1 deletion parts/k8s/cloud-init/masternodecustomdata.yml
Expand Up @@ -136,7 +136,7 @@ write_files:
APT::Periodic::AutocleanInterval "0";
APT::Periodic::Unattended-Upgrade "0";
{{if IsIPv6DualStackFeatureEnabled}}
{{if IsIPv6Enabled}}
- path: {{GetDHCPv6ServiceCSEScriptFilepath}}
permissions: "0644"
encoding: gzip
Expand Down
2 changes: 1 addition & 1 deletion parts/k8s/cloud-init/nodecustomdata.yml
Expand Up @@ -122,7 +122,7 @@ write_files:
APT::Periodic::AutocleanInterval "0";
APT::Periodic::Unattended-Upgrade "0";
{{if IsIPv6DualStackFeatureEnabled}}
{{if IsIPv6Enabled}}
- path: {{GetDHCPv6ServiceCSEScriptFilepath}}
permissions: "0644"
encoding: gzip
Expand Down
4 changes: 3 additions & 1 deletion parts/k8s/kuberneteswindowsfunctions.ps1
@@ -1,4 +1,5 @@
# This is a temporary file to test dot-sourcing functions stored in separate scripts in a zip file
# This filter removes null characters (\0) which are captured in nssm.exe output when logged through powershell
filter RemoveNulls { $_ -replace '\0', '' }

filter Timestamp {"$(Get-Date -Format o): $_"}

Expand Down Expand Up @@ -209,6 +210,7 @@ function Register-NodeResetScriptTask {
Write-Log "Creating a startup task to run windowsnodereset.ps1"

(Get-Content 'c:\AzureData\k8s\windowsnodereset.ps1') |
Foreach-Object { $_ -replace '{{CsiProxyEnabled}}', $global:EnableCsiProxy } |
Foreach-Object { $_ -replace '{{MasterSubnet}}', $global:MasterSubnet } |
Foreach-Object { $_ -replace '{{NetworkMode}}', $global:NetworkMode } |
Foreach-Object { $_ -replace '{{NetworkPlugin}}', $global:NetworkPlugin } |
Expand Down
11 changes: 11 additions & 0 deletions parts/k8s/kuberneteswindowssetup.ps1
Expand Up @@ -131,6 +131,10 @@ $global:VNetCNIPluginsURL = "{{WrapAsParameter "vnetCniWindowsPluginsURL"}}"
$global:EnableTelemetry = "{{WrapAsVariable "enableTelemetry" }}";
$global:TelemetryKey = "{{WrapAsVariable "applicationInsightsKey" }}";

# CSI Proxy settings
$global:EnableCsiProxy = [System.Convert]::ToBoolean("{{WrapAsVariable "windowsEnableCSIProxy" }}");
$global:CsiProxyUrl = "{{WrapAsVariable "windowsCSIProxyURL" }}";

# Base64 representation of ZIP archive
$zippedFiles = "{{ GetKubernetesWindowsAgentFunctions }}"

Expand All @@ -144,6 +148,7 @@ Expand-Archive scripts.zip -DestinationPath "C:\\AzureData\\"
. c:\AzureData\k8s\windowskubeletfunc.ps1
. c:\AzureData\k8s\windowscnifunc.ps1
. c:\AzureData\k8s\windowsazurecnifunc.ps1
. c:\AzureData\k8s\windowscsiproxyfunc.ps1
. c:\AzureData\k8s\windowsinstallopensshfunc.ps1

function
Expand Down Expand Up @@ -282,6 +287,10 @@ try
Write-CACert -CACertificate $global:CACertificate `
-KubeDir $global:KubeDir

if ($global:EnableCsiProxy) {
New-CsiProxyService -CsiProxyPackageUrl $global:CsiProxyUrl -KubeDir $global:KubeDir
}

Write-Log "Write kube config"
Write-KubeConfig -CACertificate $global:CACertificate `
-KubeDir $global:KubeDir `
Expand Down Expand Up @@ -364,6 +373,8 @@ try
-HNSModule $global:HNSModule `
-KubeletNodeLabels $global:KubeletNodeLabels



Get-LogCollectionScripts

Write-Log "Disable Internet Explorer compat mode and set homepage"
Expand Down
35 changes: 35 additions & 0 deletions parts/k8s/windowscsiproxyfunc.ps1
@@ -0,0 +1,35 @@
function New-CsiProxyService {
Param(
[Parameter(Mandatory = $true)][string]
$CsiProxyPackageUrl,
[Parameter(Mandatory = $true)][string]
$KubeDir
)

$tempdir = New-TemporaryDirectory
$binaryPackage = "$tempdir\csiproxy.tar"

DownloadFileOverHttp -Url $CsiProxyPackageUrl -DestinationPath $binaryPackage

tar -xzf $binaryPackage -C $tempdir
cp "$tempdir\build\server.exe" "$KubeDir\csi-proxy-server.exe"

del $tempdir -Recurse

& "$KubeDir\nssm.exe" install csi-proxy-server "$KubeDir\csi-proxy-server.exe" | RemoveNulls
& "$KubeDir\nssm.exe" set csi-proxy-server AppDirectory "$KubeDir" | RemoveNulls
& "$KubeDir\nssm.exe" set csi-proxy-server AppRestartDekay 5000 | RemoveNulls
& "$KubeDir\nssm.exe" set csi-proxy-server Description csi-proxy-server | RemoveNulls
& "$KubeDir\nssm.exe" set csi-proxy-server Start SERVICE_DEMAND_START | RemoveNulls
& "$KubeDir\nssm.exe" set csi-proxy-server ObjectName LocalSystem | RemoveNulls
& "$KubeDir\nssm.exe" set csi-proxy-server Type SERVICE_WIN32_OWN_PROCESS | RemoveNulls
& "$KubeDir\nssm.exe" set csi-proxy-server AppThrottle 1500 | RemoveNulls
& "$KubeDir\nssm.exe" set csi-proxy-server AppStdout "$KubeDir\csi-proxy-server.log" | RemoveNulls
& "$KubeDir\nssm.exe" set csi-proxy-server AppStderr "$KubeDir\csi-proxy-server.err.log" | RemoveNulls
& "$KubeDir\nssm.exe" set csi-proxy-server AppStdoutCreationDisposition 4 | RemoveNulls
& "$KubeDir\nssm.exe" set csi-proxy-server AppStderrCreationDisposition 4 | RemoveNulls
& "$KubeDir\nssm.exe" set csi-proxy-server AppRotateFiles 1 | RemoveNulls
& "$KubeDir\nssm.exe" set csi-proxy-server AppRotateOnline 1 | RemoveNulls
& "$KubeDir\nssm.exe" set csi-proxy-server AppRotateSeconds 86400 | RemoveNulls
& "$KubeDir\nssm.exe" set csi-proxy-server AppRotateBytes 10485760 | RemoveNulls
}
10 changes: 6 additions & 4 deletions parts/k8s/windowskubeletfunc.ps1
Expand Up @@ -251,9 +251,6 @@ Get-KubeBinaries {
del $tempdir -Recurse
}

# This filter removes null characters (\0) which are captured in nssm.exe output when logged through powershell
filter RemoveNulls { $_ -replace '\0', '' }

# TODO: replace KubeletStartFile with a Kubelet config, remove NSSM, and use built-in service integration
function
New-NSSMService {
Expand All @@ -269,13 +266,18 @@ New-NSSMService {
$KubeProxyStartFile
)

$kubeletDependOnServices = "docker"
if ($global:EnableCsiProxy) {
$kubeletDependOnServices += " csi-proxy-server"
}

# setup kubelet
& "$KubeDir\nssm.exe" install Kubelet C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe | RemoveNulls
& "$KubeDir\nssm.exe" set Kubelet AppDirectory $KubeDir | RemoveNulls
& "$KubeDir\nssm.exe" set Kubelet AppParameters $KubeletStartFile | RemoveNulls
& "$KubeDir\nssm.exe" set Kubelet DisplayName Kubelet | RemoveNulls
& "$KubeDir\nssm.exe" set Kubelet AppRestartDelay 5000 | RemoveNulls
& "$KubeDir\nssm.exe" set Kubelet DependOnService docker | RemoveNulls
& "$KubeDir\nssm.exe" set Kubelet DependOnService "$kubeletDependOnServices" | RemoveNulls
& "$KubeDir\nssm.exe" set Kubelet Description Kubelet | RemoveNulls
& "$KubeDir\nssm.exe" set Kubelet Start SERVICE_DEMAND_START | RemoveNulls
& "$KubeDir\nssm.exe" set Kubelet ObjectName LocalSystem | RemoveNulls
Expand Down
12 changes: 12 additions & 0 deletions parts/k8s/windowsnodereset.ps1
Expand Up @@ -8,6 +8,7 @@ $global:LogPath = "c:\k\windowsnodereset.log"
$global:HNSModule = "c:\k\hns.psm1"

# Note: the following templated values are expanded kuberneteswindowsfunctions.ps1/Register-NodeResetScriptTask() not during template generation!
$global:CsiProxyEnabled = [System.Convert]::ToBoolean("{{CsiProxyEnabled}}")
$global:MasterSubnet = "{{MasterSubnet}}"
$global:NetworkMode = "{{NetworkMode}}"
$global:NetworkPlugin = "{{NetworkPlugin}}"
Expand All @@ -31,6 +32,11 @@ Stop-Service kubeproxy
Write-Log "Stopping kubelet service"
Stop-Service kubelet

if ($global:CsiProxyEnabled) {
Write-Log "Stopping csi-proxy-server service"
Stop-Service csi-proxy-server
}

#
# Perform cleanup
#
Expand Down Expand Up @@ -83,6 +89,12 @@ if ($global:NetworkPlugin -eq 'kubenet') {
#
# Start Services
#

if ($global:CsiProxyEnabled) {
Write-Log "Starting csi-proxy-server service"
Start-Service csi-proxy-server
}

Write-Log "Starting kubelet service"
Start-Service kubelet

Expand Down
18 changes: 17 additions & 1 deletion pkg/api/addons.go
Expand Up @@ -297,7 +297,8 @@ func (cs *ContainerService) setAddonsConfig(isUpgrade bool) {
"non-masquerade-cidr": cs.Properties.GetNonMasqueradeCIDR(),
"non-masq-cni-cidr": cs.Properties.GetAzureCNICidr(),
"secondary-non-masquerade-cidr": cs.Properties.GetSecondaryNonMasqueradeCIDR(),
"enable-ipv6": strconv.FormatBool(cs.Properties.FeatureFlags.IsFeatureEnabled("EnableIPv6DualStack")),
"enable-ipv6": strconv.FormatBool(cs.Properties.FeatureFlags.IsFeatureEnabled("EnableIPv6DualStack") ||
cs.Properties.FeatureFlags.IsFeatureEnabled("EnableIPv6Only")),
},
}

Expand Down Expand Up @@ -673,6 +674,13 @@ func (cs *ContainerService) setAddonsConfig(isUpgrade bool) {
},
}

// set host network to true for single stack IPv6 as the the nameserver is currently
// IPv4 only. By setting it to host network, we can leverage the host routes to successfully
// resolve dns.
if cs.Properties.FeatureFlags.IsFeatureEnabled("EnableIPv6Only") {
defaultCorednsAddonsConfig.Config["use-host-network"] = "true"
}

// If we have any explicit coredns or kube-dns configuration in the addons array
if getAddonsIndexByName(o.KubernetesConfig.Addons, common.KubeDNSAddonName) != -1 || getAddonsIndexByName(o.KubernetesConfig.Addons, common.CoreDNSAddonName) != -1 {
// Ensure we don't we don't prepare an addons spec w/ both kube-dns and coredns enabled
Expand All @@ -697,6 +705,14 @@ func (cs *ContainerService) setAddonsConfig(isUpgrade bool) {
},
}

// set bind address, healthz and metric bind address to :: explicitly for
// single stack IPv6 cluster as it is single stack IPv6 on dual stack host
if cs.Properties.FeatureFlags.IsFeatureEnabled("EnableIPv6Only") {
defaultKubeProxyAddonsConfig.Config["bind-address"] = "::"
defaultKubeProxyAddonsConfig.Config["healthz-bind-address"] = "::"
defaultKubeProxyAddonsConfig.Config["metrics-bind-address"] = "::1"
}

defaultPodSecurityPolicyAddonsConfig := KubernetesAddon{
Name: common.PodSecurityPolicyAddonName,
Enabled: to.BoolPtr(common.IsKubernetesVersionGe(o.OrchestratorVersion, "1.15.0") || to.Bool(o.KubernetesConfig.EnablePodSecurityPolicy)),
Expand Down

0 comments on commit efff5c0

Please sign in to comment.