Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BindConfigToFlags ¶
func LoadConfigFromContext ¶
Types ¶
type CommonServiceConfig ¶
type CommonServiceConfig struct {
DebugLabelValue string `mapstructure:"debug-label-value" description:"Set the debug label value"`
MaxConcurrentReconciles int `mapstructure:"max-concurrent-reconciles" default:"10" description:"Set the max concurrent reconciles"`
Environment string `mapstructure:"environment"`
Region string `mapstructure:"region" default:"local" description:"Set the region of the service, e.g. local, dev, staging, prod"`
Kubeconfig string `mapstructure:"kubeconfig" description:"Set the kubeconfig path"`
IsLocal bool `mapstructure:"is-local" default:"false" description:"Flagging execution to be local"`
Image struct {
Name string `mapstructure:"image-name" description:"Set the image name"`
Tag string `mapstructure:"image-tag" description:"Set the image tag"`
} `mapstructure:",squash"`
Log struct {
Level string `mapstructure:"log-level" default:"info" description:"Set the log level"`
NoJson bool `mapstructure:"no-json" default:"false" description:"Disable JSON logging"`
} `mapstructure:",squash"`
ShutdownTimeout time.Duration `mapstructure:"shutdown-timeout" default:"1m" description:"Set the shutdown timeout as duration in seconds, e.g. 30s, 1m, 2h"`
Metrics struct {
BindAddress string `mapstructure:"metrics-bind-address" default:":9090" description:"Set the metrics bind address"`
Secure bool `mapstructure:"metrics-secure" default:"false" description:"Set if metrics should be exposed via https"`
} `mapstructure:",squash"`
Tracing struct {
Enabled bool `mapstructure:"tracing-enabled" default:"false" description:"Enable tracing for the service"`
Collector traces.Config `mapstructure:",squash"`
} `mapstructure:",squash"`
EnableHTTP2 bool `mapstructure:"enable-http2" default:"true" description:"Toggle to disable metrics/webhook serving using http2"`
HealthProbeBindAddress string `mapstructure:"health-probe-bind-address" default:":8090" description:"Set the health probe bind address"`
LeaderElection struct {
Enabled bool `mapstructure:"leader-elect" default:"false" description:"Enable leader election for the controller manager"`
} `mapstructure:",squash"`
Sentry struct {
Dsn string `mapstructure:"sentry-dsn" description:"Set the Sentry DSN for error reporting"`
} `mapstructure:",squash"`
}
func NewDefaultConfig ¶
Click to show internal directories.
Click to hide internal directories.