Skip to content

Commit

Permalink
feat: add support for Kubernetes 1.18.0 (Azure#2957)
Browse files Browse the repository at this point in the history
  • Loading branch information
mboersma authored and bowen5 committed Apr 16, 2020
1 parent f01086a commit ae4b9cf
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pkg/api/common/versions.go
Expand Up @@ -175,7 +175,7 @@ var AllKubernetesSupportedVersions = map[string]bool{
"1.17.1": false,
"1.17.2": true,
"1.17.3": true,
"1.18.0-beta.1": true,
"1.18.0": true,
}

// GetDefaultKubernetesVersion returns the default Kubernetes version, that is the latest patch of the default release
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/defaults_test.go
Expand Up @@ -1487,7 +1487,7 @@ func TestMasterProfileDefaults(t *testing.T) {
}

// this validates cluster subnet default configuration for single stack IPv6 only cluster
mockCS = getMockBaseContainerService("1.18.0-alpha.1")
mockCS = getMockBaseContainerService("1.18.0")
properties = mockCS.Properties
properties.OrchestratorProfile.OrchestratorType = Kubernetes
properties.FeatureFlags = &FeatureFlags{EnableIPv6Only: true}
Expand Down
4 changes: 2 additions & 2 deletions pkg/api/vlabs/validate.go
Expand Up @@ -1315,7 +1315,7 @@ func (k *KubernetesConfig) Validate(k8sVersion string, hasWindows, ipv6DualStack
}

if isIPv6 {
minVersion, err := semver.Make("1.18.0-alpha.4")
minVersion, err := semver.Make("1.18.0")
if err != nil {
return errors.New("could not validate version")
}
Expand Down Expand Up @@ -1477,7 +1477,7 @@ func (k *KubernetesConfig) Validate(k8sVersion string, hasWindows, ipv6DualStack
// dualstack IPVS mode supported from 1.16+
// dualstack IPtables mode supported from 1.18+
if ipv6DualStackEnabled && k.ProxyMode == KubeProxyModeIPTables {
minVersion, err := semver.Make("1.18.0-alpha.2")
minVersion, err := semver.Make("1.18.0")
if err != nil {
return errors.New("could not validate version")
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/api/vlabs/validate_test.go
Expand Up @@ -598,7 +598,7 @@ func Test_KubernetesConfig_Validate(t *testing.T) {
ProxyMode: "iptables",
}

if err := c.Validate(k8sVersion, false, true, false); err == nil && !common.IsKubernetesVersionGe(k8sVersion, "1.18.0-alpha.2") {
if err := c.Validate(k8sVersion, false, true, false); err == nil && !common.IsKubernetesVersionGe(k8sVersion, "1.18.0") {
t.Errorf("should error with ipv6 dual stack feature enabled as iptables mode not supported in %s", k8sVersion)
}

Expand Down Expand Up @@ -648,7 +648,7 @@ func Test_KubernetesConfig_Validate(t *testing.T) {
}

// Tests that apply to single stack IPv6 with 1.18 and later releases
for _, k8sVersion := range common.GetVersionsGt(common.GetAllSupportedKubernetesVersions(false, false), "1.18.0-alpha.4", true, true) {
for _, k8sVersion := range common.GetVersionsGt(common.GetAllSupportedKubernetesVersions(false, false), "1.18.0", true, true) {
c := KubernetesConfig{
NetworkPlugin: "azure",
}
Expand Down
3 changes: 2 additions & 1 deletion vhd/packer/configure-windows-vhd.ps1
Expand Up @@ -81,7 +81,8 @@ function Get-FilesToCacheOnVHD
"https://kubernetesartifacts.azureedge.net/kubernetes/v1.16.7/windowszip/v1.16.7-1int.zip",
"https://kubernetesartifacts.azureedge.net/kubernetes/v1.17.2/windowszip/v1.17.2-1int.zip",
"https://kubernetesartifacts.azureedge.net/kubernetes/v1.17.3/windowszip/v1.17.3-1int.zip",
"https://kubernetesartifacts.azureedge.net/kubernetes/v1.18.0-beta.1/windowszip/v1.18.0-beta.1-1int.zip"
"https://kubernetesartifacts.azureedge.net/kubernetes/v1.18.0/windowszip/v1.18.0-1int.zip"

);
"c:\akse-cache\win-vnet-cni\" = @(
"https://kubernetesartifacts.azureedge.net/azure-cni/v1.0.28/binaries/azure-vnet-cni-windows-amd64-v1.0.28.zip",
Expand Down
2 changes: 1 addition & 1 deletion vhd/packer/install-dependencies.sh
Expand Up @@ -423,7 +423,7 @@ pullContainerImage "docker" "busybox"
echo " - busybox" >> ${VHD_LOGS_FILEPATH}

K8S_VERSIONS="
1.18.0-beta.1
1.18.0
1.17.3
1.17.2
1.16.7
Expand Down

0 comments on commit ae4b9cf

Please sign in to comment.