Skip to content

Commit

Permalink
4
Browse files Browse the repository at this point in the history
  • Loading branch information
justinsb committed Feb 8, 2021
1 parent f1f8057 commit dfab695
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions nodeup/pkg/model/containerd.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,20 +309,25 @@ func (b *ContainerdBuilder) buildCNIConfigTemplateFile(c *fi.ModelBuilderContext

// Based on https://github.com/kubernetes/kubernetes/blob/15a8a8ec4a3275a33b7f8eb3d4d98db2abad55b7/cluster/gce/gci/configure-helper.sh#L2911-L2937
// TODO: Should we set MTU? upstream has "mtu": 1460
// TODO: As compared to GCE/netd configuration, we added snat here
// TODO: Upstream (GCE kube-up) uses ptp, but that breaks our NodePort tests
contents := `{
"cniVersion": "0.3.1",
"cniVersion": "0.4.0",
"name": "k8s-pod-network",
"plugins": [
{
"type": "ptp",
"ipam": {
"type": "host-local",
"ranges": [[{"subnet": "{{.PodCIDR}}"}]],
"routes": [{ "dst": "0.0.0.0/0" }]
"type": "bridge",
"bridge": "cni0",
"isGateway": true,
"isDefaultGateway":true,
"ipMasq": true,
"promiscMode": true,
"ipam":{
"type":"host-local"
"ranges": [[{"subnet": "{{.PodCIDR}}"}]],
"routes": [{ "dst": "0.0.0.0/0" }]
}
},
{
},
{
"type": "portmap",
"snat": true,
"capabilities": {"portMappings": true}
Expand Down

0 comments on commit dfab695

Please sign in to comment.