config

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateConfig

func GenerateConfig(f *pflag.FlagSet, configFile string) error

Types

type AppConfig

type AppConfig struct {
	Garm     GarmConfig     `koanf:"garm"`
	Operator OperatorConfig `koanf:"operator"`
}
var Config AppConfig

type GarmConfig

type GarmConfig struct {
	Server   string `koanf:"server" validate:"required,url" yaml:"server"`
	Username string `koanf:"username" validate:"required" yaml:"username"`
	Password string `koanf:"password" validate:"required" yaml:"password"`
	Init     bool   `koanf:"init" yaml:"init"`
	Email    string `koanf:"email" validate:"required_if=Init true" yaml:"email"`
}

type OperatorConfig

type OperatorConfig struct {
	MetricsBindAddress      string        `koanf:"metricsBindAddress" validate:"required,hostname_port" yaml:"metricsBindAddress"`
	HealthProbeBindAddress  string        `koanf:"healthProbeBindAddress" validate:"required,hostname_port" yaml:"healthProbeBindAddress"`
	LeaderElection          bool          `koanf:"leaderElection" yaml:"leaderElection"`
	SyncPeriod              time.Duration `koanf:"syncPeriod" validate:"required" yaml:"syncPeriod"`
	WatchNamespace          string        `koanf:"watchNamespace" yaml:"watchNamespace"`
	SyncRunnersInterval     time.Duration `koanf:"syncRunnersInterval" validate:"gte=5s,lte=5m" yaml:"syncRunnersInterval"`
	MinIdleRunnersAge       time.Duration `koanf:"minIdleRunnersAge" yaml:"minIdleRunnersAge"`
	RunnerConcurrency       int           `koanf:"runnerConcurrency" validate:"gte=1" yaml:"runnerConcurrency"`
	RepositoryConcurrency   int           `koanf:"repositoryConcurrency" validate:"gte=1" yaml:"repositoryConcurrency"`
	EnterpriseConcurrency   int           `koanf:"enterpriseConcurrency" validate:"gte=1" yaml:"enterpriseConcurrency"`
	OrganizationConcurrency int           `koanf:"organizationConcurrency" validate:"gte=1" yaml:"organizationConcurrency"`
	PoolConcurrency         int           `koanf:"poolConcurrency" validate:"gte=1" yaml:"poolConcurrency"`
	RunnerReconciliation    bool          `koanf:"runnerReconciliation" yaml:"runnerReconciliation"`
}

Jump to

Keyboard shortcuts

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