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

feat: support cloud-node-manager on Windows clusters #3044

Merged
merged 7 commits into from Apr 15, 2020
Merged

feat: support cloud-node-manager on Windows clusters #3044

merged 7 commits into from Apr 15, 2020

Conversation

chewong
Copy link

@chewong chewong commented Apr 8, 2020

Reason for Change:

Supports out-of-tree cloud-controller-manager and cloud-node-manager on Windows clusters with K8s >= 1.18

Issue Fixed:

Requirements:

Notes:

@codecov
Copy link

codecov bot commented Apr 8, 2020

Codecov Report

Merging #3044 into master will increase coverage by 0.03%.
The diff coverage is 95.74%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3044      +/-   ##
==========================================
+ Coverage   70.55%   70.58%   +0.03%     
==========================================
  Files         145      145              
  Lines       25169    25219      +50     
==========================================
+ Hits        17759    17802      +43     
- Misses       6307     6312       +5     
- Partials     1103     1105       +2     
Impacted Files Coverage Δ
pkg/api/k8s_versions.go 100.00% <ø> (ø)
pkg/engine/templates_generated.go 30.99% <ø> (ø)
pkg/api/vlabs/validate.go 79.17% <80.00%> (+0.22%) ⬆️
pkg/api/addons.go 97.74% <100.00%> (+<0.01%) ⬆️
pkg/api/defaults-cloud-controller-manager.go 92.85% <100.00%> (ø)
pkg/api/types.go 94.13% <100.00%> (+0.08%) ⬆️
pkg/api/vlabs/types.go 76.02% <100.00%> (+1.70%) ⬆️
pkg/engine/engine.go 86.31% <100.00%> (+0.05%) ⬆️
pkg/engine/availabilitysets.go 87.75% <0.00%> (-12.25%) ⬇️
pkg/engine/virtualmachinescalesets.go 80.79% <0.00%> (-0.33%) ⬇️
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d6bf733...26903d4. Read the comment docs.

@chewong chewong marked this pull request as ready for review April 13, 2020 18:46
@chewong chewong changed the title [WIP] feat: support cloud-node-manager on Windows clusters feat: support cloud-node-manager on Windows clusters Apr 13, 2020
@chewong chewong requested review from jackfrancis and mboersma and removed request for jackfrancis April 13, 2020 22:40
@chewong
Copy link
Author

chewong commented Apr 13, 2020

/cc @ritazh @feiskyer

@chewong
Copy link
Author

chewong commented Apr 13, 2020

Working on another branch on top of this PR which enables CSI proxy and CSI drivers by default when cloud-controller-manager is enabled on Windows cluster.

coreComponents = append(coreComponents, "cloud-controller-manager")
if common.IsKubernetesVersionGe(eng.ExpandedDefinition.Properties.OrchestratorProfile.OrchestratorVersion, "1.13.0") {
coreComponents = append(coreComponents, common.CloudControllerManagerComponentName)
if eng.ExpandedDefinition.Properties.ShouldEnableAzureCloudAddon(common.AzureDiskCSIDriverAddonName) &&
Copy link
Member

Choose a reason for hiding this comment

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

Should we re-use the ShouldEnableAzureCloudAddon method in E2E? Is there a reason why we can't simply refer to the state of the api model to see whether or not the addon is enabled or not?

Copy link
Author

Choose a reason for hiding this comment

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

I don't think we will need to reuse it since those addons are turned on/off based on ShouldEnableAzureCloudAddon anyways. I will change it to eng.HasAddon().

cpu: 50m
memory: 50Mi
limits:
cpu: 2000m
Copy link
Member

Choose a reason for hiding this comment

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

These limits seem overgenerous, but I guess that's what we have been using for Linux already.

pkg/api/vlabs/types.go Outdated Show resolved Hide resolved
@@ -1718,26 +1721,6 @@ func (a *Properties) validateCustomKubeComponent() error {
return nil
}

func (a *Properties) validatePrivateAzureRegistryServer() error {
Copy link
Member

Choose a reason for hiding this comment

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

Is this removal related to the cloud-node-manager for Windows change?

Copy link
Author

Choose a reason for hiding this comment

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

It's kinda related since I was using a cloud-node-manager image in my own ACR for testing. I don't think we should only be allowed to use privateAzureRegistryServer when custom{Component}Image is defined. That's why I removed this validation.

vhd/packer/install-dependencies.sh Show resolved Hide resolved
Expect(labels).To(HaveKeyWithValue("failure-domain.beta.kubernetes.io/region", region))
Expect(labels).To(HaveKeyWithValue("topology.kubernetes.io/region", region))
var instanceType string
switch role {
Copy link
Member

Choose a reason for hiding this comment

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

Where is the role variable defined?

Copy link
Author

Choose a reason for hiding this comment

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

role := "master"
if !strings.HasPrefix(n.Metadata.Name, "k8s-master-") {
if eng.ExpandedDefinition.Properties.HasNonRegularPriorityScaleset() {
continue
} else {
role = "agent"
}
}

Copy link
Member

Choose a reason for hiding this comment

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

lolz thanks for clicking the accordion icon for me :)

@@ -1,21 +1,20 @@
{
"env": {
"GINKGO_SKIP": "should be able to attach azure file"
Copy link
Author

Choose a reason for hiding this comment

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

Skipping this test case because azurefile-csi-driver isn't supported in Windows clusters yet. https://github.com/chewong/aks-engine/tree/windows-csi will address this issue and I will open a second PR after this PR is merged.

Copy link
Member

@jackfrancis jackfrancis left a comment

Choose a reason for hiding this comment

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

/lgtm

@jackfrancis jackfrancis merged commit b1612db into Azure:master Apr 15, 2020
@chewong chewong deleted the windows-cnm branch April 15, 2020 23:44
alexeldeib pushed a commit to alexeldeib/aks-engine that referenced this pull request Apr 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants