k3s/pkg/agent/flannel/setup_windows.go
Sean Yen 0c9bf36fe0
[K3s][Windows Port] Build script, multi-call binary, and Flannel (#7259)
* initial windows port.

Signed-off-by: Sean Yen <seanyen@microsoft.com>
Signed-off-by: Derek Nola <derek.nola@suse.com>
Co-authored-by: Derek Nola <derek.nola@suse.com>
Co-authored-by: Wei Ran <weiran@microsoft.com>
2023-10-16 14:53:09 -04:00

60 lines
1.2 KiB
Go

//go:build windows
// +build windows
package flannel
const (
cniConf = `{
"name":"flannel.4096",
"cniVersion":"1.0.0",
"plugins":[
{
"type":"flannel",
"capabilities": {
"portMappings": true,
"dns": true
},
"delegate": {
"type": "win-overlay",
"apiVersion": 2,
"Policies": [{
"Name": "EndpointPolicy",
"Value": {
"Type": "OutBoundNAT",
"Settings": {
"Exceptions": [
"%CLUSTER_CIDR%", "%SERVICE_CIDR%"
]
}
}
}, {
"Name": "EndpointPolicy",
"Value": {
"Type": "SDNRoute",
"Settings": {
"DestinationPrefix": "%SERVICE_CIDR%",
"NeedEncap": true
}
}
}, {
"name": "EndpointPolicy",
"value": {
"Type": "ProviderAddress",
"Settings": {
"ProviderAddress": "%IPV4_ADDRESS%"
}
}
}]
}
}
]
}
`
vxlanBackend = `{
"Type": "vxlan",
"VNI": 4096,
"Port": 4789
}`
)