pvc

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const ManagedLabel = "sts-resize.vshn.net/managed"

ManagedLabel is a label to mark resources to be managed by the controller

Variables

This section is empty.

Functions

This section is empty.

Types

type Entity

type Entity struct {
	Namespace  string
	SourceName string

	Labels             map[string]string
	Spec               corev1.PersistentVolumeClaimSpec
	TargetSize         resource.Quantity
	TargetStorageClass *string
	SourceStorageClass *string

	BackedUp bool
	Restored bool
}

Entity describs a resizable PVC

func NewEntity

func NewEntity(pvc corev1.PersistentVolumeClaim, growTo resource.Quantity, storageClassName *string) Entity

NewEntity returns a new pvc Info

func (Entity) BackupName

func (pi Entity) BackupName() string

BackupName return the name of the backup

func (Entity) GetBackup

func (pi Entity) GetBackup() *corev1.PersistentVolumeClaim

GetBackup returns a pvc resource for the backup

func (Entity) GetResizedSource

func (pi Entity) GetResizedSource() *corev1.PersistentVolumeClaim

GetResizedSource returns a pvc resource for the enlarged original PVC

Jump to

Keyboard shortcuts

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