Help us shape the future of Go! Take the 2026 Go Developer Survey

config

package
v1.15.1 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2026 License: AGPL-3.0 Imports: 12 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// StageDevelopment is the name for the development-stage
	StageDevelopment = "development"
	// StageProduction is the name for the production-stage
	StageProduction = "production"
	// StageEnvironmentVariable is the name of the environment-variable containing the configured stage
	StageEnvironmentVariable = "STAGE"

	// BaseRequeueTimeInSecondsEnvironmentVariable is the name of the environment variable containing the configured initial requeueTime
	BaseRequeueTimeInSecondsEnvironmentVariable = "BASE_REQUEUE_TIME_IN_SECONDS"
	// MaxRequeueTimeInSecondsEnvironmentVariable is the name of the environment variable containing the configured
	// maximum requeueTime, i.e. the cap for the exponential reconciliation backoff.
	MaxRequeueTimeInSecondsEnvironmentVariable = "MAX_REQUEUE_TIME_IN_SECONDS"
	// ChartCacheSizeEnvironmentVariable is the name of the environment variable containing the configured chart cache size.
	ChartCacheSizeEnvironmentVariable = "CHART_CACHE_SIZE"
)

Variables

View Source
var (
	Stage = StageProduction
)

Functions

This section is empty.

Types

type EndpointSchema added in v0.1.0

type EndpointSchema string
const EndpointSchemaOCI EndpointSchema = "oci"

type HelmRepositoryData

type HelmRepositoryData struct {
	// Endpoint contains the Helm registry endpoint URL.
	Endpoint string `json:"endpoint" yaml:"endpoint"`
	// Schema describes the way how clients communicate with the Helm registry endpoint.
	Schema EndpointSchema `json:"schema" yaml:"schema"`
	// PlainHttp indicates that the repository endpoint should be accessed using plain http
	PlainHttp bool `json:"plainHttp,omitempty" yaml:"plainHttp,omitempty"`
	// InsecureTls allows invalid or selfsigned certificates to be used. This option may be overridden by PlainHttp which forces HTTP traffic.
	InsecureTLS bool `json:"insecureTls" yaml:"insecureTls"`
}

HelmRepositoryData contains all necessary data for the helm repository.

func GetHelmRepositoryData

func GetHelmRepositoryData(ctx context.Context, configMapClient configMapInterface) (*HelmRepositoryData, error)

GetHelmRepositoryData reads the repository data either from file or from a secret in the cluster.

func NewHelmRepoDataFromCluster added in v0.1.0

func NewHelmRepoDataFromCluster(ctx context.Context, configMapClient configMapInterface) (*HelmRepositoryData, error)

NewHelmRepoDataFromCluster reads the repo data ConfigMap, validates and returns it.

func NewHelmRepoDataFromFile added in v0.1.0

func NewHelmRepoDataFromFile(filepath string) (*HelmRepositoryData, error)

func (*HelmRepositoryData) URL added in v0.1.1

func (hrd *HelmRepositoryData) URL() string

URL returns the full URL Helm repository endpoint including schema.

type OperatorConfig

type OperatorConfig struct {
	// Namespace specifies the namespace that the operator is deployed to.
	Namespace string `json:"namespace"`
	// Version contains the current version of the operator
	Version *semver.Version `json:"version"`
	// HelmRepositoryData contains all necessary data for the helm repository.
	HelmRepositoryData     *HelmRepositoryData `json:"helm_repository"`
	HelmClientTimeoutMins  time.Duration
	HealthSyncIntervalMins time.Duration
	// RequeueTime is the base delay (floor) for the exponential reconciliation backoff.
	RequeueTime time.Duration
	// MaxRequeueTime is the cap for the exponential reconciliation backoff.
	MaxRequeueTime time.Duration
	// ChartCacheSize is the maximum number of chart:version entries kept in the in-memory chart cache.
	ChartCacheSize int
}

OperatorConfig contains all configurable values for the component operator.

func NewOperatorConfig

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

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

Jump to

Keyboard shortcuts

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