Documentation ¶
Index ¶
- Constants
- Variables
- func CanUseWinKernelProxier(kcompat KernelCompatTester) (bool, error)
- func CleanupLeftovers() (encounteredError bool)
- func Enum(p v1.Protocol) uint16
- func Log(v interface{}, message string, level klog.Level)
- func LogJson(interfaceName string, v interface{}, message string, level klog.Level)
- func NewDualStackProxier(syncPeriod time.Duration, minSyncPeriod time.Duration, masqueradeAll bool, ...) (proxy.Provider, error)
- func RegisterMetrics()
- type DualStackCompatTester
- type HostNetworkService
- type KernelCompatTester
- type Proxier
- func (proxier *Proxier) OnEndpointSliceAdd(endpointSlice *discovery.EndpointSlice)
- func (proxier *Proxier) OnEndpointSliceDelete(endpointSlice *discovery.EndpointSlice)
- func (proxier *Proxier) OnEndpointSliceUpdate(_, endpointSlice *discovery.EndpointSlice)
- func (proxier *Proxier) OnEndpointSlicesSynced()
- func (proxier *Proxier) OnEndpointsAdd(endpoints *v1.Endpoints)
- func (proxier *Proxier) OnEndpointsDelete(endpoints *v1.Endpoints)
- func (proxier *Proxier) OnEndpointsSynced()
- func (proxier *Proxier) OnEndpointsUpdate(oldEndpoints, endpoints *v1.Endpoints)
- func (proxier *Proxier) OnServiceAdd(service *v1.Service)
- func (proxier *Proxier) OnServiceDelete(service *v1.Service)
- func (proxier *Proxier) OnServiceSynced()
- func (proxier *Proxier) OnServiceUpdate(oldService, service *v1.Service)
- func (proxier *Proxier) Sync()
- func (proxier *Proxier) SyncLoop()
- type StackCompatTester
- type WindowsKernelCompatTester
Constants ¶
const NETWORK_TYPE_OVERLAY = "overlay"
Variables ¶
var ( SyncProxyRulesLatency = metrics.NewHistogram( &metrics.HistogramOpts{ Subsystem: kubeProxySubsystem, Name: "sync_proxy_rules_duration_seconds", Help: "SyncProxyRules latency in seconds", Buckets: metrics.ExponentialBuckets(0.001, 2, 15), StabilityLevel: metrics.ALPHA, }, ) // SyncProxyRulesLastTimestamp is the timestamp proxy rules were last // successfully synced. SyncProxyRulesLastTimestamp = metrics.NewGauge( &metrics.GaugeOpts{ Subsystem: kubeProxySubsystem, Name: "sync_proxy_rules_last_timestamp_seconds", Help: "The last time proxy rules were successfully synced", StabilityLevel: metrics.ALPHA, }, ) )
var ( // LoadBalancerFlagsIPv6 enables IPV6. LoadBalancerFlagsIPv6 hcn.LoadBalancerFlags = 2 )
Functions ¶
func CanUseWinKernelProxier ¶
func CanUseWinKernelProxier(kcompat KernelCompatTester) (bool, error)
CanUseWinKernelProxier returns true if we should use the Kernel Proxier instead of the "classic" userspace Proxier. This is determined by checking the windows kernel version and for the existence of kernel features.
func CleanupLeftovers ¶
func CleanupLeftovers() (encounteredError bool)
CleanupLeftovers removes all hns rules created by the Proxier It returns true if an error was encountered. Errors are logged.
func NewDualStackProxier ¶ added in v1.19.0
func NewDualStackProxier( syncPeriod time.Duration, minSyncPeriod time.Duration, masqueradeAll bool, masqueradeBit int, clusterCIDR string, hostname string, nodeIP [2]net.IP, recorder record.EventRecorder, healthzServer healthcheck.ProxierHealthUpdater, config config.KubeProxyWinkernelConfiguration, ) (proxy.Provider, error)
func RegisterMetrics ¶
func RegisterMetrics()
Types ¶
type DualStackCompatTester ¶ added in v1.21.6
type DualStackCompatTester struct{}
func (DualStackCompatTester) DualStackCompatible ¶ added in v1.21.6
func (t DualStackCompatTester) DualStackCompatible(networkName string) bool
type HostNetworkService ¶ added in v1.14.0
type HostNetworkService interface {
// contains filtered or unexported methods
}
type KernelCompatTester ¶
type KernelCompatTester interface {
IsCompatible() error
}
KernelCompatTester tests whether the required kernel capabilities are present to run the windows kernel proxier.
type Proxier ¶
type Proxier struct { // TODO(imroc): implement node handler for winkernel proxier. proxyconfig.NoopNodeHandler // contains filtered or unexported fields }
Proxier is an hns based proxy for connections between a localhost:lport and services that provide the actual backends.
func NewProxier ¶
func NewProxier( syncPeriod time.Duration, minSyncPeriod time.Duration, masqueradeAll bool, masqueradeBit int, clusterCIDR string, hostname string, nodeIP net.IP, recorder record.EventRecorder, healthzServer healthcheck.ProxierHealthUpdater, config config.KubeProxyWinkernelConfiguration, ) (*Proxier, error)
NewProxier returns a new Proxier
func (*Proxier) OnEndpointSliceAdd ¶ added in v1.19.0
func (proxier *Proxier) OnEndpointSliceAdd(endpointSlice *discovery.EndpointSlice)
OnEndpointSliceAdd is called whenever creation of a new endpoint slice object is observed.
func (*Proxier) OnEndpointSliceDelete ¶ added in v1.19.0
func (proxier *Proxier) OnEndpointSliceDelete(endpointSlice *discovery.EndpointSlice)
OnEndpointSliceDelete is called whenever deletion of an existing endpoint slice object is observed.
func (*Proxier) OnEndpointSliceUpdate ¶ added in v1.19.0
func (proxier *Proxier) OnEndpointSliceUpdate(_, endpointSlice *discovery.EndpointSlice)
OnEndpointSliceUpdate is called whenever modification of an existing endpoint slice object is observed.
func (*Proxier) OnEndpointSlicesSynced ¶ added in v1.19.0
func (proxier *Proxier) OnEndpointSlicesSynced()
OnEndpointSlicesSynced is called once all the initial event handlers were called and the state is fully propagated to local cache.
func (*Proxier) OnEndpointsAdd ¶
OnEndpointsAdd is called whenever creation of new endpoints object is observed.
func (*Proxier) OnEndpointsDelete ¶
OnEndpointsDelete is called whenever deletion of an existing endpoints object is observed.
func (*Proxier) OnEndpointsSynced ¶
func (proxier *Proxier) OnEndpointsSynced()
OnEndpointsSynced is called once all the initial event handlers were called and the state is fully propagated to local cache.
func (*Proxier) OnEndpointsUpdate ¶
OnEndpointsUpdate is called whenever modification of an existing endpoints object is observed.
func (*Proxier) OnServiceAdd ¶
OnServiceAdd is called whenever creation of new service object is observed.
func (*Proxier) OnServiceDelete ¶
OnServiceDelete is called whenever deletion of an existing service object is observed.
func (*Proxier) OnServiceSynced ¶
func (proxier *Proxier) OnServiceSynced()
OnServiceSynced is called once all the initial event handlers were called and the state is fully propagated to local cache.
func (*Proxier) OnServiceUpdate ¶
OnServiceUpdate is called whenever modification of an existing service object is observed.
type StackCompatTester ¶ added in v1.21.6
StackCompatTester tests whether the required kernel and network are dualstack capable
type WindowsKernelCompatTester ¶
type WindowsKernelCompatTester struct{}
func (WindowsKernelCompatTester) IsCompatible ¶
func (lkct WindowsKernelCompatTester) IsCompatible() error
IsCompatible returns true if winkernel can support this mode of proxy