config

package
v0.61.1 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RetrieveKubeConfig added in v0.54.0

func RetrieveKubeConfig(log logrus.FieldLogger) (*rest.Config, error)

Types

type API

type API struct {
	Key string
	URL string
}

type ClusterControllerVersion

type ClusterControllerVersion struct {
	GitCommit, GitRef, Version string
}

func (*ClusterControllerVersion) String

func (a *ClusterControllerVersion) String() string

type Config

type Config struct {
	Log              Log
	API              API
	TLS              TLS
	Kubeconfig       string
	KubeClient       KubeClient
	ClusterID        string
	PprofPort        int
	Metrics          Metrics
	LeaderElection   LeaderElection
	Drain            Drain
	VolumeAttachment VolumeAttachment
	Informer         Informer
	// AutoscalingDisabled is a flag to disable approving csr.
	AutoscalingDisabled bool `mapstructure:"autoscaling_disabled"`
	// MaxActionsInProgress serves as a safeguard to limit the number of Goroutines in progress.
	MaxActionsInProgress int

	MonitorMetadataPath string `mapstructure:"monitor_metadata"`
	SelfPod             Pod    `mapstructure:"self_pod"`
}

func Get

func Get() Config

Get configuration bound to environment variables.

type Drain added in v0.61.0

type Drain struct {
	// DisableVolumeDetachWait disables waiting for volume detach during node drain, ignoring
	// per action settings.
	DisableVolumeDetachWait bool `mapstructure:"disablevolumedetachwait"`
}

type Informer added in v0.61.0

type Informer struct {
	EnablePod        bool          `mapstructure:"enablepod"`
	EnableNode       bool          `mapstructure:"enablenode"`
	CacheSyncTimeout time.Duration `mapstructure:"cachesynctimeout"`
}

type KubeClient

type KubeClient struct {
	// K8S client rate limiter allows bursts of up to 'burst' to exceed the QPS, while still maintaining a
	// smoothed qps rate of 'qps'.
	// The bucket is initially filled with 'burst' tokens, and refills at a rate of 'qps'.
	// The maximum number of tokens in the bucket is capped at 'burst'.
	QPS   int
	Burst int
}

type LeaderElection

type LeaderElection struct {
	Enabled            bool
	LockName           string
	LeaseDuration      time.Duration
	LeaseRenewDeadline time.Duration
}

type Log

type Log struct {
	Level uint32
}

type Metrics added in v0.56.4

type Metrics struct {
	Port int
	// ExportEnabled enabled exporting metrics to Cast AI SaaS platform.
	ExportEnabled bool
	// ExportInterval is the interval at which metrics are exported to Cast AI SaaS platform.
	ExportInterval time.Duration
}

type Pod added in v0.54.0

type Pod struct {
	Namespace string `mapstructure:"namespace"`
	Name      string `mapstructure:"name"`
	Node      string `mapstructure:"node"`
}

type TLS

type TLS struct {
	CACert string
}

type VolumeAttachment added in v0.61.0

type VolumeAttachment struct {
	// DefaultTimeout is the default timeout for waiting for VolumeAttachments to detach.
	// Used if not specified in the drain action.
	DefaultTimeout time.Duration `mapstructure:"defaulttimeout"`
}

Jump to

Keyboard shortcuts

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