From 74bbda20c45bbf657f4d01c4044e50a0181bf870 Mon Sep 17 00:00:00 2001 From: eriksywu Date: Mon, 25 Jan 2021 16:11:12 -0800 Subject: [PATCH] fix: update nodecustomdata to enable portmapper for kubenet+containerd (#4191) --- parts/k8s/cloud-init/masternodecustomdata.yml | 5 +++++ parts/k8s/cloud-init/nodecustomdata.yml | 5 +++++ pkg/engine/templates_generated.go | 10 ++++++++++ 3 files changed, 20 insertions(+) diff --git a/parts/k8s/cloud-init/masternodecustomdata.yml b/parts/k8s/cloud-init/masternodecustomdata.yml index 78dcf94951..53d2792066 100644 --- a/parts/k8s/cloud-init/masternodecustomdata.yml +++ b/parts/k8s/cloud-init/masternodecustomdata.yml @@ -290,6 +290,11 @@ write_files: "subnet": "{{`{{.PodCIDR}}`}}", "routes": [{ "dst": "0.0.0.0/0" }] } + }, + { + "type": "portmap", + "capabilities": {"portMappings": true}, + "snat": false }] } {{end}} diff --git a/parts/k8s/cloud-init/nodecustomdata.yml b/parts/k8s/cloud-init/nodecustomdata.yml index b1bc4ee657..04cea7ee06 100644 --- a/parts/k8s/cloud-init/nodecustomdata.yml +++ b/parts/k8s/cloud-init/nodecustomdata.yml @@ -263,6 +263,11 @@ write_files: "subnet": "{{`{{.PodCIDR}}`}}", "routes": [{ "dst": "0.0.0.0/0" }] } + }, + { + "type": "portmap", + "capabilities": {"portMappings": true}, + "snat": false }] } {{end}} diff --git a/pkg/engine/templates_generated.go b/pkg/engine/templates_generated.go index 4740567801..ad326f923e 100644 --- a/pkg/engine/templates_generated.go +++ b/pkg/engine/templates_generated.go @@ -15224,6 +15224,11 @@ write_files: "subnet": "{{` + "`" + `{{.PodCIDR}}` + "`" + `}}", "routes": [{ "dst": "0.0.0.0/0" }] } + }, + { + "type": "portmap", + "capabilities": {"portMappings": true}, + "snat": false }] } {{end}} @@ -15772,6 +15777,11 @@ write_files: "subnet": "{{` + "`" + `{{.PodCIDR}}` + "`" + `}}", "routes": [{ "dst": "0.0.0.0/0" }] } + }, + { + "type": "portmap", + "capabilities": {"portMappings": true}, + "snat": false }] } {{end}}