Documentation
¶
Overview ¶
Package config contains all global configuration parameters.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBaseUrl ¶
func GetBaseUrl() string
func GetProtocol ¶
func GetProtocol() string
func ResetForTesting ¶ added in v0.2.56
func ResetForTesting()
Types ¶
type OperatorConfig ¶
type OperatorConfig struct {
CaCert string `mapstructure:"CA_CERT"`
NetboxHost string `mapstructure:"NETBOX_HOST"`
AuthToken string `mapstructure:"AUTH_TOKEN"`
HttpsEnable bool `mapstructure:"HTTPS_ENABLE"`
DebugEnable bool `mapstructure:"DEBUG_ENABLE"`
NetboxRestorationHashFieldName string `mapstructure:"NETBOX_RESTORATION_HASH_FIELD_NAME"`
// cron schedule for scheduled reconciliation of all custom resources
// if set, all custom resources will be reconciled at the defined schedule, in addition to the regular event-based reconciliation
// if empty, scheduled reconciliation is disabled
// format: cron, see https://pkg.go.dev/github.com/robfig/cron/v3 for examples
// defaults to empty (disabled)
ReconcileScheduleRaw string `mapstructure:"RECONCILE_SCHEDULE"`
// jitter which is added to the defined reconcile schedule, only used if RECONCILE_SCHEDULE is defined
// it adds a random amount of time within a given window to the next scheduled reconcile and can help reducing load on backend systems
// all reconciles are randomly distributed across the window [scheduled trigger time, scheduled trigger time + RECONCILE_JITTER]
// format: duration, needs to be parseable by time.ParseDuration, e.g. "30s", "30m"
// defaults to 1 hour
ReconcileJitterRaw string `mapstructure:"RECONCILE_JITTER"`
// Parsed fields (not from config file/env)
ReconcileSchedule cron.Schedule
ReconcileJitterDuration time.Duration
// contains filtered or unexported fields
}
func GetOperatorConfig ¶
func GetOperatorConfig() *OperatorConfig
func (*OperatorConfig) LoadCaCert ¶
func (c *OperatorConfig) LoadCaCert() (cert []byte, err error)
Click to show internal directories.
Click to hide internal directories.