config

package
v0.0.0-...-48345f6 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultExternalDNSImage        = "quay.io/external-dns-operator/external-dns:latest"
	DefaultMetricsAddr             = "127.0.0.1:8080"
	DefaultOperatorNamespace       = "external-dns-operator"
	DefaultOperandNamespace        = "external-dns"
	DefaultEnableWebhook           = true
	DefaultEnablePlatformDetection = true
	DefaultTrustedCAConfigMapName  = ""
	DefaultHealthProbeAddr         = ":9440"
	DefaultRequeuePeriodSeconds    = 5
	DefaultEnableLeaderElection    = false
)

Variables

View Source
var DefaultCertDir = filepath.Join(os.TempDir(), "k8s-webhook-server", "serving-certs")

Functions

This section is empty.

Types

type Config

type Config struct {
	// ExternalDNSImage is the ExternalDNS image for the ExternalDNS container(s) managed
	// by the operator.
	ExternalDNSImage string

	// MetricsBindAddress is the TCP address that the operator should bind to for
	// serving prometheus metrics. It can be set to "0" to disable the metrics serving.
	MetricsBindAddress string

	// OperatorNamespace is the namespace that the operator is deployed in.
	OperatorNamespace string

	// OperandNamespace is the namespace that the operator should deploy ExternalDNS container(s) in.
	OperandNamespace string

	// CertDir is the directory from where the operator loads keys and certificates.
	CertDir string

	// EnableWebhook is the flag indicating if the webhook server should be started.
	EnableWebhook bool

	// EnablePlatformDetection is the flag indicating if the operator needs to detect on which platform it runs.
	EnablePlatformDetection bool

	// IsOpenShift is the flag indicating that the operator runs in OpenShift cluster.
	IsOpenShift bool

	// PlatformStatus is the details about the underlying platform.
	PlatformStatus *configv1.PlatformStatus

	// TrustedCAConfigMapName is the name of the configmap containing CA bundle to be trusted by ExternalDNS containers.
	TrustedCAConfigMapName string

	// HealthProbeBindAddress is the TCP address that the operator should bind to for
	// serving health probes (readiness and liveness).
	HealthProbeBindAddress string

	// RequeuePeriodSeconds is the number of seconds to wait after a failed reconciliation.
	RequeuePeriodSeconds int

	// EnableLeaderElection enables the controller runtime's leader election.
	EnableLeaderElection bool

	// WebhookDisableHTTP2 disables HTTP2 for the webhook server.
	WebhookDisableHTTP2 bool
}

Config is configuration of the operator.

func (*Config) DetectPlatform

func (c *Config) DetectPlatform(kubeConfig *rest.Config) error

DetectPlatform detects the underlying platform and fills corresponding config fields

func (*Config) FillPlatformDetails

func (c *Config) FillPlatformDetails(ctx context.Context, ctrlClient ctrlclient.Client) error

FillPlatformDetails fills the config with the platform details

func (*Config) InjectTrustedCA

func (c *Config) InjectTrustedCA() bool

InjectTrustedCA returns true if the trusted CA needs to be injected into ExternalDNS containers.

func (*Config) RequeuePeriod

func (c *Config) RequeuePeriod() time.Duration

RequeuePeriod returns requeue period as time.Duration.

Jump to

Keyboard shortcuts

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