v1

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: Apache-2.0 Imports: 21 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromDaemonSetHandlerToHandler

func FromDaemonSetHandlerToHandler(sync DaemonSetHandler) generic.Handler

func FromDeploymentHandlerToHandler

func FromDeploymentHandlerToHandler(sync DeploymentHandler) generic.Handler

func FromStatefulSetHandlerToHandler

func FromStatefulSetHandlerToHandler(sync StatefulSetHandler) generic.Handler

func RegisterDaemonSetGeneratingHandler

func RegisterDaemonSetGeneratingHandler(ctx context.Context, controller DaemonSetController, apply apply.Apply,
	condition condition.Cond, name string, handler DaemonSetGeneratingHandler, opts *generic.GeneratingHandlerOptions)

RegisterDaemonSetGeneratingHandler configures a DaemonSetController to execute a DaemonSetGeneratingHandler for every events observed, passing the returned objects to the provided apply.Apply. If a non-empty condition is provided, it will be updated in the status conditions for every handler execution

func RegisterDaemonSetStatusHandler

func RegisterDaemonSetStatusHandler(ctx context.Context, controller DaemonSetController, condition condition.Cond, name string, handler DaemonSetStatusHandler)

RegisterDaemonSetStatusHandler configures a DaemonSetController to execute a DaemonSetStatusHandler for every events observed. If a non-empty condition is provided, it will be updated in the status conditions for every handler execution

func RegisterDeploymentGeneratingHandler

func RegisterDeploymentGeneratingHandler(ctx context.Context, controller DeploymentController, apply apply.Apply,
	condition condition.Cond, name string, handler DeploymentGeneratingHandler, opts *generic.GeneratingHandlerOptions)

RegisterDeploymentGeneratingHandler configures a DeploymentController to execute a DeploymentGeneratingHandler for every events observed, passing the returned objects to the provided apply.Apply. If a non-empty condition is provided, it will be updated in the status conditions for every handler execution

func RegisterDeploymentStatusHandler

func RegisterDeploymentStatusHandler(ctx context.Context, controller DeploymentController, condition condition.Cond, name string, handler DeploymentStatusHandler)

RegisterDeploymentStatusHandler configures a DeploymentController to execute a DeploymentStatusHandler for every events observed. If a non-empty condition is provided, it will be updated in the status conditions for every handler execution

func RegisterStatefulSetGeneratingHandler

func RegisterStatefulSetGeneratingHandler(ctx context.Context, controller StatefulSetController, apply apply.Apply,
	condition condition.Cond, name string, handler StatefulSetGeneratingHandler, opts *generic.GeneratingHandlerOptions)

RegisterStatefulSetGeneratingHandler configures a StatefulSetController to execute a StatefulSetGeneratingHandler for every events observed, passing the returned objects to the provided apply.Apply. If a non-empty condition is provided, it will be updated in the status conditions for every handler execution

func RegisterStatefulSetStatusHandler

func RegisterStatefulSetStatusHandler(ctx context.Context, controller StatefulSetController, condition condition.Cond, name string, handler StatefulSetStatusHandler)

RegisterStatefulSetStatusHandler configures a StatefulSetController to execute a StatefulSetStatusHandler for every events observed. If a non-empty condition is provided, it will be updated in the status conditions for every handler execution

func UpdateDaemonSetDeepCopyOnChange

func UpdateDaemonSetDeepCopyOnChange(client DaemonSetClient, obj *v1.DaemonSet, handler func(obj *v1.DaemonSet) (*v1.DaemonSet, error)) (*v1.DaemonSet, error)

func UpdateDeploymentDeepCopyOnChange

func UpdateDeploymentDeepCopyOnChange(client DeploymentClient, obj *v1.Deployment, handler func(obj *v1.Deployment) (*v1.Deployment, error)) (*v1.Deployment, error)

func UpdateStatefulSetDeepCopyOnChange

func UpdateStatefulSetDeepCopyOnChange(client StatefulSetClient, obj *v1.StatefulSet, handler func(obj *v1.StatefulSet) (*v1.StatefulSet, error)) (*v1.StatefulSet, error)

Types

type DaemonSetCache

type DaemonSetCache interface {
	Get(namespace, name string) (*v1.DaemonSet, error)
	List(namespace string, selector labels.Selector) ([]*v1.DaemonSet, error)

	AddIndexer(indexName string, indexer DaemonSetIndexer)
	GetByIndex(indexName, key string) ([]*v1.DaemonSet, error)
}

type DaemonSetClient

type DaemonSetClient interface {
	Create(*v1.DaemonSet) (*v1.DaemonSet, error)
	Update(*v1.DaemonSet) (*v1.DaemonSet, error)
	UpdateStatus(*v1.DaemonSet) (*v1.DaemonSet, error)
	Delete(namespace, name string, options *metav1.DeleteOptions) error
	Get(namespace, name string, options metav1.GetOptions) (*v1.DaemonSet, error)
	List(namespace string, opts metav1.ListOptions) (*v1.DaemonSetList, error)
	Watch(namespace string, opts metav1.ListOptions) (watch.Interface, error)
	Patch(namespace, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.DaemonSet, err error)
}

type DaemonSetController

type DaemonSetController interface {
	generic.ControllerMeta
	DaemonSetClient

	OnChange(ctx context.Context, name string, sync DaemonSetHandler)
	OnRemove(ctx context.Context, name string, sync DaemonSetHandler)
	Enqueue(namespace, name string)
	EnqueueAfter(namespace, name string, duration time.Duration)

	Cache() DaemonSetCache
}

func NewDaemonSetController

func NewDaemonSetController(gvk schema.GroupVersionKind, resource string, namespaced bool, controller controller.SharedControllerFactory) DaemonSetController

type DaemonSetGeneratingHandler

type DaemonSetGeneratingHandler func(obj *v1.DaemonSet, status v1.DaemonSetStatus) ([]runtime.Object, v1.DaemonSetStatus, error)

DaemonSetGeneratingHandler is the top-level handler that is executed for every DaemonSet event. It extends DaemonSetStatusHandler by a returning a slice of child objects to be passed to apply.Apply

type DaemonSetHandler

type DaemonSetHandler func(string, *v1.DaemonSet) (*v1.DaemonSet, error)

type DaemonSetIndexer

type DaemonSetIndexer func(obj *v1.DaemonSet) ([]string, error)

type DaemonSetStatusHandler

type DaemonSetStatusHandler func(obj *v1.DaemonSet, status v1.DaemonSetStatus) (v1.DaemonSetStatus, error)

DaemonSetStatusHandler is executed for every added or modified DaemonSet. Should return the new status to be updated

type DeploymentCache

type DeploymentCache interface {
	Get(namespace, name string) (*v1.Deployment, error)
	List(namespace string, selector labels.Selector) ([]*v1.Deployment, error)

	AddIndexer(indexName string, indexer DeploymentIndexer)
	GetByIndex(indexName, key string) ([]*v1.Deployment, error)
}

type DeploymentClient

type DeploymentClient interface {
	Create(*v1.Deployment) (*v1.Deployment, error)
	Update(*v1.Deployment) (*v1.Deployment, error)
	UpdateStatus(*v1.Deployment) (*v1.Deployment, error)
	Delete(namespace, name string, options *metav1.DeleteOptions) error
	Get(namespace, name string, options metav1.GetOptions) (*v1.Deployment, error)
	List(namespace string, opts metav1.ListOptions) (*v1.DeploymentList, error)
	Watch(namespace string, opts metav1.ListOptions) (watch.Interface, error)
	Patch(namespace, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Deployment, err error)
}

type DeploymentController

type DeploymentController interface {
	generic.ControllerMeta
	DeploymentClient

	OnChange(ctx context.Context, name string, sync DeploymentHandler)
	OnRemove(ctx context.Context, name string, sync DeploymentHandler)
	Enqueue(namespace, name string)
	EnqueueAfter(namespace, name string, duration time.Duration)

	Cache() DeploymentCache
}

func NewDeploymentController

func NewDeploymentController(gvk schema.GroupVersionKind, resource string, namespaced bool, controller controller.SharedControllerFactory) DeploymentController

type DeploymentGeneratingHandler

type DeploymentGeneratingHandler func(obj *v1.Deployment, status v1.DeploymentStatus) ([]runtime.Object, v1.DeploymentStatus, error)

DeploymentGeneratingHandler is the top-level handler that is executed for every Deployment event. It extends DeploymentStatusHandler by a returning a slice of child objects to be passed to apply.Apply

type DeploymentHandler

type DeploymentHandler func(string, *v1.Deployment) (*v1.Deployment, error)

type DeploymentIndexer

type DeploymentIndexer func(obj *v1.Deployment) ([]string, error)

type DeploymentStatusHandler

type DeploymentStatusHandler func(obj *v1.Deployment, status v1.DeploymentStatus) (v1.DeploymentStatus, error)

DeploymentStatusHandler is executed for every added or modified Deployment. Should return the new status to be updated

type Interface

type Interface interface {
	DaemonSet() DaemonSetController
	Deployment() DeploymentController
	StatefulSet() StatefulSetController
}

func New

func New(controllerFactory controller.SharedControllerFactory) Interface

type StatefulSetCache

type StatefulSetCache interface {
	Get(namespace, name string) (*v1.StatefulSet, error)
	List(namespace string, selector labels.Selector) ([]*v1.StatefulSet, error)

	AddIndexer(indexName string, indexer StatefulSetIndexer)
	GetByIndex(indexName, key string) ([]*v1.StatefulSet, error)
}

type StatefulSetClient

type StatefulSetClient interface {
	Create(*v1.StatefulSet) (*v1.StatefulSet, error)
	Update(*v1.StatefulSet) (*v1.StatefulSet, error)
	UpdateStatus(*v1.StatefulSet) (*v1.StatefulSet, error)
	Delete(namespace, name string, options *metav1.DeleteOptions) error
	Get(namespace, name string, options metav1.GetOptions) (*v1.StatefulSet, error)
	List(namespace string, opts metav1.ListOptions) (*v1.StatefulSetList, error)
	Watch(namespace string, opts metav1.ListOptions) (watch.Interface, error)
	Patch(namespace, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.StatefulSet, err error)
}

type StatefulSetController

type StatefulSetController interface {
	generic.ControllerMeta
	StatefulSetClient

	OnChange(ctx context.Context, name string, sync StatefulSetHandler)
	OnRemove(ctx context.Context, name string, sync StatefulSetHandler)
	Enqueue(namespace, name string)
	EnqueueAfter(namespace, name string, duration time.Duration)

	Cache() StatefulSetCache
}

func NewStatefulSetController

func NewStatefulSetController(gvk schema.GroupVersionKind, resource string, namespaced bool, controller controller.SharedControllerFactory) StatefulSetController

type StatefulSetGeneratingHandler

type StatefulSetGeneratingHandler func(obj *v1.StatefulSet, status v1.StatefulSetStatus) ([]runtime.Object, v1.StatefulSetStatus, error)

StatefulSetGeneratingHandler is the top-level handler that is executed for every StatefulSet event. It extends StatefulSetStatusHandler by a returning a slice of child objects to be passed to apply.Apply

type StatefulSetHandler

type StatefulSetHandler func(string, *v1.StatefulSet) (*v1.StatefulSet, error)

type StatefulSetIndexer

type StatefulSetIndexer func(obj *v1.StatefulSet) ([]string, error)

type StatefulSetStatusHandler

type StatefulSetStatusHandler func(obj *v1.StatefulSet, status v1.StatefulSetStatus) (v1.StatefulSetStatus, error)

StatefulSetStatusHandler is executed for every added or modified StatefulSet. Should return the new status to be updated

Jump to

Keyboard shortcuts

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