workload

package
v1.29.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CRDMeta

func CRDMeta() *crd.CRDMeta

Types

type Controller

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

Controller represents a workload controller.

func NewController

func NewController(ctx *ControllerContext, logger klog.Logger) *Controller

NewController returns a workload controller.

func (*Controller) Run

func (c *Controller) Run(stopCh <-chan struct{})

type ControllerContext

type ControllerContext struct {
	KubeClient     kubernetes.Interface
	WorkloadClient workloadclient.Interface

	WorkloadInformer      cache.SharedIndexInformer
	ServiceInformer       cache.SharedIndexInformer
	EndpointSliceInformer cache.SharedIndexInformer
}

ControllerContext holds the state needed for the execution of the workload controller.

func NewControllerContext

func NewControllerContext(
	kubeClient kubernetes.Interface,
	workloadClient workloadclient.Interface,
	namespace string,
	resyncPeriod time.Duration,
) *ControllerContext

NewControllerContext returns a new shared set of informers.

func (*ControllerContext) HasSynced

func (ctx *ControllerContext) HasSynced() bool

HasSynced returns true if all relevant informers has been synced.

func (*ControllerContext) Start

func (ctx *ControllerContext) Start(stopCh chan struct{})

Start all of the informers.

Directories

Path Synopsis
client
clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
clientset/versioned/typed/workload/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
clientset/versioned/typed/workload/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.

Jump to

Keyboard shortcuts

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