mirror of https://github.com/kubernetes/kops.git
Merge pull request #12682 from zhengtianbao/ipforwarding
[calico] Add support for allow_ip_forwarding field
This commit is contained in:
commit
88ffb9fd8f
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"`
|
||||
|
|
|
|||
|
|
@ -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"`
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"`
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -61,6 +61,11 @@ data:
|
|||
"type": "calico-ipam"
|
||||
{{- end }}
|
||||
},
|
||||
{{- if .Networking.Calico.AllowIPForwarding }}
|
||||
"container_settings": {
|
||||
"allow_ip_forwarding": true
|
||||
},
|
||||
{{- end }}
|
||||
"policy": {
|
||||
"type": "k8s"
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue