mirror of https://github.com/kubernetes/kops.git
Allow user defined endpoint to host action for Canal
This commit is contained in:
parent
cc6fb51f91
commit
d9e4a62994
|
@ -67,8 +67,12 @@ type CalicoNetworkingSpec struct {
|
|||
CrossSubnet bool `json:"crossSubnet,omitempty"` // Enables Calico's cross-subnet mode when set to true
|
||||
}
|
||||
|
||||
// Canal declares that we want Canal networking
|
||||
// CanalNetworkingSpec declares that we want Canal networking
|
||||
type CanalNetworkingSpec struct {
|
||||
// DefaultEndpointToHostAction allows users to configure the default behaviour
|
||||
// for traffic between pod to host after calico rules have been processed.
|
||||
// Default: ACCEPT (other options: DROP, RETURN)
|
||||
DefaultEndpointToHostAction string `json:"defaultEndpointToHostAction,omitempty"`
|
||||
}
|
||||
|
||||
// Kuberouter declares that we want Kube-router networking
|
||||
|
|
|
@ -67,8 +67,12 @@ type CalicoNetworkingSpec struct {
|
|||
CrossSubnet bool `json:"crossSubnet,omitempty"` // Enables Calico's cross-subnet mode when set to true
|
||||
}
|
||||
|
||||
// Canal declares that we want Canal networking
|
||||
// CanalNetworkingSpec declares that we want Canal networking
|
||||
type CanalNetworkingSpec struct {
|
||||
// DefaultEndpointToHostAction allows users to configure the default behaviour
|
||||
// for traffic between pod to host after calico rules have been processed.
|
||||
// Default: ACCEPT (other options: DROP, RETURN)
|
||||
DefaultEndpointToHostAction string `json:"defaultEndpointToHostAction,omitempty"`
|
||||
}
|
||||
|
||||
// Kuberouter declares that we want Canal networking
|
||||
|
|
|
@ -361,6 +361,7 @@ func Convert_kops_CalicoNetworkingSpec_To_v1alpha1_CalicoNetworkingSpec(in *kops
|
|||
}
|
||||
|
||||
func autoConvert_v1alpha1_CanalNetworkingSpec_To_kops_CanalNetworkingSpec(in *CanalNetworkingSpec, out *kops.CanalNetworkingSpec, s conversion.Scope) error {
|
||||
out.DefaultEndpointToHostAction = in.DefaultEndpointToHostAction
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -370,6 +371,7 @@ func Convert_v1alpha1_CanalNetworkingSpec_To_kops_CanalNetworkingSpec(in *CanalN
|
|||
}
|
||||
|
||||
func autoConvert_kops_CanalNetworkingSpec_To_v1alpha1_CanalNetworkingSpec(in *kops.CanalNetworkingSpec, out *CanalNetworkingSpec, s conversion.Scope) error {
|
||||
out.DefaultEndpointToHostAction = in.DefaultEndpointToHostAction
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
@ -67,8 +67,12 @@ type CalicoNetworkingSpec struct {
|
|||
CrossSubnet bool `json:"crossSubnet,omitempty"` // Enables Calico's cross-subnet mode when set to true
|
||||
}
|
||||
|
||||
// Canal declares that we want Canal networking
|
||||
// CanalNetworkingSpec declares that we want Canal networking
|
||||
type CanalNetworkingSpec struct {
|
||||
// DefaultEndpointToHostAction allows users to configure the default behaviour
|
||||
// for traffic between pod to host after calico rules have been processed.
|
||||
// Default: ACCEPT (other options: DROP, RETURN)
|
||||
DefaultEndpointToHostAction string `json:"defaultEndpointToHostAction,omitempty"`
|
||||
}
|
||||
|
||||
// Kuberouter declares that we want Canal networking
|
||||
|
|
|
@ -389,6 +389,7 @@ func Convert_kops_CalicoNetworkingSpec_To_v1alpha2_CalicoNetworkingSpec(in *kops
|
|||
}
|
||||
|
||||
func autoConvert_v1alpha2_CanalNetworkingSpec_To_kops_CanalNetworkingSpec(in *CanalNetworkingSpec, out *kops.CanalNetworkingSpec, s conversion.Scope) error {
|
||||
out.DefaultEndpointToHostAction = in.DefaultEndpointToHostAction
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -398,6 +399,7 @@ func Convert_v1alpha2_CanalNetworkingSpec_To_kops_CanalNetworkingSpec(in *CanalN
|
|||
}
|
||||
|
||||
func autoConvert_kops_CanalNetworkingSpec_To_v1alpha2_CanalNetworkingSpec(in *kops.CanalNetworkingSpec, out *CanalNetworkingSpec, s conversion.Scope) error {
|
||||
out.DefaultEndpointToHostAction = in.DefaultEndpointToHostAction
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ spec:
|
|||
fieldPath: spec.nodeName
|
||||
# Set Felix endpoint to host default action to ACCEPT.
|
||||
- name: FELIX_DEFAULTENDPOINTTOHOSTACTION
|
||||
value: "ACCEPT"
|
||||
value: "{{- or .Networking.Canal.DefaultEndpointToHostAction "ACCEPT" }}"
|
||||
securityContext:
|
||||
privileged: true
|
||||
resources:
|
||||
|
|
|
@ -111,7 +111,7 @@ spec:
|
|||
fieldPath: spec.nodeName
|
||||
# Set Felix endpoint to host default action to ACCEPT.
|
||||
- name: FELIX_DEFAULTENDPOINTTOHOSTACTION
|
||||
value: "ACCEPT"
|
||||
value: "{{- or .Networking.Canal.DefaultEndpointToHostAction "ACCEPT" }}"
|
||||
securityContext:
|
||||
privileged: true
|
||||
resources:
|
||||
|
|
Loading…
Reference in New Issue