provider

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigMapMutateRequest

type ConfigMapMutateRequest struct {
	ConfigMap    *corev1.ConfigMap
	K8sClient    kubernetes.Interface
	K8sNamespace string
}

ConfigMapMutateRequest is the request object for mutating a ConfigMap

type Mutator

type Mutator interface {
	MutateConfigMap(ctx context.Context, configMapMutateRequest ConfigMapMutateRequest) error
	MutateSecret(ctx context.Context, secretMutateRequest SecretMutateRequest) error
	MutateObject(ctx context.Context, objectMutateRequest ObjectMutateRequest) error
	MutatePod(ctx context.Context, podMutateRequest PodMutateRequest) error
	// For testing purposes
	MutateContainers(ctx context.Context, containers []corev1.Container, podSpec *corev1.PodSpec, webhookConfig appCommon.Config, secretInitConfig appCommon.SecretInitConfig, k8sClient kubernetes.Interface, registry registry.ImageRegistry) (bool, error)
}

Mutator is the interface that must be implemented by a mutator

type ObjectMutateRequest

type ObjectMutateRequest struct {
	Object       *unstructured.Unstructured
	K8sClient    kubernetes.Interface
	K8sNamespace string
}

ObjectMutateRequest is the request object for mutating an Object

type PodMutateRequest

type PodMutateRequest struct {
	Pod              *corev1.Pod
	WebhookConfig    appCommon.Config
	SecretInitConfig appCommon.SecretInitConfig
	K8sClient        kubernetes.Interface
	Registry         registry.ImageRegistry
	DryRun           bool
}

PodMutateRequest is the request object for mutating a Pod

type Provider

type Provider interface {
	NewMutator(obj metav1.Object, arNamespace string, logger *slog.Logger) (*Mutator, error)
}

Provider is the interface that must be implemented by a provider

type SecretMutateRequest

type SecretMutateRequest struct {
	Secret       *corev1.Secret
	K8sClient    kubernetes.Interface
	K8sNamespace string
}

SecretMutateRequest is the request object for mutating a Secret

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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