config

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StageDevelopment         = "development"
	StageProduction          = "production"
	StageEnvironmentVariable = "STAGE"
)
View Source
const (
	// OperatorAdditionalImagesConfigmapName contains the configmap name which consists of auxiliary yet necessary container images.
	OperatorAdditionalImagesConfigmapName = "k8s-dogu-operator-additional-images"
	// ChownInitImageConfigmapNameKey contains the key to retrieve the chown init container image from the OperatorAdditionalImagesConfigmapName configmap.
	ChownInitImageConfigmapNameKey = "chownInitImage"
)

Variables

Functions

This section is empty.

Types

type DockerRegistryData

type DockerRegistryData struct {
	Username string `json:"username"`
	Password string `json:"password"`
	Email    string `json:"email"`
	Auth     string `json:"auth"`
}

DockerRegistryData contains all necessary data for the Docker registry.

type DockerRegistrySecretData

type DockerRegistrySecretData struct {
	Auths map[string]DockerRegistryData `json:"auths"`
}

DockerRegistrySecretData contains all registry login information from a Docker-JSON-config file.

type DoguRegistryData

type DoguRegistryData struct {
	Endpoint  string `json:"endpoint"`
	Username  string `json:"username"`
	Password  string `json:"password"`
	URLSchema string `json:"urlschema"`
}

DoguRegistryData contains all necessary data for the dogu registry.

type OperatorConfig

type OperatorConfig struct {
	// Namespace specifies the namespace that the operator is deployed to.
	Namespace string `json:"namespace"`
	// DoguRegistry contains all necessary data for the dogu registry.
	DoguRegistry DoguRegistryData `json:"dogu_registry"`
	// DockerRegistry contains all necessary data for the Docker registry.
	DockerRegistry DockerRegistryData `json:"docker_registry"`
	// Version contains the current version of the operator
	Version *core.Version `json:"version"`
}

OperatorConfig contains all configurable values for the dogu operator.

func NewOperatorConfig

func NewOperatorConfig(version string) (*OperatorConfig, error)

NewOperatorConfig creates a new operator config by reading values from the environment variables

func (*OperatorConfig) GetRemoteConfiguration added in v0.9.0

func (o *OperatorConfig) GetRemoteConfiguration() *core.Remote

GetRemoteConfiguration creates a remote configuration with the configured values.

func (*OperatorConfig) GetRemoteCredentials added in v0.9.0

func (o *OperatorConfig) GetRemoteCredentials() *core.Credentials

GetRemoteCredentials creates a remote credential pair with the configured values.

Jump to

Keyboard shortcuts

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