k8s

package
v1.0.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrLoadingConfig           = errors.New("error loading kube config")
	ErrCrossNamespaceSecretRef = errors.New("cross-namespace secret reference is not allowed")
)

Functions

This section is empty.

Types

type SecretController

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

SecretController watches secrets for updates and updates the configuration with the loaded data.

func NewSecretController

func NewSecretController(cfg *configv1.Config) *SecretController

NewSecretController creates a new k8s Controller that loads secrets from Kubernetes and updates the configuration with the loaded data.

func (*SecretController) Name

func (s *SecretController) Name() string

Name implements run.PreRunner

func (*SecretController) PreRun

func (s *SecretController) PreRun() error

PreRun saves the original configuration in PreRun phase because the configuration is loaded from the file in the Config Validate phase.

func (*SecretController) Reconcile

func (s *SecretController) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*SecretController) ServeContext

func (s *SecretController) ServeContext(ctx context.Context) error

ServeContext starts the controller manager and watches secrets for updates.

Jump to

Keyboard shortcuts

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