config

package
v0.2.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigManager

type ConfigManager struct {
	// contains filtered or unexported fields
}

func GetConfigManagerInstance

func GetConfigManagerInstance() *ConfigManager

GetConfigManagerInstance returns a singleton config manager throughout the application

func (*ConfigManager) GetConfig

func (cm *ConfigManager) GetConfig() (GlobalConfig, error)

func (*ConfigManager) LoadConfig

func (cm *ConfigManager) LoadConfig(onErrorReloading func(error), configPath, configFileName, configFileType string) error

type GlobalConfig

type GlobalConfig struct {
	ClusterName           string `json:"clusterName" mapstructure:"clusterName"`
	SyncTimeIntervalMs    int    `json:"syncTimeIntervalMs" mapstructure:"syncTimeIntervalMs"`
	AutomatedSyncDisabled bool   `json:"automatedSyncDisabled" mapstructure:"automatedSyncDisabled"`
	CascadeDeletion       bool   `json:"cascadeDeletion" mapstructure:"cascadeDeletion"`
	AutoHealDisabled      bool   `json:"autoHealDisabled" mapstructure:"autoHealDisabled"`
	IncludedResources     string `json:"includedResources" mapstructure:"includedResources"`
	// RepoCredentials maps each Git Repository Path prefix to the corresponding credentials that are needed for it
	RepoCredentials         []apiv1.RepoCredential `json:"repoCredentials" mapstructure:"repoCredentials"`
	LogLevel                int                    `json:"logLevel" mapstructure:"logLevel"`
	PersistentRepoClonePath string                 `json:"persistentRepoClonePath" mapstructure:"persistentRepoClonePath"`
}

GlobalConfig is the configuration for the controllers, it is supposed to be populated from the configmap attached to the controller manager.

func CloneWithSerialization

func CloneWithSerialization(orig *GlobalConfig) (*GlobalConfig, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL