Add option to set allow_ip_forwarding for the calico network

This commit is contained in:
zhengtianbao 2021-11-04 14:14:55 +08:00
parent e6eadbb215
commit 976e3c1f13
4 changed files with 14 additions and 0 deletions

View File

@ -106,6 +106,9 @@ type CalicoNetworkingSpec struct {
// Version overrides the Calico container image tag.
Version string `json:"version,omitempty"`
// AllowIPForwarding enable ip_forwarding setting within the container namespace.
// (default: false)
AllowIPForwarding bool `json:"allowIPForwarding,omitempty"`
// AWSSrcDstCheck enables/disables ENI source/destination checks (AWS only)
// Options: Disable (default), Enable, or DoNothing
AWSSrcDstCheck string `json:"awsSrcDstCheck,omitempty"`

View File

@ -109,6 +109,9 @@ type CalicoNetworkingSpec struct {
// Version overrides the Calico container image tag.
Version string `json:"version,omitempty"`
// AllowIPForwarding enable ip_forwarding setting within the container namespace.
// (default: false)
AllowIPForwarding bool `json:"allowIPForwarding,omitempty"`
// AWSSrcDstCheck enables/disables ENI source/destination checks (AWS only)
// Options: Disable (default), Enable, or DoNothing
AWSSrcDstCheck string `json:"awsSrcDstCheck,omitempty"`

View File

@ -104,6 +104,9 @@ type CalicoNetworkingSpec struct {
// Version overrides the Calico container image tag.
Version string `json:"version,omitempty"`
// AllowIPForwarding enable ip_forwarding setting within the container namespace.
// (default: false)
AllowIPForwarding bool `json:"allowIPForwarding,omitempty"`
// AWSSrcDstCheck enables/disables ENI source/destination checks (AWS only)
// Options: Disable (default), Enable, or DoNothing
AWSSrcDstCheck string `json:"awsSrcDstCheck,omitempty"`

View File

@ -61,6 +61,11 @@ data:
"type": "calico-ipam"
{{- end }}
},
{{- if .Networking.Calico.AllowIPForwarding }}
"container_settings": {
"allow_ip_forwarding": true
},
{{- end }}
"policy": {
"type": "k8s"
},