Merge pull request #16143 from maxbrunet/fix/cni/bridge/pod-comms

CNI/bridge: Ensure pod communications are allowed
pull/18579/head
Steven Powell 2024-04-05 09:44:51 -07:00 committed by GitHub
commit 744196c70d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -30,12 +30,13 @@ import (
// bridge is what minikube defaulted to when `--enable-default-cni=true` // bridge is what minikube defaulted to when `--enable-default-cni=true`
// ref: https://www.cni.dev/plugins/current/main/bridge/ // ref: https://www.cni.dev/plugins/current/main/bridge/
// ref: https://www.cni.dev/plugins/current/meta/portmap/ // ref: https://www.cni.dev/plugins/current/meta/portmap/
// ref: https://www.cni.dev/plugins/current/meta/firewall/
// note: "cannot set hairpin mode and promiscuous mode at the same time" // note: "cannot set hairpin mode and promiscuous mode at the same time"
// ref: https://github.com/containernetworking/plugins/blob/7e9ada51e751740541969e1ea5a803cbf45adcf3/plugins/main/bridge/bridge.go#L424 // ref: https://github.com/containernetworking/plugins/blob/7e9ada51e751740541969e1ea5a803cbf45adcf3/plugins/main/bridge/bridge.go#L424
var bridgeConf = template.Must(template.New("bridge").Parse(` var bridgeConf = template.Must(template.New("bridge").Parse(`
{ {
"cniVersion": "0.3.1", "cniVersion": "0.4.0",
"name": "bridge", "name": "bridge",
"plugins": [ "plugins": [
{ {
@ -56,6 +57,9 @@ var bridgeConf = template.Must(template.New("bridge").Parse(`
"capabilities": { "capabilities": {
"portMappings": true "portMappings": true
} }
},
{
"type": "firewall"
} }
] ]
} }