config

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Runner     RunnerConfig     `mapstructure:"runner"`
	Controller ControllerConfig `mapstructure:"controller"`
	Redis      Redis            `mapstructure:"redis"`
	Server     ServerConfig     `mapstructure:"server"`
}

func TestConfig added in v0.2.0

func TestConfig() *Config

func (*Config) Load

func (c *Config) Load(flags *pflag.FlagSet) error

type ControllerConfig

type ControllerConfig struct {
	Namespaces             []string             `mapstructure:"namespaces"`
	Timers                 ControllerTimers     `mapstructure:"timers"`
	TerraformMaxRetries    int                  `mapstructure:"terraformMaxRetries"`
	Types                  []string             `mapstructure:"types"`
	LeaderElection         LeaderElectionConfig `mapstructure:"leaderElection"`
	MetricsBindAddress     string               `mapstructure:"metricsBindAddress"`
	HealthProbeBindAddress string               `mapstructure:"healthProbeBindAddress"`
	KubernetesWebhookPort  int                  `mapstructure:"kubernetesWebhookPort"`
	GithubConfig           GithubConfig         `mapstructure:"githubConfig"`
	GitlabConfig           GitlabConfig         `mapstructure:"gitlabConfig"`
}

type ControllerTimers

type ControllerTimers struct {
	DriftDetection     time.Duration `mapstructure:"driftDetection"`
	OnError            time.Duration `mapstructure:"onError"`
	WaitAction         time.Duration `mapstructure:"waitAction"`
	FailureGracePeriod time.Duration `mapstructure:"failureGracePeriod"`
}

type GithubConfig added in v0.2.0

type GithubConfig struct {
	AppId          int64  `mapstructure:"appId"`
	InstallationId int64  `mapstructure:"installationId"`
	PrivateKey     string `mapstructure:"privateKey"`
	APIToken       string `mapstructure:"apiToken"`
}

type GitlabConfig added in v0.2.0

type GitlabConfig struct {
	APIToken string `mapstructure:"apiToken"`
	URL      string `mapstructure:"url"`
}

type Layer

type Layer struct {
	Name      string `mapstructure:"name"`
	Namespace string `mapstructure:"namespace"`
}

type LeaderElectionConfig

type LeaderElectionConfig struct {
	Enabled bool   `mapstructure:"enabled"`
	ID      string `mapstructure:"id"`
}

type Redis

type Redis struct {
	Hostname   string `mapstructure:"hostname"`
	ServerPort int    `mapstructure:"serverPort"`
	Password   string `mapstructure:"password"`
	Database   int    `mapstructure:"database"`
}

type RepositoryConfig

type RepositoryConfig struct {
	SSHPrivateKey string `mapstructure:"sshPrivateKey"`
	Username      string `mapstructure:"username"`
	Password      string `mapstructure:"password"`
}

type RunnerConfig

type RunnerConfig struct {
	Action                     string           `mapstructure:"action"`
	Layer                      Layer            `mapstructure:"layer"`
	Repository                 RepositoryConfig `mapstructure:"repository"`
	SSHKnownHostsConfigMapName string           `mapstructure:"sshKnownHostsConfigMapName"`
}

type ServerConfig added in v0.2.0

type ServerConfig struct {
	Addr    string        `mapstructure:"addr"`
	Webhook WebhookConfig `mapstructure:"webhook"`
}

type WebhookConfig

type WebhookConfig struct {
	Github WebhookGithubConfig `mapstructure:"github"`
	Gitlab WebhookGitlabConfig `mapstructure:"gitlab"`
}

type WebhookGithubConfig

type WebhookGithubConfig struct {
	Secret string `mapstructure:"secret"`
}

type WebhookGitlabConfig

type WebhookGitlabConfig struct {
	Secret string `mapstructure:"secret"`
}

Jump to

Keyboard shortcuts

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