config

package
v1.0.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// WatchNamespaceEnvVar is the constant for env variable WATCH_NAMESPACE
	// which specifies the Namespace to watch.
	// An empty value means the operator is running with cluster scope.
	WatchNamespaceEnvVar = "WATCH_NAMESPACE"
	// DDAPIKeyEnvVar is the constant for the env variable DD_API_KEY which is the fallback
	// API key to use if a resource does not have it defined in its spec.
	DDAPIKeyEnvVar = "DD_API_KEY"
	// DDAppKeyEnvVar is the constant for the env variable DD_APP_KEY which is the fallback
	// App key to use if a resource does not have it defined in its spec.
	DDAppKeyEnvVar = "DD_APP_KEY"
	// DDURLEnvVar is the constant for the env variable DD_URL which is the
	// host of the Datadog intake server to send data to.
	DDURLEnvVar = "DD_URL"
)

Variables

This section is empty.

Functions

func GetWatchNamespaces

func GetWatchNamespaces() []string

GetWatchNamespaces returns the Namespaces the operator should be watching for changes.

func ManagerOptionsWithNamespaces

func ManagerOptionsWithNamespaces(logger logr.Logger, opt ctrl.Options) ctrl.Options

ManagerOptionsWithNamespaces returns an updated Options with namespaces information.

Types

type CredentialManager added in v0.6.0

type CredentialManager struct {
	// contains filtered or unexported fields
}

CredentialManager provides the credentials from the operator configuration.

func NewCredentialManager added in v0.6.0

func NewCredentialManager() *CredentialManager

NewCredentialManager returns a CredentialManager.

func (*CredentialManager) GetCredentials added in v0.6.0

func (cm *CredentialManager) GetCredentials() (Creds, error)

GetCredentials returns the API and APP keys respectively from the operator configurations. This function tries to decrypt the secrets using the secret backend if needed. It returns an error if the creds aren't configured or if the secret backend fails to decrypt.

type Creds added in v0.6.0

type Creds struct {
	APIKey string
	AppKey string
}

Creds holds the api and app keys.

Jump to

Keyboard shortcuts

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