Merge pull request #12682 from zhengtianbao/ipforwarding

[calico] Add support for allow_ip_forwarding field
This commit is contained in:
Kubernetes Prow Robot 2021-11-11 18:54:28 -08:00 committed by GitHub
commit 88ffb9fd8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 22 additions and 0 deletions

View File

@ -4215,6 +4215,10 @@ spec:
description: CalicoNetworkingSpec declares that we want Calico
networking
properties:
allowIPForwarding:
description: 'AllowIPForwarding enable ip_forwarding setting
within the container namespace. (default: false)'
type: boolean
awsSrcDstCheck:
description: 'AWSSrcDstCheck enables/disables ENI source/destination
checks (AWS only) Options: Disable (default), Enable, or

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

@ -1708,6 +1708,7 @@ func Convert_kops_CNINetworkingSpec_To_v1alpha2_CNINetworkingSpec(in *kops.CNINe
func autoConvert_v1alpha2_CalicoNetworkingSpec_To_kops_CalicoNetworkingSpec(in *CalicoNetworkingSpec, out *kops.CalicoNetworkingSpec, s conversion.Scope) error {
out.Registry = in.Registry
out.Version = in.Version
out.AllowIPForwarding = in.AllowIPForwarding
out.AWSSrcDstCheck = in.AWSSrcDstCheck
out.BPFEnabled = in.BPFEnabled
out.BPFExternalServiceMode = in.BPFExternalServiceMode
@ -1744,6 +1745,7 @@ func Convert_v1alpha2_CalicoNetworkingSpec_To_kops_CalicoNetworkingSpec(in *Cali
func autoConvert_kops_CalicoNetworkingSpec_To_v1alpha2_CalicoNetworkingSpec(in *kops.CalicoNetworkingSpec, out *CalicoNetworkingSpec, s conversion.Scope) error {
out.Registry = in.Registry
out.Version = in.Version
out.AllowIPForwarding = in.AllowIPForwarding
out.AWSSrcDstCheck = in.AWSSrcDstCheck
out.BPFEnabled = in.BPFEnabled
out.BPFExternalServiceMode = in.BPFExternalServiceMode

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

@ -1658,6 +1658,7 @@ func Convert_kops_CNINetworkingSpec_To_v1alpha3_CNINetworkingSpec(in *kops.CNINe
func autoConvert_v1alpha3_CalicoNetworkingSpec_To_kops_CalicoNetworkingSpec(in *CalicoNetworkingSpec, out *kops.CalicoNetworkingSpec, s conversion.Scope) error {
out.Registry = in.Registry
out.Version = in.Version
out.AllowIPForwarding = in.AllowIPForwarding
out.AWSSrcDstCheck = in.AWSSrcDstCheck
out.BPFEnabled = in.BPFEnabled
out.BPFExternalServiceMode = in.BPFExternalServiceMode
@ -1693,6 +1694,7 @@ func Convert_v1alpha3_CalicoNetworkingSpec_To_kops_CalicoNetworkingSpec(in *Cali
func autoConvert_kops_CalicoNetworkingSpec_To_v1alpha3_CalicoNetworkingSpec(in *kops.CalicoNetworkingSpec, out *CalicoNetworkingSpec, s conversion.Scope) error {
out.Registry = in.Registry
out.Version = in.Version
out.AllowIPForwarding = in.AllowIPForwarding
out.AWSSrcDstCheck = in.AWSSrcDstCheck
out.BPFEnabled = in.BPFEnabled
out.BPFExternalServiceMode = in.BPFExternalServiceMode

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"
},