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

add support for k8s v1.12.0-alpha.1 #3604

Merged
merged 4 commits into from
Aug 3, 2018
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 65 additions & 27 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,14 @@ jobs:
path: /go/src/github.com/Azure/acs-engine/_logs
- store_artifacts:
path: /go/src/github.com/Azure/acs-engine/_output
k8s-1.7-release-e2e:
k8s-linux-default-e2e:
<<: *defaults
steps:
- checkout
- run: |
echo 'export TIMEOUT=20m' >> $BASH_ENV
echo 'export ORCHESTRATOR_RELEASE=1.7' >> $BASH_ENV
echo 'export CLUSTER_DEFINITION=examples/e2e-tests/kubernetes/release/default/definition.json' >> $BASH_ENV
echo 'export CREATE_VNET=true' >> $BASH_ENV
echo 'export TIMEOUT=10m' >> $BASH_ENV
echo 'export CLUSTER_DEFINITION=examples/kubernetes.json' >> $BASH_ENV
echo 'export CREATE_VNET=false' >> $BASH_ENV
echo 'export CLEANUP_ON_EXIT=${CLEANUP_ON_EXIT}' >> $BASH_ENV
echo 'export RETAIN_SSH=false' >> $BASH_ENV
echo 'export SUBSCRIPTION_ID=${SUBSCRIPTION_ID_E2E_KUBERNETES}' >> $BASH_ENV
Expand All @@ -83,15 +82,17 @@ jobs:
path: /go/src/github.com/Azure/acs-engine/_logs
- store_artifacts:
path: /go/src/github.com/Azure/acs-engine/_output
k8s-linux-default-e2e:
k8s-1.9-release-e2e:
<<: *defaults
steps:
- checkout
- run: |
echo 'export TIMEOUT=10m' >> $BASH_ENV
echo 'export CLUSTER_DEFINITION=examples/kubernetes.json' >> $BASH_ENV
echo 'export CREATE_VNET=false' >> $BASH_ENV
echo 'export TIMEOUT=20m' >> $BASH_ENV
echo 'export ORCHESTRATOR_RELEASE=1.9' >> $BASH_ENV
echo 'export CLUSTER_DEFINITION=examples/e2e-tests/kubernetes/release/default/definition.json' >> $BASH_ENV
echo 'export CREATE_VNET=true' >> $BASH_ENV
echo 'export CLEANUP_ON_EXIT=${CLEANUP_ON_EXIT}' >> $BASH_ENV
echo 'export CLEANUP_IF_FAIL=false' >> $BASH_ENV
echo 'export RETAIN_SSH=false' >> $BASH_ENV
echo 'export SUBSCRIPTION_ID=${SUBSCRIPTION_ID_E2E_KUBERNETES}' >> $BASH_ENV
echo 'export CLIENT_ID=${SERVICE_PRINCIPAL_CLIENT_ID_E2E_KUBERNETES}' >> $BASH_ENV
Expand All @@ -107,21 +108,23 @@ jobs:
path: /go/src/github.com/Azure/acs-engine/_logs
- store_artifacts:
path: /go/src/github.com/Azure/acs-engine/_output
k8s-1.9-release-e2e:
k8s-1.10-release-e2e:
<<: *defaults
steps:
- checkout
- run: |
echo 'export TIMEOUT=20m' >> $BASH_ENV
echo 'export ORCHESTRATOR_RELEASE=1.9' >> $BASH_ENV
echo 'export ORCHESTRATOR_RELEASE=1.10' >> $BASH_ENV
echo 'export CLUSTER_DEFINITION=examples/e2e-tests/kubernetes/release/default/definition.json' >> $BASH_ENV
echo 'export CREATE_VNET=true' >> $BASH_ENV
echo 'export ENABLE_KMS_ENCRYPTION=true' >> $BASH_ENV
Copy link
Contributor

Choose a reason for hiding this comment

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

should this be enabled for 1.12 as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

this diff is hard to read, but yeah, I am moving forward 1.11's test config to 1.12 (which includes KMS encryption)

Copy link
Contributor

Choose a reason for hiding this comment

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

Got it, I think I got mixed up in the diff

echo 'export CLEANUP_ON_EXIT=${CLEANUP_ON_EXIT}' >> $BASH_ENV
echo 'export CLEANUP_IF_FAIL=false' >> $BASH_ENV
echo 'export RETAIN_SSH=false' >> $BASH_ENV
echo 'export SUBSCRIPTION_ID=${SUBSCRIPTION_ID_E2E_KUBERNETES}' >> $BASH_ENV
echo 'export CLIENT_ID=${SERVICE_PRINCIPAL_CLIENT_ID_E2E_KUBERNETES}' >> $BASH_ENV
echo 'export CLIENT_SECRET=${SERVICE_PRINCIPAL_CLIENT_SECRET_E2E_KUBERNETES}' >> $BASH_ENV
echo 'export CLIENT_OBJECTID=${SERVICE_PRINCIPAL_OBJECT_ID_E2E_KUBERNETES}' >> $BASH_ENV
Copy link
Contributor

Choose a reason for hiding this comment

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

is this needed for encryption?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes

- run:
name: compile
command: make build-binary
Expand All @@ -133,18 +136,17 @@ jobs:
path: /go/src/github.com/Azure/acs-engine/_logs
- store_artifacts:
path: /go/src/github.com/Azure/acs-engine/_output
k8s-1.10-release-e2e:
k8s-1.11-release-e2e:
<<: *defaults
steps:
- checkout
- run: |
echo 'export TIMEOUT=20m' >> $BASH_ENV
echo 'export ORCHESTRATOR_RELEASE=1.10' >> $BASH_ENV
echo 'export ORCHESTRATOR_RELEASE=1.11' >> $BASH_ENV
echo 'export CLUSTER_DEFINITION=examples/e2e-tests/kubernetes/release/default/definition.json' >> $BASH_ENV
echo 'export CREATE_VNET=true' >> $BASH_ENV
echo 'export ENABLE_KMS_ENCRYPTION=true' >> $BASH_ENV
echo 'export CLEANUP_ON_EXIT=${CLEANUP_ON_EXIT}' >> $BASH_ENV
echo 'export CLEANUP_IF_FAIL=false' >> $BASH_ENV
echo 'export RETAIN_SSH=false' >> $BASH_ENV
echo 'export SUBSCRIPTION_ID=${SUBSCRIPTION_ID_E2E_KUBERNETES}' >> $BASH_ENV
echo 'export CLIENT_ID=${SERVICE_PRINCIPAL_CLIENT_ID_E2E_KUBERNETES}' >> $BASH_ENV
Expand All @@ -161,13 +163,13 @@ jobs:
path: /go/src/github.com/Azure/acs-engine/_logs
- store_artifacts:
path: /go/src/github.com/Azure/acs-engine/_output
k8s-1.11-release-e2e:
k8s-1.12-release-e2e:
<<: *defaults
steps:
- checkout
- run: |
echo 'export TIMEOUT=20m' >> $BASH_ENV
echo 'export ORCHESTRATOR_RELEASE=1.11' >> $BASH_ENV
echo 'export ORCHESTRATOR_RELEASE=1.12' >> $BASH_ENV
echo 'export CLUSTER_DEFINITION=examples/e2e-tests/kubernetes/release/default/definition.json' >> $BASH_ENV
echo 'export CREATE_VNET=true' >> $BASH_ENV
echo 'export ENABLE_KMS_ENCRYPTION=true' >> $BASH_ENV
Expand Down Expand Up @@ -286,6 +288,30 @@ jobs:
path: /go/src/github.com/Azure/acs-engine/_logs
- store_artifacts:
path: /go/src/github.com/Azure/acs-engine/_output
k8s-windows-1.12-release-e2e:
<<: *defaults
steps:
- checkout
- run: |
echo 'export TIMEOUT=30m' >> $BASH_ENV
echo 'export ORCHESTRATOR_RELEASE=1.12' >> $BASH_ENV
echo 'export CLUSTER_DEFINITION=examples/e2e-tests/kubernetes/windows/definition.json' >> $BASH_ENV
echo 'export CLEANUP_ON_EXIT=${CLEANUP_ON_EXIT}' >> $BASH_ENV
echo 'export RETAIN_SSH=false' >> $BASH_ENV
echo 'export SUBSCRIPTION_ID=${SUBSCRIPTION_ID_E2E_KUBERNETES}' >> $BASH_ENV
echo 'export CLIENT_ID=${SERVICE_PRINCIPAL_CLIENT_ID_E2E_KUBERNETES}' >> $BASH_ENV
echo 'export CLIENT_SECRET=${SERVICE_PRINCIPAL_CLIENT_SECRET_E2E_KUBERNETES}' >> $BASH_ENV
- run:
name: compile
command: make build-binary
- run:
name: ginkgo k8s windows e2e tests
command: make test-kubernetes
no_output_timeout: "30m"
- store_artifacts:
path: /go/src/github.com/Azure/acs-engine/_logs
- store_artifacts:
path: /go/src/github.com/Azure/acs-engine/_output
workflows:
version: 2
build_and_test_pr:
Expand All @@ -307,31 +333,31 @@ workflows:
filters:
branches:
ignore: master
- k8s-1.7-release-e2e:
- k8s-1.8-release-e2e:
requires:
- pr-e2e-hold
filters:
branches:
ignore: master
- k8s-1.8-release-e2e:
- k8s-windows-1.9-release-e2e:
requires:
- pr-e2e-hold
filters:
branches:
ignore: master
- k8s-windows-1.9-release-e2e:
- k8s-windows-1.10-release-e2e:
requires:
- pr-e2e-hold
filters:
branches:
ignore: master
- k8s-windows-1.10-release-e2e:
- k8s-windows-1.11-release-e2e:
requires:
- pr-e2e-hold
filters:
branches:
ignore: master
- k8s-windows-1.11-release-e2e:
- k8s-windows-1.12-release-e2e:
requires:
- pr-e2e-hold
filters:
Expand All @@ -355,6 +381,12 @@ workflows:
filters:
branches:
ignore: master
- k8s-1.12-release-e2e:
requires:
- pr-e2e-hold
filters:
branches:
ignore: master
- dcos-e2e:
requires:
- pr-e2e-hold
Expand All @@ -367,12 +399,6 @@ workflows:
filters:
branches:
only: master
- k8s-1.7-release-e2e:
requires:
- test
filters:
branches:
only: master
- k8s-1.8-release-e2e:
requires:
- test
Expand Down Expand Up @@ -409,12 +435,24 @@ workflows:
filters:
branches:
only: master
- k8s-1.12-release-e2e:
requires:
- test
filters:
branches:
only: master
- k8s-windows-1.11-release-e2e:
requires:
- test
filters:
branches:
only: master
- k8s-windows-1.12-release-e2e:
requires:
- test
filters:
branches:
only: master
- dcos-e2e:
requires:
- test
Expand Down
7 changes: 7 additions & 0 deletions pkg/acsengine/defaults-kubelet.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@ func setKubeletConfig(cs *api.ContainerService) {
}
}

// Get rid of values not supported in v1.12 and up
if common.IsKubernetesVersionGe(o.OrchestratorVersion, "1.12.0-alpha.1") {
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be 1.12.0-alpha.0 if we want to be rigorous (but otherwise doesn't matter)

for _, key := range []string{"--cadvisor-port"} {
delete(o.KubernetesConfig.KubeletConfig, key)
}
}

// Remove secure kubelet flags, if configured
if !helpers.IsTrueBoolPointer(o.KubernetesConfig.EnableSecureKubelet) {
for _, key := range []string{"--anonymous-auth", "--client-ca-file"} {
Expand Down
66 changes: 66 additions & 0 deletions pkg/acsengine/k8s_versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,37 @@ import (
)

var k8sComponentVersions = map[string]map[string]string{
"1.12": {
"dockerEngine": "1.13.*",
"dashboard": "kubernetes-dashboard-amd64:v1.8.3",
"addon-resizer": "addon-resizer:1.8.1",
"heapster": "heapster-amd64:v1.5.3",
"metrics-server": "metrics-server-amd64:v0.2.1",
"kube-dns": "k8s-dns-kube-dns-amd64:1.14.10",
"addon-manager": "kube-addon-manager-amd64:v8.6",
"dnsmasq": "k8s-dns-dnsmasq-nanny-amd64:1.14.10",
"pause": "pause-amd64:3.1",
"tiller": "tiller:v2.8.1",
"rescheduler": "rescheduler:v0.4.0",
"aci-connector": "virtual-kubelet:latest",
ContainerMonitoringAddonName: "oms:ciprod05082018",
AzureCNINetworkMonitoringAddonName: "networkmonitor:v0.0.4",
"cluster-autoscaler": "cluster-autoscaler:v1.3.1",
Copy link
Member Author

Choose a reason for hiding this comment

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

cluster-autoscaler updated to 1.3.1 as per release notes

NVIDIADevicePluginAddonName: "k8s-device-plugin:1.11",
"k8s-dns-sidecar": "k8s-dns-sidecar-amd64:1.14.10",
"nodestatusfreq": DefaultKubernetesNodeStatusUpdateFrequency,
"nodegraceperiod": DefaultKubernetesCtrlMgrNodeMonitorGracePeriod,
"podeviction": DefaultKubernetesCtrlMgrPodEvictionTimeout,
"routeperiod": DefaultKubernetesCtrlMgrRouteReconciliationPeriod,
"backoffretries": strconv.Itoa(DefaultKubernetesCloudProviderBackoffRetries),
"backoffjitter": strconv.FormatFloat(DefaultKubernetesCloudProviderBackoffJitter, 'f', -1, 64),
"backoffduration": strconv.Itoa(DefaultKubernetesCloudProviderBackoffDuration),
"backoffexponent": strconv.FormatFloat(DefaultKubernetesCloudProviderBackoffExponent, 'f', -1, 64),
"ratelimitqps": strconv.FormatFloat(DefaultKubernetesCloudProviderRateLimitQPS, 'f', -1, 64),
"ratelimitbucket": strconv.Itoa(DefaultKubernetesCloudProviderRateLimitBucket),
"gchighthreshold": strconv.Itoa(DefaultKubernetesGCHighThreshold),
"gclowthreshold": strconv.Itoa(DefaultKubernetesGCLowThreshold),
},
"1.11": {
"dockerEngine": "1.13.*",
"dashboard": "kubernetes-dashboard-amd64:v1.8.3",
Expand Down Expand Up @@ -247,6 +278,41 @@ func getK8sVersionComponents(version string, overrides map[string]string) map[st
majorMinor := strings.Join(s[:2], ".")
var ret map[string]string
switch majorMinor {
case "1.12":
ret = map[string]string{
"hyperkube": "hyperkube-amd64:v" + version,
"ccm": "cloud-controller-manager-amd64:v" + version,
"windowszip": "v" + version + "-1int.zip",
"dockerEngineVersion": k8sComponentVersions["1.12"]["dockerEngine"],
DefaultDashboardAddonName: k8sComponentVersions["1.12"]["dashboard"],
"addonresizer": k8sComponentVersions["1.12"]["addon-resizer"],
"heapster": k8sComponentVersions["1.12"]["heapster"],
DefaultMetricsServerAddonName: k8sComponentVersions["1.12"]["metrics-server"],
"dns": k8sComponentVersions["1.12"]["kube-dns"],
"addonmanager": k8sComponentVersions["1.12"]["addon-manager"],
"dnsmasq": k8sComponentVersions["1.12"]["dnsmasq"],
"pause": k8sComponentVersions["1.12"]["pause"],
DefaultTillerAddonName: k8sComponentVersions["1.12"]["tiller"],
DefaultReschedulerAddonName: k8sComponentVersions["1.12"]["rescheduler"],
DefaultACIConnectorAddonName: k8sComponentVersions["1.12"]["aci-connector"],
ContainerMonitoringAddonName: k8sComponentVersions["1.12"][ContainerMonitoringAddonName],
AzureCNINetworkMonitoringAddonName: k8sComponentVersions["1.12"][AzureCNINetworkMonitoringAddonName],
DefaultClusterAutoscalerAddonName: k8sComponentVersions["1.12"]["cluster-autoscaler"],
"k8s-dns-sidecar": k8sComponentVersions["1.12"]["k8s-dns-sidecar"],
"nodestatusfreq": k8sComponentVersions["1.12"]["nodestatusfreq"],
"nodegraceperiod": k8sComponentVersions["1.12"]["nodegraceperiod"],
"podeviction": k8sComponentVersions["1.12"]["podeviction"],
"routeperiod": k8sComponentVersions["1.12"]["routeperiod"],
"backoffretries": k8sComponentVersions["1.12"]["backoffretries"],
"backoffjitter": k8sComponentVersions["1.12"]["backoffjitter"],
"backoffduration": k8sComponentVersions["1.12"]["backoffduration"],
"backoffexponent": k8sComponentVersions["1.12"]["backoffexponent"],
"ratelimitqps": k8sComponentVersions["1.12"]["ratelimitqps"],
"ratelimitbucket": k8sComponentVersions["1.12"]["ratelimitbucket"],
"gchighthreshold": k8sComponentVersions["1.12"]["gchighthreshold"],
"gclowthreshold": k8sComponentVersions["1.12"]["gclowthreshold"],
NVIDIADevicePluginAddonName: k8sComponentVersions["1.12"][NVIDIADevicePluginAddonName],
}
case "1.11":
ret = map[string]string{
"hyperkube": "hyperkube-amd64:v" + version,
Expand Down
1 change: 1 addition & 0 deletions pkg/api/common/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ var AllKubernetesSupportedVersions = map[string]bool{
"1.11.0-rc.3": true,
"1.11.0": true,
"1.11.1": true,
"1.12.0-alpha.1": true,
}

// GetDefaultKubernetesVersion returns the default Kubernetes version, that is the latest patch of the default release
Expand Down