config

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 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 AzureConfig added in v0.4.0

type AzureConfig struct {
	StorageAccount string `mapstructure:"storageAccount"`
	Container      string `mapstructure:"container"`
}

type Config

type Config struct {
	Runner     RunnerConfig     `mapstructure:"runner"`
	Controller ControllerConfig `mapstructure:"controller"`
	Datastore  DatastoreConfig  `mapstructure:"datastore"`
	Server     ServerConfig     `mapstructure:"server"`
	Hermitcrab HermitcrabConfig `mapstructure:"hermitcrab"`
}

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 {
	MainNamespace           string               `mapstructure:"mainNamespace"`
	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"`
	RunParallelism          int                  `mapstructure:"runParallelism"`
	MaxConcurrentReconciles int                  `mapstructure:"maxConcurrentReconciles"`
}

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 DatastoreConfig added in v0.4.0

type DatastoreConfig struct {
	Hostname                  string        `mapstructure:"hostname"`
	Addr                      string        `mapstructure:"addr"`
	TLS                       bool          `mapstructure:"tls"`
	CertificateSecretName     string        `mapstructure:"certificateSecretName"`
	Storage                   StorageConfig `mapstructure:"storage"`
	AuthorizedServiceAccounts []string      `mapstructure:"serviceAccounts"`
}

type GCSConfig added in v0.4.0

type GCSConfig struct {
	Bucket string `mapstructure:"bucket"`
}

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 HermitcrabConfig added in v0.4.0

type HermitcrabConfig struct {
	Enabled               bool   `mapstructure:"enabled"`
	CertificateSecretName string `mapstructure:"certificateSecretName"`
	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 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"`
	Run                        string           `mapstructure:"run"`
	Repository                 RepositoryConfig `mapstructure:"repository"`
	SSHKnownHostsConfigMapName string           `mapstructure:"sshKnownHostsConfigMapName"`
	RunnerBinaryPath           string           `mapstructure:"runnerBinaryPath"`
	RepositoryPath             string           `mapstructure:"repositoryPath"`
}

type S3Config added in v0.4.0

type S3Config struct {
	Bucket       string `mapstructure:"bucket"`
	UsePathStyle bool   `mapstructure:"usePathStyle"`
}

type ServerConfig added in v0.2.0

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

type StorageConfig added in v0.4.0

type StorageConfig struct {
	GCS   GCSConfig   `mapstructure:"gcs"`
	S3    S3Config    `mapstructure:"s3"`
	Azure AzureConfig `mapstructure:"azure"`
	Mock  bool        `mapstructure:"mock"`
}

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