Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type OperatorConfig ¶
type OperatorConfig struct { // GatewayContainerImage can be used to select alternate container sources. GatewayContainerImage string `mapstructure:"gateway-container-image"` // GatewayContainerName can be used to set the name of the primary container, // the one running gateway, in the pod. GatewayContainerName string `mapstructure:"gateway-container-name"` // GatewayStorageMountPath is where the storage volume should be mounted to GatewayStorageMountPath string `mapstructure:"gateway-storage-path"` // GatewayOpenAPIContainerImage can be used to select alternate container sources. GatewayOpenAPIContainerImage string `mapstructure:"gateway-openapi-container-image"` // GatewayContainerName can be used to set the name of the primary container, // the one running gateway, in the pod. GatewayOpenAPIContainerName string `mapstructure:"gateway-openapi-container-name"` // WorkingNamespace defines the namespace for the operator's internal resources WorkingNamespace string `mapstructure:"working-namespace"` // LockerConfigMapName defines the name of the ConfigMap used as the backend for the distributed locking LockerConfigMapName string `mapstructure:"locker-configmap-name"` }
OperatorConfig is a type holding general configuration values. Most of the operator code that needs to reference configuration should do so via this type.
func (*OperatorConfig) Validate ¶
func (*OperatorConfig) Validate() error
Validate the OperatorConfig returning an error if the config is not directly usable by the operator. This may occur if certain required values are unset or invalid.
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
Source is how external configuration sources populate the operator config.
func NewSource ¶
func NewSource() *Source
NewSource creates a new Source based on default configuration values.
func (*Source) Flags ¶
Flags returns a pflag FlagSet populated with flags based on the default configuration. If used, flags allow changing configuration values on the CLI. Once parsed these flags act as a configuration source.
func (*Source) Read ¶
func (s *Source) Read() (*OperatorConfig, error)
Read a new OperatorConfig from all available sources.