handlers

package
v0.0.0-...-67b0140 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLabelOrAnnotation

func GetLabelOrAnnotation(resource *metav1.ObjectMeta, primaryAnnotation string, secondaryAnnotation string) (string, bool)

func GetOwnerReference

func GetOwnerReference(resource *metav1.ObjectMeta) metav1.OwnerReference

Types

type AppCreationRequestHandler

type AppCreationRequestHandler struct {
	Client      client.Client
	Log         logr.Logger
	EventSender eventsender.IEvent
}

func (*AppCreationRequestHandler) Handle

func (a *AppCreationRequestHandler) Handle(ctx context.Context, pod *corev1.Pod, namespace string) error

type Decoder

type Decoder interface {
	Decode(req admission.Request, into runtime.Object) error
	DecodeRaw(rawObj runtime.RawExtension, into runtime.Object) error
}

type K8sHandler

type K8sHandler interface {
	Handle(ctx context.Context, pod *corev1.Pod, namespace string) error
}

type PodAnnotationHandler

type PodAnnotationHandler struct {
	Client client.Client
	Log    logr.Logger
}

func (*PodAnnotationHandler) IsAnnotated

func (p *PodAnnotationHandler) IsAnnotated(ctx context.Context, req *admission.Request, pod *corev1.Pod) bool

type WorkloadHandler

type WorkloadHandler struct {
	Client      client.Client
	Log         logr.Logger
	EventSender eventsender.IEvent
}

func (*WorkloadHandler) Handle

func (a *WorkloadHandler) Handle(ctx context.Context, pod *corev1.Pod, namespace string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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