-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: CNS writes CNI conflist on Windows. #2281
Conversation
eb34786
to
d1fa944
Compare
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
71293ae
to
ad104ca
Compare
"ExceptionList": [ | ||
"10.240.0.0/16", | ||
"10.0.0.0/8" | ||
] | ||
}`), | ||
}, | ||
{ | ||
Name: "EndpointPolicy", | ||
Value: []byte(`{ | ||
"Type": "ROUTE", | ||
"DestinationPrefix": "10.0.0.0/8", | ||
"NeedEncap": true |
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.
could you fix the indentation spaces here?
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.
@nddq it's a mix of spaces and tabs, you should replace it with all tabs
"ExceptionList": [ | ||
"10.240.0.0/16", | ||
"10.0.0.0/8" | ||
] | ||
}`), | ||
}, | ||
{ | ||
Name: "EndpointPolicy", | ||
Value: []byte(`{ | ||
"Type": "ROUTE", | ||
"DestinationPrefix": "10.0.0.0/8", | ||
"NeedEncap": true |
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.
here too
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.
this could come in a later PR, but we should test this feature on our pipeline clusters
ad104ca
to
ec788d4
Compare
ec788d4
to
327b97b
Compare
327b97b
to
10324cc
Compare
@@ -0,0 +1,52 @@ | |||
{ |
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 know that in Windows AKS, the CNI conflist is generated dynamically based on a few things:
- If the customer specified
DisableOutboundNAT
, then a certainExceptionList
for anEndpointPolicy
will not be present- In the conflist I commented down below, this block is what I'm talking about:
{
"Name": "EndpointPolicy",
"Value": {
"Type": "OutBoundNAT",
"ExceptionList": [
"fddc:be24:d690:87d::/64"
]
}
},
There are other settings that are dynamic, based on a few customer inputs, so we'll need to take all that into account when generating these Windows conflists
Here is where the Conflists are configured (altered) in Windows AKS: AgentBaker - azurecnifunc.ps1
I would also talk to @AbelHu about what all settings in a customer cluster, can change the Conflist (or read the script I linked, he gave it to me originally)
@@ -0,0 +1,52 @@ | |||
{ | |||
"cniVersion": "0.3.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.
Here is an example overlay conflist today in AKS, from a cluster that I just made once:
{
"cniVersion": "0.3.0",
"name": "azure",
"adapterName": "",
"plugins": [
{
"type": "azure-vnet",
"mode": "bridge",
"bridge": "azure0",
"capabilities": {
"portMappings": true,
"dns": true
},
"ipam": {
"type": "azure-cns",
"mode": "overlay"
},
"dns": {
"Nameservers": [
"10.0.0.10",
"168.63.129.16"
],
"Search": [
"svc.cluster.local"
]
},
"AdditionalArgs": [
{
"Name": "EndpointPolicy",
"Value": {
"Type": "OutBoundNAT",
"ExceptionList": [
"10.244.0.0/16"
]
}
},
{
"Name": "EndpointPolicy",
"Value": {
"Type": "OutBoundNAT",
"ExceptionList": [
"fddc:be24:d690:87d::/64"
]
}
},
{
"Name": "EndpointPolicy",
"Value": {
"Type": "ACL",
"Protocols": "6",
"Action": "Block",
"Direction": "Out",
"RemoteAddresses": "168.63.129.16/32",
"RemotePorts": "80",
"Priority": 200,
"RuleType": "Switch"
}
},
{
"Name": "EndpointPolicy",
"Value": {
"Type": "ACL",
"Action": "Allow",
"Direction": "In",
"Priority": 65500
}
},
{
"Name": "EndpointPolicy",
"Value": {
"Type": "ACL",
"Action": "Allow",
"Direction": "Out",
"Priority": 65500
}
}
],
"windowsSettings": {
"enableLoopbackDSR": true
}
}
]
}
10324cc
to
26c1d07
Compare
Merge queue setting changed
This pull request is stale because it has been open for 2 weeks with no activity. Remove stale label or comment or this will be closed in 7 days |
Pull request closed due to inactivity. |
Reason for Change:
Allow CNS to write CNI conflist for SWIFT and SWIFT Overlay scenario on Windows.
Issue Fixed:
Requirements:
Notes: