Documentation
¶
Index ¶
- func GetEnvVar(key, fallback string) string
- func GetEnvVarAsDuration(key string, defaultVal time.Duration) time.Duration
- func GetEnvVarAsInt(key string, defaultVal int) int
- func IsCertManager() bool
- func IsHandler() bool
- func IsMetricsManager() bool
- func IsOperator() bool
- func IsWebhook() bool
- func LookupAsDuration(varName string) (time.Duration, error)
- func NodeName() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEnvVarAsDuration ¶ added in v0.87.0
GetEnvVarAsDuration reads a seconds value from an environment variable and returns it as a time.Duration, falling back to defaultVal if unset or invalid.
func GetEnvVarAsInt ¶ added in v0.87.0
GetEnvVarAsInt reads an integer from an environment variable, returning defaultVal if the variable is unset or not a valid integer.
func IsCertManager ¶ added in v0.44.0
func IsCertManager() bool
IsCertManager return true when RUN_CERT_MANAGER env var is present
func IsHandler ¶
func IsHandler() bool
IsHandler returns true if it's not the operator or webhook server
func IsMetricsManager ¶ added in v0.82.0
func IsMetricsManager() bool
IsCertManager return true when RUN_CERT_MANAGER env var is present
func IsOperator ¶
func IsOperator() bool
IsOperator returns true when RUN_OPERATOR env var is present
func IsWebhook ¶
func IsWebhook() bool
IsWebhook returns true when RUN_WEBHOOK_SERVER env var is present
func LookupAsDuration ¶ added in v0.27.0
Types ¶
This section is empty.