Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Cell = cell.Module( "datapath-tunnel-config", "Tunneling configurations", cell.Config(userCfg{TunnelProtocol: defaults.TunnelProtocol}), cell.Provide( newConfig, Config.datapathConfigProvider, func(dcfg *option.DaemonConfig) EnablerOut { return NewEnabler(dcfg.TunnelingEnabled()) }, func(dcfg *option.DaemonConfig) EnablerOut { return NewEnabler( (dcfg.EnableNodePort || dcfg.KubeProxyReplacement == option.KubeProxyReplacementStrict || dcfg.KubeProxyReplacement == option.KubeProxyReplacementTrue) && dcfg.LoadBalancerUsesDSR() && dcfg.LoadBalancerDSRDispatch == option.DSRDispatchGeneve, WithoutMTUAdaptation(), ) }, func(dcfg *option.DaemonConfig) EnablerOut { return NewEnabler(dcfg.EnableHighScaleIPcache) }, ), )
Cell is a cell that provides the parameters for the Cilium tunnel, based on user configuration and requests from external modules.
Functions ¶
func WithValidator ¶
WithValidator allows to register extra validation functions to assert that the configured tunnel protocol matches the one expected by the given feature.
func WithoutMTUAdaptation ¶
func WithoutMTUAdaptation() enablerOpt
WithoutMTUAdaptation conveys that the given feature request to enable tunneling, but the MTU adaptation is already handled externally.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config represents the materialized tunneling configuration to be used, depending on the user configuration and optional overrides required by additional features.
func NewTestConfig ¶
NewTestConfig returns a new TunnelConfig for testing purposes.
func (Config) DeviceName ¶
DeviceName returns the name of the tunnel device (empty if disabled).
func (Config) Protocol ¶
Protocol returns the enabled tunnel protocol. The tunnel protocol may be set to either VXLAN or Geneve even when the primary mode is native routing, in case an additional feature (e.g., egress gateway) may request some traffic to be routed through a tunnel.
func (Config) ShouldAdaptMTU ¶
ShouldAdaptMTU returns whether we should adapt the MTU calculation to account for encapsulation.
type EnablerOut ¶
EnablerOut allows requesting to enable tunneling functionalities.
func NewEnabler ¶
func NewEnabler(enable bool, opts ...enablerOpt) EnablerOut
NewEnabler returns an object to be injected through hive to request to enable tunneling functionalities. Extra options are meaningful only when enable is set to true, and are ignored otherwise.