options

package
v1.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 4, 2025 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultDummyIfIP4 = "169.254.2.1"
	DefaultDummyIfIP6 = "fd00::2:1"
	DummyIfCIDR4      = "169.254.0.0/16"
	ExclusiveCIDR     = "169.254.31.0/24"
)

Variables

View Source
var (
	// DisabledInCloudMode contains the filters that should be disabled when yurthub is working in cloud mode.
	DisabledInCloudMode = []string{discardcloudservice.FilterName, forwardkubesvctraffic.FilterName}

	// SupportedComponentsForFilter is used for specifying which components are supported by filters as default setting.
	SupportedComponentsForFilter = map[string]string{
		masterservice.FilterName:         "kubelet",
		discardcloudservice.FilterName:   "kube-proxy",
		servicetopology.FilterName:       "kube-proxy, coredns, nginx-ingress-controller",
		inclusterconfig.FilterName:       "kubelet",
		nodeportisolation.FilterName:     "kube-proxy",
		forwardkubesvctraffic.FilterName: "kube-proxy",
	}
)

Functions

func RegisterAllFilters added in v1.5.0

func RegisterAllFilters(filters *base.Filters)

RegisterAllFilters by order, the front registered filter will be called before the latter registered ones. Attention: when you add a new filter, you should register new filter here.

Types

type YurtHubOptions

type YurtHubOptions struct {
	ServerAddr                string
	YurtHubHost               string // YurtHub server host (e.g.: expose metrics API)
	YurtHubProxyHost          string // YurtHub proxy server host
	YurtHubPort               int
	YurtHubProxyPort          int
	YurtHubProxySecurePort    int
	YurtHubNamespace          string
	GCFrequency               int
	YurtHubCertOrganizations  []string
	NodeName                  string
	NodePoolName              string
	LBMode                    string
	HeartbeatFailedRetry      int
	HeartbeatHealthyThreshold int
	HeartbeatTimeoutSeconds   int
	HeartbeatIntervalSeconds  int
	MaxRequestInFlight        int
	JoinToken                 string
	BootstrapMode             string
	BootstrapFile             string
	RootDir                   string
	Version                   bool
	EnableProfiling           bool
	EnableDummyIf             bool
	EnableIptables            bool
	HubAgentDummyIfIP         string
	HubAgentDummyIfName       string
	DiskCachePath             string
	EnableResourceFilter      bool
	DisabledResourceFilters   []string
	WorkingMode               string
	KubeletHealthGracePeriod  time.Duration
	EnableNodePool            bool
	MinRequestTimeout         time.Duration
	CACertHashes              []string
	UnsafeSkipCAVerification  bool
	ClientForTest             kubernetes.Interface
	EnableCoordinator         bool
	CoordinatorServerAddr     string
	CoordinatorStoragePrefix  string
	CoordinatorStorageAddr    string
	LeaderElection            componentbaseconfig.LeaderElectionConfiguration
	EnablePoolServiceTopology bool
}

YurtHubOptions is the main settings for the yurthub

func NewYurtHubOptions

func NewYurtHubOptions() *YurtHubOptions

NewYurtHubOptions creates a new YurtHubOptions with a default config.

func (*YurtHubOptions) AddFlags

func (o *YurtHubOptions) AddFlags(fs *pflag.FlagSet)

AddFlags returns flags for a specific yurthub by section name

func (*YurtHubOptions) Validate added in v0.7.0

func (options *YurtHubOptions) Validate() error

Validate validates YurtHubOptions

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL