eventlistener

package
v0.0.0-...-af2e4d2 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2020 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ControllerName defines the name for EventListener Controller
	ControllerName = "EventListener"

	// GeneratedResourcePrefix is the name prefix for resources generated in the
	// EventListener reconciler
	GeneratedResourcePrefix = "el"
)

Variables

View Source
var (

	// ElPort defines the port for the EventListener to listen on
	ElPort = flag.Int("el-port", 8080,
		"The container port for the EventListener to listen on.")
	// PeriodSeconds defines Period Seconds for the EventListener Liveness and Readiness Probes
	PeriodSeconds = flag.Int("period-seconds", 10,
		"The Period Seconds for the EventListener Liveness and Readiness Probes.")
	// FailureThreshold defines the Failure Threshold for the EventListener Liveness and Readiness Probes
	FailureThreshold = flag.Int("failure-threshold", 3,
		"The Failure Threshold for the EventListener Liveness and Readiness Probes.")
	// StaticResourceLabels is a map with all the labels that should be on
	// all resources generated by the EventListener
	StaticResourceLabels = map[string]string{
		"app.kubernetes.io/managed-by": "EventListener",
		"app.kubernetes.io/part-of":    "Triggers",
	}
)

Functions

func GenerateResourceLabels

func GenerateResourceLabels(eventListenerName string) map[string]string

GenerateResourceLabels generates the labels to be used on all generated resources.

func NewController

func NewController(ctx context.Context, cmw configmap.Watcher) *controller.Impl

NewController creates a new instance of an EventListener controller.

Types

type Reconciler

type Reconciler struct {

	// KubeClientSet allows us to talk to the k8s for core APIs
	KubeClientSet kubernetes.Interface

	// TriggersClientSet allows us to configure triggers objects
	TriggersClientSet triggersclientset.Interface
	// contains filtered or unexported fields
}

Reconciler implements controller.Reconciler for Configuration resources.

func (*Reconciler) FinalizeKind

FinalizeKind cleans up associated logging config maps when an EventListener is deleted

func (*Reconciler) ReconcileKind

func (r *Reconciler) ReconcileKind(ctx context.Context, el *v1alpha1.EventListener) pkgreconciler.Event

ReconcileKind compares the actual state with the desired, and attempts to converge the two.

Jump to

Keyboard shortcuts

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