-
Notifications
You must be signed in to change notification settings - Fork 525
chore: add support for Kubernetes v1.21.10 and v1.22.7 on Azure Stack Hub #4846
Conversation
Please include a brief description of what you are pushing, why we care and how it is accomplished. |
@@ -270,7 +270,7 @@ func getComponentDefaultContainerImage(component string, cs *ContainerService) s | |||
k8sComponents := GetK8sComponentsByVersionMap(kubernetesConfig)[cs.Properties.OrchestratorProfile.OrchestratorVersion] | |||
hyperkubeImageBase := kubernetesImageBase | |||
hyperkubeImage := hyperkubeImageBase + k8sComponents[common.Hyperkube] | |||
if cs.Properties.IsAzureStackCloud() { | |||
if cs.Properties.IsAzureStackCloud() && !common.IsKubernetesVersionGe(cs.Properties.OrchestratorProfile.OrchestratorVersion, "1.21.0") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
include please a small comment explaining why the behavior changes starting with 1.21
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the alternative is to write code that documents itself
variableWithMeaningfulName := !common.IsKubernetesVersionGe(...)
if cs.Properties.IsAzureStackCloud() && variableWithMeaningfulName { ... }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added comment
@@ -1232,6 +1232,9 @@ func (p *Properties) ShouldEnableAzureCloudAddon(addonName string) bool { | |||
if !to.Bool(o.KubernetesConfig.UseCloudControllerManager) { | |||
return false | |||
} | |||
if addonName == common.AzureDiskCSIDriverAddonName && p.IsAzureStackCloud() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update the method documentation please:
// For Azure Stack Hub clusters, ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added comment
test/e2e/cluster.sh
Outdated
-e AZURE_CORE_ONLY_SHOW_ERRORS="True" \ | ||
"${DEV_IMAGE}" make test-kubernetes || exit 1 | ||
|
||
echo "Installing azuredisk-csi-driver..." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is unnecessary as you can leverage cluster-init
in this case: https://github.com/Azure/aks-engine/blob/master/docs/topics/clusterdefinitions.md#components
test/e2e/cluster.sh
Outdated
-e CUSTOM_WINDOWS_PACKAGE_URL=${CUSTOM_WINDOWS_PACKAGE_URL} \ | ||
-e AZURE_CORE_ONLY_SHOW_ERRORS="True" \ | ||
"${DEV_IMAGE}" make test-kubernetes || tryExit && renameResultsFile "deploy" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this can be undone if you use cluster-init
test/e2e/cluster.sh
Outdated
@@ -584,6 +747,15 @@ if [ "${SCALE_CLUSTER}" = "true" ]; then | |||
fi | |||
|
|||
if [ "${UPGRADE_CLUSTER}" = "true" ]; then | |||
if [ "${DEPLOY_AND_INSTALL_AZUREDISKCSI}" = "true" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need to uninstall before upgrade?
Make sure aks-engine/vhd/packer/configure-windows-vhd.ps1 Lines 120 to 129 in 93a4723
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
powershell changes LGTM
Reason for Change:
Update external-cloud-provider and azuredisk-csi-driver configurations to enable support for K8s 1.21.10 and 1.22.7 on Azure Stack Hub
Issue Fixed:
Credit Where Due:
Does this change contain code from or inspired by another project?
If "Yes," did you notify that project's maintainers and provide attribution?
Requirements:
Notes: