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: 153

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromConfigMapHandlerToHandler

func FromConfigMapHandlerToHandler(sync ConfigMapHandler) generic.Handler

func FromEndpointsHandlerToHandler

func FromEndpointsHandlerToHandler(sync EndpointsHandler) generic.Handler

func FromEventHandlerToHandler

func FromEventHandlerToHandler(sync EventHandler) generic.Handler

func FromNamespaceHandlerToHandler

func FromNamespaceHandlerToHandler(sync NamespaceHandler) generic.Handler

func FromNodeHandlerToHandler

func FromNodeHandlerToHandler(sync NodeHandler) generic.Handler

func FromPersistentVolumeClaimHandlerToHandler

func FromPersistentVolumeClaimHandlerToHandler(sync PersistentVolumeClaimHandler) generic.Handler

func FromPersistentVolumeHandlerToHandler added in v1.0.0

func FromPersistentVolumeHandlerToHandler(sync PersistentVolumeHandler) generic.Handler

func FromPodHandlerToHandler

func FromPodHandlerToHandler(sync PodHandler) generic.Handler

func FromSecretHandlerToHandler

func FromSecretHandlerToHandler(sync SecretHandler) generic.Handler

func FromServiceAccountHandlerToHandler

func FromServiceAccountHandlerToHandler(sync ServiceAccountHandler) generic.Handler

func FromServiceHandlerToHandler

func FromServiceHandlerToHandler(sync ServiceHandler) generic.Handler

func RegisterNamespaceGeneratingHandler

func RegisterNamespaceGeneratingHandler(ctx context.Context, controller NamespaceController, apply apply.Apply,
	condition condition.Cond, name string, handler NamespaceGeneratingHandler, opts *generic.GeneratingHandlerOptions)

RegisterNamespaceGeneratingHandler configures a NamespaceController to execute a NamespaceGeneratingHandler 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 RegisterNamespaceStatusHandler

func RegisterNamespaceStatusHandler(ctx context.Context, controller NamespaceController, condition condition.Cond, name string, handler NamespaceStatusHandler)

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

func RegisterNodeGeneratingHandler

func RegisterNodeGeneratingHandler(ctx context.Context, controller NodeController, apply apply.Apply,
	condition condition.Cond, name string, handler NodeGeneratingHandler, opts *generic.GeneratingHandlerOptions)

RegisterNodeGeneratingHandler configures a NodeController to execute a NodeGeneratingHandler 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 RegisterNodeStatusHandler

func RegisterNodeStatusHandler(ctx context.Context, controller NodeController, condition condition.Cond, name string, handler NodeStatusHandler)

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

func RegisterPersistentVolumeClaimGeneratingHandler

func RegisterPersistentVolumeClaimGeneratingHandler(ctx context.Context, controller PersistentVolumeClaimController, apply apply.Apply,
	condition condition.Cond, name string, handler PersistentVolumeClaimGeneratingHandler, opts *generic.GeneratingHandlerOptions)

RegisterPersistentVolumeClaimGeneratingHandler configures a PersistentVolumeClaimController to execute a PersistentVolumeClaimGeneratingHandler 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 RegisterPersistentVolumeClaimStatusHandler

func RegisterPersistentVolumeClaimStatusHandler(ctx context.Context, controller PersistentVolumeClaimController, condition condition.Cond, name string, handler PersistentVolumeClaimStatusHandler)

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

func RegisterPersistentVolumeGeneratingHandler added in v1.0.0

func RegisterPersistentVolumeGeneratingHandler(ctx context.Context, controller PersistentVolumeController, apply apply.Apply,
	condition condition.Cond, name string, handler PersistentVolumeGeneratingHandler, opts *generic.GeneratingHandlerOptions)

RegisterPersistentVolumeGeneratingHandler configures a PersistentVolumeController to execute a PersistentVolumeGeneratingHandler 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 RegisterPersistentVolumeStatusHandler added in v1.0.0

func RegisterPersistentVolumeStatusHandler(ctx context.Context, controller PersistentVolumeController, condition condition.Cond, name string, handler PersistentVolumeStatusHandler)

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

func RegisterPodGeneratingHandler

func RegisterPodGeneratingHandler(ctx context.Context, controller PodController, apply apply.Apply,
	condition condition.Cond, name string, handler PodGeneratingHandler, opts *generic.GeneratingHandlerOptions)

RegisterPodGeneratingHandler configures a PodController to execute a PodGeneratingHandler 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 RegisterPodStatusHandler

func RegisterPodStatusHandler(ctx context.Context, controller PodController, condition condition.Cond, name string, handler PodStatusHandler)

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

func RegisterServiceGeneratingHandler

func RegisterServiceGeneratingHandler(ctx context.Context, controller ServiceController, apply apply.Apply,
	condition condition.Cond, name string, handler ServiceGeneratingHandler, opts *generic.GeneratingHandlerOptions)

RegisterServiceGeneratingHandler configures a ServiceController to execute a ServiceGeneratingHandler 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 RegisterServiceStatusHandler

func RegisterServiceStatusHandler(ctx context.Context, controller ServiceController, condition condition.Cond, name string, handler ServiceStatusHandler)

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

func UpdateConfigMapDeepCopyOnChange

func UpdateConfigMapDeepCopyOnChange(client ConfigMapClient, obj *v1.ConfigMap, handler func(obj *v1.ConfigMap) (*v1.ConfigMap, error)) (*v1.ConfigMap, error)

func UpdateEndpointsDeepCopyOnChange

func UpdateEndpointsDeepCopyOnChange(client EndpointsClient, obj *v1.Endpoints, handler func(obj *v1.Endpoints) (*v1.Endpoints, error)) (*v1.Endpoints, error)

func UpdateEventDeepCopyOnChange

func UpdateEventDeepCopyOnChange(client EventClient, obj *v1.Event, handler func(obj *v1.Event) (*v1.Event, error)) (*v1.Event, error)

func UpdateNamespaceDeepCopyOnChange

func UpdateNamespaceDeepCopyOnChange(client NamespaceClient, obj *v1.Namespace, handler func(obj *v1.Namespace) (*v1.Namespace, error)) (*v1.Namespace, error)

func UpdateNodeDeepCopyOnChange

func UpdateNodeDeepCopyOnChange(client NodeClient, obj *v1.Node, handler func(obj *v1.Node) (*v1.Node, error)) (*v1.Node, error)

func UpdatePersistentVolumeDeepCopyOnChange added in v1.0.0

func UpdatePersistentVolumeDeepCopyOnChange(client PersistentVolumeClient, obj *v1.PersistentVolume, handler func(obj *v1.PersistentVolume) (*v1.PersistentVolume, error)) (*v1.PersistentVolume, error)

func UpdatePodDeepCopyOnChange

func UpdatePodDeepCopyOnChange(client PodClient, obj *v1.Pod, handler func(obj *v1.Pod) (*v1.Pod, error)) (*v1.Pod, error)

func UpdateSecretDeepCopyOnChange

func UpdateSecretDeepCopyOnChange(client SecretClient, obj *v1.Secret, handler func(obj *v1.Secret) (*v1.Secret, error)) (*v1.Secret, error)

func UpdateServiceAccountDeepCopyOnChange

func UpdateServiceAccountDeepCopyOnChange(client ServiceAccountClient, obj *v1.ServiceAccount, handler func(obj *v1.ServiceAccount) (*v1.ServiceAccount, error)) (*v1.ServiceAccount, error)

func UpdateServiceDeepCopyOnChange

func UpdateServiceDeepCopyOnChange(client ServiceClient, obj *v1.Service, handler func(obj *v1.Service) (*v1.Service, error)) (*v1.Service, error)

Types

type ConfigMapCache

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

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

type ConfigMapClient

type ConfigMapClient interface {
	Create(*v1.ConfigMap) (*v1.ConfigMap, error)
	Update(*v1.ConfigMap) (*v1.ConfigMap, error)

	Delete(namespace, name string, options *metav1.DeleteOptions) error
	Get(namespace, name string, options metav1.GetOptions) (*v1.ConfigMap, error)
	List(namespace string, opts metav1.ListOptions) (*v1.ConfigMapList, error)
	Watch(namespace string, opts metav1.ListOptions) (watch.Interface, error)
	Patch(namespace, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error)
}

type ConfigMapController

type ConfigMapController interface {
	generic.ControllerMeta
	ConfigMapClient

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

	Cache() ConfigMapCache
}

func NewConfigMapController

func NewConfigMapController(gvk schema.GroupVersionKind, resource string, namespaced bool, controller controller.SharedControllerFactory) ConfigMapController

type ConfigMapHandler

type ConfigMapHandler func(string, *v1.ConfigMap) (*v1.ConfigMap, error)

type ConfigMapIndexer

type ConfigMapIndexer func(obj *v1.ConfigMap) ([]string, error)

type EndpointsCache

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

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

type EndpointsClient

type EndpointsClient interface {
	Create(*v1.Endpoints) (*v1.Endpoints, error)
	Update(*v1.Endpoints) (*v1.Endpoints, error)

	Delete(namespace, name string, options *metav1.DeleteOptions) error
	Get(namespace, name string, options metav1.GetOptions) (*v1.Endpoints, error)
	List(namespace string, opts metav1.ListOptions) (*v1.EndpointsList, error)
	Watch(namespace string, opts metav1.ListOptions) (watch.Interface, error)
	Patch(namespace, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Endpoints, err error)
}

type EndpointsController

type EndpointsController interface {
	generic.ControllerMeta
	EndpointsClient

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

	Cache() EndpointsCache
}

func NewEndpointsController

func NewEndpointsController(gvk schema.GroupVersionKind, resource string, namespaced bool, controller controller.SharedControllerFactory) EndpointsController

type EndpointsHandler

type EndpointsHandler func(string, *v1.Endpoints) (*v1.Endpoints, error)

type EndpointsIndexer

type EndpointsIndexer func(obj *v1.Endpoints) ([]string, error)

type EventCache

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

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

type EventClient

type EventClient interface {
	Create(*v1.Event) (*v1.Event, error)
	Update(*v1.Event) (*v1.Event, error)

	Delete(namespace, name string, options *metav1.DeleteOptions) error
	Get(namespace, name string, options metav1.GetOptions) (*v1.Event, error)
	List(namespace string, opts metav1.ListOptions) (*v1.EventList, error)
	Watch(namespace string, opts metav1.ListOptions) (watch.Interface, error)
	Patch(namespace, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Event, err error)
}

type EventController

type EventController interface {
	generic.ControllerMeta
	EventClient

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

	Cache() EventCache
}

func NewEventController

func NewEventController(gvk schema.GroupVersionKind, resource string, namespaced bool, controller controller.SharedControllerFactory) EventController

type EventHandler

type EventHandler func(string, *v1.Event) (*v1.Event, error)

type EventIndexer

type EventIndexer func(obj *v1.Event) ([]string, error)

type Interface

type Interface interface {
	ConfigMap() ConfigMapController
	Endpoints() EndpointsController
	Event() EventController
	Namespace() NamespaceController
	Node() NodeController
	PersistentVolume() PersistentVolumeController
	PersistentVolumeClaim() PersistentVolumeClaimController
	Pod() PodController
	Secret() SecretController
	Service() ServiceController
	ServiceAccount() ServiceAccountController
}

func New

func New(controllerFactory controller.SharedControllerFactory) Interface

type NamespaceCache

type NamespaceCache interface {
	Get(name string) (*v1.Namespace, error)
	List(selector labels.Selector) ([]*v1.Namespace, error)

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

type NamespaceClient

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

type NamespaceController

type NamespaceController interface {
	generic.ControllerMeta
	NamespaceClient

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

	Cache() NamespaceCache
}

func NewNamespaceController

func NewNamespaceController(gvk schema.GroupVersionKind, resource string, namespaced bool, controller controller.SharedControllerFactory) NamespaceController

type NamespaceGeneratingHandler

type NamespaceGeneratingHandler func(obj *v1.Namespace, status v1.NamespaceStatus) ([]runtime.Object, v1.NamespaceStatus, error)

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

type NamespaceHandler

type NamespaceHandler func(string, *v1.Namespace) (*v1.Namespace, error)

type NamespaceIndexer

type NamespaceIndexer func(obj *v1.Namespace) ([]string, error)

type NamespaceStatusHandler

type NamespaceStatusHandler func(obj *v1.Namespace, status v1.NamespaceStatus) (v1.NamespaceStatus, error)

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

type NodeCache

type NodeCache interface {
	Get(name string) (*v1.Node, error)
	List(selector labels.Selector) ([]*v1.Node, error)

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

type NodeClient

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

type NodeController

type NodeController interface {
	generic.ControllerMeta
	NodeClient

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

	Cache() NodeCache
}

func NewNodeController

func NewNodeController(gvk schema.GroupVersionKind, resource string, namespaced bool, controller controller.SharedControllerFactory) NodeController

type NodeGeneratingHandler

type NodeGeneratingHandler func(obj *v1.Node, status v1.NodeStatus) ([]runtime.Object, v1.NodeStatus, error)

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

type NodeHandler

type NodeHandler func(string, *v1.Node) (*v1.Node, error)

type NodeIndexer

type NodeIndexer func(obj *v1.Node) ([]string, error)

type NodeStatusHandler

type NodeStatusHandler func(obj *v1.Node, status v1.NodeStatus) (v1.NodeStatus, error)

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

type PersistentVolumeCache added in v1.0.0

type PersistentVolumeCache interface {
	Get(name string) (*v1.PersistentVolume, error)
	List(selector labels.Selector) ([]*v1.PersistentVolume, error)

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

type PersistentVolumeClaimCache

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

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

type PersistentVolumeClaimClient

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

type PersistentVolumeClaimController

type PersistentVolumeClaimController interface {
	generic.ControllerMeta
	PersistentVolumeClaimClient

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

	Cache() PersistentVolumeClaimCache
}

func NewPersistentVolumeClaimController

func NewPersistentVolumeClaimController(gvk schema.GroupVersionKind, resource string, namespaced bool, controller controller.SharedControllerFactory) PersistentVolumeClaimController

type PersistentVolumeClaimGeneratingHandler

type PersistentVolumeClaimGeneratingHandler func(obj *v1.PersistentVolumeClaim, status v1.PersistentVolumeClaimStatus) ([]runtime.Object, v1.PersistentVolumeClaimStatus, error)

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

type PersistentVolumeClaimHandler

type PersistentVolumeClaimHandler func(string, *v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error)

type PersistentVolumeClaimIndexer

type PersistentVolumeClaimIndexer func(obj *v1.PersistentVolumeClaim) ([]string, error)

type PersistentVolumeClaimStatusHandler

type PersistentVolumeClaimStatusHandler func(obj *v1.PersistentVolumeClaim, status v1.PersistentVolumeClaimStatus) (v1.PersistentVolumeClaimStatus, error)

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

type PersistentVolumeClient added in v1.0.0

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

type PersistentVolumeController added in v1.0.0

type PersistentVolumeController interface {
	generic.ControllerMeta
	PersistentVolumeClient

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

	Cache() PersistentVolumeCache
}

func NewPersistentVolumeController added in v1.0.0

func NewPersistentVolumeController(gvk schema.GroupVersionKind, resource string, namespaced bool, controller controller.SharedControllerFactory) PersistentVolumeController

type PersistentVolumeGeneratingHandler added in v1.0.0

type PersistentVolumeGeneratingHandler func(obj *v1.PersistentVolume, status v1.PersistentVolumeStatus) ([]runtime.Object, v1.PersistentVolumeStatus, error)

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

type PersistentVolumeHandler added in v1.0.0

type PersistentVolumeHandler func(string, *v1.PersistentVolume) (*v1.PersistentVolume, error)

type PersistentVolumeIndexer added in v1.0.0

type PersistentVolumeIndexer func(obj *v1.PersistentVolume) ([]string, error)

type PersistentVolumeStatusHandler added in v1.0.0

type PersistentVolumeStatusHandler func(obj *v1.PersistentVolume, status v1.PersistentVolumeStatus) (v1.PersistentVolumeStatus, error)

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

type PodCache

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

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

type PodClient

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

type PodController

type PodController interface {
	generic.ControllerMeta
	PodClient

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

	Cache() PodCache
}

func NewPodController

func NewPodController(gvk schema.GroupVersionKind, resource string, namespaced bool, controller controller.SharedControllerFactory) PodController

type PodGeneratingHandler

type PodGeneratingHandler func(obj *v1.Pod, status v1.PodStatus) ([]runtime.Object, v1.PodStatus, error)

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

type PodHandler

type PodHandler func(string, *v1.Pod) (*v1.Pod, error)

type PodIndexer

type PodIndexer func(obj *v1.Pod) ([]string, error)

type PodStatusHandler

type PodStatusHandler func(obj *v1.Pod, status v1.PodStatus) (v1.PodStatus, error)

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

type SecretCache

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

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

type SecretClient

type SecretClient interface {
	Create(*v1.Secret) (*v1.Secret, error)
	Update(*v1.Secret) (*v1.Secret, error)

	Delete(namespace, name string, options *metav1.DeleteOptions) error
	Get(namespace, name string, options metav1.GetOptions) (*v1.Secret, error)
	List(namespace string, opts metav1.ListOptions) (*v1.SecretList, error)
	Watch(namespace string, opts metav1.ListOptions) (watch.Interface, error)
	Patch(namespace, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error)
}

type SecretController

type SecretController interface {
	generic.ControllerMeta
	SecretClient

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

	Cache() SecretCache
}

func NewSecretController

func NewSecretController(gvk schema.GroupVersionKind, resource string, namespaced bool, controller controller.SharedControllerFactory) SecretController

type SecretHandler

type SecretHandler func(string, *v1.Secret) (*v1.Secret, error)

type SecretIndexer

type SecretIndexer func(obj *v1.Secret) ([]string, error)

type ServiceAccountCache

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

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

type ServiceAccountClient

type ServiceAccountClient interface {
	Create(*v1.ServiceAccount) (*v1.ServiceAccount, error)
	Update(*v1.ServiceAccount) (*v1.ServiceAccount, error)

	Delete(namespace, name string, options *metav1.DeleteOptions) error
	Get(namespace, name string, options metav1.GetOptions) (*v1.ServiceAccount, error)
	List(namespace string, opts metav1.ListOptions) (*v1.ServiceAccountList, error)
	Watch(namespace string, opts metav1.ListOptions) (watch.Interface, error)
	Patch(namespace, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ServiceAccount, err error)
}

type ServiceAccountController

type ServiceAccountController interface {
	generic.ControllerMeta
	ServiceAccountClient

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

	Cache() ServiceAccountCache
}

func NewServiceAccountController

func NewServiceAccountController(gvk schema.GroupVersionKind, resource string, namespaced bool, controller controller.SharedControllerFactory) ServiceAccountController

type ServiceAccountHandler

type ServiceAccountHandler func(string, *v1.ServiceAccount) (*v1.ServiceAccount, error)

type ServiceAccountIndexer

type ServiceAccountIndexer func(obj *v1.ServiceAccount) ([]string, error)

type ServiceCache

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

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

type ServiceClient

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

type ServiceController

type ServiceController interface {
	generic.ControllerMeta
	ServiceClient

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

	Cache() ServiceCache
}

func NewServiceController

func NewServiceController(gvk schema.GroupVersionKind, resource string, namespaced bool, controller controller.SharedControllerFactory) ServiceController

type ServiceGeneratingHandler

type ServiceGeneratingHandler func(obj *v1.Service, status v1.ServiceStatus) ([]runtime.Object, v1.ServiceStatus, error)

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

type ServiceHandler

type ServiceHandler func(string, *v1.Service) (*v1.Service, error)

type ServiceIndexer

type ServiceIndexer func(obj *v1.Service) ([]string, error)

type ServiceStatusHandler

type ServiceStatusHandler func(obj *v1.Service, status v1.ServiceStatus) (v1.ServiceStatus, error)

ServiceStatusHandler is executed for every added or modified Service. 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