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

feat: Dualstack support for Windows containers #3415

Merged
merged 6 commits into from
Jun 11, 2020

Conversation

tamilmani1989
Copy link
Member

@tamilmani1989 tamilmani1989 commented Jun 5, 2020

Reason for Change:

This PR adds dual stack support for azure cni windows cluster as like linux cluster. V4 Ips will be in vnet and v6 IPs will be in non-vnet. Non lifting validation check for windows dualstack until windows team release OS support. This PR also fixes creating multiple v6 configs per nic as its not supported.

Issue Fixed:

Requirements:

Notes:

@acs-bot acs-bot added the size/L label Jun 5, 2020
@tamilmani1989 tamilmani1989 changed the title Feat: Dualstack support for Windows containers feat: Dualstack support for Windows containers Jun 5, 2020
@tamilmani1989
Copy link
Member Author

/assign @aramase @marosset

@tamilmani1989
Copy link
Member Author

/assign @jackfrancis @mboersma

@marosset
Copy link
Contributor

marosset commented Jun 5, 2020

/azp run pr-e2e

1 similar comment
@mboersma
Copy link
Member

mboersma commented Jun 5, 2020

/azp run pr-e2e

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@tamilmani1989
Copy link
Member Author

@mboersma fixed nit issue. can you please start pipeline again?

@marosset
Copy link
Contributor

marosset commented Jun 5, 2020

/azp run pr-e2e

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@marosset marosset left a comment

Choose a reason for hiding this comment

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

Except for a minor refactor noted above the changes look OK to me.

@ksubrmnn want to take a look as well? I don't have a lot of context here.

parts/k8s/kubeproxystart.ps1 Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jun 5, 2020

Codecov Report

Merging #3415 into master will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3415      +/-   ##
==========================================
- Coverage   73.17%   73.16%   -0.01%     
==========================================
  Files         147      147              
  Lines       24923    25024     +101     
==========================================
+ Hits        18238    18310      +72     
- Misses       5559     5580      +21     
- Partials     1126     1134       +8     
Impacted Files Coverage Δ
pkg/api/defaults.go 92.72% <100.00%> (+0.14%) ⬆️
pkg/engine/templates_generated.go 54.08% <100.00%> (ø)
pkg/engine/virtualmachinescalesets.go 80.30% <100.00%> (-0.98%) ⬇️
pkg/armhelpers/support_validator.go 64.06% <0.00%> (-2.07%) ⬇️
pkg/api/vlabs/types.go 71.83% <0.00%> (-1.47%) ⬇️
pkg/engine/vmextensions.go 94.55% <0.00%> (-0.95%) ⬇️
pkg/engine/virtualmachines.go 80.04% <0.00%> (-0.94%) ⬇️
cmd/upgrade.go 44.14% <0.00%> (-0.18%) ⬇️
pkg/api/vlabs/validate.go 80.29% <0.00%> (-0.08%) ⬇️
... and 11 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 efb978a...610e26a. Read the comment docs.

parts/k8s/kubeproxystart.ps1 Outdated Show resolved Hide resolved
parts/k8s/kuberneteswindowssetup.ps1 Outdated Show resolved Hide resolved
@tamilmani1989
Copy link
Member Author

@ksubrmnn @marosset please take a look, Addressed your comments.

@@ -16,6 +17,12 @@ while (!$hnsNetwork) {
$hnsNetwork = Get-HnsNetwork | ? Name -EQ $KubeNetwork
}

# add dualstack feature gate if dualstack enabled
$isDualStackEnabled = ("--feature-gates=IPv6DualStack=true" | ? { $Global:ClusterConfiguration.Kubernetes.Kubelet.ConfigArgs -match $_ }) -ne $null
Copy link
Member

Choose a reason for hiding this comment

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

Would this check fail if IPv6DualStack feature gate was not first in the list --feature-gates=CSIInlineVolume=true,IPv6DualStack=true?

Copy link
Member Author

Choose a reason for hiding this comment

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

you're right, it will fail. let me change the match to "IPv6DualStack=true"

$configJson.plugins[0].AdditionalArgs[1].Value.DestinationPrefix = $serviceCidr[0]
$valueObj = [PSCustomObject]@{
Type = 'ROUTE'
DestinationPrefix = $serviceCidr[1]
Copy link
Member

Choose a reason for hiding this comment

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

What about the case where cluster is dual stack, but services are just single stack? The user could just have a single family CIDR for service.

Copy link
Member Author

Choose a reason for hiding this comment

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

so if user didn't specify ipv6 service cidr, won't aks-e assign default service v6 cidr? May be im interpreting your ask wrongly

Copy link
Member

Choose a reason for hiding this comment

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

aks-e default v6 CIDR only for ClusterCIDR. Having v4 and v6 CIDR for services isn't mandatory.

Copy link
Member Author

Choose a reason for hiding this comment

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

i believe we should add default for v6 service cidr also here if user opted for dualstack.

if o.KubernetesConfig.ServiceCIDR == "" {

Copy link
Member

Choose a reason for hiding this comment

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

@tamilmani1989 Having dual stack CIDRs for services is not mandatory unlike ClusterCIDRs. The user can just define single stack v4 or v6 service CIDR in dual stack cluster. Thats the reason for not appending v6 service CIDR unless the user explicitly requests it.

Copy link
Member Author

@tamilmani1989 tamilmani1989 Jun 9, 2020

Choose a reason for hiding this comment

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

@aramase Yes you are right. Its not mandatory to create ipv6 svc but if user decided to have in future he has to recreate cluster. What's the user going to loose if we assign default svc cidr if its not explicitly specified?

Copy link
Member Author

Choose a reason for hiding this comment

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

@aramase what you think?

@marosset
Copy link
Contributor

marosset commented Jun 9, 2020

/azp run pr-e2e

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

marosset
marosset previously approved these changes Jun 9, 2020
Copy link
Contributor

@marosset marosset left a comment

Choose a reason for hiding this comment

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

/lgtm
Looks good to me.
@aramase can you give an LGTM when ready?
After that we can merge.

@tamilmani1989
Copy link
Member Author

@aramase as per our discussion offline, addressed those changes

Copy link
Member

@aramase aramase 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
Copy link
Member

/azp run pr-e2e

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@marosset
Copy link
Contributor

/lgtm

@acs-bot acs-bot added the lgtm label Jun 11, 2020
@acs-bot
Copy link

acs-bot commented Jun 11, 2020

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: marosset, tamilmani1989

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jackfrancis
Copy link
Member

Thank you @tamilmani1989!

@jackfrancis jackfrancis merged commit 384aeb1 into Azure:master Jun 11, 2020
@marosset
Copy link
Contributor

yay!

@tamilmani1989
Copy link
Member Author

Thank you guys!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants