controllers

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PodCreatedCondition     = "PodCreated"
	TestCompletedCondition  = "TestCompleted"
	TestStartingEvent       = "PodCreated"
	TestPassedEvent         = "TestPassed"
	TestFailedEvent         = "TestFailed"
	TestErrorEvent          = "ErrorCreatingPod"
	TestControllerFinalizer = konfirm.GroupName + "/test-controller"
)
View Source
const (
	TestRunControllerFinalizer = konfirm.GroupName + "/testrun-controller"
	TestRunStartedCondition    = "RunStarted"
	TestRunCompletedCondition  = "RunCompleted"
)
View Source
const (
	TestSuiteControllerFinalizer       = konfirm.GroupName + "/testsuite-controller"
	TestSuiteScheduleAnnotation        = konfirm.GroupName + "/active-schedule"
	TestSuiteLastHelmReleaseAnnotation = konfirm.GroupName + "/last-helm-release"
	TestSuiteHelmTriggerLabel          = konfirm.GroupName + "/helm-trigger"
	TestSuiteNeedsRunCondition         = "NeedsRun"
	TestSuiteRunStartedCondition       = "RunStarted"
	TestSuiteHasScheduleCondition      = "HasSchedule"
	TestSuiteErrorCondition            = "HasError"
)
View Source
const (
	HelmSecretType = "helm.sh/release.v1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EnqueueForHelmTrigger

type EnqueueForHelmTrigger struct {
	client.Client
}

EnqueueForHelmTrigger is a handler.Handler implementation for enqueuing TestSuites with a Helm trigger when a matching Helm Release is deployed. It only responds to Create and Update events.

func (*EnqueueForHelmTrigger) Create

func (*EnqueueForHelmTrigger) Delete

func (*EnqueueForHelmTrigger) Generic

func (*EnqueueForHelmTrigger) Update

type ErrorList

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

func (*ErrorList) Append

func (e *ErrorList) Append(err error)

func (*ErrorList) Error

func (e *ErrorList) Error() error

func (*ErrorList) HasError

func (e *ErrorList) HasError() bool

type HelmReleaseMeta

type HelmReleaseMeta struct {
	types.NamespacedName
	Version       int
	VersionString string
	Status        string
}

HelmReleaseMeta describes a Helm Release.

func ParseHelmReleaseSecret

func ParseHelmReleaseSecret(secret *v1.Secret) (release *HelmReleaseMeta, ok bool)

ParseHelmReleaseSecret generates HelmReleaseMeta based on the provided v1.Secret. If the provided Secret does not appear to be a valid Helm release, the return boolean will be false; otherwise it will be true.

func (*HelmReleaseMeta) LabelValue

func (hrm *HelmReleaseMeta) LabelValue() string

type IsHelmRelease

type IsHelmRelease struct{}

IsHelmRelease is a predicate.Predicate implementation that matches only Helm Release Secrets.

func (IsHelmRelease) Create

func (h IsHelmRelease) Create(e event.CreateEvent) bool

func (IsHelmRelease) Delete

func (h IsHelmRelease) Delete(e event.DeleteEvent) bool

func (IsHelmRelease) Generic

func (h IsHelmRelease) Generic(e event.GenericEvent) bool

func (IsHelmRelease) Update

func (h IsHelmRelease) Update(e event.UpdateEvent) bool

type TestReconciler

type TestReconciler struct {
	client.Client
	Scheme          *runtime.Scheme
	Recorder        record.EventRecorder
	ErrRequeueDelay time.Duration
}

TestReconciler reconciles a Test object

func (*TestReconciler) Reconcile

func (r *TestReconciler) Reconcile(ctx context.Context, req ctrl.Request) (res ctrl.Result, err error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.11.2/pkg/reconcile

func (*TestReconciler) SetupWithManager

func (r *TestReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type TestRunReconciler

type TestRunReconciler struct {
	client.Client
	Scheme          *runtime.Scheme
	Recorder        record.EventRecorder
	ErrRequeueDelay time.Duration
}

TestRunReconciler reconciles a TestRun object

func (*TestRunReconciler) Reconcile

func (r *TestRunReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.11.2/pkg/reconcile

func (*TestRunReconciler) SetupWithManager

func (r *TestRunReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type TestSuiteReconciler

type TestSuiteReconciler struct {
	client.Client
	Scheme          *runtime.Scheme
	Recorder        record.EventRecorder
	ErrRequeueDelay time.Duration
	CronParser      func(string) (cron.Schedule, error)
	Clock           clock.PassiveClock
}

TestSuiteReconciler reconciles a TestSuite object

func (*TestSuiteReconciler) Reconcile

func (r *TestSuiteReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.11.2/pkg/reconcile

func (*TestSuiteReconciler) SetupWithManager

func (r *TestSuiteReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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