config

package
v0.0.0-...-894910e Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultServiceMaxConcurrentReconciles = 3
	DefaultNodeMaxConcurrentReconciles    = 1
)
View Source
const (
	IPv6DualStack             featuregate.Feature = "IPv6DualStack"
	EndpointSlice             featuregate.Feature = "EndpointSlice"
	FilterServiceOnNodeChange featuregate.Feature = "FilterServiceOnNodeChange"
)

Variables

View Source
var CloudCFG = &CloudConfig{}
View Source
var CloudProviderFeatureGates = map[featuregate.Feature]featuregate.FeatureSpec{
	IPv6DualStack:             {Default: false, PreRelease: featuregate.Alpha},
	EndpointSlice:             {Default: true, PreRelease: featuregate.GA},
	FilterServiceOnNodeChange: {Default: false, PreRelease: featuregate.Alpha},
}
View Source
var ControllerCFG = &ControllerConfig{
	CloudConfig: CloudCFG,
}

Functions

func BindFeatureGates

func BindFeatureGates(client *apiext.Clientset, features string) error

func BuildRuntimeOptions

func BuildRuntimeOptions(rtCfg RuntimeConfig) manager.Options

Types

type CloudConfig

type CloudConfig struct {
	Global struct {
		UID             string `json:"uid"`
		AccessKeyID     string `json:"accessKeyID"`
		AccessKeySecret string `json:"accessKeySecret"`

		// cluster related
		ClusterID            string `json:"clusterID"`
		KubernetesClusterTag string `json:"kubernetesClusterTag"`
		Region               string `json:"region"`
		VpcID                string `json:"vpcid"`
		ZoneID               string `json:"zoneid"`
		VswitchID            string `json:"vswitchid"`
		ResourceGroupID      string `json:"resourceGroupID"`

		// service controller
		ServiceMaxConcurrentReconciles int    `json:"serviceMaxConcurrentReconciles"`
		ServiceBackendType             string `json:"serviceBackendType"`
		DisablePublicSLB               bool   `json:"disablePublicSLB"`

		// node controller
		NodeMaxConcurrentReconciles int   `json:"nodeMaxConcurrentReconciles"`
		NodeMonitorPeriod           int64 `json:"nodeMonitorPeriod"`
		NodeAddrSyncPeriod          int64 `json:"nodeAddrSyncPeriod"`

		// route controller
		RouteTableIDS string `json:"routeTableIDs"`

		// pvtz controller
		PrivateZoneID        string `json:"privateZoneId"`
		PrivateZoneRecordTTL int64  `json:"privateZoneRecordTTL"`

		FeatureGates string `json:"featureGates"`
	}
}

CloudConfig wraps the settings for the Alibaba Cloud provider.

func (*CloudConfig) GetKubernetesClusterTag

func (cc *CloudConfig) GetKubernetesClusterTag() string

func (*CloudConfig) LoadCloudCFG

func (cc *CloudConfig) LoadCloudCFG() error

func (*CloudConfig) PrintInfo

func (cc *CloudConfig) PrintInfo()

func (*CloudConfig) SetDefaultValue

func (cc *CloudConfig) SetDefaultValue()

type ControllerConfig

type ControllerConfig struct {
	config.KubeCloudSharedConfiguration
	CloudConfigPath      string
	Controllers          []string
	FeatureGates         string
	ServerGroupBatchSize int
	LogLevel             int
	DryRun               bool
	NetWork              string

	RuntimeConfig RuntimeConfig
	CloudConfig   *CloudConfig
}

Flag stores the configuration for global usage

func (*ControllerConfig) BindFlags

func (cfg *ControllerConfig) BindFlags(fs *pflag.FlagSet)

func (*ControllerConfig) LoadControllerConfig

func (cfg *ControllerConfig) LoadControllerConfig() error

func (*ControllerConfig) Validate

func (cfg *ControllerConfig) Validate() error

Validate the controller configuration

type RuntimeConfig

type RuntimeConfig struct {
	MetricsBindAddress           string
	HealthProbeBindAddress       string
	PprofBindAddress             string
	LeaderElect                  bool
	LeaderElectLeaseDuration     time.Duration
	LeaderElectRenewDeadline     time.Duration
	LeaderElectRetryPeriod       time.Duration
	LeaderElectResourceLock      string
	LeaderElectResourceName      string
	LeaderElectResourceNamespace string
	QPS                          float32
	Burst                        int
}

RuntimeConfig stores the configuration for controller-runtime

func (*RuntimeConfig) BindFlags

func (c *RuntimeConfig) BindFlags(fs *pflag.FlagSet)

Jump to

Keyboard shortcuts

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