watcher

package
v1.2.9 Latest Latest
Warning

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

Go to latest
Published: May 2, 2025 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

Package watcher ...

Index

Constants

View Source
const (
	//IbmCloudGtAPIEndpoint ...
	IbmCloudGtAPIEndpoint = "IBMCLOUD_GT_API_ENDPOINT"
	//ReclaimPolicyTag ...
	ReclaimPolicyTag = "reclaimpolicy:"
	//NameSpaceTag ...
	NameSpaceTag = "namespace:"
	//StorageClassTag ...
	StorageClassTag = "storageclass:"
	//PVCNameTag ...
	PVCNameTag = "pvc:"
	//PVNameTag ...
	PVNameTag = "pv:"
	//VolumeCRN ...
	VolumeCRN = "volumeCRN"
	//ProvisionerTag ...
	ProvisionerTag = "provisioner:"

	//VolumeStatus ...
	VolumeStatus = "status"
	//VolumeStatusCreated ...
	VolumeStatusCreated = "created"
	//VolumeStatusDeleted ...
	VolumeStatusDeleted = "deleted"
	//VolumeUpdateEventReason ...
	VolumeUpdateEventReason = "VolumeMetaDataSaved"
	//VolumeUpdateEventSuccess ...
	VolumeUpdateEventSuccess = "Success"

	// VolumeIDLabel ...
	VolumeIDLabel = "volumeId"

	// VolumeCRNLabel ...
	VolumeCRNLabel = "volumeCRN"

	// ClusterIDLabel ...
	ClusterIDLabel = "clusterID"

	// IOPSLabel ...
	IOPSLabel = "iops"

	// ZoneLabel ...
	ZoneLabel = "zone"

	// GiB in bytes
	GiB = 1024 * 1024 * 1024
)

Variables

View Source
var VolumeTypeMap = map[string]string{}

VolumeTypeMap ...

Functions

func BytesToGiB added in v1.2.6

func BytesToGiB(volumeSizeBytes int64) int

BytesToGiB converts Bytes to GiB

func GetContextLogger added in v1.2.6

func GetContextLogger(ctx context.Context, isDebug bool) (*zap.Logger, string)

GetContextLogger ...

func GetContextLoggerWithRequestID added in v1.2.6

func GetContextLoggerWithRequestID(ctx context.Context, isDebug bool, requestIDIn *string) (*zap.Logger, string)

GetContextLoggerWithRequestID adds existing requestID in the logger The Existing requestID might be coming from ControllerPublishVolume etc

Types

type PVWatcher

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

PVWatcher to watch pv creation and add taggs

func New

func New(logger *zap.Logger, provisionerName string, volumeType string, cloudProvider cloudprovider.CloudProviderInterface) *PVWatcher

New creates the Watcher instance

func (*PVWatcher) Start

func (pvw *PVWatcher) Start()

Start start pv watcher

Jump to

Keyboard shortcuts

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