crd

package
v0.52.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckCRDExists

func CheckCRDExists(ctx context.Context, crdName string, clientset apiextensionsclientset.Interface) (*v1.CustomResourceDefinition, bool, error)

CheckCRDExists checks if the given crd exists and is established

func EnsureResourceReservationsCRD

func EnsureResourceReservationsCRD(ctx context.Context, clientset apiextensionsclientset.Interface, annotations map[string]string, crd *v1.CustomResourceDefinition) error

EnsureResourceReservationsCRD is responsible for creating and ensuring the ResourceReservation CRD is created, it ensures that both v1beta1 and v1beta2 exist.

Types

type LazyDemandInformer

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

LazyDemandInformer checks for Demand CRD existence and creates a demand informer if it exists.

func NewLazyDemandInformer

func NewLazyDemandInformer(
	informerFactory ssinformers.SharedInformerFactory,
	apiExtensionsClient apiextensionsclientset.Interface) *LazyDemandInformer

NewLazyDemandInformer constructs a new LazyDemandInformer instance

func (*LazyDemandInformer) Informer

func (ldi *LazyDemandInformer) Informer() (v1alpha2.DemandInformer, bool)

Informer returns the informer instance if it is initialized, returns false otherwise

func (*LazyDemandInformer) Ready

func (ldi *LazyDemandInformer) Ready() <-chan struct{}

Ready returns a channel that will be closed when the informer is initialized

func (*LazyDemandInformer) Run

func (ldi *LazyDemandInformer) Run(ctx context.Context)

Run starts the goroutine to check for the existence of the demand CRD, and initialize the demand informer if CRD exists

Jump to

Keyboard shortcuts

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