controller

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Annotation key used to indicate a pod is receiver udp traffic from a quilkin sender
	ReceiverAnnotation = "nfowler.dev/quilkin.receiver"
	// Annotation key used to indicate a pod is sending udp traffic to any listening receivers
	SenderAnnotation = "nfowler.dev/quilkin.sender"
	// The finalizer string used to cleanup and setup senders/receivers as part of the reconcile action
	Finalizer = "quilkin.nfowler.dev/finalizer"
)

Variables

View Source
var (
	// The image source that will be injected in as a sidecar to senders
	QuilkinImage = "us-docker.pkg.dev/quilkin/release/quilkin:0.1.0"
)

Functions

func HasAnnotations

func HasAnnotations(obj client.Object) bool

HasAnnotations checks whether the passed object has one of the sender or receiver annotations

func OnlyIncludeAnnotatedPredicate

func OnlyIncludeAnnotatedPredicate() predicate.Predicate

OnlyIncludeAnnotatedPredicate is a predicate that is passed to the reconciler to only watch pods with the required annotations

Types

type QuilkinAnnotationReader

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

func (*QuilkinAnnotationReader) Handle

Handle is the function that handles all webhook admission requests Currently this only acts on Create requests. Updates/Deletes are mostly handled as part of the reconciler.

func (*QuilkinAnnotationReader) InjectDecoder

func (q *QuilkinAnnotationReader) InjectDecoder(d *admission.Decoder) error

InjectDecoder injects the admission decoder into the QuilkinAnnotationReader provided

type QuilkinReconciler

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

QuilkinReconciler contains the required objects to run the Reconcile loop

func NewQuilkinReconciler

func NewQuilkinReconciler(c client.Client, l *zap.SugaredLogger, s *store.SotwStore) *QuilkinReconciler

NewQuilkinReconciler constructs a new QuilkinReconciler struct from the passed arguments

func (*QuilkinReconciler) Reconcile

Reconcile implements the reconciliation logic for all pods that are acting as either a quilkin sender/receiver

Jump to

Keyboard shortcuts

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