datastore

package
v1.5.4-rc3 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 44 Imported by: 4

Documentation

Index

Constants

View Source
const (
	// KubeStatusPollCount is the number of retry to validate The KubernetesStatus
	KubeStatusPollCount = 5
	// KubeStatusPollInterval is the waiting time between each KubeStatusPollCount
	KubeStatusPollInterval = 1 * time.Second

	PodProbeInitialDelay             = 3
	PodProbeTimeoutSeconds           = PodProbePeriodSeconds - 1
	PodProbePeriodSeconds            = 5
	PodLivenessProbeFailureThreshold = 3
)
View Source
const (
	// NameMaximumLength restricted the length due to Kubernetes name limitation
	NameMaximumLength = 40

	MaxRecurringJobRetain = 100
)

Variables

View Source
var (
	// SkipListerCheck bypass the created longhorn resource validation
	SkipListerCheck = false

	// SystemBackupTimeout is the timeout for system backup
	SystemBackupTimeout = time.Hour

	// SystemRestoreTimeout is the timeout for system restore
	SystemRestoreTimeout = 24 * time.Hour

	// VolumeBackupTimeout is the timeout for volume backups
	VolumeBackupTimeout = 24 * time.Hour
)
View Source
var (

	// VerificationRetryInterval is the wait time for each verification retries
	VerificationRetryInterval = 100 * time.Millisecond
	// VerificationRetryCounts is the number of times to retry for verification
	VerificationRetryCounts = 20
)

Functions

func CheckInstanceManagerType added in v0.6.0

func CheckInstanceManagerType(im *longhorn.InstanceManager) (longhorn.InstanceManagerType, error)

CheckInstanceManagerType checks and returns InstanceManager labels type Returns error if the InstanceManager type is not engine or replica

func CheckVolume added in v1.3.0

func CheckVolume(v *longhorn.Volume) error

func ErrorIsConflict added in v0.5.0

func ErrorIsConflict(err error) bool

ErrorIsConflict checks if given error match metav1.StatusReasonConflict

func ErrorIsNotFound added in v0.3.1

func ErrorIsNotFound(err error) bool

ErrorIsNotFound checks if given error match metav1.StatusReasonNotFound

func FixupRecurringJob added in v1.2.0

func FixupRecurringJob(v *longhorn.Volume) error

func GetCurrentEngineAndExtras added in v1.2.3

func GetCurrentEngineAndExtras(v *longhorn.Volume, es map[string]*longhorn.Engine) (currentEngine *longhorn.Engine, extras []*longhorn.Engine, err error)

GetCurrentEngineAndExtras pick the current Engine and extra Engines from the Engine list of a volume with the given namespace

func GetLabelsForVolumesFollowsGlobalSettings added in v1.4.0

func GetLabelsForVolumesFollowsGlobalSettings(volume *longhorn.Volume) map[string]string

GetLabelsForVolumesFollowsGlobalSettings returns a label map in which contains all global settings the volume follows

func GetNewCurrentEngineAndExtras added in v1.2.3

func GetNewCurrentEngineAndExtras(v *longhorn.Volume, es map[string]*longhorn.Engine) (currentEngine *longhorn.Engine, extras []*longhorn.Engine, err error)

GetNewCurrentEngineAndExtras detects the new current Engine and extra Engines from the Engine list of a volume with the given namespace during engine switching.

func GetObjectReferencesForVolume added in v1.3.0

func GetObjectReferencesForVolume(v *longhorn.Volume) corev1.ObjectReference

func GetOwnerReferencesForBackingImage added in v1.2.0

func GetOwnerReferencesForBackingImage(backingImage *longhorn.BackingImage) []metav1.OwnerReference

GetOwnerReferencesForBackingImage returns OwnerReference for the given backing image name and UID

func GetOwnerReferencesForBackingImageDataSource added in v1.2.0

func GetOwnerReferencesForBackingImageDataSource(backingImageDataSource *longhorn.BackingImageDataSource) []metav1.OwnerReference

GetOwnerReferencesForBackingImageDataSource returns OwnerReference for the given backing image data source name and UID

func GetOwnerReferencesForBackingImageManager added in v1.1.1

func GetOwnerReferencesForBackingImageManager(backingImageManager *longhorn.BackingImageManager) []metav1.OwnerReference

GetOwnerReferencesForBackingImageManager returns OwnerReference for the given // backing image manager name and UID

func GetOwnerReferencesForEngineImage added in v0.7.0

func GetOwnerReferencesForEngineImage(ei *longhorn.EngineImage) []metav1.OwnerReference

GetOwnerReferencesForEngineImage returns OwnerReference for the given Longhorn EngineImage name and UID

func GetOwnerReferencesForInstanceManager added in v0.7.0

func GetOwnerReferencesForInstanceManager(im *longhorn.InstanceManager) []metav1.OwnerReference

GetOwnerReferencesForInstanceManager returns OwnerReference for the given instance Manager name and UID

func GetOwnerReferencesForNode added in v0.8.0

func GetOwnerReferencesForNode(node *longhorn.Node) []metav1.OwnerReference

GetOwnerReferencesForNode returns a list contains a single OwnerReference for the given Node ID and name

func GetOwnerReferencesForRecurringJob added in v1.2.0

func GetOwnerReferencesForRecurringJob(recurringJob *longhorn.RecurringJob) []metav1.OwnerReference

GetOwnerReferencesForRecurringJob returns a list contains single OwnerReference for the given recurringJob name

func GetOwnerReferencesForShareManager added in v1.1.0

func GetOwnerReferencesForShareManager(sm *longhorn.ShareManager, isController bool) []metav1.OwnerReference

GetOwnerReferencesForShareManager returns OwnerReference for the given share manager name and UID

func GetOwnerReferencesForSupportBundle added in v1.4.0

func GetOwnerReferencesForSupportBundle(supportBundle *longhorn.SupportBundle) []metav1.OwnerReference

GetOwnerReferencesForSupportBundle returns a list contains single OwnerReference for the given SupportBundle object

func GetOwnerReferencesForSystemRestore added in v1.4.0

func GetOwnerReferencesForSystemRestore(systemRestore *longhorn.SystemRestore) []metav1.OwnerReference

GetOwnerReferencesForSystemRestore returns OwnerReference for the given SystemRestore

func GetOwnerReferencesForVolume added in v0.7.0

func GetOwnerReferencesForVolume(v *longhorn.Volume) []metav1.OwnerReference

GetOwnerReferencesForVolume returns a list contains single OwnerReference for the given volume UID and name

func IsAvailableHealthyReplica added in v1.2.5

func IsAvailableHealthyReplica(r *longhorn.Replica) bool

IsAvailableHealthyReplica returns if the specified replica is a healthy one

func IsBackendStoreDriverV1 added in v1.5.4

func IsBackendStoreDriverV1(backendstoreDriver longhorn.BackendStoreDriverType) bool

IsBackendStoreDriverV1 returns true if the given backendstoreDriver is v1

func IsBackendStoreDriverV2 added in v1.5.4

func IsBackendStoreDriverV2(backendstoreDriver longhorn.BackendStoreDriverType) bool

IsBackendStoreDriverV2 returns true if the given backendstoreDriver is v2

func IsReplicaRebuildingFailed added in v1.4.1

func IsReplicaRebuildingFailed(reusableFailedReplica *longhorn.Replica) bool

IsReplicaRebuildingFailed returns true if the rebuilding replica failed not caused by network issues.

func IsSupportedVolumeSize added in v1.5.4

func IsSupportedVolumeSize(backendstoreDriver longhorn.BackendStoreDriverType, fsType string, volumeSize int64) bool

IsSupportedVolumeSize returns turn if the v1 volume size is supported by the given fsType file system.

func LabelSystemBackupVersion added in v1.4.0

func LabelSystemBackupVersion(version string, obj runtime.Object) error

func MarshalLabelToVolumeRecurringJob added in v1.2.4

func MarshalLabelToVolumeRecurringJob(labels map[string]string) map[string]*longhorn.VolumeRecurringJob

func NewPVCManifest added in v0.8.1

func NewPVCManifest(size int64, pvName, ns, pvcName, storageClassName string, accessMode corev1.PersistentVolumeAccessMode) *corev1.PersistentVolumeClaim

NewPVCManifest returns a new PersistentVolumeClaim object

func NewPVCManifestForVolume added in v1.1.0

func NewPVCManifestForVolume(v *longhorn.Volume, pvName, ns, pvcName, storageClassName string) *corev1.PersistentVolumeClaim

NewPVCManifestForVolume returns a new PersistentVolumeClaim object for a longhorn volume

func NewPVManifest added in v0.8.1

func NewPVManifest(size int64, pvName, volumeName, storageClassName, fsType string, volAttributes map[string]string, accessMode corev1.PersistentVolumeAccessMode) *corev1.PersistentVolume

NewPVManifest returns a new PersistentVolume object

func NewPVManifestForVolume added in v1.1.0

func NewPVManifestForVolume(v *longhorn.Volume, pvName, storageClassName, fsType string) *corev1.PersistentVolume

NewPVManifestForVolume returns a new PersistentVolume object for a longhorn volume

func ReplicaAddressToReplicaName added in v1.0.0

func ReplicaAddressToReplicaName(address string, rs []*longhorn.Replica) string

ReplicaAddressToReplicaName will directly return the address if the format is invalid or the replica is not found.

func ValidateRecurringJob added in v1.2.0

func ValidateRecurringJob(job longhorn.RecurringJobSpec) error

func ValidateRecurringJobs added in v1.2.0

func ValidateRecurringJobs(jobs []longhorn.RecurringJobSpec) error

Types

type DataStore

type DataStore struct {
	VolumeInformer cache.SharedInformer

	EngineInformer cache.SharedInformer

	ReplicaInformer cache.SharedInformer

	EngineImageInformer cache.SharedInformer

	NodeInformer cache.SharedInformer

	SettingInformer cache.SharedInformer

	InstanceManagerInformer cache.SharedInformer

	ShareManagerInformer cache.SharedInformer

	BackingImageInformer cache.SharedInformer

	BackingImageManagerInformer cache.SharedInformer

	BackingImageDataSourceInformer cache.SharedInformer

	BackupTargetInformer cache.SharedInformer

	BackupVolumeInformer cache.SharedInformer

	BackupInformer cache.SharedInformer

	RecurringJobInformer cache.SharedInformer

	OrphanInformer cache.SharedInformer

	SnapshotInformer cache.SharedInformer

	SupportBundleInformer cache.SharedInformer

	SystemBackupInformer cache.SharedInformer

	SystemRestoreInformer cache.SharedInformer

	LHVolumeAttachmentInformer cache.SharedInformer

	PodInformer cache.SharedInformer

	CronJobInformer cache.SharedInformer

	DaemonSetInformer cache.SharedInformer

	DeploymentInformer cache.SharedInformer

	PersistentVolumeInformer cache.SharedInformer

	PersistentVolumeClaimInformer cache.SharedInformer

	VolumeAttachmentInformer cache.SharedInformer

	ConfigMapInformer cache.SharedInformer

	SecretInformer cache.SharedInformer

	KubeNodeInformer cache.SharedInformer

	PriorityClassInformer cache.SharedInformer

	CSIDriverInformer cache.SharedInformer

	StorageClassInformer cache.SharedInformer

	PodDisruptionBudgetInformer cache.SharedInformer

	ServiceInformer cache.SharedInformer
	// contains filtered or unexported fields
}

DataStore object

func NewDataStore

func NewDataStore(namespace string, lhClient lhclientset.Interface, kubeClient clientset.Interface, extensionsClient apiextensionsclientset.Interface, informerFactories *util.InformerFactories) *DataStore

NewDataStore creates new DataStore object

func (*DataStore) AddRecurringJobLabelToVolume added in v1.5.0

func (s *DataStore) AddRecurringJobLabelToVolume(volume *longhorn.Volume, labelKey string) (*longhorn.Volume, error)

AddRecurringJobLabelToVolume adds a recurring job label to the given volume.

func (*DataStore) AreAllVolumesDetached added in v1.3.0

func (s *DataStore) AreAllVolumesDetached() (bool, error)

func (*DataStore) AreAllVolumesDetachedState added in v1.4.4

func (s *DataStore) AreAllVolumesDetachedState() (bool, error)

func (*DataStore) CheckEngineImageReadiness added in v1.1.1

func (s *DataStore) CheckEngineImageReadiness(image string, nodes ...string) (isReady bool, err error)

CheckEngineImageReadiness return true if the engine IMAGE is deployed on all nodes in the NODES list

func (*DataStore) CheckEngineImageReadyOnAllVolumeReplicas added in v1.1.1

func (s *DataStore) CheckEngineImageReadyOnAllVolumeReplicas(image, volumeName, nodeID string) (bool, error)

CheckEngineImageReadyOnAllVolumeReplicas checks if the IMAGE is deployed on the NODEID as well as all the volume's replicas

func (*DataStore) CheckEngineImageReadyOnAtLeastOneVolumeReplica added in v1.1.1

func (s *DataStore) CheckEngineImageReadyOnAtLeastOneVolumeReplica(image, volumeName, nodeID string, dataLocality longhorn.DataLocality) (bool, error)

CheckEngineImageReadyOnAtLeastOneVolumeReplica checks if the IMAGE is deployed on the NODEID and on at least one of the the volume's replicas

func (*DataStore) CreateBackingImage added in v1.1.1

func (s *DataStore) CreateBackingImage(backingImage *longhorn.BackingImage) (*longhorn.BackingImage, error)

CreateBackingImage creates a Longhorn BackingImage resource and verifies creation

func (*DataStore) CreateBackingImageDataSource added in v1.2.0

func (s *DataStore) CreateBackingImageDataSource(backingImageDataSource *longhorn.BackingImageDataSource) (*longhorn.BackingImageDataSource, error)

CreateBackingImageDataSource creates a Longhorn BackingImageDataSource resource and verifies creation

func (*DataStore) CreateBackingImageManager added in v1.1.1

func (s *DataStore) CreateBackingImageManager(backingImageManager *longhorn.BackingImageManager) (*longhorn.BackingImageManager, error)

CreateBackingImageManager creates a Longhorn BackingImageManager resource and verifies creation

func (*DataStore) CreateBackup added in v1.2.0

func (s *DataStore) CreateBackup(backup *longhorn.Backup, backupVolumeName string) (*longhorn.Backup, error)

CreateBackup creates a Longhorn Backup CR and verifies creation

func (*DataStore) CreateBackupTarget added in v1.2.0

func (s *DataStore) CreateBackupTarget(backupTarget *longhorn.BackupTarget) (*longhorn.BackupTarget, error)

CreateBackupTarget creates a Longhorn BackupTargets CR and verifies creation

func (*DataStore) CreateBackupVolume added in v1.2.0

func (s *DataStore) CreateBackupVolume(backupVolume *longhorn.BackupVolume) (*longhorn.BackupVolume, error)

CreateBackupVolume creates a Longhorn BackupVolumes CR and verifies creation

func (*DataStore) CreateClusterRole added in v1.4.0

func (s *DataStore) CreateClusterRole(clusterRole *rbacv1.ClusterRole) (*rbacv1.ClusterRole, error)

CreateClusterRole create a ClusterRole resource with the given ClusterRole object

func (*DataStore) CreateClusterRoleBinding added in v1.4.0

func (s *DataStore) CreateClusterRoleBinding(clusterRoleBinding *rbacv1.ClusterRoleBinding) (*rbacv1.ClusterRoleBinding, error)

CreateClusterRoleBinding create a ClusterRoleBinding resource with the given ClusterRoleBinding object

func (*DataStore) CreateConfigMap added in v1.4.0

func (s *DataStore) CreateConfigMap(configMap *corev1.ConfigMap) (*corev1.ConfigMap, error)

CreateConfigMap creates a ConfigMap resource

func (*DataStore) CreateCronJob added in v1.2.0

func (s *DataStore) CreateCronJob(cronJob *batchv1.CronJob) (*batchv1.CronJob, error)

CreateCronJob creates a CronJob resource

func (*DataStore) CreateCustomResourceDefinition added in v1.4.0

CreateCustomResourceDefinition creates a CustomResourceDefinition resource with the given CustomResourceDefinition object

func (*DataStore) CreateDaemonSet added in v1.4.0

func (s *DataStore) CreateDaemonSet(daemonSet *appsv1.DaemonSet) (*appsv1.DaemonSet, error)

CreateDaemonSet creates a DaemonSet resource with the given DaemonSet object in the Longhorn namespace

func (*DataStore) CreateDefaultNode

func (s *DataStore) CreateDefaultNode(name string) (*longhorn.Node, error)

CreateDefaultNode will create the default Disk at the value of the DefaultDataPath Setting only if Create Default Disk on Labeled Nodes has been disabled.

func (*DataStore) CreateDeployment added in v1.4.0

func (s *DataStore) CreateDeployment(obj *appsv1.Deployment) (*appsv1.Deployment, error)

CreateDeployment creates Deployment with the given object

func (*DataStore) CreateEngine

func (s *DataStore) CreateEngine(e *longhorn.Engine) (*longhorn.Engine, error)

CreateEngine creates a Longhorn Engine resource and verifies creation

func (*DataStore) CreateEngineImage

func (s *DataStore) CreateEngineImage(img *longhorn.EngineImage) (*longhorn.EngineImage, error)

CreateEngineImage creates a Longhorn EngineImage resource and verifies creation

func (*DataStore) CreateEngineImageDaemonSet

func (s *DataStore) CreateEngineImageDaemonSet(ds *appsv1.DaemonSet) error

CreateEngineImageDaemonSet sets EngineImage labels in DaemonSet label and creates a DaemonSet resource in the given namespace

func (*DataStore) CreateInstanceManager added in v0.6.0

func (s *DataStore) CreateInstanceManager(im *longhorn.InstanceManager) (*longhorn.InstanceManager, error)

CreateInstanceManager creates a Longhorn InstanceManager resource and verifies creation

func (*DataStore) CreateJob added in v1.4.0

func (s *DataStore) CreateJob(job *batchv1.Job) (*batchv1.Job, error)

CreateJob creates a Job resource for the given job object in the Longhorn namespace

func (*DataStore) CreateLHVolumeAttachment added in v1.5.0

func (s *DataStore) CreateLHVolumeAttachment(va *longhorn.VolumeAttachment) (*longhorn.VolumeAttachment, error)

CreateLHVolumeAttachment creates a Longhorn volume attachment resource and verifies creation

func (*DataStore) CreateNode

func (s *DataStore) CreateNode(node *longhorn.Node) (*longhorn.Node, error)

CreateNode creates a Longhorn Node resource and verifies creation

func (*DataStore) CreateOrphan added in v1.3.0

func (s *DataStore) CreateOrphan(orphan *longhorn.Orphan) (*longhorn.Orphan, error)

CreateOrphan creates a Longhorn Orphan resource and verifies creation

func (*DataStore) CreatePDB added in v1.1.0

CreatePDB creates a PodDisruptionBudget resource for the given PDB object and namespace

func (*DataStore) CreatePersistentVolume added in v1.1.2

func (s *DataStore) CreatePersistentVolume(pv *corev1.PersistentVolume) (*corev1.PersistentVolume, error)

CreatePersistentVolume creates a PersistentVolume resource for the given PersistentVolume object

func (*DataStore) CreatePersistentVolumeClaim added in v1.1.2

func (s *DataStore) CreatePersistentVolumeClaim(ns string, pvc *corev1.PersistentVolumeClaim) (*corev1.PersistentVolumeClaim, error)

CreatePersistentVolumeClaim creates a PersistentVolumeClaim resource for the given PersistentVolumeclaim object and namespace

func (*DataStore) CreatePod added in v0.6.0

func (s *DataStore) CreatePod(pod *corev1.Pod) (*corev1.Pod, error)

CreatePod creates a Pod resource for the given pod object and namespace

func (*DataStore) CreatePodSecurityPolicy added in v1.4.0

func (s *DataStore) CreatePodSecurityPolicy(podSecurityPolicy *policyv1beta1.PodSecurityPolicy) (*policyv1beta1.PodSecurityPolicy, error)

CreatePodSecurityPolicy create a PodSecurityPolicy resource with the given PodSecurityPolicy object

func (*DataStore) CreateRecurringJob added in v1.2.0

func (s *DataStore) CreateRecurringJob(recurringJob *longhorn.RecurringJob) (*longhorn.RecurringJob, error)

CreateRecurringJob creates a Longhorn RecurringJob resource and verifies creation

func (*DataStore) CreateReplica

func (s *DataStore) CreateReplica(r *longhorn.Replica) (*longhorn.Replica, error)

CreateReplica creates a Longhorn Replica resource and verifies creation

func (*DataStore) CreateRole added in v1.4.0

func (s *DataStore) CreateRole(role *rbacv1.Role) (*rbacv1.Role, error)

CreateRole create a Role resource with the given Role object in the Longhorn namespace

func (*DataStore) CreateRoleBinding added in v1.4.0

func (s *DataStore) CreateRoleBinding(role *rbacv1.RoleBinding) (*rbacv1.RoleBinding, error)

CreateRoleBinding create a RoleBinding resource with the given RoleBinding object in the Longhorn namespace

func (*DataStore) CreateService added in v1.1.0

func (s *DataStore) CreateService(ns string, service *corev1.Service) (*corev1.Service, error)

CreateService creates a Service resource for the given CreateService object and namespace

func (*DataStore) CreateServiceAccount added in v1.4.0

func (s *DataStore) CreateServiceAccount(serviceAccount *corev1.ServiceAccount) (*corev1.ServiceAccount, error)

CreateServiceAccount create a ServiceAccount resource with the given ServiceAccount object in the Longhorn namespace

func (*DataStore) CreateSetting

func (s *DataStore) CreateSetting(setting *longhorn.Setting) (*longhorn.Setting, error)

CreateSetting create a Longhorn Settings resource for the given setting and namespace

func (*DataStore) CreateShareManager added in v1.1.0

func (s *DataStore) CreateShareManager(sm *longhorn.ShareManager) (*longhorn.ShareManager, error)

CreateShareManager creates a Longhorn ShareManager resource and verifies creation

func (*DataStore) CreateSnapshot added in v1.3.0

func (s *DataStore) CreateSnapshot(snapshot *longhorn.Snapshot) (*longhorn.Snapshot, error)

CreateSnapshot creates a Longhorn snapshot CR and verifies creation

func (*DataStore) CreateStorageClass added in v1.1.0

func (s *DataStore) CreateStorageClass(sc *storagev1.StorageClass) (*storagev1.StorageClass, error)

CreateStorageClass creates StorageClass with the given object

func (*DataStore) CreateSupportBundle added in v1.4.0

func (s *DataStore) CreateSupportBundle(supportBundle *longhorn.SupportBundle) (*longhorn.SupportBundle, error)

CreateSupportBundle creates a Longhorn SupportBundle resource and verifies creation

func (*DataStore) CreateSystemBackup added in v1.4.0

func (s *DataStore) CreateSystemBackup(systemBackup *longhorn.SystemBackup) (*longhorn.SystemBackup, error)

CreateSystemBackup creates a Longhorn SystemBackup and verifies creation

func (*DataStore) CreateSystemRestore added in v1.4.0

func (s *DataStore) CreateSystemRestore(systemRestore *longhorn.SystemRestore) (*longhorn.SystemRestore, error)

CreateSystemRestore creates a Longhorn SystemRestore resource and verifies creation

func (*DataStore) CreateVolume

func (s *DataStore) CreateVolume(v *longhorn.Volume) (*longhorn.Volume, error)

CreateVolume creates a Longhorn Volume resource and verifies creation

func (*DataStore) DeleteAllBackupsForBackupVolume added in v1.2.0

func (s *DataStore) DeleteAllBackupsForBackupVolume(backupVolumeName string) error

DeleteAllBackupsForBackupVolume won't result in immediately deletion since finalizer was set by default

func (*DataStore) DeleteBackingImage added in v1.1.1

func (s *DataStore) DeleteBackingImage(name string) error

DeleteBackingImage won't result in immediately deletion since finalizer was set by default

func (*DataStore) DeleteBackingImageDataSource added in v1.2.0

func (s *DataStore) DeleteBackingImageDataSource(name string) error

DeleteBackingImageDataSource won't result in immediately deletion since finalizer was set by default

func (*DataStore) DeleteBackingImageManager added in v1.1.1

func (s *DataStore) DeleteBackingImageManager(name string) error

DeleteBackingImageManager won't result in immediately deletion since finalizer was set by default

func (*DataStore) DeleteBackup added in v1.2.0

func (s *DataStore) DeleteBackup(backupName string) error

DeleteBackup won't result in immediately deletion since finalizer was set by default

func (*DataStore) DeleteBackupTarget added in v1.2.0

func (s *DataStore) DeleteBackupTarget(backupTargetName string) error

DeleteBackupTarget won't result in immediately deletion since finalizer was set by default

func (*DataStore) DeleteBackupVolume added in v1.2.0

func (s *DataStore) DeleteBackupVolume(backupVolumeName string) error

DeleteBackupVolume won't result in immediately deletion since finalizer was set by default

func (*DataStore) DeleteCSIDriver added in v0.7.0

func (s *DataStore) DeleteCSIDriver(name string) error

DeleteCSIDriver deletes CSIDriver for the given name and namespace

func (*DataStore) DeleteConfigMap added in v1.4.0

func (s *DataStore) DeleteConfigMap(namespace, name string) error

DeleteConfigMap deletes the ConfigMap for the given name and namespace

func (*DataStore) DeleteCronJob

func (s *DataStore) DeleteCronJob(cronJobName string) error

DeleteCronJob delete CronJob for the given name and namespace. The dependents will be deleted in the background

func (*DataStore) DeleteDaemonSet added in v0.3.2

func (s *DataStore) DeleteDaemonSet(name string) error

DeleteDaemonSet deletes DaemonSet for the given name and namespace. The dependents will be deleted in the foreground

func (*DataStore) DeleteDeployment added in v0.4.0

func (s *DataStore) DeleteDeployment(name string) error

DeleteDeployment deletes Deployment for the given name and namespace. The dependents will be deleted in the foreground

func (*DataStore) DeleteEngine

func (s *DataStore) DeleteEngine(name string) error

DeleteEngine won't result in immediately deletion since finalizer was set by default

func (*DataStore) DeleteEngineImage

func (s *DataStore) DeleteEngineImage(name string) error

DeleteEngineImage won't result in immediately deletion since finalizer was set by default

func (*DataStore) DeleteInstanceManager added in v0.6.0

func (s *DataStore) DeleteInstanceManager(name string) error

DeleteInstanceManager deletes the InstanceManager. The dependents will be deleted in the foreground

func (*DataStore) DeleteJob added in v1.4.0

func (s *DataStore) DeleteJob(name string) error

DeleteJob delete a Job resource for the given job name in the Longhorn namespace

func (*DataStore) DeleteLHVolumeAttachment added in v1.5.0

func (s *DataStore) DeleteLHVolumeAttachment(vaName string) error

DeleteLHVolumeAttachment won't result in immediately deletion since finalizer was set by default

func (*DataStore) DeleteLease added in v1.1.0

func (s *DataStore) DeleteLease(name string) error

DeleteLease deletes Lease with the given name in s.namespace

func (*DataStore) DeleteNode added in v0.3.1

func (s *DataStore) DeleteNode(name string) error

DeleteNode deletes Node for the given name and namespace

func (*DataStore) DeleteOrphan added in v1.3.0

func (s *DataStore) DeleteOrphan(orphanName string) error

DeleteOrphan won't result in immediately deletion since finalizer was set by default

func (*DataStore) DeletePDB added in v1.1.0

func (s *DataStore) DeletePDB(name string) error

DeletePDB deletes PodDisruptionBudget for the given name and namespace

func (*DataStore) DeletePersistentVolume added in v1.1.2

func (s *DataStore) DeletePersistentVolume(pvName string) error

DeletePersistentVolume deletes the PersistentVolume for the given PersistentVolume name

func (*DataStore) DeletePersistentVolumeClaim added in v1.1.2

func (s *DataStore) DeletePersistentVolumeClaim(ns, pvcName string) error

DeletePersistentVolumeClaim deletes the PersistentVolumeClaim for the given name and namespace

func (*DataStore) DeletePod added in v0.6.0

func (s *DataStore) DeletePod(name string) error

DeletePod deletes Pod for the given name and namespace

func (*DataStore) DeleteRecurringJob added in v1.2.0

func (s *DataStore) DeleteRecurringJob(name string) error

DeleteRecurringJob deletes the RecurringJob. The dependents will be deleted in the foreground

func (*DataStore) DeleteReplica

func (s *DataStore) DeleteReplica(name string) error

DeleteReplica won't result in immediately deletion since finalizer was set by default

func (*DataStore) DeleteSecret added in v1.5.4

func (s *DataStore) DeleteSecret(namespace, name string) error

DeleteSecret deletes the Secret for the given name and namespace

func (*DataStore) DeleteService added in v1.1.0

func (s *DataStore) DeleteService(namespace, name string) error

DeleteService deletes the Service for the given name and namespace

func (*DataStore) DeleteShareManager added in v1.1.0

func (s *DataStore) DeleteShareManager(name string) error

DeleteShareManager won't result in immediately deletion since finalizer was set by default

func (*DataStore) DeleteSnapshot added in v1.3.0

func (s *DataStore) DeleteSnapshot(snapshotName string) error

DeleteSnapshot won't result in immediately deletion since finalizer was set by default

func (*DataStore) DeleteStorageClass added in v1.1.0

func (s *DataStore) DeleteStorageClass(scName string) error

DeleteStorageClass deletes StorageClass with the given name

func (*DataStore) DeleteSupportBundle added in v1.4.0

func (s *DataStore) DeleteSupportBundle(name string) error

DeleteSupportBundle won't result in immediately deletion since finalizer was set by default

func (*DataStore) DeleteSystemBackup added in v1.4.0

func (s *DataStore) DeleteSystemBackup(name string) error

DeleteSystemBackup won't result in immediately deletion since finalizer was set by default

func (*DataStore) DeleteSystemRestore added in v1.4.0

func (s *DataStore) DeleteSystemRestore(name string) error

DeleteSystemRestore won't result in immediately deletion since finalizer was set by default The dependents will be deleted in the foreground

func (*DataStore) DeleteVolume

func (s *DataStore) DeleteVolume(name string) error

DeleteVolume won't result in immediately deletion since finalizer was set by default

func (*DataStore) GetAllClusterRoleBindingList added in v1.4.0

func (s *DataStore) GetAllClusterRoleBindingList() (runtime.Object, error)

GetAllClusterRoleBindingList returns an uncached list of ClusterRoleBindings directly from the API server. Direct retrieval from the API server should only be used for one-shot tasks.

func (*DataStore) GetAllClusterRoleList added in v1.4.0

func (s *DataStore) GetAllClusterRoleList() (runtime.Object, error)

GetAllClusterRoleList returns an uncached list of ClusterRoles directly from the API server. Direct retrieval from the API server should only be used for one-shot tasks.

func (*DataStore) GetAllConfigMaps added in v0.6.2

func (s *DataStore) GetAllConfigMaps() (runtime.Object, error)

GetAllConfigMaps returns an uncached list of configmaps for the given namespace directly from the API server. Using cached informers should be preferred but current lister doesn't have a field selector. Direct retrieval from the API server should only be used for one-shot tasks. For example, support bundle creation

func (*DataStore) GetAllCronJobsList added in v0.4.0

func (s *DataStore) GetAllCronJobsList() (runtime.Object, error)

GetAllCronJobsList returns an uncached list of cronjobs for the given namespace directly from the API server. Using cached informers should be preferred but current lister doesn't have a field selector. Direct retrieval from the API server should only be used for one-shot tasks. For example, support bundle creation

func (*DataStore) GetAllDaemonSetsList added in v0.4.0

func (s *DataStore) GetAllDaemonSetsList() (runtime.Object, error)

GetAllDaemonSetsList returns an uncached list of daemonsets for the given namespace directly from the API server. Using cached informers should be preferred but current lister doesn't have a field selector. Direct retrieval from the API server should only be used for one-shot tasks. For example, support bundle creation

func (*DataStore) GetAllDeploymentsList added in v0.4.0

func (s *DataStore) GetAllDeploymentsList() (runtime.Object, error)

GetAllDeploymentsList returns an uncached list of deployments for the given namespace directly from the API server. Using cached informers should be preferred but current lister doesn't have a field selector. Direct retrieval from the API server should only be used for one-shot tasks. For example, support bundle creation

func (*DataStore) GetAllEventsList added in v0.4.0

func (s *DataStore) GetAllEventsList() (runtime.Object, error)

GetAllEventsList returns an uncached list of events for the given namespace directly from the API server. Using cached informers should be preferred but current lister doesn't have a field selector. Direct retrieval from the API server should only be used for one-shot tasks. For example, support bundle creation

func (*DataStore) GetAllJobsList added in v0.4.0

func (s *DataStore) GetAllJobsList() (runtime.Object, error)

GetAllJobsList returns an uncached list of jobs for the given namespace directly from the API server. Using cached informers should be preferred but current lister doesn't have a field selector. Direct retrieval from the API server should only be used for one-shot tasks. For example, support bundle creation

func (*DataStore) GetAllLonghornCustomResourceDefinitions added in v1.4.0

func (s *DataStore) GetAllLonghornCustomResourceDefinitions() (runtime.Object, error)

GetAllLonghornCustomResourceDefinitions returns an uncached list of Longhorn grouped CustomResourceDefinitions directly from the API server. Direct retrieval from the API server should only be used for one-shot tasks.

func (*DataStore) GetAllLonghornEngineImages added in v1.4.0

func (s *DataStore) GetAllLonghornEngineImages() (runtime.Object, error)

GetAllLonghornEngineImages returns an uncached list of EngineImages in Longhorn namespace directly from the API server. Using cached informers should be preferred but current lister doesn't have a field selector. Direct retrieval from the API server should only be used for one-shot tasks.

func (*DataStore) GetAllLonghornRecurringJobs added in v1.4.0

func (s *DataStore) GetAllLonghornRecurringJobs() (runtime.Object, error)

GetAllLonghornRecurringJobs returns an uncached list of RecurringJobs in Longhorn namespace directly from the API server. Using cached informers should be preferred but current lister doesn't have a field selector. Direct retrieval from the API server should only be used for one-shot tasks.

func (*DataStore) GetAllLonghornSettings added in v1.4.0

func (s *DataStore) GetAllLonghornSettings() (runtime.Object, error)

GetAllLonghornSettings returns an uncached list of Settings in Longhorn namespace directly from the API server. Using cached informers should be preferred but current lister doesn't have a field selector. Direct retrieval from the API server should only be used for one-shot tasks.

func (*DataStore) GetAllLonghornStorageClassList added in v1.4.0

func (s *DataStore) GetAllLonghornStorageClassList() (runtime.Object, error)

GetAllLonghornStorageClassList returns an uncached list of Longhorn StorageClasses directly from the API server. Using cached informers should be preferred but current lister doesn't have a field selector. Direct retrieval from the API server should only be used for one-shot tasks.

func (*DataStore) GetAllLonghornVolumes added in v1.4.0

func (s *DataStore) GetAllLonghornVolumes() (runtime.Object, error)

GetAllLonghornVolumes returns an uncached list of Volumes in Longhorn namespace directly from the API server. Using cached informers should be preferred but current lister doesn't have a field selector. Direct retrieval from the API server should only be used for one-shot tasks.

func (*DataStore) GetAllNodesList added in v0.5.0

func (s *DataStore) GetAllNodesList() (runtime.Object, error)

GetAllNodesList returns an uncached list of nodes for the given namespace directly from the API server. Using cached informers should be preferred but current lister doesn't have a field selector. Direct retrieval from the API server should only be used for one-shot tasks. For example, support bundle creation

func (*DataStore) GetAllPersistentVolumeClaimsByPersistentVolumeProvisioner added in v1.4.0

func (s *DataStore) GetAllPersistentVolumeClaimsByPersistentVolumeProvisioner() (runtime.Object, error)

GetAllPersistentVolumeClaimsByPersistentVolumeProvisioner returns an uncached list of PersistentVolumeClaims with the StorageClass of the PersistentVolumes with provisioner "driver.longhorn.io". This is directly from the API server. Using cached informers should be preferred but current lister doesn't have a field selector. Direct retrieval from the API server should only be used for one-shot tasks.

func (*DataStore) GetAllPersistentVolumeClaimsByStorageClass added in v1.4.0

func (s *DataStore) GetAllPersistentVolumeClaimsByStorageClass(storageClassNames []string) (runtime.Object, error)

GetAllPersistentVolumeClaimsByStorageClass returns an uncached list of PersistentVolumeClaims of the given storage class name directly from the API server. Using cached informers should be preferred but current lister doesn't have a field selector. Direct retrieval from the API server should only be used for one-shot tasks.

func (*DataStore) GetAllPersistentVolumesWithLonghornProvisioner added in v1.4.0

func (s *DataStore) GetAllPersistentVolumesWithLonghornProvisioner() (runtime.Object, error)

GetAllPersistentVolumesWithLonghornProvisioner returns an uncached list of PersistentVolumes with provisioner "driver.longhorn.io" directly from the API server. Using cached informers should be preferred but current lister doesn't have a field selector. Direct retrieval from the API server should only be used for one-shot tasks.

func (*DataStore) GetAllPodSecurityPolicyList added in v1.4.0

func (s *DataStore) GetAllPodSecurityPolicyList() (runtime.Object, error)

GetAllPodSecurityPolicyList returns an uncached list of PodSecurityPolicys directly from the API server. Direct retrieval from the API server should only be used for one-shot tasks.

func (*DataStore) GetAllPodsList added in v0.4.0

func (s *DataStore) GetAllPodsList() (runtime.Object, error)

GetAllPodsList returns an uncached list of pods for the given namespace directly from the API server. Using cached informers should be preferred but current lister doesn't have a field selector. Direct retrieval from the API server should only be used for one-shot tasks. For example, support bundle creation

func (*DataStore) GetAllRoleBindingList added in v1.4.0

func (s *DataStore) GetAllRoleBindingList() (runtime.Object, error)

GetAllRoleBindingList returns an uncached list of RoleBindings directly from the API server. Direct retrieval from the API server should only be used for one-shot tasks.

func (*DataStore) GetAllRoleList added in v1.4.0

func (s *DataStore) GetAllRoleList() (runtime.Object, error)

GetAllRoleList returns an uncached list of Roles directly from the API server. Direct retrieval from the API server should only be used for one-shot tasks.

func (*DataStore) GetAllServiceAccountList added in v1.4.0

func (s *DataStore) GetAllServiceAccountList() (runtime.Object, error)

GetAllServiceAccountList returns an uncached list of ServiceAccounts in Longhorn namespace directly from the API server. Direct retrieval from the API server should only be used for one-shot tasks.

func (*DataStore) GetAllServicesList added in v0.4.0

func (s *DataStore) GetAllServicesList() (runtime.Object, error)

GetAllServicesList returns an uncached list of services for the given namespace directly from the API server. Using cached informers should be preferred but current lister doesn't have a field selector. Direct retrieval from the API server should only be used for one-shot tasks. For example, support bundle creation

func (*DataStore) GetAllStatefulSetsList added in v0.4.0

func (s *DataStore) GetAllStatefulSetsList() (runtime.Object, error)

GetAllStatefulSetsList returns an uncached list of statefulsets for the given namespace directly from the API server. Using cached informers should be preferred but current lister doesn't have a field selector. Direct retrieval from the API server should only be used for one-shot tasks. For example, support bundle creation

func (*DataStore) GetAllVolumeAttachments added in v1.0.0

func (s *DataStore) GetAllVolumeAttachments() (runtime.Object, error)

GetAllVolumeAttachments returns an uncached list of volumeattachments for the given namespace directly from the API server. Using cached informers should be preferred but current lister doesn't have a field selector. Direct retrieval from the API server should only be used for one-shot tasks. For example, support bundle creation

func (*DataStore) GetBackingImage added in v1.1.1

func (s *DataStore) GetBackingImage(name string) (*longhorn.BackingImage, error)

GetBackingImage returns a new BackingImage object for the given name and namespace

func (*DataStore) GetBackingImageDataSource added in v1.2.0

func (s *DataStore) GetBackingImageDataSource(name string) (*longhorn.BackingImageDataSource, error)

GetBackingImageDataSource returns a new BackingImageDataSource object for the given name and namespace

func (*DataStore) GetBackingImageManager added in v1.1.1

func (s *DataStore) GetBackingImageManager(name string) (*longhorn.BackingImageManager, error)

GetBackingImageManager returns a new BackingImageManager object for the given name and namespace

func (*DataStore) GetBackingImageManagerRO added in v1.5.4

func (s *DataStore) GetBackingImageManagerRO(name string) (*longhorn.BackingImageManager, error)

func (*DataStore) GetBackingImageRO added in v1.5.4

func (s *DataStore) GetBackingImageRO(name string) (*longhorn.BackingImage, error)

func (*DataStore) GetBackup added in v1.2.0

func (s *DataStore) GetBackup(name string) (*longhorn.Backup, error)

GetBackup returns a copy of Backup with the given backup name in the cluster

func (*DataStore) GetBackupRO added in v1.2.0

func (s *DataStore) GetBackupRO(backupName string) (*longhorn.Backup, error)

GetBackupRO returns the Backup with the given backup name in the cluster

func (*DataStore) GetBackupTarget added in v1.2.0

func (s *DataStore) GetBackupTarget(name string) (*longhorn.BackupTarget, error)

GetBackupTarget returns a copy of BackupTarget with the given backup target name in the cluster

func (*DataStore) GetBackupTargetRO added in v1.2.0

func (s *DataStore) GetBackupTargetRO(backupTargetName string) (*longhorn.BackupTarget, error)

GetBackupTargetRO returns the BackupTarget with the given backup target name in the cluster

func (*DataStore) GetBackupVolume added in v1.2.0

func (s *DataStore) GetBackupVolume(name string) (*longhorn.BackupVolume, error)

GetBackupVolume returns a copy of BackupVolume with the given backup volume name in the cluster

func (*DataStore) GetBackupVolumeRO added in v1.2.0

func (s *DataStore) GetBackupVolumeRO(backupVolumeName string) (*longhorn.BackupVolume, error)

GetBackupVolumeRO returns the BackupVolume with the given backup volume name in the cluster

func (*DataStore) GetClusterRole added in v1.4.0

func (s *DataStore) GetClusterRole(name string) (*rbacv1.ClusterRole, error)

GetClusterRole get the ClusterRole resource of the given name

func (*DataStore) GetClusterRoleBinding added in v1.4.0

func (s *DataStore) GetClusterRoleBinding(name string) (*rbacv1.ClusterRoleBinding, error)

GetClusterRoleBinding get the ClusterRoleBinding resource of the given name

func (*DataStore) GetConfigMap added in v1.1.0

func (s *DataStore) GetConfigMap(namespace, name string) (resultRO *corev1.ConfigMap, err error)

GetConfigMap return a new ConfigMap object for the given namespace and name

func (*DataStore) GetConfigMapRO added in v1.1.0

func (s *DataStore) GetConfigMapRO(namespace, name string) (*corev1.ConfigMap, error)

GetConfigMapRO gets ConfigMap with the given name in s.namespace This function returns direct reference to the internal cache object and should not be mutated. Consider using this function when you can guarantee read only access and don't want the overhead of deep copies

func (*DataStore) GetConfigMapWithoutCache added in v1.4.1

func (s *DataStore) GetConfigMapWithoutCache(namespace, name string) (*corev1.ConfigMap, error)

GetConfigMapWithoutCache return a new ConfigMap via Kubernetes client object for the given namespace and name

func (*DataStore) GetCredentialFromSecret

func (s *DataStore) GetCredentialFromSecret(secretName string) (map[string]string, error)

GetCredentialFromSecret gets the Secret of the given name and namespace Returns a new credential object or error

func (*DataStore) GetCronJobROByRecurringJob added in v1.2.0

func (s *DataStore) GetCronJobROByRecurringJob(recurringJob *longhorn.RecurringJob) (*batchv1.CronJob, error)

GetCronJobROByRecurringJob returns read-only CronJob for the recurring job

func (*DataStore) GetCustomResourceDefinition added in v1.4.0

func (s *DataStore) GetCustomResourceDefinition(name string) (*apiextensionsv1.CustomResourceDefinition, error)

GetCustomResourceDefinition get the CustomResourceDefinition resource of the given name

func (*DataStore) GetDaemonSet added in v0.3.2

func (s *DataStore) GetDaemonSet(name string) (*appsv1.DaemonSet, error)

GetDaemonSet gets the DaemonSet for the given name and namespace

func (*DataStore) GetDefaultBackupTargetRO added in v1.4.0

func (s *DataStore) GetDefaultBackupTargetRO() (*longhorn.BackupTarget, error)

GetDefaultBackupTargetRO returns the BackupTarget for the default backup target

func (*DataStore) GetDefaultInstanceManagerByNodeRO added in v1.5.4

func (s *DataStore) GetDefaultInstanceManagerByNodeRO(name string) (*longhorn.InstanceManager, error)

GetDefaultInstanceManagerByNodeRO returns the given node's engine InstanceManager that is using the default instance manager image. The object is the direct reference to the internal cache object and should not be mutated. Consider using this function when you can guarantee read only access and don't want the overhead of deep copy.

func (*DataStore) GetDeployment added in v0.4.0

func (s *DataStore) GetDeployment(name string) (*appsv1.Deployment, error)

GetDeployment gets the Deployment for the given name and namespace

func (*DataStore) GetEngine

func (s *DataStore) GetEngine(name string) (*longhorn.Engine, error)

GetEngine returns the Engine for the given name and namespace

func (*DataStore) GetEngineImage

func (s *DataStore) GetEngineImage(name string) (*longhorn.EngineImage, error)

GetEngineImage returns a new EngineImage object for the given name and namespace

func (*DataStore) GetEngineImageByImage added in v1.4.0

func (s *DataStore) GetEngineImageByImage(image string) (*longhorn.EngineImage, error)

func (*DataStore) GetEngineImageCLIAPIVersion added in v1.1.0

func (s *DataStore) GetEngineImageCLIAPIVersion(imageName string) (int, error)

GetEngineImageCLIAPIVersion get engine image for the given name and returns the CLIAPIVersion

func (*DataStore) GetEngineImageDaemonSet

func (s *DataStore) GetEngineImageDaemonSet(name string) (*appsv1.DaemonSet, error)

GetEngineImageDaemonSet get DaemonSet for the given name and namespace, and returns a new DaemonSet object

func (*DataStore) GetEngineImageRO added in v1.5.4

func (s *DataStore) GetEngineImageRO(name string) (*longhorn.EngineImage, error)

func (*DataStore) GetEngineRO added in v1.2.5

func (s *DataStore) GetEngineRO(name string) (*longhorn.Engine, error)

func (*DataStore) GetInstanceManager added in v0.6.0

func (s *DataStore) GetInstanceManager(name string) (*longhorn.InstanceManager, error)

GetInstanceManager gets the InstanceManager for the given name and namespace. Returns new InstanceManager object

func (*DataStore) GetInstanceManagerByInstance added in v0.6.0

func (s *DataStore) GetInstanceManagerByInstance(obj interface{}) (*longhorn.InstanceManager, error)

GetInstanceManagerByInstance returns an InstanceManager for a given object, or an error if more than one InstanceManager is found.

func (*DataStore) GetInstanceManagerByInstanceRO added in v1.5.4

func (s *DataStore) GetInstanceManagerByInstanceRO(obj interface{}) (*longhorn.InstanceManager, error)

func (*DataStore) GetInstanceManagerRO added in v1.3.0

func (s *DataStore) GetInstanceManagerRO(name string) (*longhorn.InstanceManager, error)

func (*DataStore) GetJob added in v1.4.0

func (s *DataStore) GetJob(name string) (*batchv1.Job, error)

GetJob get a Job resource for the given job name in the Longhorn namespace

func (*DataStore) GetKubernetesNodeRO added in v1.5.4

func (s *DataStore) GetKubernetesNodeRO(name string) (*corev1.Node, error)

GetKubernetesNodeRO gets the Node from the index for the given name

func (*DataStore) GetKubernetesVersion added in v0.4.0

func (s *DataStore) GetKubernetesVersion() (*version.Info, error)

GetKubernetesVersion returns the server version

func (*DataStore) GetLHVolumeAttachment added in v1.5.0

func (s *DataStore) GetLHVolumeAttachment(name string) (*longhorn.VolumeAttachment, error)

GetLHVolumeAttachment returns a copy of VolumeAttachment with the given name in the cluster

func (*DataStore) GetLHVolumeAttachmentByVolumeName added in v1.5.0

func (s *DataStore) GetLHVolumeAttachmentByVolumeName(volName string) (*longhorn.VolumeAttachment, error)

func (*DataStore) GetLHVolumeAttachmentRO added in v1.5.0

func (s *DataStore) GetLHVolumeAttachmentRO(name string) (*longhorn.VolumeAttachment, error)

GetLHVolumeAttachmentRO returns the VolumeAttachment with the given name in the cluster

func (*DataStore) GetLonghornEngineImage added in v1.4.0

func (s *DataStore) GetLonghornEngineImage(name string) (runtime.Object, error)

GetLonghornEngineImage returns the uncached EngineImage in Longhorn namespace directly from the API server. Direct retrieval from the API server should only be used for one-shot tasks.

func (*DataStore) GetLonghornEventList added in v0.4.0

func (s *DataStore) GetLonghornEventList() (*corev1.EventList, error)

GetLonghornEventList returns an uncached list of longhorn events for the given namespace directly from the API server. Using cached informers should be preferred but current lister doesn't have a field selector. Direct retrieval from the API server should only be used for one-shot tasks. For example, support bundle creation

func (*DataStore) GetLonghornNamespace added in v0.4.0

func (s *DataStore) GetLonghornNamespace() (*corev1.Namespace, error)

GetLonghornNamespace returns an uncached namespace object for the given Longhorn namespace directly from the API server. Using cached informers should be preferred but current lister doesn't have a field selector. Direct retrieval from the API server should only be used for one-shot tasks. For example, support bundle creation

func (*DataStore) GetLonghornSnapshotUncached added in v1.5.2

func (s *DataStore) GetLonghornSnapshotUncached(name string) (*longhorn.Snapshot, error)

GetLonghornSnapshotUncached returns the uncached Snapshot in the Longhorn namespace directly from the API server. Direct retrieval from the API server should ideally only be used for one-shot tasks, but there may be other limited situations in which it is necessary.

func (*DataStore) GetManagerLabel added in v1.4.4

func (s *DataStore) GetManagerLabel() map[string]string

func (*DataStore) GetManagerNodeIPMap

func (s *DataStore) GetManagerNodeIPMap() (map[string]string, error)

GetManagerNodeIPMap returns an object contains podIPs from list of running pods with app=longhorn-manager

func (*DataStore) GetNamespace added in v1.4.0

func (s *DataStore) GetNamespace(name string) (*corev1.Namespace, error)

GetNamespace returns an uncached namespace object for the given namespace directly from the API server. Direct retrieval from the API server should only be used for one-shot tasks. For example, support bundle creation

func (*DataStore) GetNode

func (s *DataStore) GetNode(name string) (*longhorn.Node, error)

GetNode gets Longhorn Node for the given name and namespace Returns a new Node object

func (*DataStore) GetNodeRO added in v0.3.2

func (s *DataStore) GetNodeRO(name string) (*longhorn.Node, error)

func (*DataStore) GetOrphan added in v1.3.0

func (s *DataStore) GetOrphan(name string) (*longhorn.Orphan, error)

GetOrphan returns a copy of Orphan with the given orphan name in the cluster

func (*DataStore) GetOrphanRO added in v1.3.0

func (s *DataStore) GetOrphanRO(orphanName string) (*longhorn.Orphan, error)

GetOrphanRO returns the Orphan with the given orphan name in the cluster

func (*DataStore) GetPDBRO added in v1.1.0

func (s *DataStore) GetPDBRO(name string) (*policyv1.PodDisruptionBudget, error)

GetPDBRO gets PDB for the given name and namespace. This function returns direct reference to the internal cache object and should not be mutated. Consider using this function when you can guarantee read only access and don't want the overhead of deep copies

func (*DataStore) GetPersistentVolume added in v1.1.2

func (s *DataStore) GetPersistentVolume(pvName string) (*corev1.PersistentVolume, error)

GetPersistentVolume gets a mutable PersistentVolume for the given name

func (*DataStore) GetPersistentVolumeClaim added in v1.1.2

func (s *DataStore) GetPersistentVolumeClaim(namespace, pvcName string) (*corev1.PersistentVolumeClaim, error)

GetPersistentVolumeClaim gets a mutable PersistentVolumeClaim for the given name and namespace

func (*DataStore) GetPersistentVolumeClaimRO added in v1.1.2

func (s *DataStore) GetPersistentVolumeClaimRO(namespace, pvcName string) (*corev1.PersistentVolumeClaim, error)

GetPersistentVolumeClaimRO gets the PersistentVolumeClaim from the index for the given name and namespace This function returns direct reference to the internal cache object and should not be mutated. Consider using this function when you can guarantee read only access and don't want the overhead of deep copies

func (*DataStore) GetPersistentVolumeRO added in v1.1.2

func (s *DataStore) GetPersistentVolumeRO(pvName string) (*corev1.PersistentVolume, error)

GetPersistentVolumeRO gets the PersistentVolume from the index for the given name This function returns direct reference to the internal cache object and should not be mutated. Consider using this function when you can guarantee read only access and don't want the overhead of deep copies

func (*DataStore) GetPod added in v1.1.0

func (s *DataStore) GetPod(name string) (*corev1.Pod, error)

GetPod returns a mutable Pod object for the given name and namespace

func (*DataStore) GetPodContainerLog added in v1.2.0

func (s *DataStore) GetPodContainerLog(podName, containerName string) ([]byte, error)

GetPodContainerLog dumps the log of a container in a Pod object for the given name and namespace. Be careful that this function will directly talk with the API server.

func (*DataStore) GetPodContainerLogRequest added in v0.4.0

func (s *DataStore) GetPodContainerLogRequest(podName, containerName string) *rest.Request

GetPodContainerLogRequest returns the Pod log for the given pod name, container name and namespace

func (*DataStore) GetPodRO added in v1.3.0

func (s *DataStore) GetPodRO(namespace, name string) (*corev1.Pod, error)

func (*DataStore) GetPodSecurityPolicy added in v1.4.0

func (s *DataStore) GetPodSecurityPolicy(name string) (*policyv1beta1.PodSecurityPolicy, error)

GetPodSecurityPolicy get the PodSecurityPolicy resource of the given name

func (*DataStore) GetPriorityClass added in v1.0.1

func (s *DataStore) GetPriorityClass(pcName string) (*schedulingv1.PriorityClass, error)

GetPriorityClass gets the PriorityClass from the index for the given name

func (*DataStore) GetRandomReadyNodeDisk added in v1.3.3

func (s *DataStore) GetRandomReadyNodeDisk() (*longhorn.Node, string, error)

GetRandomReadyNodeDisk a list of all Node the in the given namespace and returns the first Node && the first Disk of the Node marked with condition ready and allow scheduling

func (*DataStore) GetReadyDisk added in v1.3.0

func (s *DataStore) GetReadyDisk(nodeName string, diskUUID string) (string, error)

GetReadyDisk find disk name by the given nodeName and diskUUD Returns a disk name

func (*DataStore) GetReadyDiskNode added in v1.1.1

func (s *DataStore) GetReadyDiskNode(diskUUID string) (*longhorn.Node, string, error)

GetReadyDiskNode find the corresponding ready Longhorn Node for a given disk Returns a Node object and the disk name

func (*DataStore) GetReadyDiskNodeRO added in v1.5.4

func (s *DataStore) GetReadyDiskNodeRO(diskUUID string) (*longhorn.Node, string, error)

func (*DataStore) GetRecurringJob added in v1.2.0

func (s *DataStore) GetRecurringJob(name string) (*longhorn.RecurringJob, error)

GetRecurringJob gets the RecurringJob for the given name and namespace. Returns a mutable RecurringJob object

func (*DataStore) GetRecurringJobRO added in v1.5.4

func (s *DataStore) GetRecurringJobRO(name string) (*longhorn.RecurringJob, error)

func (*DataStore) GetReplica

func (s *DataStore) GetReplica(name string) (*longhorn.Replica, error)

GetReplica gets Replica for the given name and namespace and returns a new Replica object

func (*DataStore) GetReplicaRO added in v1.5.0

func (s *DataStore) GetReplicaRO(name string) (*longhorn.Replica, error)

func (*DataStore) GetRole added in v1.4.0

func (s *DataStore) GetRole(name string) (*rbacv1.Role, error)

GetRole get the Role resource of the given name in the Longhorn namespace

func (*DataStore) GetRoleBinding added in v1.4.0

func (s *DataStore) GetRoleBinding(name string) (*rbacv1.RoleBinding, error)

GetRoleBinding get the RoleBinding resource of the given name in the Longhorn namespace

func (*DataStore) GetSecret added in v1.1.1

func (s *DataStore) GetSecret(namespace, name string) (resultRO *corev1.Secret, err error)

GetSecret return a new Secret object with the given namespace and name

func (*DataStore) GetSecretRO added in v1.1.1

func (s *DataStore) GetSecretRO(namespace, name string) (*corev1.Secret, error)

GetSecretRO gets Secret with the given namespace and name This function returns direct reference to the internal cache object and should not be mutated. Consider using this function when you can guarantee read only access and don't want the overhead of deep copies

func (*DataStore) GetService added in v1.1.0

func (s *DataStore) GetService(namespace, name string) (*corev1.Service, error)

GetService gets the Service for the given name and namespace

func (*DataStore) GetServiceAccount added in v1.4.0

func (s *DataStore) GetServiceAccount(name string) (*corev1.ServiceAccount, error)

GetServiceAccount get the ServiceAccount resource of the given name in the Longhorn namespace

func (*DataStore) GetSetting

func (s *DataStore) GetSetting(sName types.SettingName) (*longhorn.Setting, error)

GetSetting will automatically fill the non-existing setting if it's a valid setting name. The function will not return nil for *longhorn.Setting when error is nil

func (*DataStore) GetSettingAsBool added in v0.3.2

func (s *DataStore) GetSettingAsBool(settingName types.SettingName) (bool, error)

GetSettingAsBool gets the setting for the given name, returns as boolean Returns error if the definition type is not boolean

func (*DataStore) GetSettingAsInt

func (s *DataStore) GetSettingAsInt(settingName types.SettingName) (int64, error)

GetSettingAsInt gets the setting for the given name, returns as integer Returns error if the definition type is not integer

func (*DataStore) GetSettingExact added in v1.2.5

func (s *DataStore) GetSettingExact(sName types.SettingName) (*longhorn.Setting, error)

GetSettingExact returns the Setting for the given name and namespace

func (*DataStore) GetSettingExactRO added in v1.5.4

func (s *DataStore) GetSettingExactRO(sName types.SettingName) (*longhorn.Setting, error)

func (*DataStore) GetSettingImagePullPolicy added in v1.1.0

func (s *DataStore) GetSettingImagePullPolicy() (corev1.PullPolicy, error)

GetSettingImagePullPolicy get the setting and return one of Kubernetes ImagePullPolicy definition Returns error if the ImagePullPolicy is invalid

func (*DataStore) GetSettingSystemManagedComponentsNodeSelector added in v1.1.1

func (s *DataStore) GetSettingSystemManagedComponentsNodeSelector() (map[string]string, error)

func (*DataStore) GetSettingTaintToleration added in v1.1.0

func (s *DataStore) GetSettingTaintToleration() ([]corev1.Toleration, error)

func (*DataStore) GetSettingValueExisted added in v0.5.0

func (s *DataStore) GetSettingValueExisted(sName types.SettingName) (string, error)

GetSettingValueExisted returns the value of the given setting name. Returns error if the setting does not exist or value is empty

func (*DataStore) GetSettingWithAutoFillingRO added in v1.5.4

func (s *DataStore) GetSettingWithAutoFillingRO(sName types.SettingName) (*longhorn.Setting, error)

func (*DataStore) GetShareManager added in v1.1.0

func (s *DataStore) GetShareManager(name string) (*longhorn.ShareManager, error)

GetShareManager gets the ShareManager for the given name and namespace. Returns a mutable ShareManager object

func (*DataStore) GetSnapshot added in v1.3.0

func (s *DataStore) GetSnapshot(name string) (*longhorn.Snapshot, error)

GetSnapshot returns a copy of Snapshot with the given snapshot name in the cluster

func (*DataStore) GetSnapshotRO added in v1.3.0

func (s *DataStore) GetSnapshotRO(snapName string) (*longhorn.Snapshot, error)

GetSnapshotRO returns the Snapshot with the given snapshot name in the cluster

func (*DataStore) GetStorageClass added in v1.4.0

func (s *DataStore) GetStorageClass(name string) (*storagev1.StorageClass, error)

GetStorageClass returns a new StorageClass object for the given name

func (*DataStore) GetStorageClassRO added in v1.1.0

func (s *DataStore) GetStorageClassRO(scName string) (*storagev1.StorageClass, error)

GetStorageClassRO gets StorageClass with the given name This function returns direct reference to the internal cache object and should not be mutated. Consider using this function when you can guarantee read only access and don't want the overhead of deep copies

func (*DataStore) GetStorageIPFromPod added in v1.3.0

func (s *DataStore) GetStorageIPFromPod(pod *corev1.Pod) string

GetStorageIPFromPod returns the given pod network-status IP of the name matching the storage-network setting value. If the storage-network setting is empty or encountered an error, return the pod IP instead. For below example, given "kube-system/demo-192-168-0-0" will return "192.168.1.175".

apiVersion: v1 kind: Pod metadata:

annotations:
  k8s.v1.cni.cncf.io/network-status: |-
    [{
  	  "name": "cbr0",
  	  "interface": "eth0",
  	  "ips": [
  		  "10.42.0.175"
  	  ],
  	  "mac": "be:67:b2:19:17:84",
  	  "default": true,
  	  "dns": {}
    },{
  	  "name": "kube-system/demo-192-168-0-0",
  	  "interface": "lhnet1",
  	  "ips": [
  		  "192.168.1.175"
  	  ],
  	  "mac": "02:59:e5:d4:ae:ea",
  	  "dns": {}
    }]

func (*DataStore) GetSupportBundle added in v1.4.0

func (s *DataStore) GetSupportBundle(name string) (*longhorn.SupportBundle, error)

GetSupportBundle returns a copy of SupportBundle with the given name

func (*DataStore) GetSupportBundleManagerLabel added in v1.4.0

func (s *DataStore) GetSupportBundleManagerLabel(supportBundle *longhorn.SupportBundle) map[string]string

func (*DataStore) GetSupportBundleManagerPod added in v1.4.0

func (s *DataStore) GetSupportBundleManagerPod(supportBundle *longhorn.SupportBundle) (*corev1.Pod, error)

func (*DataStore) GetSupportBundleRO added in v1.4.0

func (s *DataStore) GetSupportBundleRO(name string) (*longhorn.SupportBundle, error)

GetSupportBundleRO returns the SupportBundle with the given name

func (*DataStore) GetSystemBackup added in v1.4.0

func (s *DataStore) GetSystemBackup(name string) (*longhorn.SystemBackup, error)

GetSystemBackup returns a copy of SystemBackup with the given name

func (*DataStore) GetSystemBackupRO added in v1.4.0

func (s *DataStore) GetSystemBackupRO(name string) (*longhorn.SystemBackup, error)

GetSystemBackupRO returns the SystemBackup with the given name

func (*DataStore) GetSystemRestore added in v1.4.0

func (s *DataStore) GetSystemRestore(name string) (*longhorn.SystemRestore, error)

GetSystemRestore returns a copy of SystemRestore with the given obj name

func (*DataStore) GetSystemRestoreInProgress added in v1.4.0

func (s *DataStore) GetSystemRestoreInProgress(name string) (systemRestore *longhorn.SystemRestore, err error)

GetSystemRestoreInProgress validate the given name and returns the only SystemRestore in progress. Returns error if found less or more SystemRestore. If given an empty name, return the SystemRestore without validating the name.

func (*DataStore) GetSystemRestoreRO added in v1.4.0

func (s *DataStore) GetSystemRestoreRO(name string) (*longhorn.SystemRestore, error)

GetSystemRestoreRO returns the SystemRestore with the given CR name

func (*DataStore) GetVolume

func (s *DataStore) GetVolume(name string) (*longhorn.Volume, error)

GetVolume returns a new volume object for the given namespace and name

func (*DataStore) GetVolumeCurrentEngine added in v1.2.0

func (s *DataStore) GetVolumeCurrentEngine(volumeName string) (*longhorn.Engine, error)

GetVolumeCurrentEngine returns the Engine for a volume with the given namespace

func (*DataStore) GetVolumeRO added in v1.2.4

func (s *DataStore) GetVolumeRO(name string) (*longhorn.Volume, error)

func (*DataStore) IsEngineImageCLIAPIVersionOne added in v0.6.0

func (s *DataStore) IsEngineImageCLIAPIVersionOne(imageName string) (bool, error)

IsEngineImageCLIAPIVersionOne get engine image CLIAPIVersion for the given name. Returns true if CLIAPIVersion is 1

func (*DataStore) IsKubeNodeUnschedulable added in v1.2.4

func (s *DataStore) IsKubeNodeUnschedulable(nodeName string) (bool, error)

IsKubeNodeUnschedulable checks if the Kubernetes Node resource is unschedulable

func (*DataStore) IsNodeDeleted added in v1.4.2

func (s *DataStore) IsNodeDeleted(name string) (bool, error)

IsNodeDeleted checks whether the node does not exist by passing in the node name

func (*DataStore) IsNodeDownOrDeleted added in v0.3.2

func (s *DataStore) IsNodeDownOrDeleted(name string) (bool, error)

IsNodeDownOrDeleted gets Node for the given name and namespace and checks if the Node condition is gone or not ready

func (*DataStore) IsNodeDownOrDeletedOrMissingManager added in v1.1.1

func (s *DataStore) IsNodeDownOrDeletedOrMissingManager(name string) (bool, error)

func (*DataStore) IsNodeSchedulable added in v1.1.1

func (s *DataStore) IsNodeSchedulable(name string) bool

func (*DataStore) ListBackingImageDataSources added in v1.2.0

func (s *DataStore) ListBackingImageDataSources() (map[string]*longhorn.BackingImageDataSource, error)

ListBackingImageDataSources returns object includes all BackingImageDataSource in namespace

func (*DataStore) ListBackingImageDataSourcesByNode added in v1.2.0

func (s *DataStore) ListBackingImageDataSourcesByNode(nodeName string) (map[string]*longhorn.BackingImageDataSource, error)

ListBackingImageDataSourcesByNode returns object includes all BackingImageDataSource in namespace

func (*DataStore) ListBackingImageDataSourcesExportingFromVolume added in v1.2.0

func (s *DataStore) ListBackingImageDataSourcesExportingFromVolume(volumeName string) (map[string]*longhorn.BackingImageDataSource, error)

ListBackingImageDataSourcesExportingFromVolume returns object includes all BackingImageDataSource in namespace

func (*DataStore) ListBackingImageManagerPods added in v1.1.1

func (s *DataStore) ListBackingImageManagerPods() ([]*corev1.Pod, error)

func (*DataStore) ListBackingImageManagers added in v1.1.1

func (s *DataStore) ListBackingImageManagers() (map[string]*longhorn.BackingImageManager, error)

ListBackingImageManagers returns object includes all BackingImageManager in namespace

func (*DataStore) ListBackingImageManagersByDiskUUID added in v1.1.1

func (s *DataStore) ListBackingImageManagersByDiskUUID(diskUUID string) (map[string]*longhorn.BackingImageManager, error)

ListBackingImageManagersByDiskUUID gets a list of BackingImageManager in a specific disk with the given namespace.

func (*DataStore) ListBackingImageManagersByNode added in v1.1.1

func (s *DataStore) ListBackingImageManagersByNode(nodeName string) (map[string]*longhorn.BackingImageManager, error)

ListBackingImageManagersByNode gets a list of BackingImageManager on a specific node with the given namespace.

func (*DataStore) ListBackingImageManagersByNodeRO added in v1.5.4

func (s *DataStore) ListBackingImageManagersByNodeRO(nodeName string) ([]*longhorn.BackingImageManager, error)

func (*DataStore) ListBackingImageManagersRO added in v1.5.4

func (s *DataStore) ListBackingImageManagersRO() ([]*longhorn.BackingImageManager, error)

func (*DataStore) ListBackingImages added in v1.1.1

func (s *DataStore) ListBackingImages() (map[string]*longhorn.BackingImage, error)

ListBackingImages returns object includes all BackingImage in namespace

func (*DataStore) ListBackupTargets added in v1.2.0

func (s *DataStore) ListBackupTargets() (map[string]*longhorn.BackupTarget, error)

ListBackupTargets returns an object contains all backup targets in the cluster BackupTargets CR

func (*DataStore) ListBackupVolumes added in v1.2.0

func (s *DataStore) ListBackupVolumes() (map[string]*longhorn.BackupVolume, error)

ListBackupVolumes returns an object contains all backup volumes in the cluster BackupVolumes CR

func (*DataStore) ListBackups added in v1.2.0

func (s *DataStore) ListBackups() (map[string]*longhorn.Backup, error)

ListBackups returns an object contains all backups in the cluster Backups CR

func (*DataStore) ListBackupsRO added in v1.3.0

func (s *DataStore) ListBackupsRO() ([]*longhorn.Backup, error)

ListBackupsRO returns a list of all Backups for the given namespace

func (*DataStore) ListBackupsWithBackupVolumeName added in v1.2.0

func (s *DataStore) ListBackupsWithBackupVolumeName(backupVolumeName string) (map[string]*longhorn.Backup, error)

ListBackupsWithBackupVolumeName returns an object contains all backups in the cluster Backups CR of the given backup volume name

func (*DataStore) ListDRVolumesRO added in v1.2.0

func (s *DataStore) ListDRVolumesRO() (map[string]*longhorn.Volume, error)

ListDRVolumesRO returns a single object contains all DR Volumes

func (*DataStore) ListDRVolumesWithBackupVolumeNameRO added in v1.5.4

func (s *DataStore) ListDRVolumesWithBackupVolumeNameRO(backupVolumeName string) (map[string]*longhorn.Volume, error)

ListDRVolumesWithBackupVolumeNameRO returns a single object contains the DR volumes matches to the backup volume name

func (*DataStore) ListDaemonSet added in v0.6.0

func (s *DataStore) ListDaemonSet() ([]*appsv1.DaemonSet, error)

ListDaemonSet gets a list of all DaemonSet for the given namespace

func (*DataStore) ListDaemonSetWithLabels added in v1.1.1

func (s *DataStore) ListDaemonSetWithLabels(labels map[string]string) ([]*appsv1.DaemonSet, error)

func (*DataStore) ListDeployment added in v0.6.0

func (s *DataStore) ListDeployment() ([]*appsv1.Deployment, error)

ListDeployment gets a list of all Deployment for the given namespace

func (*DataStore) ListDeploymentWithLabels added in v1.1.1

func (s *DataStore) ListDeploymentWithLabels(labels map[string]string) ([]*appsv1.Deployment, error)

func (*DataStore) ListEngineImageDaemonSetPodsFromEngineImageName added in v1.1.1

func (s *DataStore) ListEngineImageDaemonSetPodsFromEngineImageName(EIName string) ([]*corev1.Pod, error)

func (*DataStore) ListEngineImages

func (s *DataStore) ListEngineImages() (map[string]*longhorn.EngineImage, error)

ListEngineImages returns object includes all EngineImage in namespace

func (*DataStore) ListEngines added in v0.3.2

func (s *DataStore) ListEngines() (map[string]*longhorn.Engine, error)

ListEngines returns an object contains all Engine for the given namespace

func (*DataStore) ListEnginesByNodeRO added in v1.1.2

func (s *DataStore) ListEnginesByNodeRO(name string) ([]*longhorn.Engine, error)

ListEnginesByNodeRO returns a list of all Engines on node Name for the given namespace, the list contains direct references to the internal cache objects and should not be mutated. Consider using this function when you can guarantee read only access and don't want the overhead of deep copies

func (*DataStore) ListEnginesRO added in v0.7.0

func (s *DataStore) ListEnginesRO() ([]*longhorn.Engine, error)

ListEnginesRO returns a list of all Engine for the given namespace

func (*DataStore) ListInstanceManagerPods added in v0.6.0

func (s *DataStore) ListInstanceManagerPods() ([]*corev1.Pod, error)

ListInstanceManagerPods returns a list of Pod marked with component=instance-manager

func (*DataStore) ListInstanceManagerPodsBy added in v1.1.2

func (s *DataStore) ListInstanceManagerPodsBy(node string, image string, imType longhorn.InstanceManagerType) ([]*corev1.Pod, error)

ListInstanceManagerPodsBy returns a list of instance manager pods that fulfill the below conditions

func (*DataStore) ListInstanceManagers added in v0.6.0

func (s *DataStore) ListInstanceManagers() (map[string]*longhorn.InstanceManager, error)

ListInstanceManagers gets a list of InstanceManagers for the given namespace. Returns a new InstanceManager object

func (*DataStore) ListInstanceManagersByNodeRO added in v1.5.4

func (s *DataStore) ListInstanceManagersByNodeRO(node string, imType longhorn.InstanceManagerType) (map[string]*longhorn.InstanceManager, error)

func (*DataStore) ListInstanceManagersBySelectorRO added in v1.5.4

func (s *DataStore) ListInstanceManagersBySelectorRO(node, instanceManagerImage string, managerType longhorn.InstanceManagerType) (map[string]*longhorn.InstanceManager, error)

ListInstanceManagersBySelectorRO gets a list of InstanceManager by labels for the given namespace, the list contains direct references to the internal cache objects and should not be mutated. Consider using this function when you can guarantee read only access and don't want the overhead of deep copies.

func (*DataStore) ListInstanceManagersRO added in v1.5.4

func (s *DataStore) ListInstanceManagersRO() (map[string]*longhorn.InstanceManager, error)

func (*DataStore) ListKubeNodesRO added in v1.1.0

func (s *DataStore) ListKubeNodesRO() ([]*corev1.Node, error)

ListKubeNodesRO returns a list of all Kubernetes Nodes for the given namespace, the list contains direct references to the internal cache objects and should not be mutated. Consider using this function when you can guarantee read only access and don't want the overhead of deep copies

func (*DataStore) ListLonghornVolumeAttachmentByVolumeRO added in v1.5.0

func (s *DataStore) ListLonghornVolumeAttachmentByVolumeRO(name string) ([]*longhorn.VolumeAttachment, error)

ListLonghornVolumeAttachmentByVolumeRO returns a list of all Longhorn VolumeAttachments of a volume. The list contains direct references to the internal cache objects and should not be mutated. Consider using this function when you can guarantee read only access and don't want the overhead of deep copies

func (*DataStore) ListManagerPods

func (s *DataStore) ListManagerPods() ([]*corev1.Pod, error)

ListManagerPods returns a list of Pods marked with app=longhorn-manager

func (*DataStore) ListManagerPodsRO added in v1.5.4

func (s *DataStore) ListManagerPodsRO() ([]*corev1.Pod, error)

func (*DataStore) ListNodes

func (s *DataStore) ListNodes() (map[string]*longhorn.Node, error)

ListNodes returns an object contains all Node for the namespace

func (*DataStore) ListNodesContainingEngineImageRO added in v1.5.4

func (s *DataStore) ListNodesContainingEngineImageRO(ei *longhorn.EngineImage) (map[string]*longhorn.Node, error)

func (*DataStore) ListNodesRO added in v1.1.0

func (s *DataStore) ListNodesRO() ([]*longhorn.Node, error)

ListNodesRO returns a list of all Nodes for the given namespace, the list contains direct references to the internal cache objects and should not be mutated. Consider using this function when you can guarantee read only access and don't want the overhead of deep copies

func (*DataStore) ListOrphans added in v1.3.0

func (s *DataStore) ListOrphans() (map[string]*longhorn.Orphan, error)

ListOrphans returns an object contains all Orphans for the given namespace

func (*DataStore) ListOrphansByNode added in v1.3.0

func (s *DataStore) ListOrphansByNode(name string) (map[string]*longhorn.Orphan, error)

ListOrphansByNode gets a map of Orphans on the node Name for the given namespace.

func (*DataStore) ListOrphansByNodeRO added in v1.3.0

func (s *DataStore) ListOrphansByNodeRO(name string) ([]*longhorn.Orphan, error)

ListOrphansByNodeRO returns a list of all Orphans on node Name for the given namespace, the list contains direct references to the internal cache objects and should not be mutated. Consider using this function when you can guarantee read only access and don't want the overhead of deep copies

func (*DataStore) ListOrphansRO added in v1.3.0

func (s *DataStore) ListOrphansRO() ([]*longhorn.Orphan, error)

ListOrphansRO returns a list of all Orphans for the given namespace

func (*DataStore) ListPDBsRO added in v1.5.4

func (s *DataStore) ListPDBsRO() (map[string]*policyv1.PodDisruptionBudget, error)

ListPDBsRO gets a map of PDB in s.namespace This function returns direct reference to the internal cache objects and should not be mutated. Consider using this function when you can guarantee read only access and don't want the overhead of deep copies

func (*DataStore) ListPersistentVolumesRO added in v1.4.0

func (s *DataStore) ListPersistentVolumesRO() ([]*corev1.PersistentVolume, error)

ListPersistentVolumesRO gets a list of PersistentVolumes. This function returns direct reference to the internal cache object and should not be mutated. Consider using this function when you can guarantee read only access and don't want the overhead of deep copies

func (*DataStore) ListPodsBySelector added in v1.1.0

func (s *DataStore) ListPodsBySelector(selector labels.Selector) ([]*corev1.Pod, error)

func (*DataStore) ListPodsBySelectorRO added in v1.5.4

func (s *DataStore) ListPodsBySelectorRO(selector labels.Selector) ([]*corev1.Pod, error)

func (*DataStore) ListPodsRO added in v1.1.0

func (s *DataStore) ListPodsRO(namespace string) ([]*corev1.Pod, error)

ListPodsRO returns a list of all Pods for the given namespace, the list contains direct references to the internal cache objects and should not be mutated. Consider using this function when you can guarantee read only access and don't want the overhead of deep copies

func (*DataStore) ListReadyAndSchedulableNodesRO added in v1.5.4

func (s *DataStore) ListReadyAndSchedulableNodesRO() (map[string]*longhorn.Node, error)

func (*DataStore) ListReadyNodes added in v1.1.1

func (s *DataStore) ListReadyNodes() (map[string]*longhorn.Node, error)

func (*DataStore) ListReadyNodesContainingEngineImageRO added in v1.5.4

func (s *DataStore) ListReadyNodesContainingEngineImageRO(image string) (map[string]*longhorn.Node, error)

func (*DataStore) ListReadyNodesRO added in v1.5.4

func (s *DataStore) ListReadyNodesRO() (map[string]*longhorn.Node, error)

func (*DataStore) ListRecurringJobs added in v1.2.0

func (s *DataStore) ListRecurringJobs() (map[string]*longhorn.RecurringJob, error)

ListRecurringJobs returns a map of RecurringJobPolicies indexed by name

func (*DataStore) ListRecurringJobsRO added in v1.4.0

func (s *DataStore) ListRecurringJobsRO() (map[string]*longhorn.RecurringJob, error)

ListRecurringJobsRO returns a map of RecurringJobPolicies indexed by name

func (*DataStore) ListReplicas added in v0.3.2

func (s *DataStore) ListReplicas() (map[string]*longhorn.Replica, error)

ListReplicas returns an object contains all Replicas for the given namespace

func (*DataStore) ListReplicasByBackingImage added in v1.1.1

func (s *DataStore) ListReplicasByBackingImage(backingImageName string) ([]*longhorn.Replica, error)

ListReplicasByBackingImage gets a list of Replicas using a specific backing image the given namespace.

func (*DataStore) ListReplicasByDiskUUID added in v1.1.0

func (s *DataStore) ListReplicasByDiskUUID(uuid string) (map[string]*longhorn.Replica, error)

ListReplicasByDiskUUID gets a list of Replicas on a specific disk the given namespace.

func (*DataStore) ListReplicasByNode

func (s *DataStore) ListReplicasByNode(name string) (map[string]*longhorn.Replica, error)

ListReplicasByNode gets a map of Replicas on the node Name for the given namespace.

func (*DataStore) ListReplicasByNodeRO added in v1.1.0

func (s *DataStore) ListReplicasByNodeRO(name string) ([]*longhorn.Replica, error)

ListReplicasByNodeRO returns a list of all Replicas on node Name for the given namespace, the list contains direct references to the internal cache objects and should not be mutated. Consider using this function when you can guarantee read only access and don't want the overhead of deep copies

func (*DataStore) ListReplicasRO added in v1.3.0

func (s *DataStore) ListReplicasRO() ([]*longhorn.Replica, error)

ListReplicasRO returns a list of all replicas for the given namespace

func (*DataStore) ListSettings

func (s *DataStore) ListSettings() (map[types.SettingName]*longhorn.Setting, error)

ListSettings lists all Settings in the namespace, and fill with default values of any missing entry

func (*DataStore) ListShareManagerPods added in v1.1.0

func (s *DataStore) ListShareManagerPods() ([]*corev1.Pod, error)

func (*DataStore) ListShareManagers added in v1.1.0

func (s *DataStore) ListShareManagers() (map[string]*longhorn.ShareManager, error)

ListShareManagers returns a map of ShareManagers indexed by name

func (*DataStore) ListSnapshots added in v1.3.0

func (s *DataStore) ListSnapshots() (map[string]*longhorn.Snapshot, error)

func (*DataStore) ListSnapshotsRO added in v1.3.0

func (s *DataStore) ListSnapshotsRO(selector labels.Selector) (map[string]*longhorn.Snapshot, error)

func (*DataStore) ListStorageClassesInPersistentVolumesWithLonghornProvisioner added in v1.4.0

func (s *DataStore) ListStorageClassesInPersistentVolumesWithLonghornProvisioner() ([]string, error)

ListStorageClassesInPersistentVolumesWithLonghornProvisioner returns a list of StorageClasses used by PersistenVolumes with provisioner "driver.longhorn.io".

func (*DataStore) ListSupportBundleManagerPods added in v1.4.0

func (s *DataStore) ListSupportBundleManagerPods(supportBundle *longhorn.SupportBundle) ([]*corev1.Pod, error)

ListSupportBundleManagerPods returns a list of support bundle manager Pods

func (*DataStore) ListSupportBundles added in v1.4.0

func (s *DataStore) ListSupportBundles() (map[string]*longhorn.SupportBundle, error)

ListSupportBundles returns an object contains all SupportBundles

func (*DataStore) ListSupportBundlesRO added in v1.4.0

func (s *DataStore) ListSupportBundlesRO() ([]*longhorn.SupportBundle, error)

ListSupportBundlesRO returns a list of all SupportBundles for the given namespace. Consider using this function when you can guarantee read only access and don't want the overhead of deep copies

func (*DataStore) ListSystemBackups added in v1.4.0

func (s *DataStore) ListSystemBackups() (map[string]*longhorn.SystemBackup, error)

ListSystemBackups returns a copy of the object contains all SystemBackups

func (*DataStore) ListSystemBackupsRO added in v1.4.0

func (s *DataStore) ListSystemBackupsRO() ([]*longhorn.SystemBackup, error)

ListSystemBackupsRO returns an object contains all SystemBackups

func (*DataStore) ListSystemRestores added in v1.4.0

func (s *DataStore) ListSystemRestores() (map[string]*longhorn.SystemRestore, error)

ListSystemRestores returns an object contains all SystemRestores

func (*DataStore) ListSystemRestoresInProgress added in v1.4.0

func (s *DataStore) ListSystemRestoresInProgress() (map[string]*longhorn.SystemRestore, error)

ListSystemRestoresInProgress returns an object contains all SystemRestores in progress

func (*DataStore) ListVolumeAttachmentsRO added in v1.2.5

func (s *DataStore) ListVolumeAttachmentsRO() ([]*storagev1.VolumeAttachment, error)

ListVolumeAttachmentsRO gets a list of volumeattachments This function returns direct reference to the internal cache object and should not be mutated. Consider using this function when you can guarantee read only access and don't want the overhead of deep copies

func (*DataStore) ListVolumeEngines

func (s *DataStore) ListVolumeEngines(volumeName string) (map[string]*longhorn.Engine, error)

ListVolumeEngines returns an object contains all Engines with the given LonghornLabelVolume name and namespace

func (*DataStore) ListVolumeEnginesRO added in v1.5.4

func (s *DataStore) ListVolumeEnginesRO(volumeName string) (map[string]*longhorn.Engine, error)

func (*DataStore) ListVolumeEnginesUncached added in v1.4.4

func (s *DataStore) ListVolumeEnginesUncached(volumeName string) ([]longhorn.Engine, error)

ListVolumeEnginesUncached returns an uncached list of Volume's engines in Longhorn namespace directly from the API server.

func (*DataStore) ListVolumePDBProtectedHealthyReplicasRO added in v1.5.4

func (s *DataStore) ListVolumePDBProtectedHealthyReplicasRO(volumeName string) (map[string]*longhorn.Replica, error)

func (*DataStore) ListVolumeReplicas

func (s *DataStore) ListVolumeReplicas(volumeName string) (map[string]*longhorn.Replica, error)

ListVolumeReplicas returns an object contains all Replica with the given LonghornLabelVolume name and namespace

func (*DataStore) ListVolumeReplicasRO added in v1.5.4

func (s *DataStore) ListVolumeReplicasRO(volumeName string) (map[string]*longhorn.Replica, error)

func (*DataStore) ListVolumeSnapshotsRO added in v1.3.0

func (s *DataStore) ListVolumeSnapshotsRO(volumeName string) (map[string]*longhorn.Snapshot, error)

func (*DataStore) ListVolumes

func (s *DataStore) ListVolumes() (map[string]*longhorn.Volume, error)

ListVolumes returns an object contains all Volume

func (*DataStore) ListVolumesByBackupVolumeRO added in v1.3.3

func (s *DataStore) ListVolumesByBackupVolumeRO(backupVolumeName string) (map[string]*longhorn.Volume, error)

ListVolumesByBackupVolumeRO returns an object contains all Volumes with the specified backup-volume label

func (*DataStore) ListVolumesByLabelSelector added in v1.2.0

func (s *DataStore) ListVolumesByLabelSelector(selector labels.Selector) (map[string]*longhorn.Volume, error)

ListVolumesByLabelSelector returns an object contains all Volume

func (*DataStore) ListVolumesBySelectorRO added in v1.2.0

func (s *DataStore) ListVolumesBySelectorRO(selector labels.Selector) ([]*longhorn.Volume, error)

ListVolumesBySelectorRO returns a list of all Volumes for the given namespace

func (*DataStore) ListVolumesFollowsGlobalSettingsRO added in v1.4.0

func (s *DataStore) ListVolumesFollowsGlobalSettingsRO(followedSettingNames map[string]bool) (map[string]*longhorn.Volume, error)

ListVolumesFollowsGlobalSettingsRO returns an object contains all Volumes that don't apply specific spec and follow the global settings

func (*DataStore) ListVolumesRO added in v0.3.2

func (s *DataStore) ListVolumesRO() ([]*longhorn.Volume, error)

ListVolumesRO returns a list of all Volumes for the given namespace

func (*DataStore) ListVolumesROWithBackupVolumeName added in v1.2.0

func (s *DataStore) ListVolumesROWithBackupVolumeName(backupVolumeName string) ([]*longhorn.Volume, error)

ListVolumesROWithBackupVolumeName returns a single object contains all volumes with the given backup volume name

func (*DataStore) PickVolumeCurrentEngine added in v1.2.0

func (s *DataStore) PickVolumeCurrentEngine(v *longhorn.Volume, es map[string]*longhorn.Engine) (*longhorn.Engine, error)

PickVolumeCurrentEngine pick the current Engine from the Engine list of a volume with the given namespace

func (*DataStore) RemoveFinalizerForBackingImage added in v1.1.1

func (s *DataStore) RemoveFinalizerForBackingImage(obj *longhorn.BackingImage) error

RemoveFinalizerForBackingImage will result in deletion if DeletionTimestamp was set

func (*DataStore) RemoveFinalizerForBackingImageDataSource added in v1.2.0

func (s *DataStore) RemoveFinalizerForBackingImageDataSource(obj *longhorn.BackingImageDataSource) error

RemoveFinalizerForBackingImageDataSource will result in deletion if DeletionTimestamp was set

func (*DataStore) RemoveFinalizerForBackingImageManager added in v1.1.1

func (s *DataStore) RemoveFinalizerForBackingImageManager(obj *longhorn.BackingImageManager) error

RemoveFinalizerForBackingImageManager will result in deletion if DeletionTimestamp was set

func (*DataStore) RemoveFinalizerForBackup added in v1.2.0

func (s *DataStore) RemoveFinalizerForBackup(backup *longhorn.Backup) error

RemoveFinalizerForBackup will result in deletion if DeletionTimestamp was set

func (*DataStore) RemoveFinalizerForBackupVolume added in v1.2.0

func (s *DataStore) RemoveFinalizerForBackupVolume(backupVolume *longhorn.BackupVolume) error

RemoveFinalizerForBackupVolume will result in deletion if DeletionTimestamp was set

func (*DataStore) RemoveFinalizerForEngine

func (s *DataStore) RemoveFinalizerForEngine(obj *longhorn.Engine) error

RemoveFinalizerForEngine will result in deletion if DeletionTimestamp was set

func (*DataStore) RemoveFinalizerForEngineImage

func (s *DataStore) RemoveFinalizerForEngineImage(obj *longhorn.EngineImage) error

RemoveFinalizerForEngineImage will result in deletion if DeletionTimestamp was set

func (*DataStore) RemoveFinalizerForLHVolumeAttachment added in v1.5.0

func (s *DataStore) RemoveFinalizerForLHVolumeAttachment(va *longhorn.VolumeAttachment) error

RemoveFinalizerForLHVolumeAttachment will result in deletion if DeletionTimestamp was set

func (*DataStore) RemoveFinalizerForNode

func (s *DataStore) RemoveFinalizerForNode(obj *longhorn.Node) error

RemoveFinalizerForNode will result in deletion if DeletionTimestamp was set

func (*DataStore) RemoveFinalizerForOrphan added in v1.3.0

func (s *DataStore) RemoveFinalizerForOrphan(orphan *longhorn.Orphan) error

RemoveFinalizerForOrphan will result in deletion if DeletionTimestamp was set

func (*DataStore) RemoveFinalizerForReplica

func (s *DataStore) RemoveFinalizerForReplica(obj *longhorn.Replica) error

RemoveFinalizerForReplica will result in deletion if DeletionTimestamp was set

func (*DataStore) RemoveFinalizerForShareManager added in v1.1.0

func (s *DataStore) RemoveFinalizerForShareManager(obj *longhorn.ShareManager) error

RemoveFinalizerForShareManager will result in deletion if DeletionTimestamp was set

func (*DataStore) RemoveFinalizerForSnapshot added in v1.3.0

func (s *DataStore) RemoveFinalizerForSnapshot(snapshot *longhorn.Snapshot) error

RemoveFinalizerForSnapshot will result in deletion if DeletionTimestamp was set

func (*DataStore) RemoveFinalizerForSupportBundle added in v1.4.0

func (s *DataStore) RemoveFinalizerForSupportBundle(supportBundle *longhorn.SupportBundle) (err error)

RemoveFinalizerForSupportBundle will result in deletion if DeletionTimestamp was set

func (*DataStore) RemoveFinalizerForSystemBackup added in v1.4.0

func (s *DataStore) RemoveFinalizerForSystemBackup(obj *longhorn.SystemBackup) error

RemoveFinalizerForSystemBackup results in deletion if DeletionTimestamp was set

func (*DataStore) RemoveFinalizerForVolume

func (s *DataStore) RemoveFinalizerForVolume(obj *longhorn.Volume) error

RemoveFinalizerForVolume will result in deletion if DeletionTimestamp was set

func (*DataStore) RemoveRecurringJobLabelFromVolume added in v1.5.0

func (s *DataStore) RemoveRecurringJobLabelFromVolume(volume *longhorn.Volume, labelKey string) (*longhorn.Volume, error)

RemoveRecurringJobLabelFromVolume removes a recurring job label from the given volume.

func (*DataStore) RemoveSystemRestoreLabel added in v1.4.0

func (s *DataStore) RemoveSystemRestoreLabel(systemRestore *longhorn.SystemRestore) (*longhorn.SystemRestore, error)

RemoveSystemRestoreLabel removed the system-restore label and updates the SystemRestore. Longhorn labels SystemRestore with "longhorn.io/system-restore: InProgress" during restoring to ensure only one restore is rolling out.

func (*DataStore) ResetMonitoringEngineStatus added in v0.7.0

func (s *DataStore) ResetMonitoringEngineStatus(e *longhorn.Engine) (*longhorn.Engine, error)

ResetMonitoringEngineStatus clean and update Engine status

func (*DataStore) Sync

func (s *DataStore) Sync(stopCh <-chan struct{}) bool

Sync returns WaitForCacheSync for Longhorn DataStore

func (*DataStore) UpdateBackingImage added in v1.1.1

func (s *DataStore) UpdateBackingImage(backingImage *longhorn.BackingImage) (*longhorn.BackingImage, error)

UpdateBackingImage updates Longhorn BackingImage and verifies update

func (*DataStore) UpdateBackingImageDataSource added in v1.2.0

func (s *DataStore) UpdateBackingImageDataSource(backingImageDataSource *longhorn.BackingImageDataSource) (*longhorn.BackingImageDataSource, error)

UpdateBackingImageDataSource updates Longhorn BackingImageDataSource and verifies update

func (*DataStore) UpdateBackingImageDataSourceStatus added in v1.2.0

func (s *DataStore) UpdateBackingImageDataSourceStatus(backingImageDataSource *longhorn.BackingImageDataSource) (*longhorn.BackingImageDataSource, error)

UpdateBackingImageDataSourceStatus updates Longhorn BackingImageDataSource resource status and verifies update

func (*DataStore) UpdateBackingImageManager added in v1.1.1

func (s *DataStore) UpdateBackingImageManager(backingImageManager *longhorn.BackingImageManager) (*longhorn.BackingImageManager, error)

UpdateBackingImageManager updates Longhorn BackingImageManager and verifies update

func (*DataStore) UpdateBackingImageManagerStatus added in v1.1.1

func (s *DataStore) UpdateBackingImageManagerStatus(backingImageManager *longhorn.BackingImageManager) (*longhorn.BackingImageManager, error)

UpdateBackingImageManagerStatus updates Longhorn BackingImageManager resource status and verifies update

func (*DataStore) UpdateBackingImageStatus added in v1.1.1

func (s *DataStore) UpdateBackingImageStatus(backingImage *longhorn.BackingImage) (*longhorn.BackingImage, error)

UpdateBackingImageStatus updates Longhorn BackingImage resource status and verifies update

func (*DataStore) UpdateBackup added in v1.2.0

func (s *DataStore) UpdateBackup(backup *longhorn.Backup) (*longhorn.Backup, error)

UpdateBackup updates the given Longhorn backup in the cluster Backup CR and verifies update

func (*DataStore) UpdateBackupStatus added in v1.2.0

func (s *DataStore) UpdateBackupStatus(backup *longhorn.Backup) (*longhorn.Backup, error)

UpdateBackupStatus updates the given Longhorn backup status in the cluster Backups CR status and verifies update

func (*DataStore) UpdateBackupTarget added in v1.2.0

func (s *DataStore) UpdateBackupTarget(backupTarget *longhorn.BackupTarget) (*longhorn.BackupTarget, error)

UpdateBackupTarget updates the given Longhorn backup target in the cluster BackupTargets CR and verifies update

func (*DataStore) UpdateBackupTargetStatus added in v1.2.0

func (s *DataStore) UpdateBackupTargetStatus(backupTarget *longhorn.BackupTarget) (*longhorn.BackupTarget, error)

UpdateBackupTargetStatus updates the given Longhorn backup target in the cluster BackupTargets CR status and verifies update

func (*DataStore) UpdateBackupVolume added in v1.2.0

func (s *DataStore) UpdateBackupVolume(backupVolume *longhorn.BackupVolume) (*longhorn.BackupVolume, error)

UpdateBackupVolume updates the given Longhorn backup volume in the cluster BackupVolume CR and verifies update

func (*DataStore) UpdateBackupVolumeStatus added in v1.2.0

func (s *DataStore) UpdateBackupVolumeStatus(backupVolume *longhorn.BackupVolume) (*longhorn.BackupVolume, error)

UpdateBackupVolumeStatus updates the given Longhorn backup volume in the cluster BackupVolumes CR status and verifies update

func (*DataStore) UpdateClusterRole added in v1.4.0

func (s *DataStore) UpdateClusterRole(clusterRole *rbacv1.ClusterRole) (*rbacv1.ClusterRole, error)

UpdateClusterRole create a ClusterRole resource with the given ClusterRole objecct

func (*DataStore) UpdateClusterRoleBinding added in v1.4.0

func (s *DataStore) UpdateClusterRoleBinding(clusterRoleBinding *rbacv1.ClusterRoleBinding) (*rbacv1.ClusterRoleBinding, error)

UpdateClusterRoleBinding updates the ClusterRoleBinding resource with the given ClusterRoleBinding object

func (*DataStore) UpdateConfigMap added in v1.4.0

func (s *DataStore) UpdateConfigMap(configMap *corev1.ConfigMap) (*corev1.ConfigMap, error)

UpdateConfigMap updates ConfigMap resource

func (*DataStore) UpdateCronJob added in v1.2.0

func (s *DataStore) UpdateCronJob(cronJob *batchv1.CronJob) (*batchv1.CronJob, error)

UpdateCronJob updates CronJob resource

func (*DataStore) UpdateCustomResourceDefinition added in v1.4.0

UpdateCustomResourceDefinition updates the CustomResourceDefinition resource with the given object and verifies update

func (*DataStore) UpdateCustomizedSettings added in v1.2.5

func (s *DataStore) UpdateCustomizedSettings(defaultImages map[types.SettingName]string) error

func (*DataStore) UpdateDaemonSet added in v0.6.0

func (s *DataStore) UpdateDaemonSet(obj *appsv1.DaemonSet) (*appsv1.DaemonSet, error)

UpdateDaemonSet updates the DaemonSet for the given DaemonSet object and namespace

func (*DataStore) UpdateDeployment added in v0.6.0

func (s *DataStore) UpdateDeployment(obj *appsv1.Deployment) (*appsv1.Deployment, error)

UpdateDeployment updates Deployment for the given Deployment object and namespace

func (*DataStore) UpdateEngine

func (s *DataStore) UpdateEngine(e *longhorn.Engine) (*longhorn.Engine, error)

UpdateEngine updates Longhorn Engine and verifies update

func (*DataStore) UpdateEngineImage

func (s *DataStore) UpdateEngineImage(img *longhorn.EngineImage) (*longhorn.EngineImage, error)

UpdateEngineImage updates Longhorn EngineImage and verifies update

func (*DataStore) UpdateEngineImageStatus added in v0.7.0

func (s *DataStore) UpdateEngineImageStatus(img *longhorn.EngineImage) (*longhorn.EngineImage, error)

UpdateEngineImageStatus updates Longhorn EngineImage resource status and verifies update

func (*DataStore) UpdateEngineStatus added in v0.7.0

func (s *DataStore) UpdateEngineStatus(e *longhorn.Engine) (*longhorn.Engine, error)

UpdateEngineStatus updates Longhorn Engine status and verifies update

func (*DataStore) UpdateInstanceManager added in v0.6.0

func (s *DataStore) UpdateInstanceManager(im *longhorn.InstanceManager) (*longhorn.InstanceManager, error)

UpdateInstanceManager updates Longhorn InstanceManager resource and verifies update

func (*DataStore) UpdateInstanceManagerStatus added in v0.7.0

func (s *DataStore) UpdateInstanceManagerStatus(im *longhorn.InstanceManager) (*longhorn.InstanceManager, error)

UpdateInstanceManagerStatus updates Longhorn InstanceManager resource status and verifies update

func (*DataStore) UpdateLHVolumeAttachment added in v1.5.0

func (s *DataStore) UpdateLHVolumeAttachment(va *longhorn.VolumeAttachment) (*longhorn.VolumeAttachment, error)

UpdateLHVolumeAttachment updates the given Longhorn VolumeAttachment in the VolumeAttachment CR and verifies update

func (*DataStore) UpdateLHVolumeAttachmentStatus added in v1.5.0

func (s *DataStore) UpdateLHVolumeAttachmentStatus(va *longhorn.VolumeAttachment) (*longhorn.VolumeAttachment, error)

UpdateLHVolumeAttachmentStatus updates the given Longhorn VolumeAttachment status in the VolumeAttachment CR status and verifies update

func (*DataStore) UpdateNode

func (s *DataStore) UpdateNode(node *longhorn.Node) (*longhorn.Node, error)

UpdateNode updates Longhorn Node resource and verifies update

func (*DataStore) UpdateNodeStatus added in v0.7.0

func (s *DataStore) UpdateNodeStatus(node *longhorn.Node) (*longhorn.Node, error)

UpdateNodeStatus updates Longhorn Node status and verifies update

func (*DataStore) UpdateOrphan added in v1.3.0

func (s *DataStore) UpdateOrphan(orphan *longhorn.Orphan) (*longhorn.Orphan, error)

UpdateOrphan updates the given Longhorn orphan in the cluster Orphan CR and verifies update

func (*DataStore) UpdateOrphanStatus added in v1.3.0

func (s *DataStore) UpdateOrphanStatus(orphan *longhorn.Orphan) (*longhorn.Orphan, error)

UpdateOrphanStatus updates the given Longhorn orphan status in the cluster Orphans CR status and verifies update

func (*DataStore) UpdatePVAnnotation added in v1.2.6

func (s *DataStore) UpdatePVAnnotation(volume *longhorn.Volume, annotationKey, annotationVal string) error

func (*DataStore) UpdatePersistentVolume added in v1.1.2

func (s *DataStore) UpdatePersistentVolume(pv *corev1.PersistentVolume) (*corev1.PersistentVolume, error)

UpdatePersistentVolume updates the PersistentVolume for the given PersistentVolume object

func (*DataStore) UpdatePersistentVolumeClaim added in v1.1.2

func (s *DataStore) UpdatePersistentVolumeClaim(namespace string, pvc *corev1.PersistentVolumeClaim) (*corev1.PersistentVolumeClaim, error)

UpdatePersistentVolumeClaim expand the PersistentVolumeClaim from the index for the given name and namespace

func (*DataStore) UpdatePod added in v1.5.2

func (s *DataStore) UpdatePod(obj *corev1.Pod) (*corev1.Pod, error)

UpdatePod updates Pod for the given Pod object and namespace

func (*DataStore) UpdatePodSecurityPolicy added in v1.4.0

func (s *DataStore) UpdatePodSecurityPolicy(podSecurityPolicy *policyv1beta1.PodSecurityPolicy) (*policyv1beta1.PodSecurityPolicy, error)

UpdatePodSecurityPolicy updates the PodSecurityPolicy resource with the given PodSecurityPolicy object

func (*DataStore) UpdateRecurringJob added in v1.2.0

func (s *DataStore) UpdateRecurringJob(recurringJob *longhorn.RecurringJob) (*longhorn.RecurringJob, error)

UpdateRecurringJob updates Longhorn RecurringJob and verifies update

func (*DataStore) UpdateRecurringJobStatus added in v1.2.0

func (s *DataStore) UpdateRecurringJobStatus(recurringJob *longhorn.RecurringJob) (*longhorn.RecurringJob, error)

UpdateRecurringJobStatus updates Longhorn RecurringJob resource status and verifies update

func (*DataStore) UpdateReplica

func (s *DataStore) UpdateReplica(r *longhorn.Replica) (*longhorn.Replica, error)

UpdateReplica updates Replica and verifies update

func (*DataStore) UpdateReplicaStatus added in v0.7.0

func (s *DataStore) UpdateReplicaStatus(r *longhorn.Replica) (*longhorn.Replica, error)

UpdateReplicaStatus updates Replica status and verifies update

func (*DataStore) UpdateRole added in v1.4.0

func (s *DataStore) UpdateRole(role *rbacv1.Role) (*rbacv1.Role, error)

UpdateRole updates the Role resource with the given Role object in the Longhorn namespace

func (*DataStore) UpdateRoleBinding added in v1.4.0

func (s *DataStore) UpdateRoleBinding(roleBinding *rbacv1.RoleBinding) (*rbacv1.RoleBinding, error)

UpdateRoleBinding updates the RoleBinding resource with the given RoleBinding object in the Longhorn namespace

func (*DataStore) UpdateSecret added in v1.5.2

func (s *DataStore) UpdateSecret(namespace string, secret *corev1.Secret) (*corev1.Secret, error)

UpdateSecret updates the Secret resource with the given object and namespace

func (*DataStore) UpdateService added in v1.4.0

func (s *DataStore) UpdateService(namespace string, service *corev1.Service) (*corev1.Service, error)

UpdateService updates the Service resource with the given object and namespace

func (*DataStore) UpdateServiceAccount added in v1.4.0

func (s *DataStore) UpdateServiceAccount(serviceAccount *corev1.ServiceAccount) (*corev1.ServiceAccount, error)

UpdateServiceAccount updates the ServiceAccount resource with the given ServiceAccount object in the Longhorn namespace

func (*DataStore) UpdateSetting

func (s *DataStore) UpdateSetting(setting *longhorn.Setting) (*longhorn.Setting, error)

UpdateSetting updates the given Longhorn Settings and verifies update

func (*DataStore) UpdateShareManager added in v1.1.0

func (s *DataStore) UpdateShareManager(sm *longhorn.ShareManager) (*longhorn.ShareManager, error)

UpdateShareManager updates Longhorn ShareManager resource and verifies update

func (*DataStore) UpdateShareManagerStatus added in v1.1.0

func (s *DataStore) UpdateShareManagerStatus(sm *longhorn.ShareManager) (*longhorn.ShareManager, error)

UpdateShareManagerStatus updates Longhorn ShareManager resource status and verifies update

func (*DataStore) UpdateSnapshotStatus added in v1.3.0

func (s *DataStore) UpdateSnapshotStatus(snap *longhorn.Snapshot) (*longhorn.Snapshot, error)

UpdateSnapshotStatus updates the given Longhorn snapshot status verifies update

func (*DataStore) UpdateStorageClass added in v1.4.0

func (s *DataStore) UpdateStorageClass(obj *storagev1.StorageClass) (*storagev1.StorageClass, error)

UpdateStorageClass updates the StorageClass for the given StorageClass object

func (*DataStore) UpdateSupportBundleStatus added in v1.4.0

func (s *DataStore) UpdateSupportBundleStatus(supportBundle *longhorn.SupportBundle) (*longhorn.SupportBundle, error)

UpdateSupportBundleStatus updates the given Longhorn SupportBundle status and verifies update

func (*DataStore) UpdateSystemBackup added in v1.4.0

func (s *DataStore) UpdateSystemBackup(systemBackup *longhorn.SystemBackup) (*longhorn.SystemBackup, error)

UpdateSystemBackup updates Longhorn SystemBackup and verifies update

func (*DataStore) UpdateSystemBackupStatus added in v1.4.0

func (s *DataStore) UpdateSystemBackupStatus(systemBackup *longhorn.SystemBackup) (*longhorn.SystemBackup, error)

UpdateSystemBackupStatus updates Longhorn SystemBackup status and verifies update

func (*DataStore) UpdateSystemRestore added in v1.4.0

func (s *DataStore) UpdateSystemRestore(systemRestore *longhorn.SystemRestore) (*longhorn.SystemRestore, error)

UpdateSystemRestore updates Longhorn SystemRestore and verifies update

func (*DataStore) UpdateSystemRestoreStatus added in v1.4.0

func (s *DataStore) UpdateSystemRestoreStatus(systemRestore *longhorn.SystemRestore) (*longhorn.SystemRestore, error)

UpdateSystemRestoreStatus updates Longhorn SystemRestore resource status and verifies update

func (*DataStore) UpdateVolume

func (s *DataStore) UpdateVolume(v *longhorn.Volume) (*longhorn.Volume, error)

UpdateVolume updates Longhorn Volume and verifies update

func (*DataStore) UpdateVolumeStatus added in v0.7.0

func (s *DataStore) UpdateVolumeStatus(v *longhorn.Volume) (*longhorn.Volume, error)

UpdateVolumeStatus updates Longhorn Volume status and verifies update

func (*DataStore) ValidateSetting added in v0.6.0

func (s *DataStore) ValidateSetting(name, value string) (err error)

ValidateSetting checks the given setting value types and condition

func (*DataStore) ValidateV2DataEngine added in v1.5.0

func (s *DataStore) ValidateV2DataEngine(v2DataEngineEnabled bool) error

Jump to

Keyboard shortcuts

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