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 Mar 26, 2020
1 parent 1c597d8 commit 6dadaf0
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
11 changes: 6 additions & 5 deletions pkg/api/common/versions.go
Original file line number Diff line number Diff line change
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,
"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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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: 1 addition & 2 deletions vhd/packer/configure-windows-vhd.ps1
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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

0 comments on commit 6dadaf0

Please sign in to comment.