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
BytesToGiB converts Bytes to GiB
func GetContextLogger ¶ added in v1.2.6
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
Click to show internal directories.
Click to hide internal directories.