config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 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 {
	LoggerConfig                 LoggerConfig                 `yaml:"logger"`
	Metrics                      MetricsConfig                `yaml:"metrics"`
	Pprof                        PprofConfig                  `yaml:"pprof"`
	Health                       HealthConfig                 `yaml:"health"`
	LeaderElectionConfig         LeaderElectionConfig         `yaml:"leader_election"`
	WorkersCount                 uint32                       `yaml:"worker_count"`
	PrePullImageReconcilerConfig PrePullImageReconcilerConfig `yaml:"pre_pull_image_reconciller"`
}

func ParseConfig

func ParseConfig(path string) (*Config, error)

type ContainerConfig

type ContainerConfig struct {
	Name      string             `yaml:"name,omitempty"`
	Image     string             `yaml:"image,omitempty"`
	Command   []string           `yaml:"command"`
	Args      []string           `yaml:"args"`
	Resources ContainerResources `yaml:"resources"`
}

type ContainerResources

type ContainerResources struct {
	Limits   Resources `yaml:"limits"`
	Requests Resources `yaml:"requests"`
}

type HealthConfig

type HealthConfig struct {
	Port          int    `yaml:"port"`
	LivenessPath  string `yaml:"liveness_path"`
	ReadinessPath string `yaml:"readiness_path"`
}

type LeaderElectionConfig

type LeaderElectionConfig struct {
	InstanceID string `yaml:"instance_id"`
	Name       string `yaml:"lock_name"`
	Namespace  string `yaml:"lock_namespace"`
}

type LoggerConfig

type LoggerConfig struct {
	System string `yaml:"system"`
	Level  string `yaml:"level"`
}

type MetricsConfig

type MetricsConfig struct {
	Path string `yaml:"path"`
	Port int    `yaml:"port"`
}

type PprofConfig

type PprofConfig struct {
	EnableServerPprof bool `yaml:"enable"`
	Port              int  `yaml:"port"`
}

type PrePullImageReconcilerConfig

type PrePullImageReconcilerConfig struct {
	MainContainer        ContainerConfig `yaml:"main_container"`
	PrePullContainer     ContainerConfig `yaml:"pre_pull_container"`
	ImagePullSecretNames []string        `yaml:"image_pull_secret_names"`
}

func (*PrePullImageReconcilerConfig) ToControllerConfig

type Resources

type Resources map[string]string

func (Resources) ToResourcesList

func (r Resources) ToResourcesList() (corev1.ResourceList, error)

Jump to

Keyboard shortcuts

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