Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadEnv ¶
LoadEnv fills the environment-backed fields; call before flag parsing so explicit flags win.
Types ¶
type Components ¶
type Components struct {
RestConfig *rest.Config
Logger controllerutil.Logger
Dialer controllerutil.DialContextFunc
Fetcher upgrade.Fetcher
}
Components holds the runtime objects the operator is built from, replaceable in tests.
type Settings ¶
type Settings struct {
// Reconciliation behavior.
EnableWebhooks bool `env:"ENABLE_WEBHOOKS, default=true"`
EnablePDB bool `env:"ENABLE_PDB, default=true"`
EnableNetworkPolicy bool `env:"ENABLE_NETWORK_POLICY, default=true"`
WatchNamespace []string `env:"WATCH_NAMESPACE"`
ResyncPeriod time.Duration `env:"RESYNC_PERIOD, default=30s"`
MaxConcurrentReconciles int `env:"MAX_CONCURRENT_RECONCILES, default=4"`
VersionUpdateInterval time.Duration `env:"VERSION_UPDATE_INTERVAL, default=24h"`
DisableVersionUpdateChecks bool `env:"DISABLE_VERSION_UPDATE_CHECKS, default=false"`
// Manager process wiring, command-line flags only.
MetricsAddr string
ProbeAddr string
EnableLeaderElection bool
SecureMetrics bool
EnableHTTP2 bool
MetricsCertPath string
MetricsCertName string
MetricsCertKey string
WebhookCertPath string
WebhookCertName string
WebhookCertKey string
}
Settings holds the operator configuration from command-line flags and environment variables. Behavior knobs are environment-sourced so OLM subscription config and helm envOverrides can inject them; process wiring stays on kubebuilder-scaffold command-line flags. Flags take precedence over environment.
func Defaults ¶
func Defaults() Settings
Defaults returns Settings pre-filled with the defaults of the flag-only fields.
Click to show internal directories.
Click to hide internal directories.