Documentation ¶
Overview ¶
Package config sets up the application configuration from env, file, etc. FIXME: golangci-lint nolint:errcheck,gocritic,gosimple,govet,revive
FIXME: golangci-lint nolint:revive
Index ¶
Constants ¶
const DefaultDistribution = distRHEL90
DefaultDistribution set the default image distribution in case miss it
const OstreeRefRHEL8 = "rhel/8/x86_64/edge"
ostree ref for supported distributions
const OstreeRefRHEL9 = "rhel/9/x86_64/edge"
Variables ¶
var DistributionsPackages = map[string][]string{ // contains filtered or unexported fields }
DistributionsPackages add packages by image
var DistributionsRefs = map[string]string{ // contains filtered or unexported fields }
DistributionsRefs set the ref to Images
var RHEL8 = []string{"ansible"}
RHEL8 contains additional list of packages to build an image to >= RHEL85
var RHEL8X = []string{"ansible-core"}
RHEL8X contains additional list of packages to build an image to = RHEL8X
var RHEL9 = []string{"ansible-core"}
RHEL90 contains additional list of packages to build an image to = RHEL90
var RequiredPackages = []string{"rhc",
"rhc-worker-playbook",
"subscription-manager",
"subscription-manager-plugin-ostree",
"insights-client"}
RequiredPackages contains minimun list of packages to build an image
Functions ¶
func GetConfigValues ¶
GetConfigValues return all configuration values that may be used for logging
func LogConfigAtStartup ¶
func LogConfigAtStartup(cfg *EdgeConfig)
LogConfigAtStartup logs specific edgeConfig fields at startup
Types ¶
type DevConfigFile ¶
type DevConfigFile struct {
Kafka clowder.KafkaConfig
}
DevConfigFile is a wrapper for local dev kafka edgeConfig
type EdgeConfig ¶
type EdgeConfig struct { Hostname string `json:"hostname,omitempty"` Auth bool `json:"auth,omitempty"` WebPort int `json:"web_port,omitempty"` MetricsPort int `json:"metrics_port,omitempty"` MetricsBaseURL string `json:"metrics_api_base_url,omitempty"` Logging *loggingConfig `json:"logging,omitempty"` LogLevel string `json:"log_level,omitempty"` Debug bool `json:"debug,omitempty"` Database *dbConfig `json:"database,omitempty"` BucketName string `json:"bucket_name,omitempty"` BucketRegion string `json:"bucket_region,omitempty"` AccessKey string `json:"-"` SecretKey string `json:"-"` AWSToken string `json:"-"` RepoTempPath string `json:"repo_temp_path,omitempty"` OpenAPIFilePath string `json:"openapi_file_path,omitempty"` ImageBuilderConfig *imageBuilderConfig `json:"image_builder,omitempty"` InventoryConfig *inventoryConfig `json:"inventory,omitempty"` PlaybookDispatcherConfig *playbookDispatcherConfig `json:"playbook_dispatcher,omitempty"` TemplatesPath string `json:"templates_path,omitempty"` EdgeAPIBaseURL string `json:"edge_api_base_url,omitempty"` EdgeCertAPIBaseURL string `json:"edge_cert_api_base_url,omitempty"` EdgeAPIServiceHost string `json:"edge_api_service_host,omitempty"` EdgeAPIServicePort int `json:"edge_api_service_port,omitempty"` UploadWorkers int `json:"upload_workers,omitempty"` KafkaConfig *clowder.KafkaConfig `json:"kafka,omitempty"` KafkaBrokers []clowder.BrokerConfig `json:"kafka_brokers,omitempty"` KafkaServers string `json:"kafka_servers,omitempty"` KafkaBroker *clowder.BrokerConfig `json:"kafka_broker,omitempty"` KafkaBrokerCaCertPath string `json:"kafka_broker_ca_cert_path,omitempty"` KafkaRequestRequiredAcks int `json:"kafka_request_required_acks,omitempty"` KafkaMessageSendMaxRetries int `json:"kafka_message_send_max_retries,omitempty"` KafkaRetryBackoffMs int `json:"kafka_retry_backoff_ms,omitempty"` KafkaTopics map[string]string `json:"kafka_topics,omitempty"` FDO *fdoConfig `json:"fdo,omitempty"` Local bool `json:"local,omitempty"` Dev bool `json:"dev,omitempty"` UnleashURL string `json:"unleash_url,omitempty"` FeatureFlagsEnvironment string `json:"featureflags_environment,omitempty"` FeatureFlagsURL string `json:"featureflags_url,omitempty"` FeatureFlagsAPIToken string `json:"featureflags_api_token,omitempty"` FeatureFlagsService string `json:"featureflags_service,omitempty"` ContentSourcesURL string `json:"content_sources_url,omitempty"` TenantTranslatorHost string `json:"tenant_translator_host,omitempty"` TenantTranslatorPort string `json:"tenant_translator_port,omitempty"` TenantTranslatorURL string `json:"tenant_translator_url,omitempty"` ImageBuilderOrgID string `json:"image_builder_org_id,omitempty"` GpgVerify string `json:"gpg_verify,omitempty"` GlitchtipDsn string `json:"glitchtip_dsn,omitempty"` HTTPClientTimeout int `json:"HTTP_client_timeout,omitempty"` TlsCAPath string `json:"Tls_CA_path,omitempty"` RepoFileUploadAttempts uint `json:"repo_file_upload_attempts"` RepoFileUploadDelay uint `json:"repo_file_upload_delay"` DeleteFilesAttempts uint `json:"delete_files_attempts"` DeleteFilesRetryDelay uint `json:"delete_files_retry_delay"` RbacBaseURL string `json:"rbac_base_url"` RbacTimeout uint `mapstructure:"rbac_timeout,omitempty"` SubscriptionServerURL string `json:"subscription_server_url"` SubscriptionBaseUrl string `json:"subscription_base_url"` }
EdgeConfig represents the runtime configuration
func CreateEdgeAPIConfig ¶
func CreateEdgeAPIConfig() (*EdgeConfig, error)
CreateEdgeAPIConfig create a new configuration for Edge API