utils

package
v0.0.0-...-62baabf Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpenshiftCSIDriverAnnotationKey = "csi.openshift.io/managed"
	VSphereDriverName               = "csi.vsphere.vmware.com"
	DefaultNamespace                = "openshift-cluster-csi-drivers"
	InfraGlobalName                 = "cluster"
)

Variables

View Source
var (
	InstallErrorMetric = metrics.NewGaugeVec(
		&metrics.GaugeOpts{
			Name:           "vsphere_csi_driver_error",
			Help:           "vSphere driver installation error",
			StabilityLevel: metrics.ALPHA,
		},
		[]string{failureReason, condition},
	)

	TopologyTagsMetric = metrics.NewGaugeVec(
		&metrics.GaugeOpts{
			Name:           "vsphere_topology_tags",
			Help:           "Number of vSphere topology tags",
			StabilityLevel: metrics.ALPHA,
		},
		[]string{topologyTagSource},
	)
	InfrastructureFailureDomains = metrics.NewGaugeVec(
		&metrics.GaugeOpts{
			Name:           "vsphere_infrastructure_failure_domains",
			Help:           "Number of vSphere failure domains",
			StabilityLevel: metrics.ALPHA,
		},
		[]string{domainScope},
	)
)

Functions

func GetCSIDriverTopologyCategories

func GetCSIDriverTopologyCategories(clusterCSIDriver *opv1.ClusterCSIDriver) []string

func GetDatacenters

func GetDatacenters(config *vsphere.VSphereConfig) ([]string, error)

func GetInfraTopologyCategories

func GetInfraTopologyCategories(infra *cfgv1.Infrastructure) []string

func GetTopologyCategories

func GetTopologyCategories(clusterCSIDriver *opv1.ClusterCSIDriver, infra *cfgv1.Infrastructure) []string

func UpdateMetrics

func UpdateMetrics(infra *cfgv1.Infrastructure, clusterCSIDriver *opv1.ClusterCSIDriver)

Types

type APIClient

type APIClient struct {
	// Client for CSO's CR
	OperatorClient v1helpers.OperatorClientWithFinalizers
	// Kubernetes API client
	KubeClient kubernetes.Interface
	// API extension client
	ApiExtClient apiextclient.Interface
	// Kubernetes API informers, per namespace
	KubeInformers v1helpers.KubeInformersForNamespaces

	SecretInformer    v1.SecretInformer
	ConfigMapInformer v1.ConfigMapInformer
	NodeInformer      v1.NodeInformer

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

	// a more specific version of Openshift operator informers.
	OCPOperatorInformers     operatorinformers.SharedInformerFactory
	ClusterCSIDriverInformer clustercsidriverinformer.ClusterCSIDriverInformer

	// Dynamic client for OLM and old CSI operator APIs
	DynamicClient dynamic.Interface
}

Rather than passing individual apiclients to controllers APIClient defines a type that can encapsulate all of those

Jump to

Keyboard shortcuts

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