Documentation
¶
Index ¶
Constants ¶
View Source
const ( RestoreS3EndpointEnvName = "RESTORE_S3ENDPOINT" RestoreS3AccessKeyIDEnvName = "RESTORE_ACCESSKEYID" RestoreS3SecretAccessKeyEnvName = "RESTORE_SECRETACCESSKEY" ResticRepositoryEnvName = "RESTIC_REPOSITORY" ResticPasswordEnvName = "RESTIC_PASSWORD" ResticOptionsEnvName = "RESTIC_OPTIONS" AwsAccessKeyIDEnvName = "AWS_ACCESS_KEY_ID" AwsSecretAccessKeyEnvName = "AWS_SECRET_ACCESS_KEY" AzureAccountEnvName = "AZURE_ACCOUNT_NAME" AzureAccountKeyEnvName = "AZURE_ACCOUNT_KEY" GcsProjectIDEnvName = "GOOGLE_PROJECT_ID" GcsAccessTokenEnvName = "GOOGLE_ACCESS_TOKEN" B2AccountIDEnvName = "B2_ACCOUNT_ID" B2AccountKeyEnvName = "B2_ACCOUNT_KEY" RestUserEnvName = "USER" RestPasswordEnvName = "PASSWORD" )
Variables ¶
View Source
var (
Config = NewDefaultConfig()
)
Functions ¶
func GetGlobalRepository ¶
func GetGlobalRepository() string
GetGlobalRepository is a shortcut for building an S3 string "s3:<endpoint>/<bucket>"
Types ¶
type Configuration ¶
type Configuration struct {
MountPath string `koanf:"datapath"`
BackupAnnotation string `koanf:"annotation"`
BackupCommandAnnotation string `koanf:"backupcommandannotation"`
FileExtensionAnnotation string `koanf:"fileextensionannotation"`
ServiceAccount string `koanf:"podexecaccountname"`
BackupCheckSchedule string `koanf:"checkschedule"`
GlobalAccessKey string `koanf:"globalaccesskeyid"`
GlobalKeepJobs int `koanf:"globalkeepjobs"`
GlobalFailedJobsHistoryLimit int `koanf:"global-failed-jobs-history-limit"`
GlobalSuccessfulJobsHistoryLimit int `koanf:"global-successful-jobs-history-limit"`
GlobalRepoPassword string `koanf:"globalrepopassword"`
GlobalRestoreS3AccessKey string `koanf:"globalrestores3accesskeyid"`
GlobalRestoreS3Bucket string `koanf:"globalrestores3bucket"`
GlobalRestoreS3Endpoint string `koanf:"globalrestores3endpoint"`
GlobalRestoreS3SecretAccessKey string `koanf:"globalrestores3secretaccesskey"`
GlobalS3Bucket string `koanf:"globals3bucket"`
GlobalS3Endpoint string `koanf:"globals3endpoint"`
GlobalSecretAccessKey string `koanf:"globalsecretaccesskey"`
GlobalStatsURL string `koanf:"globalstatsurl"`
GlobalConcurrentArchiveJobsLimit int `koanf:"global-concurrent-archive-jobs-limit"`
GlobalConcurrentBackupJobsLimit int `koanf:"global-concurrent-backup-jobs-limit"`
GlobalConcurrentCheckJobsLimit int `koanf:"global-concurrent-check-jobs-limit"`
GlobalConcurrentPruneJobsLimit int `koanf:"global-concurrent-prune-jobs-limit"`
GlobalConcurrentRestoreJobsLimit int `koanf:"global-concurrent-restore-jobs-limit"`
GlobalCPUResourceRequest string `koanf:"global-cpu-request"`
GlobalCPUResourceLimit string `koanf:"global-cpu-limit"`
GlobalMemoryResourceRequest string `koanf:"global-memory-request"`
GlobalMemoryResourceLimit string `koanf:"global-memory-limit"`
BackupImage string `koanf:"image"`
MetricsBindAddress string `koanf:"metrics-bindaddress"`
PodExecRoleName string `koanf:"podexecrolename"`
PodFilter string `koanf:"podfilter"`
PromURL string `koanf:"promurl"`
RestartPolicy string `koanf:"restartpolicy"`
// Enabling this will ensure there is only one active controller manager.
EnableLeaderElection bool `koanf:"enable-leader-election"`
OperatorNamespace string `koanf:"operator-namespace"`
// Allows to pass options to restic, see https://restic.readthedocs.io/en/stable/manual_rest.html?highlight=--option#usage-help
// Format: `key=value,key2=value2`
ResticOptions string `koanf:"restic-options"`
}
Configuration holds a strongly-typed tree of the configuration
func NewDefaultConfig ¶
func NewDefaultConfig() *Configuration
NewDefaultConfig retrieves the config with sane defaults
func (Configuration) GetGlobalDefaultResources ¶
func (c Configuration) GetGlobalDefaultResources() (res corev1.ResourceRequirements)
func (Configuration) GetGlobalFailedJobsHistoryLimit ¶
func (c Configuration) GetGlobalFailedJobsHistoryLimit() int
GetGlobalFailedJobsHistoryLimit returns the global failed jobs history limit. Returns global KeepJobs if unspecified.
func (Configuration) GetGlobalSuccessfulJobsHistoryLimit ¶
func (c Configuration) GetGlobalSuccessfulJobsHistoryLimit() int
GetGlobalSuccessfulJobsHistoryLimit returns the global successful jobs history limit. Returns global KeepJobs if unspecified.
func (Configuration) ValidateSyntax ¶
func (c Configuration) ValidateSyntax() error
Click to show internal directories.
Click to hide internal directories.