csoclients

package
v0.0.0-...-233eb29 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	OperatorNamespace      = "openshift-cluster-storage-operator"
	CSIOperatorNamespace   = "openshift-cluster-csi-drivers"
	CloudConfigNamespace   = "openshift-config"
	ManagedConfigNamespace = "openshift-config-managed"
)

Variables

This section is empty.

Functions

func GetCR

func GetCR(modifiers ...CrModifier) *opv1.Storage

func StartGuestInformers

func StartGuestInformers(clients *Clients, stopCh <-chan struct{})

func StartInformers

func StartInformers(clients *Clients, stopCh <-chan struct{})

func StartMgmtInformers

func StartMgmtInformers(clients *Clients, stopCh <-chan struct{})

func WaitForSync

func WaitForSync(clients *Clients, stopCh <-chan struct{})

Types

type Clients

type Clients struct {
	// Client for CSO's CR
	OperatorClient *operatorclient.OperatorClient
	// Kubernetes API client
	KubeClient kubernetes.Interface
	// Kubernetes API informers, per namespace
	KubeInformers v1helpers.KubeInformersForNamespaces

	// CRD client
	ExtensionClientSet apiextclient.Interface
	// CRD informer
	ExtensionInformer apiextinformers.SharedInformerFactory

	// operator.openshift.io client
	OperatorClientSet opclient.Interface
	// operator.openshift.io informers
	OperatorInformers opinformers.SharedInformerFactory

	// config.openshift.io client
	ConfigClientSet cfgclientset.Interface
	// config.openshift.io informers
	ConfigInformers cfginformers.SharedInformerFactory

	// Client for talking using prometheus-operator APIs (ServiceMonitor)
	MonitoringClient promclient.Interface
	// informer for prometheus-operator APIs
	MonitoringInformer prominformer.SharedInformerFactory

	// Dynamic client for OLM, old CSI operator APIs and HyperShift
	DynamicClient   dynamic.Interface
	DynamicInformer dynamicinformer.DynamicSharedInformerFactory

	// Rest Mapper for mapping GVK to GVR
	RestMapper       *restmapper.DeferredDiscoveryRESTMapper
	CategoryExpander restmapper.CategoryExpander
}

func NewClients

func NewClients(controllerConfig *controllercmd.ControllerContext, resync time.Duration) (*Clients, error)

func NewFakeClients

func NewFakeClients(initialObjects *FakeTestObjects) *Clients

func NewFakeMgmtClients

func NewFakeMgmtClients(initialObjects *FakeTestObjects) *Clients

func NewHypershiftGuestClients

func NewHypershiftGuestClients(
	controllerConfig *controllercmd.ControllerContext,
	guestKubeConfig string,
	controllerName string, resync time.Duration) (*Clients, error)

func NewHypershiftMgmtClients

func NewHypershiftMgmtClients(controllerConfig *controllercmd.ControllerContext, controlNamespace string, resync time.Duration) (*Clients, error)

type CrModifier

type CrModifier func(cr *opv1.Storage) *opv1.Storage

type FakeTestObjects

type FakeTestObjects struct {
	CoreObjects, ExtensionObjects, OperatorObjects, ConfigObjects, DynamicObjects, MonitoringObjects []runtime.Object
}

Jump to

Keyboard shortcuts

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