Documentation ¶
Index ¶
Constants ¶
View Source
const ( OperatorModeWatchers = OperatorMode(1 << iota) OperatorModeWebhooks OperatorModeBoth = OperatorModeWatchers | OperatorModeWebhooks )
View Source
const (
SubscriptionIDVar = "AZURE_SUBSCRIPTION_ID"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OperatorMode ¶
type OperatorMode int
OperatorMode determines whether we'll run watchers and/or webhooks.
func ParseOperatorMode ¶
func ParseOperatorMode(value string) (OperatorMode, error)
ParseOperatorMode converts a string value into the corresponding operator mode.
func (OperatorMode) IncludesWatchers ¶
func (m OperatorMode) IncludesWatchers() bool
IncludesWatchers returns whether an operator running in this mode should register reconcilers.
func (OperatorMode) IncludesWebhooks ¶
func (m OperatorMode) IncludesWebhooks() bool
IncludesWebhooks returns whether an operator running in this mode should register webhooks.
func (OperatorMode) String ¶
func (m OperatorMode) String() string
String converts the mode into a readable value.
type Values ¶
type Values struct { // SubscriptionID is the Azure subscription the operator will use // for ARM communication. SubscriptionID string // PodNamespace is the namespace the operator pods are running in. PodNamespace string // OperatorMode determines whether the operator should run // watchers, webhooks or both. OperatorMode OperatorMode // TargetNamespaces lists the namespaces the operator will watch // for Azure resources (if the mode includes running watchers). If // it's empty the operator will watch all namespaces. TargetNamespaces []string // SyncPeriod is the frequency at which resources are re-reconciled with Azure // when there have been no triggering changes in the Kubernetes resources. This sync // exists to detect and correct changes that happened in Azure that Kubernetes is not // aware about. BE VERY CAREFUL setting this value low - even a modest number of resources // can cause subscription level throttling if they are re-synced frequently. // If nil, no sync is performed. Durations are specified as "1h", "15m", or "60s". See // https://pkg.go.dev/time#ParseDuration for more details. // // This can be set to nil by specifying empty string for AZURE_SYNC_PERIOD explicitly in // the config. SyncPeriod *time.Duration }
Values stores configuration values that are set for the operator.
func ReadAndValidate ¶
ReadAndValidate loads the configuration values and checks that they're consistent.
func ReadFromEnvironment ¶
ReadFromEnvironment loads configuration values from the AZURE_* environment variables.
Click to show internal directories.
Click to hide internal directories.