controller

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Delays for requeuing each type of event
	// For example: when a new cluster is created
	// first sync of its state will be done after REQUEUE_NEW time,
	// next sync will be done in REQUEUE_IN_PROGRESS
	REQUEUE_NEW         = 20 * time.Second
	REQUEUE_UPDATE      = 20 * time.Second
	REQUEUE_IN_PROGRES  = 10 * time.Second
	REQUEUE_DELETE      = 20 * time.Second
	REQUEUE_AFTER_ERROR = 30 * time.Second
)

Variables

This section is empty.

Functions

func NewWebhook

func NewWebhook(scheme *runtime.Scheme, port int, dir, path string, log logr.Logger) wbhk.Server

NewWebhook returns a new validation webhook for InputManifest resource

Types

type InputManifestReconciler

type InputManifestReconciler struct {
	Scheme   *runtime.Scheme
	Recorder record.EventRecorder
	Logger   logr.Logger
	*usecases.Usecases
	// contains filtered or unexported fields
}

InputManifestReconciler reconciles a InputManifest object

func New

func New(kclient client.Client,
	scheme *runtime.Scheme,
	logger logr.Logger,
	recorder record.EventRecorder,
	usecase usecases.Usecases) *InputManifestReconciler

New returns a new controller for InputManifest resource

func (*InputManifestReconciler) Reconcile

func (r *InputManifestReconciler) 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.

func (*InputManifestReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type InputManifestValidator

type InputManifestValidator struct {
	Logger logr.Logger
}

InputManifestValidator validates InputManifest containing the input-manifest

func (*InputManifestValidator) ValidateCreate

ValidateCreate defines the logic when a kubernetes obj resource is created

func (*InputManifestValidator) ValidateDelete

ValidateDelete defines the logic when a kubernetes obj resource is deleted

func (*InputManifestValidator) ValidateUpdate

func (v *InputManifestValidator) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)

ValidateUpdate defines the logic when a kubernetes obj resource is updated

Jump to

Keyboard shortcuts

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