Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Logger logger.Config KubeconfigPath string `envconfig:"optional"` // TmpDir defines temporary directory path where addons .tgz files will be extracted TmpDir string Port int `default:"8070"` StatusPort int `default:"8071"` MetricsPort int `default:"8072"` Storage []storage.Config `valid:"required"` HelmDriver string `default:"secrets"` }
Config provide helm broker configuration Supported tags:
- json: github.com/ghodss/yaml
- envconfig: github.com/vrischmann/envconfig
- default: github.com/mcuadros/go-defaults
- valid github.com/asaskevich/govalidator
Example of valid tag: `valid:"alphanum,required"` Combining many tags: tags have to be separated by WHITESPACE: `json:"port" default:"8080" valid:"required"`
type ControllerConfig ¶
type ControllerConfig struct { TmpDir string Logger logger.Config KubeconfigPath string `envconfig:"optional"` Namespace string ServiceName string StatusPort int `default:"8081"` ClusterServiceBrokerName string Storage []storage.Config `valid:"required"` DevelopMode bool UploadServiceURL string `default:"http://rafter-upload-service.kyma-system.svc.cluster.local:3000"` DocumentationEnabled bool }
ControllerConfig provide helm broker configuration Supported tags:
- json: github.com/ghodss/yaml
- envconfig: github.com/vrischmann/envconfig
- default: github.com/mcuadros/go-defaults
- valid github.com/asaskevich/govalidator
Example of valid tag: `valid:"alphanum,required"` Combining many tags: tags have to be separated by WHITESPACE: `json:"port" default:"8080" valid:"required"`
func LoadControllerConfig ¶
func LoadControllerConfig(verbose bool) (*ControllerConfig, error)
LoadControllerConfig method has following strategy: 1. Check env variable 'APP_CONFIG_FILE_NAME', if exists load configuration from specified file 2. Read configuration from environment variables (will override configuration from file) 3. Apply defaults 4. Validate