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

feat: add support for Kubernetes 1.18.0 #2957

Merged
merged 1 commit into from Mar 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 6 additions & 5 deletions pkg/api/common/versions.go
Expand Up @@ -178,11 +178,12 @@ var AllKubernetesSupportedVersions = map[string]bool{
"1.17.2": false,
"1.17.3": true,
"1.17.4": true,
"1.18.0-alpha.1": true,
"1.18.0-alpha.2": true,
"1.18.0-alpha.3": true,
"1.18.0-alpha.5": true,
"1.18.0-beta.1": true,
"1.18.0-alpha.1": false,
"1.18.0-alpha.2": false,
"1.18.0-alpha.3": false,
"1.18.0-alpha.5": false,
"1.18.0-beta.1": false,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add false entries for 1.18.0-beta.2 and 1.18.0-rc.1? AKS Engine never supported either one due to bugs, but we could add them in order to reference the issues.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's do, good call.

"1.18.0": true,
}

// GetDefaultKubernetesVersion returns the default Kubernetes version, that is the latest patch of the default release
Expand Down
6 changes: 3 additions & 3 deletions pkg/api/components_test.go
Expand Up @@ -1604,7 +1604,7 @@ func getContainerServicesMap() map[string]*ContainerService {
"1.18": {
Properties: &Properties{
OrchestratorProfile: &OrchestratorProfile{
OrchestratorVersion: "1.18.0-alpha.1",
OrchestratorVersion: "1.18.0",
KubernetesConfig: &KubernetesConfig{
KubernetesImageBase: specConfig.KubernetesImageBase,
KubernetesImageBaseType: common.KubernetesImageBaseTypeGCR,
Expand All @@ -1616,7 +1616,7 @@ func getContainerServicesMap() map[string]*ContainerService {
"1.18 user-configured": {
Properties: &Properties{
OrchestratorProfile: &OrchestratorProfile{
OrchestratorVersion: "1.18.0-alpha.1",
OrchestratorVersion: "1.18.0",
KubernetesConfig: &KubernetesConfig{
KubernetesImageBase: specConfig.KubernetesImageBase,
KubernetesImageBaseType: common.KubernetesImageBaseTypeGCR,
Expand All @@ -1635,7 +1635,7 @@ func getContainerServicesMap() map[string]*ContainerService {
"1.18 + customCcmImage + customKubeAPIServerImage + customKubeControllerManagerImage + customKubeSchedulerImage": {
Properties: &Properties{
OrchestratorProfile: &OrchestratorProfile{
OrchestratorVersion: "1.18.0-alpha.1",
OrchestratorVersion: "1.18.0",
KubernetesConfig: &KubernetesConfig{
CustomCcmImage: customCcmImage,
CustomKubeAPIServerImage: customKubeAPIServerImage,
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/defaults_test.go
Expand Up @@ -1548,7 +1548,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 @@ -1292,7 +1292,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 @@ -1454,7 +1454,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") {
mboersma marked this conversation as resolved.
Show resolved Hide resolved
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: 1 addition & 2 deletions vhd/packer/configure-windows-vhd.ps1
Expand Up @@ -84,8 +84,7 @@ function Get-FilesToCacheOnVHD
"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.17.4/windowszip/v1.17.4-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-beta.2/windowszip/v1.18.0-beta.2-1int.zip"
"https://kubernetesartifacts.azureedge.net/kubernetes/v1.18.0/windowszip/v1.18.0-1int.zip"

);
"c:\akse-cache\win-vnet-cni\" = @(
Expand Down
2 changes: 1 addition & 1 deletion vhd/packer/install-dependencies.sh
Expand Up @@ -338,7 +338,7 @@ pullContainerImage "docker" "busybox"
echo " - busybox" >> ${VHD_LOGS_FILEPATH}

K8S_VERSIONS="
1.18.0-beta.1
1.18.0
1.17.4
1.17.3
1.16.8
Expand Down