controller

package
v1.6.9 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: Apache-2.0 Imports: 8 Imported by: 26 modules, 25 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package controller provides helper methods for external controllers for Custom Task types.

Package controller provides helper methods for external controllers for Custom Task types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterCustomRunRef added in v0.43.0

func FilterCustomRunRef(apiVersion, kind string) func(interface{}) bool

FilterCustomRunRef returns a filter that can be passed to a CustomRun Informer, which filters out CustomRuns for apiVersion and kinds that a controller doesn't care about.

For example, a controller impl that wants to be notified of updates to CustomRuns which reference a Task with apiVersion "example.dev/v0" and kind "Example":

customruninformer.Get(ctx).Informer().AddEventHandler(cache.FilteringResourceEventHandler{
  FilterFunc: FilterCustomRunRef("example.dev/v0", "Example"),
  Handler:    controller.HandleAll(impl.Enqueue),
})

func FilterOwnerCustomRunRef added in v0.43.0

func FilterOwnerCustomRunRef(customRunLister listersbeta.CustomRunLister, apiVersion, kind string) func(interface{}) bool

FilterOwnerCustomRunRef returns a filter that can be passed to an Informer for any runtime object, which filters out objects that aren't controlled by a CustomRun that references a particular apiVersion and kind.

For example, a controller impl that wants to be notified of updates to TaskRuns that are controlled by a CustomRun which references a custom task with apiVersion "example.dev/v0" and kind "Example":

taskruninformer.Get(ctx).Informer().AddEventHandler(cache.FilteringResourceEventHandler{
  FilterFunc: FilterOwnerCustomRunRef("example.dev/v0", "Example"),
  Handler:    controller.HandleAll(impl.Enqueue),
})

func IsWebhookTimeout added in v1.3.0

func IsWebhookTimeout(err error) bool

IsWebhookTimeout checks if the error is due to a mutating admission webhook timeout. This function is used to determine if an error should trigger exponential backoff retry logic.

Types

This section is empty.

Jump to

Keyboard shortcuts

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