Documentation
¶
Index ¶
Constants ¶
View Source
const ( SourceClusterConfigMap = "clusterConfigMap" SourceNodeMerged = "nodeMerged" NetworkModeENIExclusive = "eni_exclusive" PlatformVKE = "vke" // DefaultDebugPort is the port for debug and prometheus metrics. DefaultDebugPort = 11414 DefaultPoolTargetLimit = 1 DefaultPoolMonitorIntervalSec = 120 DefaultSubnetStatAgingSec = 40 DefaultSubnetStatUpdateIntervalSec = 60 DefaultReconcileIntervalSec = 1200 DefaultGcProtectPeriodSec = 120 )
View Source
const ( Namespace = "kube-system" CelloConfigName = "cello-config" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// CredentialServerAddress address of credential server, if not set, take the default value of sdk
CredentialServerAddress *string `yaml:"credentialServerAddress" json:"credentialServerAddress,omitempty"`
// CredentialAccessKeyId used in static authentication
CredentialAccessKeyId *string `yaml:"credentialAccessKeyId" json:"credentialAccessKeyId,omitempty"`
// CredentialAccessKeySecret used in static authentication
CredentialAccessKeySecret *string `yaml:"credentialAccessKeySecret" json:"credentialAccessKeySecret,omitempty"`
// RamRole used in dynamic authentication, mutually exclusive with static authentication and takes precedence over static authentication
RamRole *string `yaml:"ramRole" json:"ramRole,omitempty"`
// OpenApiAddress address of top gateway for accessing volc openapi
OpenApiAddress *string `yaml:"openApiAddress" json:"openApiAddress,omitempty"`
// SecurityGroups used by pods (actually used by ENI)
SecurityGroups []string `yaml:"securityGroups" json:"securityGroups,omitempty"`
// LegacySecurityGroups used for compatibility
LegacySecurityGroups []string `yaml:"security_groups" json:"security_groups,omitempty"`
// Subnets used by pods (actually used by ENI)
Subnets []string `yaml:"subnets" json:"subnets,omitempty"`
// HeathAndDebugPort port for heath check and debug
HeathAndDebugPort *uint32 `yaml:"heathAndDebugPort" json:"heathAndDebugPort,omitempty"`
// ReconcileIntervalSec ReconcileInterval of daemon expressed in seconds
ReconcileIntervalSec *uint32 `yaml:"reconcileIntervalSec" json:"reconcileIntervalSec"`
// pool configs of eni or eni-multi-ip mode
// PoolTargetLimit the maximum ratio of the number of cached resources to the total quota
PoolTargetLimit *float64 `yaml:"PoolTargetLimit" json:"poolTargetLimit,omitempty"`
// PoolTarget the target number of cached resources
PoolTarget *uint32 `yaml:"poolTarget" json:"poolTarget,omitempty"`
// PoolTargetMin the min number of cached resources and used resources
PoolTargetMin *uint32 `yaml:"poolTargetMin" json:"poolTargetMin,omitempty"`
// PoolMaxCap max capacity of resources Pool
PoolMaxCap *uint32 `yaml:"poolMaxCap" json:"poolMaxCap,omitempty"`
// PoolMaxCapProbe enable PoolMaxCap automatic detection
PoolMaxCapProbe *bool `yaml:"poolMaxCapProbe" json:"poolMaxCapProbe,omitempty"`
// PoolMonitorIntervalSec PoolMonitorInterval expressed in seconds
PoolMonitorIntervalSec *uint32 `yaml:"poolMonitorIntervalSec" json:"poolMonitorIntervalSec,omitempty"`
// PoolGCProtectPeriodSec protect period in seconds of resource while gc action
PoolGCProtectPeriodSec *uint32 `yaml:"poolGCProtectPeriodSec" json:"poolGCProtectPeriodSec,omitempty"`
// SubnetStatAgingSec SubnetStatAging expressed in seconds
SubnetStatAgingSec *uint32 `yaml:"subnetStatAgingSec" json:"subnetStatAgingSec,omitempty"`
// SubnetStatUpdateIntervalSec SubnetStatUpdateInterval expressed in seconds
SubnetStatUpdateIntervalSec *uint32 `yaml:"subnetStatUpdateIntervalSec" json:"subnetStatUpdateIntervalSec,omitempty"`
// EnableTrunk enable trunk
EnableTrunk *bool `yaml:"enableTrunk" json:"enableTrunk,omitempty"`
// NetworkMode network mode of cello
NetworkMode *string `yaml:"networkMode" json:"networkMode,omitempty"`
// IPFamily protocol stack
IPFamily *string `yaml:"ipFamily" json:"ipFamily,omitempty"`
// Source config source
Source *string `yaml:"source" json:"source,omitempty"`
// Platform is the platform used by user to deploy the kubernetes cluster. Optional values:
// - "vke": The cluster is provided by Volcengine Kubernetes Engine(VKE).
// - "kubernetes": The cluster is hosted by user(self-managed).
Platform *string `yaml:"platform" json:"platform,omitempty"`
}
Config configuration of cello daemon.
func GetCelloConfigFromConfigMap ¶
GetCelloConfigFromConfigMap get cello config from configmap object.
func GetMergedConfigFromConfigMap ¶
GetMergedConfigFromConfigMap get merged config from all configmaps(cluster scope and node scope).
func ParseConfig ¶
ParseConfig Parse Config from configmap.
Click to show internal directories.
Click to hide internal directories.