package winkernel
import "k8s.io/kubernetes/pkg/proxy/winkernel"
Index ¶
- 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(v interface{}, message string, level klog.Level)
- func RegisterMetrics()
- type HostNetworkService
- type KernelCompatTester
- type Proxier
- func NewProxier( syncPeriod time.Duration, minSyncPeriod time.Duration, masqueradeAll bool, masqueradeBit int, clusterCIDR string, hostname string, nodeIP net.IP, recorder record.EventRecorder, healthzServer healthcheck.HealthzUpdater, config config.KubeProxyWinkernelConfiguration, ) (*Proxier, error)
- 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 WindowsKernelCompatTester
Variables ¶
var ( SyncProxyRulesLatency = prometheus.NewHistogram( prometheus.HistogramOpts{ Subsystem: kubeProxySubsystem, Name: "sync_proxy_rules_duration_seconds", Help: "SyncProxyRules latency in seconds", Buckets: prometheus.ExponentialBuckets(0.001, 2, 15), }, ) DeprecatedSyncProxyRulesLatency = prometheus.NewHistogram( prometheus.HistogramOpts{ Subsystem: kubeProxySubsystem, Name: "sync_proxy_rules_latency_microseconds", Help: "(Deprecated) SyncProxyRules latency in microseconds", Buckets: prometheus.ExponentialBuckets(1000, 2, 15), }, ) )
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 Enum ¶
func Log ¶
func LogJson ¶
func RegisterMetrics ¶
func RegisterMetrics()
Types ¶
type HostNetworkService ¶
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 {
// 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.HealthzUpdater, config config.KubeProxyWinkernelConfiguration, ) (*Proxier, error)
NewProxier returns a new Proxier
func (*Proxier) OnEndpointsAdd ¶
func (*Proxier) OnEndpointsDelete ¶
func (*Proxier) OnEndpointsSynced ¶
func (proxier *Proxier) OnEndpointsSynced()
func (*Proxier) OnEndpointsUpdate ¶
func (*Proxier) OnServiceAdd ¶
func (*Proxier) OnServiceDelete ¶
func (*Proxier) OnServiceSynced ¶
func (proxier *Proxier) OnServiceSynced()
func (*Proxier) OnServiceUpdate ¶
func (*Proxier) Sync ¶
func (proxier *Proxier) Sync()
Sync is called to synchronize the proxier state to hns as soon as possible.
func (*Proxier) SyncLoop ¶
func (proxier *Proxier) SyncLoop()
SyncLoop runs periodic work. This is expected to run as a goroutine or as the main loop of the app. It does not return.
type WindowsKernelCompatTester ¶
type WindowsKernelCompatTester struct{}
func (WindowsKernelCompatTester) IsCompatible ¶
func (lkct WindowsKernelCompatTester) IsCompatible() error
IsCompatible returns true if winkernel can support this mode of proxy
Source Files ¶
hnsV1.go hnsV2.go metrics.go proxier.go
- Version
- v1.14.0
- Published
- Mar 21, 2019
- Platform
- windows/amd64
- Imports
- 27 packages
- Last checked
- 1 hour ago –
Tools for package owners.