Documentation ¶
Index ¶
- Constants
- Variables
- func CheckInstanceManagerType(im *longhorn.InstanceManager) (longhorn.InstanceManagerType, error)
- func CheckVolume(v *longhorn.Volume) error
- func ErrorIsConflict(err error) bool
- func ErrorIsNotFound(err error) bool
- func FixupRecurringJob(v *longhorn.Volume) error
- func GetCurrentEngineAndExtras(v *longhorn.Volume, es map[string]*longhorn.Engine) (currentEngine *longhorn.Engine, extras []*longhorn.Engine, err error)
- func GetLabelsForVolumesFollowsGlobalSettings(volume *longhorn.Volume) map[string]string
- func GetNewCurrentEngineAndExtras(v *longhorn.Volume, es map[string]*longhorn.Engine) (currentEngine *longhorn.Engine, extras []*longhorn.Engine, err error)
- func GetObjectReferencesForVolume(v *longhorn.Volume) corev1.ObjectReference
- func GetOwnerReferencesForBackingImage(backingImage *longhorn.BackingImage) []metav1.OwnerReference
- func GetOwnerReferencesForBackingImageDataSource(backingImageDataSource *longhorn.BackingImageDataSource) []metav1.OwnerReference
- func GetOwnerReferencesForBackingImageManager(backingImageManager *longhorn.BackingImageManager) []metav1.OwnerReference
- func GetOwnerReferencesForEngineImage(ei *longhorn.EngineImage) []metav1.OwnerReference
- func GetOwnerReferencesForInstanceManager(im *longhorn.InstanceManager) []metav1.OwnerReference
- func GetOwnerReferencesForNode(node *longhorn.Node) []metav1.OwnerReference
- func GetOwnerReferencesForRecurringJob(recurringJob *longhorn.RecurringJob) []metav1.OwnerReference
- func GetOwnerReferencesForShareManager(sm *longhorn.ShareManager, isController bool) []metav1.OwnerReference
- func GetOwnerReferencesForSupportBundle(supportBundle *longhorn.SupportBundle) []metav1.OwnerReference
- func GetOwnerReferencesForSystemRestore(systemRestore *longhorn.SystemRestore) []metav1.OwnerReference
- func GetOwnerReferencesForVolume(v *longhorn.Volume) []metav1.OwnerReference
- func IsAvailableHealthyReplica(r *longhorn.Replica) bool
- func IsDataEngineV1(dataEngine longhorn.DataEngineType) bool
- func IsDataEngineV2(dataEngine longhorn.DataEngineType) bool
- func IsReplicaRebuildingFailed(reusableFailedReplica *longhorn.Replica) bool
- func IsSupportedVolumeSize(dataEngine longhorn.DataEngineType, fsType string, volumeSize int64) bool
- func LabelSystemBackupVersion(version string, obj runtime.Object) error
- func MarshalLabelToVolumeRecurringJob(labels map[string]string) map[string]*longhorn.VolumeRecurringJob
- func NewPVCManifest(size int64, pvName, ns, pvcName, storageClassName string, ...) *corev1.PersistentVolumeClaim
- func NewPVCManifestForVolume(v *longhorn.Volume, pvName, ns, pvcName, storageClassName string) *corev1.PersistentVolumeClaim
- func NewPVManifest(size int64, pvName, volumeName, storageClassName, fsType string, ...) *corev1.PersistentVolume
- func NewPVManifestForVolume(v *longhorn.Volume, pvName, storageClassName, fsType string) *corev1.PersistentVolume
- func ReplicaAddressToReplicaName(address string, rs []*longhorn.Replica) string
- func ValidateRecurringJob(job longhorn.RecurringJobSpec) error
- type DataStore
- func (s *DataStore) AddRecurringJobLabelToVolume(volume *longhorn.Volume, labelKey string) (*longhorn.Volume, error)
- func (s *DataStore) AreAllDisksRemovedByDiskType(diskType longhorn.DiskType) (bool, error)
- func (s *DataStore) AreAllVolumesDetached(dataEngine longhorn.DataEngineType) (bool, []*longhorn.InstanceManager, error)
- func (s *DataStore) AreAllVolumesDetachedState() (bool, error)
- func (s *DataStore) CheckDataEngineImageCompatiblityByImage(image string, dataEngine longhorn.DataEngineType) error
- func (s *DataStore) CheckDataEngineImageReadiness(image string, dataEngine longhorn.DataEngineType, nodes ...string) (isReady bool, err error)
- func (s *DataStore) CheckDataEngineImageReadyOnAtLeastOneVolumeReplica(image, volumeName, nodeID string, dataLocality longhorn.DataLocality, ...) (bool, error)
- func (s *DataStore) CheckEngineImageReadiness(image string, nodes ...string) (isReady bool, err error)
- func (s *DataStore) CheckImageReadyOnAllVolumeReplicas(image, volumeName, nodeID string, dataEngine longhorn.DataEngineType) (bool, error)
- func (s *DataStore) CreateBackingImage(backingImage *longhorn.BackingImage) (*longhorn.BackingImage, error)
- func (s *DataStore) CreateBackingImageDataSource(backingImageDataSource *longhorn.BackingImageDataSource) (*longhorn.BackingImageDataSource, error)
- func (s *DataStore) CreateBackingImageManager(backingImageManager *longhorn.BackingImageManager) (*longhorn.BackingImageManager, error)
- func (s *DataStore) CreateBackup(backup *longhorn.Backup, backupVolumeName string) (*longhorn.Backup, error)
- func (s *DataStore) CreateBackupBackingImage(backupBackingImage *longhorn.BackupBackingImage) (*longhorn.BackupBackingImage, error)
- func (s *DataStore) CreateBackupTarget(backupTarget *longhorn.BackupTarget) (*longhorn.BackupTarget, error)
- func (s *DataStore) CreateBackupVolume(backupVolume *longhorn.BackupVolume) (*longhorn.BackupVolume, error)
- func (s *DataStore) CreateClusterRole(clusterRole *rbacv1.ClusterRole) (*rbacv1.ClusterRole, error)
- func (s *DataStore) CreateClusterRoleBinding(clusterRoleBinding *rbacv1.ClusterRoleBinding) (*rbacv1.ClusterRoleBinding, error)
- func (s *DataStore) CreateConfigMap(configMap *corev1.ConfigMap) (*corev1.ConfigMap, error)
- func (s *DataStore) CreateCronJob(cronJob *batchv1.CronJob) (*batchv1.CronJob, error)
- func (s *DataStore) CreateCustomResourceDefinition(crd *apiextensionsv1.CustomResourceDefinition) (*apiextensionsv1.CustomResourceDefinition, error)
- func (s *DataStore) CreateDaemonSet(daemonSet *appsv1.DaemonSet) (*appsv1.DaemonSet, error)
- func (s *DataStore) CreateDefaultNode(name string) (*longhorn.Node, error)
- func (s *DataStore) CreateDeployment(obj *appsv1.Deployment) (*appsv1.Deployment, error)
- func (s *DataStore) CreateEngine(e *longhorn.Engine) (*longhorn.Engine, error)
- func (s *DataStore) CreateEngineImage(img *longhorn.EngineImage) (*longhorn.EngineImage, error)
- func (s *DataStore) CreateEngineImageDaemonSet(ds *appsv1.DaemonSet) error
- func (s *DataStore) CreateInstanceManager(im *longhorn.InstanceManager) (*longhorn.InstanceManager, error)
- func (s *DataStore) CreateJob(job *batchv1.Job) (*batchv1.Job, error)
- func (s *DataStore) CreateLHVolumeAttachment(va *longhorn.VolumeAttachment) (*longhorn.VolumeAttachment, error)
- func (s *DataStore) CreateNode(node *longhorn.Node) (*longhorn.Node, error)
- func (s *DataStore) CreateOrphan(orphan *longhorn.Orphan) (*longhorn.Orphan, error)
- func (s *DataStore) CreatePDB(pdp *policyv1.PodDisruptionBudget) (*policyv1.PodDisruptionBudget, error)
- func (s *DataStore) CreatePersistentVolume(pv *corev1.PersistentVolume) (*corev1.PersistentVolume, error)
- func (s *DataStore) CreatePersistentVolumeClaim(ns string, pvc *corev1.PersistentVolumeClaim) (*corev1.PersistentVolumeClaim, error)
- func (s *DataStore) CreatePod(pod *corev1.Pod) (*corev1.Pod, error)
- func (s *DataStore) CreatePodSecurityPolicy(podSecurityPolicy *policyv1beta1.PodSecurityPolicy) (*policyv1beta1.PodSecurityPolicy, error)
- func (s *DataStore) CreateRecurringJob(recurringJob *longhorn.RecurringJob) (*longhorn.RecurringJob, error)
- func (s *DataStore) CreateReplica(r *longhorn.Replica) (*longhorn.Replica, error)
- func (s *DataStore) CreateRole(role *rbacv1.Role) (*rbacv1.Role, error)
- func (s *DataStore) CreateRoleBinding(role *rbacv1.RoleBinding) (*rbacv1.RoleBinding, error)
- func (s *DataStore) CreateService(ns string, service *corev1.Service) (*corev1.Service, error)
- func (s *DataStore) CreateServiceAccount(serviceAccount *corev1.ServiceAccount) (*corev1.ServiceAccount, error)
- func (s *DataStore) CreateSetting(setting *longhorn.Setting) (*longhorn.Setting, error)
- func (s *DataStore) CreateShareManager(sm *longhorn.ShareManager) (*longhorn.ShareManager, error)
- func (s *DataStore) CreateSnapshot(snapshot *longhorn.Snapshot) (*longhorn.Snapshot, error)
- func (s *DataStore) CreateStorageClass(sc *storagev1.StorageClass) (*storagev1.StorageClass, error)
- func (s *DataStore) CreateSupportBundle(supportBundle *longhorn.SupportBundle) (*longhorn.SupportBundle, error)
- func (s *DataStore) CreateSystemBackup(systemBackup *longhorn.SystemBackup) (*longhorn.SystemBackup, error)
- func (s *DataStore) CreateSystemRestore(systemRestore *longhorn.SystemRestore) (*longhorn.SystemRestore, error)
- func (s *DataStore) CreateVolume(v *longhorn.Volume) (*longhorn.Volume, error)
- func (s *DataStore) DeleteAllBackupsForBackupVolume(backupVolumeName string) error
- func (s *DataStore) DeleteBackingImage(name string) error
- func (s *DataStore) DeleteBackingImageDataSource(name string) error
- func (s *DataStore) DeleteBackingImageManager(name string) error
- func (s *DataStore) DeleteBackup(backupName string) error
- func (s *DataStore) DeleteBackupBackingImage(name string) error
- func (s *DataStore) DeleteBackupTarget(backupTargetName string) error
- func (s *DataStore) DeleteBackupVolume(backupVolumeName string) error
- func (s *DataStore) DeleteCSIDriver(name string) error
- func (s *DataStore) DeleteConfigMap(namespace, name string) error
- func (s *DataStore) DeleteCronJob(cronJobName string) error
- func (s *DataStore) DeleteDaemonSet(name string) error
- func (s *DataStore) DeleteDeployment(name string) error
- func (s *DataStore) DeleteEngine(name string) error
- func (s *DataStore) DeleteEngineImage(name string) error
- func (s *DataStore) DeleteInstanceManager(name string) error
- func (s *DataStore) DeleteJob(name string) error
- func (s *DataStore) DeleteLHVolumeAttachment(vaName string) error
- func (s *DataStore) DeleteLease(name string) error
- func (s *DataStore) DeleteNode(name string) error
- func (s *DataStore) DeleteOrphan(orphanName string) error
- func (s *DataStore) DeletePDB(name string) error
- func (s *DataStore) DeletePersistentVolume(pvName string) error
- func (s *DataStore) DeletePersistentVolumeClaim(ns, pvcName string) error
- func (s *DataStore) DeletePod(name string) error
- func (s *DataStore) DeleteRecurringJob(name string) error
- func (s *DataStore) DeleteReplica(name string) error
- func (s *DataStore) DeleteSecret(namespace, name string) error
- func (s *DataStore) DeleteService(namespace, name string) error
- func (s *DataStore) DeleteShareManager(name string) error
- func (s *DataStore) DeleteSnapshot(snapshotName string) error
- func (s *DataStore) DeleteStorageClass(scName string) error
- func (s *DataStore) DeleteSupportBundle(name string) error
- func (s *DataStore) DeleteSystemBackup(name string) error
- func (s *DataStore) DeleteSystemRestore(name string) error
- func (s *DataStore) DeleteVolume(name string) error
- func (s *DataStore) GetAllClusterRoleBindingList() (runtime.Object, error)
- func (s *DataStore) GetAllClusterRoleList() (runtime.Object, error)
- func (s *DataStore) GetAllConfigMaps() (runtime.Object, error)
- func (s *DataStore) GetAllCronJobsList() (runtime.Object, error)
- func (s *DataStore) GetAllDaemonSetsList() (runtime.Object, error)
- func (s *DataStore) GetAllDeploymentsList() (runtime.Object, error)
- func (s *DataStore) GetAllEventsList() (runtime.Object, error)
- func (s *DataStore) GetAllJobsList() (runtime.Object, error)
- func (s *DataStore) GetAllLonghornCustomResourceDefinitions() (runtime.Object, error)
- func (s *DataStore) GetAllLonghornEngineImages() (runtime.Object, error)
- func (s *DataStore) GetAllLonghornRecurringJobs() (runtime.Object, error)
- func (s *DataStore) GetAllLonghornSettings() (runtime.Object, error)
- func (s *DataStore) GetAllLonghornStorageClassList() (runtime.Object, error)
- func (s *DataStore) GetAllLonghornVolumes() (runtime.Object, error)
- func (s *DataStore) GetAllNodesList() (runtime.Object, error)
- func (s *DataStore) GetAllPersistentVolumeClaimsByPersistentVolumeProvisioner() (runtime.Object, error)
- func (s *DataStore) GetAllPersistentVolumeClaimsByStorageClass(storageClassNames []string) (runtime.Object, error)
- func (s *DataStore) GetAllPersistentVolumesWithLonghornProvisioner() (runtime.Object, error)
- func (s *DataStore) GetAllPodSecurityPolicyList() (runtime.Object, error)
- func (s *DataStore) GetAllPodsList() (runtime.Object, error)
- func (s *DataStore) GetAllRoleBindingList() (runtime.Object, error)
- func (s *DataStore) GetAllRoleList() (runtime.Object, error)
- func (s *DataStore) GetAllServiceAccountList() (runtime.Object, error)
- func (s *DataStore) GetAllServicesList() (runtime.Object, error)
- func (s *DataStore) GetAllStatefulSetsList() (runtime.Object, error)
- func (s *DataStore) GetAllVolumeAttachments() (runtime.Object, error)
- func (s *DataStore) GetBackingImage(name string) (*longhorn.BackingImage, error)
- func (s *DataStore) GetBackingImageDataSource(name string) (*longhorn.BackingImageDataSource, error)
- func (s *DataStore) GetBackingImageManager(name string) (*longhorn.BackingImageManager, error)
- func (s *DataStore) GetBackingImageManagerRO(name string) (*longhorn.BackingImageManager, error)
- func (s *DataStore) GetBackingImageRO(name string) (*longhorn.BackingImage, error)
- func (s *DataStore) GetBackup(name string) (*longhorn.Backup, error)
- func (s *DataStore) GetBackupBackingImage(name string) (*longhorn.BackupBackingImage, error)
- func (s *DataStore) GetBackupRO(backupName string) (*longhorn.Backup, error)
- func (s *DataStore) GetBackupTarget(name string) (*longhorn.BackupTarget, error)
- func (s *DataStore) GetBackupTargetRO(backupTargetName string) (*longhorn.BackupTarget, error)
- func (s *DataStore) GetBackupVolume(name string) (*longhorn.BackupVolume, error)
- func (s *DataStore) GetBackupVolumeRO(backupVolumeName string) (*longhorn.BackupVolume, error)
- func (s *DataStore) GetClusterRole(name string) (*rbacv1.ClusterRole, error)
- func (s *DataStore) GetClusterRoleBinding(name string) (*rbacv1.ClusterRoleBinding, error)
- func (s *DataStore) GetConfigMap(namespace, name string) (resultRO *corev1.ConfigMap, err error)
- func (s *DataStore) GetConfigMapRO(namespace, name string) (*corev1.ConfigMap, error)
- func (s *DataStore) GetConfigMapWithoutCache(namespace, name string) (*corev1.ConfigMap, error)
- func (s *DataStore) GetCredentialFromSecret(secretName string) (map[string]string, error)
- func (s *DataStore) GetCronJobROByRecurringJob(recurringJob *longhorn.RecurringJob) (*batchv1.CronJob, error)
- func (s *DataStore) GetCustomResourceDefinition(name string) (*apiextensionsv1.CustomResourceDefinition, error)
- func (s *DataStore) GetDaemonSet(name string) (*appsv1.DaemonSet, error)
- func (s *DataStore) GetDataEngineImageCLIAPIVersion(imageName string, dataEngine longhorn.DataEngineType) (int, error)
- func (s *DataStore) GetDataEngines() map[longhorn.DataEngineType]struct{}
- func (s *DataStore) GetDefaultBackupTargetRO() (*longhorn.BackupTarget, error)
- func (s *DataStore) GetDefaultInstanceManagerByNodeRO(name string, dataEngine longhorn.DataEngineType) (*longhorn.InstanceManager, error)
- func (s *DataStore) GetDeployment(name string) (*appsv1.Deployment, error)
- func (s *DataStore) GetEngine(name string) (*longhorn.Engine, error)
- func (s *DataStore) GetEngineImage(name string) (*longhorn.EngineImage, error)
- func (s *DataStore) GetEngineImageByImage(image string) (*longhorn.EngineImage, error)
- func (s *DataStore) GetEngineImageCLIAPIVersion(imageName string) (int, error)
- func (s *DataStore) GetEngineImageDaemonSet(name string) (*appsv1.DaemonSet, error)
- func (s *DataStore) GetEngineImageRO(name string) (*longhorn.EngineImage, error)
- func (s *DataStore) GetEngineRO(name string) (*longhorn.Engine, error)
- func (s *DataStore) GetInstanceManager(name string) (*longhorn.InstanceManager, error)
- func (s *DataStore) GetInstanceManagerByInstance(obj interface{}) (*longhorn.InstanceManager, error)
- func (s *DataStore) GetInstanceManagerByInstanceRO(obj interface{}) (*longhorn.InstanceManager, error)
- func (s *DataStore) GetInstanceManagerRO(name string) (*longhorn.InstanceManager, error)
- func (s *DataStore) GetJob(name string) (*batchv1.Job, error)
- func (s *DataStore) GetKubernetesNodeRO(name string) (*corev1.Node, error)
- func (s *DataStore) GetKubernetesVersion() (*version.Info, error)
- func (s *DataStore) GetLHVolumeAttachment(name string) (*longhorn.VolumeAttachment, error)
- func (s *DataStore) GetLHVolumeAttachmentByVolumeName(volName string) (*longhorn.VolumeAttachment, error)
- func (s *DataStore) GetLHVolumeAttachmentRO(name string) (*longhorn.VolumeAttachment, error)
- func (s *DataStore) GetLonghornEngineImage(name string) (runtime.Object, error)
- func (s *DataStore) GetLonghornEventList() (*corev1.EventList, error)
- func (s *DataStore) GetLonghornNamespace() (*corev1.Namespace, error)
- func (s *DataStore) GetLonghornSnapshotUncached(name string) (*longhorn.Snapshot, error)
- func (s *DataStore) GetManagerLabel() map[string]string
- func (s *DataStore) GetManagerNodeIPMap() (map[string]string, error)
- func (s *DataStore) GetNamespace(name string) (*corev1.Namespace, error)
- func (s *DataStore) GetNode(name string) (*longhorn.Node, error)
- func (s *DataStore) GetNodeRO(name string) (*longhorn.Node, error)
- func (s *DataStore) GetOrphan(name string) (*longhorn.Orphan, error)
- func (s *DataStore) GetOrphanRO(orphanName string) (*longhorn.Orphan, error)
- func (s *DataStore) GetPDBRO(name string) (*policyv1.PodDisruptionBudget, error)
- func (s *DataStore) GetPersistentVolume(pvName string) (*corev1.PersistentVolume, error)
- func (s *DataStore) GetPersistentVolumeClaim(namespace, pvcName string) (*corev1.PersistentVolumeClaim, error)
- func (s *DataStore) GetPersistentVolumeClaimRO(namespace, pvcName string) (*corev1.PersistentVolumeClaim, error)
- func (s *DataStore) GetPersistentVolumeRO(pvName string) (*corev1.PersistentVolume, error)
- func (s *DataStore) GetPod(name string) (*corev1.Pod, error)
- func (s *DataStore) GetPodContainerLog(podName, containerName string) ([]byte, error)
- func (s *DataStore) GetPodContainerLogRequest(podName, containerName string) *rest.Request
- func (s *DataStore) GetPodRO(namespace, name string) (*corev1.Pod, error)
- func (s *DataStore) GetPodSecurityPolicy(name string) (*policyv1beta1.PodSecurityPolicy, error)
- func (s *DataStore) GetPriorityClass(pcName string) (*schedulingv1.PriorityClass, error)
- func (s *DataStore) GetRandomReadyNodeDisk() (*longhorn.Node, string, error)
- func (s *DataStore) GetReadyDisk(nodeName string, diskUUID string) (string, error)
- func (s *DataStore) GetReadyDiskNode(diskUUID string) (*longhorn.Node, string, error)
- func (s *DataStore) GetReadyDiskNodeRO(diskUUID string) (*longhorn.Node, string, error)
- func (s *DataStore) GetRecurringJob(name string) (*longhorn.RecurringJob, error)
- func (s *DataStore) GetRecurringJobRO(name string) (*longhorn.RecurringJob, error)
- func (s *DataStore) GetReplica(name string) (*longhorn.Replica, error)
- func (s *DataStore) GetReplicaRO(name string) (*longhorn.Replica, error)
- func (s *DataStore) GetRole(name string) (*rbacv1.Role, error)
- func (s *DataStore) GetRoleBinding(name string) (*rbacv1.RoleBinding, error)
- func (s *DataStore) GetSecret(namespace, name string) (resultRO *corev1.Secret, err error)
- func (s *DataStore) GetSecretRO(namespace, name string) (*corev1.Secret, error)
- func (s *DataStore) GetService(namespace, name string) (*corev1.Service, error)
- func (s *DataStore) GetServiceAccount(name string) (*corev1.ServiceAccount, error)
- func (s *DataStore) GetSetting(sName types.SettingName) (*longhorn.Setting, error)
- func (s *DataStore) GetSettingAsBool(settingName types.SettingName) (bool, error)
- func (s *DataStore) GetSettingAsInt(settingName types.SettingName) (int64, error)
- func (s *DataStore) GetSettingExact(sName types.SettingName) (*longhorn.Setting, error)
- func (s *DataStore) GetSettingExactRO(sName types.SettingName) (*longhorn.Setting, error)
- func (s *DataStore) GetSettingImagePullPolicy() (corev1.PullPolicy, error)
- func (s *DataStore) GetSettingSystemManagedComponentsNodeSelector() (map[string]string, error)
- func (s *DataStore) GetSettingTaintToleration() ([]corev1.Toleration, error)
- func (s *DataStore) GetSettingValueExisted(sName types.SettingName) (string, error)
- func (s *DataStore) GetSettingWithAutoFillingRO(sName types.SettingName) (*longhorn.Setting, error)
- func (s *DataStore) GetShareManager(name string) (*longhorn.ShareManager, error)
- func (s *DataStore) GetSnapshot(name string) (*longhorn.Snapshot, error)
- func (s *DataStore) GetSnapshotRO(snapName string) (*longhorn.Snapshot, error)
- func (s *DataStore) GetStorageClass(name string) (*storagev1.StorageClass, error)
- func (s *DataStore) GetStorageClassRO(scName string) (*storagev1.StorageClass, error)
- func (s *DataStore) GetStorageIPFromPod(pod *corev1.Pod) string
- func (s *DataStore) GetSupportBundle(name string) (*longhorn.SupportBundle, error)
- func (s *DataStore) GetSupportBundleManagerLabel(supportBundle *longhorn.SupportBundle) map[string]string
- func (s *DataStore) GetSupportBundleManagerPod(supportBundle *longhorn.SupportBundle) (*corev1.Pod, error)
- func (s *DataStore) GetSupportBundleRO(name string) (*longhorn.SupportBundle, error)
- func (s *DataStore) GetSystemBackup(name string) (*longhorn.SystemBackup, error)
- func (s *DataStore) GetSystemBackupRO(name string) (*longhorn.SystemBackup, error)
- func (s *DataStore) GetSystemRestore(name string) (*longhorn.SystemRestore, error)
- func (s *DataStore) GetSystemRestoreInProgress(name string) (systemRestore *longhorn.SystemRestore, err error)
- func (s *DataStore) GetSystemRestoreRO(name string) (*longhorn.SystemRestore, error)
- func (s *DataStore) GetVolume(name string) (*longhorn.Volume, error)
- func (s *DataStore) GetVolumeCurrentEngine(volumeName string) (*longhorn.Engine, error)
- func (s *DataStore) GetVolumeRO(name string) (*longhorn.Volume, error)
- func (s *DataStore) IsDataEngineEnabled(dataEngine longhorn.DataEngineType) (bool, error)
- func (s *DataStore) IsEngineImageCLIAPIVersionOne(imageName string) (bool, error)
- func (s *DataStore) IsKubeNodeUnschedulable(nodeName string) (bool, error)
- func (s *DataStore) IsNodeDeleted(name string) (bool, error)
- func (s *DataStore) IsNodeDownOrDeleted(name string) (bool, error)
- func (s *DataStore) IsNodeDownOrDeletedOrMissingManager(name string) (bool, error)
- func (s *DataStore) IsNodeSchedulable(name string) bool
- func (s *DataStore) IsV2DataEngineDisabledForNode(nodeName string) (bool, error)
- func (s *DataStore) ListBackingImageDataSources() (map[string]*longhorn.BackingImageDataSource, error)
- func (s *DataStore) ListBackingImageDataSourcesByNode(nodeName string) (map[string]*longhorn.BackingImageDataSource, error)
- func (s *DataStore) ListBackingImageDataSourcesExportingFromVolume(volumeName string) (map[string]*longhorn.BackingImageDataSource, error)
- func (s *DataStore) ListBackingImageManagerPods() ([]*corev1.Pod, error)
- func (s *DataStore) ListBackingImageManagers() (map[string]*longhorn.BackingImageManager, error)
- func (s *DataStore) ListBackingImageManagersByDiskUUID(diskUUID string) (map[string]*longhorn.BackingImageManager, error)
- func (s *DataStore) ListBackingImageManagersByNode(nodeName string) (map[string]*longhorn.BackingImageManager, error)
- func (s *DataStore) ListBackingImageManagersByNodeRO(nodeName string) ([]*longhorn.BackingImageManager, error)
- func (s *DataStore) ListBackingImageManagersRO() ([]*longhorn.BackingImageManager, error)
- func (s *DataStore) ListBackingImages() (map[string]*longhorn.BackingImage, error)
- func (s *DataStore) ListBackupBackingImages() (map[string]*longhorn.BackupBackingImage, error)
- func (s *DataStore) ListBackupTargets() (map[string]*longhorn.BackupTarget, error)
- func (s *DataStore) ListBackupVolumes() (map[string]*longhorn.BackupVolume, error)
- func (s *DataStore) ListBackups() (map[string]*longhorn.Backup, error)
- func (s *DataStore) ListBackupsRO() ([]*longhorn.Backup, error)
- func (s *DataStore) ListBackupsWithBackupVolumeName(backupVolumeName string) (map[string]*longhorn.Backup, error)
- func (s *DataStore) ListDRVolumesRO() (map[string]*longhorn.Volume, error)
- func (s *DataStore) ListDRVolumesWithBackupVolumeNameRO(backupVolumeName string) (map[string]*longhorn.Volume, error)
- func (s *DataStore) ListDaemonSet() ([]*appsv1.DaemonSet, error)
- func (s *DataStore) ListDaemonSetWithLabels(labels map[string]string) ([]*appsv1.DaemonSet, error)
- func (s *DataStore) ListDeployment() ([]*appsv1.Deployment, error)
- func (s *DataStore) ListDeploymentWithLabels(labels map[string]string) ([]*appsv1.Deployment, error)
- func (s *DataStore) ListEngineImageDaemonSetPodsFromEngineImageNameRO(EIName string) ([]*corev1.Pod, error)
- func (s *DataStore) ListEngineImages() (map[string]*longhorn.EngineImage, error)
- func (s *DataStore) ListEngines() (map[string]*longhorn.Engine, error)
- func (s *DataStore) ListEnginesByNodeRO(name string) ([]*longhorn.Engine, error)
- func (s *DataStore) ListEnginesRO() ([]*longhorn.Engine, error)
- func (s *DataStore) ListInstanceManagerPods() ([]*corev1.Pod, error)
- func (s *DataStore) ListInstanceManagerPodsBy(node string, imImage string, imType longhorn.InstanceManagerType, ...) ([]*corev1.Pod, error)
- func (s *DataStore) ListInstanceManagers() (map[string]*longhorn.InstanceManager, error)
- func (s *DataStore) ListInstanceManagersByNodeRO(node string, imType longhorn.InstanceManagerType, ...) (map[string]*longhorn.InstanceManager, error)
- func (s *DataStore) ListInstanceManagersBySelectorRO(node, imImage string, imType longhorn.InstanceManagerType, ...) (map[string]*longhorn.InstanceManager, error)
- func (s *DataStore) ListInstanceManagersRO() (map[string]*longhorn.InstanceManager, error)
- func (s *DataStore) ListKubeNodesRO() ([]*corev1.Node, error)
- func (s *DataStore) ListLHVolumeAttachmentsRO() ([]*longhorn.VolumeAttachment, error)
- func (s *DataStore) ListLonghornVolumeAttachmentByVolumeRO(name string) ([]*longhorn.VolumeAttachment, error)
- func (s *DataStore) ListManagerPods() ([]*corev1.Pod, error)
- func (s *DataStore) ListManagerPodsRO() ([]*corev1.Pod, error)
- func (s *DataStore) ListNodes() (map[string]*longhorn.Node, error)
- func (s *DataStore) ListNodesContainingEngineImageRO(ei *longhorn.EngineImage) (map[string]*longhorn.Node, error)
- func (s *DataStore) ListNodesRO() ([]*longhorn.Node, error)
- func (s *DataStore) ListOrphans() (map[string]*longhorn.Orphan, error)
- func (s *DataStore) ListOrphansByNode(name string) (map[string]*longhorn.Orphan, error)
- func (s *DataStore) ListOrphansByNodeRO(name string) ([]*longhorn.Orphan, error)
- func (s *DataStore) ListOrphansRO() ([]*longhorn.Orphan, error)
- func (s *DataStore) ListPDBsRO() (map[string]*policyv1.PodDisruptionBudget, error)
- func (s *DataStore) ListPersistentVolumesRO() ([]*corev1.PersistentVolume, error)
- func (s *DataStore) ListPodsBySelector(selector labels.Selector) ([]*corev1.Pod, error)
- func (s *DataStore) ListPodsBySelectorRO(selector labels.Selector) ([]*corev1.Pod, error)
- func (s *DataStore) ListPodsRO(namespace string) ([]*corev1.Pod, error)
- func (s *DataStore) ListReadyAndSchedulableNodesRO() (map[string]*longhorn.Node, error)
- func (s *DataStore) ListReadyNodes() (map[string]*longhorn.Node, error)
- func (s *DataStore) ListReadyNodesContainingEngineImageRO(image string) (map[string]*longhorn.Node, error)
- func (s *DataStore) ListReadyNodesRO() (map[string]*longhorn.Node, error)
- func (s *DataStore) ListRecurringJobs() (map[string]*longhorn.RecurringJob, error)
- func (s *DataStore) ListRecurringJobsRO() (map[string]*longhorn.RecurringJob, error)
- func (s *DataStore) ListReplicas() (map[string]*longhorn.Replica, error)
- func (s *DataStore) ListReplicasByBackingImage(backingImageName string) ([]*longhorn.Replica, error)
- func (s *DataStore) ListReplicasByDiskUUID(uuid string) (map[string]*longhorn.Replica, error)
- func (s *DataStore) ListReplicasByNode(name string) (map[string]*longhorn.Replica, error)
- func (s *DataStore) ListReplicasByNodeRO(name string) ([]*longhorn.Replica, error)
- func (s *DataStore) ListReplicasRO() ([]*longhorn.Replica, error)
- func (s *DataStore) ListSettings() (map[types.SettingName]*longhorn.Setting, error)
- func (s *DataStore) ListShareManagerPods() ([]*corev1.Pod, error)
- func (s *DataStore) ListShareManagers() (map[string]*longhorn.ShareManager, error)
- func (s *DataStore) ListSnapshots() (map[string]*longhorn.Snapshot, error)
- func (s *DataStore) ListSnapshotsRO(selector labels.Selector) (map[string]*longhorn.Snapshot, error)
- func (s *DataStore) ListStorageClassesInPersistentVolumesWithLonghornProvisioner() ([]string, error)
- func (s *DataStore) ListSupportBundleManagerPods(supportBundle *longhorn.SupportBundle) ([]*corev1.Pod, error)
- func (s *DataStore) ListSupportBundles() (map[string]*longhorn.SupportBundle, error)
- func (s *DataStore) ListSupportBundlesRO() ([]*longhorn.SupportBundle, error)
- func (s *DataStore) ListSystemBackups() (map[string]*longhorn.SystemBackup, error)
- func (s *DataStore) ListSystemBackupsRO() ([]*longhorn.SystemBackup, error)
- func (s *DataStore) ListSystemRestores() (map[string]*longhorn.SystemRestore, error)
- func (s *DataStore) ListSystemRestoresInProgress() (map[string]*longhorn.SystemRestore, error)
- func (s *DataStore) ListVolumeAttachmentsRO() ([]*storagev1.VolumeAttachment, error)
- func (s *DataStore) ListVolumeEngines(volumeName string) (map[string]*longhorn.Engine, error)
- func (s *DataStore) ListVolumeEnginesRO(volumeName string) (map[string]*longhorn.Engine, error)
- func (s *DataStore) ListVolumeEnginesUncached(volumeName string) ([]longhorn.Engine, error)
- func (s *DataStore) ListVolumePDBProtectedHealthyReplicasRO(volumeName string) (map[string]*longhorn.Replica, error)
- func (s *DataStore) ListVolumeReplicas(volumeName string) (map[string]*longhorn.Replica, error)
- func (s *DataStore) ListVolumeReplicasRO(volumeName string) (map[string]*longhorn.Replica, error)
- func (s *DataStore) ListVolumeSnapshotsRO(volumeName string) (map[string]*longhorn.Snapshot, error)
- func (s *DataStore) ListVolumes() (map[string]*longhorn.Volume, error)
- func (s *DataStore) ListVolumesByBackupVolumeRO(backupVolumeName string) (map[string]*longhorn.Volume, error)
- func (s *DataStore) ListVolumesByLabelSelector(selector labels.Selector) (map[string]*longhorn.Volume, error)
- func (s *DataStore) ListVolumesBySelectorRO(selector labels.Selector) ([]*longhorn.Volume, error)
- func (s *DataStore) ListVolumesFollowsGlobalSettingsRO(followedSettingNames map[string]bool) (map[string]*longhorn.Volume, error)
- func (s *DataStore) ListVolumesRO() ([]*longhorn.Volume, error)
- func (s *DataStore) ListVolumesROWithBackupVolumeName(backupVolumeName string) ([]*longhorn.Volume, error)
- func (s *DataStore) PickVolumeCurrentEngine(v *longhorn.Volume, es map[string]*longhorn.Engine) (*longhorn.Engine, error)
- func (s *DataStore) RemoveFinalizerForBackingImage(obj *longhorn.BackingImage) error
- func (s *DataStore) RemoveFinalizerForBackingImageDataSource(obj *longhorn.BackingImageDataSource) error
- func (s *DataStore) RemoveFinalizerForBackingImageManager(obj *longhorn.BackingImageManager) error
- func (s *DataStore) RemoveFinalizerForBackup(backup *longhorn.Backup) error
- func (s *DataStore) RemoveFinalizerForBackupBackingImage(obj *longhorn.BackupBackingImage) error
- func (s *DataStore) RemoveFinalizerForBackupVolume(backupVolume *longhorn.BackupVolume) error
- func (s *DataStore) RemoveFinalizerForEngine(obj *longhorn.Engine) error
- func (s *DataStore) RemoveFinalizerForEngineImage(obj *longhorn.EngineImage) error
- func (s *DataStore) RemoveFinalizerForLHVolumeAttachment(va *longhorn.VolumeAttachment) error
- func (s *DataStore) RemoveFinalizerForNode(obj *longhorn.Node) error
- func (s *DataStore) RemoveFinalizerForOrphan(orphan *longhorn.Orphan) error
- func (s *DataStore) RemoveFinalizerForReplica(obj *longhorn.Replica) error
- func (s *DataStore) RemoveFinalizerForShareManager(obj *longhorn.ShareManager) error
- func (s *DataStore) RemoveFinalizerForSnapshot(snapshot *longhorn.Snapshot) error
- func (s *DataStore) RemoveFinalizerForSupportBundle(supportBundle *longhorn.SupportBundle) (err error)
- func (s *DataStore) RemoveFinalizerForSystemBackup(obj *longhorn.SystemBackup) error
- func (s *DataStore) RemoveFinalizerForVolume(obj *longhorn.Volume) error
- func (s *DataStore) RemoveRecurringJobLabelFromVolume(volume *longhorn.Volume, labelKey string) (*longhorn.Volume, error)
- func (s *DataStore) RemoveSystemRestoreLabel(systemRestore *longhorn.SystemRestore) (*longhorn.SystemRestore, error)
- func (s *DataStore) ResetMonitoringEngineStatus(e *longhorn.Engine) (*longhorn.Engine, error)
- func (s *DataStore) Sync(stopCh <-chan struct{}) bool
- func (s *DataStore) UpdateBackingImage(backingImage *longhorn.BackingImage) (*longhorn.BackingImage, error)
- func (s *DataStore) UpdateBackingImageDataSource(backingImageDataSource *longhorn.BackingImageDataSource) (*longhorn.BackingImageDataSource, error)
- func (s *DataStore) UpdateBackingImageDataSourceStatus(backingImageDataSource *longhorn.BackingImageDataSource) (*longhorn.BackingImageDataSource, error)
- func (s *DataStore) UpdateBackingImageManager(backingImageManager *longhorn.BackingImageManager) (*longhorn.BackingImageManager, error)
- func (s *DataStore) UpdateBackingImageManagerStatus(backingImageManager *longhorn.BackingImageManager) (*longhorn.BackingImageManager, error)
- func (s *DataStore) UpdateBackingImageStatus(backingImage *longhorn.BackingImage) (*longhorn.BackingImage, error)
- func (s *DataStore) UpdateBackup(backup *longhorn.Backup) (*longhorn.Backup, error)
- func (s *DataStore) UpdateBackupBackingImage(backupBackingImage *longhorn.BackupBackingImage) (*longhorn.BackupBackingImage, error)
- func (s *DataStore) UpdateBackupBackingImageStatus(backupBackingImage *longhorn.BackupBackingImage) (*longhorn.BackupBackingImage, error)
- func (s *DataStore) UpdateBackupStatus(backup *longhorn.Backup) (*longhorn.Backup, error)
- func (s *DataStore) UpdateBackupTarget(backupTarget *longhorn.BackupTarget) (*longhorn.BackupTarget, error)
- func (s *DataStore) UpdateBackupTargetStatus(backupTarget *longhorn.BackupTarget) (*longhorn.BackupTarget, error)
- func (s *DataStore) UpdateBackupVolume(backupVolume *longhorn.BackupVolume) (*longhorn.BackupVolume, error)
- func (s *DataStore) UpdateBackupVolumeStatus(backupVolume *longhorn.BackupVolume) (*longhorn.BackupVolume, error)
- func (s *DataStore) UpdateClusterRole(clusterRole *rbacv1.ClusterRole) (*rbacv1.ClusterRole, error)
- func (s *DataStore) UpdateClusterRoleBinding(clusterRoleBinding *rbacv1.ClusterRoleBinding) (*rbacv1.ClusterRoleBinding, error)
- func (s *DataStore) UpdateConfigMap(configMap *corev1.ConfigMap) (*corev1.ConfigMap, error)
- func (s *DataStore) UpdateCronJob(cronJob *batchv1.CronJob) (*batchv1.CronJob, error)
- func (s *DataStore) UpdateCustomResourceDefinition(crd *apiextensionsv1.CustomResourceDefinition) (*apiextensionsv1.CustomResourceDefinition, error)
- func (s *DataStore) UpdateCustomizedSettings(defaultImages map[types.SettingName]string) error
- func (s *DataStore) UpdateDaemonSet(obj *appsv1.DaemonSet) (*appsv1.DaemonSet, error)
- func (s *DataStore) UpdateDeployment(obj *appsv1.Deployment) (*appsv1.Deployment, error)
- func (s *DataStore) UpdateEngine(e *longhorn.Engine) (*longhorn.Engine, error)
- func (s *DataStore) UpdateEngineImage(img *longhorn.EngineImage) (*longhorn.EngineImage, error)
- func (s *DataStore) UpdateEngineImageStatus(img *longhorn.EngineImage) (*longhorn.EngineImage, error)
- func (s *DataStore) UpdateEngineStatus(e *longhorn.Engine) (*longhorn.Engine, error)
- func (s *DataStore) UpdateInstanceManager(im *longhorn.InstanceManager) (*longhorn.InstanceManager, error)
- func (s *DataStore) UpdateInstanceManagerStatus(im *longhorn.InstanceManager) (*longhorn.InstanceManager, error)
- func (s *DataStore) UpdateLHVolumeAttachment(va *longhorn.VolumeAttachment) (*longhorn.VolumeAttachment, error)
- func (s *DataStore) UpdateLHVolumeAttachmentStatus(va *longhorn.VolumeAttachment) (*longhorn.VolumeAttachment, error)
- func (s *DataStore) UpdateNode(node *longhorn.Node) (*longhorn.Node, error)
- func (s *DataStore) UpdateNodeStatus(node *longhorn.Node) (*longhorn.Node, error)
- func (s *DataStore) UpdateOrphan(orphan *longhorn.Orphan) (*longhorn.Orphan, error)
- func (s *DataStore) UpdateOrphanStatus(orphan *longhorn.Orphan) (*longhorn.Orphan, error)
- func (s *DataStore) UpdatePVAnnotation(volume *longhorn.Volume, annotationKey, annotationVal string) error
- func (s *DataStore) UpdatePersistentVolume(pv *corev1.PersistentVolume) (*corev1.PersistentVolume, error)
- func (s *DataStore) UpdatePersistentVolumeClaim(namespace string, pvc *corev1.PersistentVolumeClaim) (*corev1.PersistentVolumeClaim, error)
- func (s *DataStore) UpdatePod(obj *corev1.Pod) (*corev1.Pod, error)
- func (s *DataStore) UpdatePodSecurityPolicy(podSecurityPolicy *policyv1beta1.PodSecurityPolicy) (*policyv1beta1.PodSecurityPolicy, error)
- func (s *DataStore) UpdateRecurringJob(recurringJob *longhorn.RecurringJob) (*longhorn.RecurringJob, error)
- func (s *DataStore) UpdateRecurringJobStatus(recurringJob *longhorn.RecurringJob) (*longhorn.RecurringJob, error)
- func (s *DataStore) UpdateReplica(r *longhorn.Replica) (*longhorn.Replica, error)
- func (s *DataStore) UpdateReplicaStatus(r *longhorn.Replica) (*longhorn.Replica, error)
- func (s *DataStore) UpdateRole(role *rbacv1.Role) (*rbacv1.Role, error)
- func (s *DataStore) UpdateRoleBinding(roleBinding *rbacv1.RoleBinding) (*rbacv1.RoleBinding, error)
- func (s *DataStore) UpdateSecret(namespace string, secret *corev1.Secret) (*corev1.Secret, error)
- func (s *DataStore) UpdateService(namespace string, service *corev1.Service) (*corev1.Service, error)
- func (s *DataStore) UpdateServiceAccount(serviceAccount *corev1.ServiceAccount) (*corev1.ServiceAccount, error)
- func (s *DataStore) UpdateSetting(setting *longhorn.Setting) (*longhorn.Setting, error)
- func (s *DataStore) UpdateShareManager(sm *longhorn.ShareManager) (*longhorn.ShareManager, error)
- func (s *DataStore) UpdateShareManagerStatus(sm *longhorn.ShareManager) (*longhorn.ShareManager, error)
- func (s *DataStore) UpdateSnapshotStatus(snap *longhorn.Snapshot) (*longhorn.Snapshot, error)
- func (s *DataStore) UpdateStorageClass(obj *storagev1.StorageClass) (*storagev1.StorageClass, error)
- func (s *DataStore) UpdateSupportBundleStatus(supportBundle *longhorn.SupportBundle) (*longhorn.SupportBundle, error)
- func (s *DataStore) UpdateSystemBackup(systemBackup *longhorn.SystemBackup) (*longhorn.SystemBackup, error)
- func (s *DataStore) UpdateSystemBackupStatus(systemBackup *longhorn.SystemBackup) (*longhorn.SystemBackup, error)
- func (s *DataStore) UpdateSystemRestore(systemRestore *longhorn.SystemRestore) (*longhorn.SystemRestore, error)
- func (s *DataStore) UpdateSystemRestoreStatus(systemRestore *longhorn.SystemRestore) (*longhorn.SystemRestore, error)
- func (s *DataStore) UpdateVolume(v *longhorn.Volume) (*longhorn.Volume, error)
- func (s *DataStore) UpdateVolumeStatus(v *longhorn.Volume) (*longhorn.Volume, error)
- func (s *DataStore) ValidateRecurringJobs(jobs []longhorn.RecurringJobSpec) error
- func (s *DataStore) ValidateSetting(name, value string) (err error)
- func (s *DataStore) ValidateV1DataEngineEnabled(dataEngineEnabled bool) (ims []*longhorn.InstanceManager, err error)
- func (s *DataStore) ValidateV2DataEngineEnabled(dataEngineEnabled bool) (ims []*longhorn.InstanceManager, err error)
Constants ¶
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 )
const (
// NameMaximumLength restricted the length due to Kubernetes name limitation
NameMaximumLength = 40
)
Variables ¶
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 )
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 ErrorIsConflict ¶ added in v0.5.0
ErrorIsConflict checks if given error match metav1.StatusReasonConflict
func ErrorIsNotFound ¶ added in v0.3.1
ErrorIsNotFound checks if given error match metav1.StatusReasonNotFound
func FixupRecurringJob ¶ added in v1.2.0
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
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
IsAvailableHealthyReplica returns if the specified replica is a healthy one
func IsDataEngineV1 ¶ added in v1.6.0
func IsDataEngineV1(dataEngine longhorn.DataEngineType) bool
IsDataEngineV1 returns true if the given dataEngine is v1
func IsDataEngineV2 ¶ added in v1.6.0
func IsDataEngineV2(dataEngine longhorn.DataEngineType) bool
IsDataEngineV2 returns true if the given dataEngine is v2
func IsReplicaRebuildingFailed ¶ added in v1.4.1
IsReplicaRebuildingFailed returns true if the rebuilding replica failed not caused by network issues.
func IsSupportedVolumeSize ¶ added in v1.5.4
func IsSupportedVolumeSize(dataEngine longhorn.DataEngineType, 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 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
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
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 BackingImageInformer cache.SharedInformer BackingImageManagerInformer cache.SharedInformer BackingImageDataSourceInformer cache.SharedInformer BackupBackingImageInformer 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) AreAllDisksRemovedByDiskType ¶ added in v1.6.0
func (*DataStore) AreAllVolumesDetached ¶ added in v1.3.0
func (s *DataStore) AreAllVolumesDetached(dataEngine longhorn.DataEngineType) (bool, []*longhorn.InstanceManager, error)
func (*DataStore) AreAllVolumesDetachedState ¶ added in v1.4.4
func (*DataStore) CheckDataEngineImageCompatiblityByImage ¶ added in v1.6.0
func (s *DataStore) CheckDataEngineImageCompatiblityByImage(image string, dataEngine longhorn.DataEngineType) error
func (*DataStore) CheckDataEngineImageReadiness ¶ added in v1.6.0
func (*DataStore) CheckDataEngineImageReadyOnAtLeastOneVolumeReplica ¶ added in v1.6.0
func (s *DataStore) CheckDataEngineImageReadyOnAtLeastOneVolumeReplica(image, volumeName, nodeID string, dataLocality longhorn.DataLocality, dataEngine longhorn.DataEngineType) (bool, error)
CheckDataEngineImageReadyOnAtLeastOneVolumeReplica checks if the IMAGE is deployed on the NODEID and on at least one of the the volume's replicas
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) CheckImageReadyOnAllVolumeReplicas ¶ added in v1.6.0
func (s *DataStore) CheckImageReadyOnAllVolumeReplicas(image, volumeName, nodeID string, dataEngine longhorn.DataEngineType) (bool, error)
CheckImageReadyOnAllVolumeReplicas checks if the IMAGE is deployed on the NODEID as well as all 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) CreateBackupBackingImage ¶ added in v1.6.0
func (s *DataStore) CreateBackupBackingImage(backupBackingImage *longhorn.BackupBackingImage) (*longhorn.BackupBackingImage, error)
CreateBackupBackingImage creates a Longhorn BackupBackingImage resource and verifies
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
CreateConfigMap creates a ConfigMap resource
func (*DataStore) CreateCronJob ¶ added in v1.2.0
CreateCronJob creates a CronJob resource
func (*DataStore) CreateCustomResourceDefinition ¶ added in v1.4.0
func (s *DataStore) CreateCustomResourceDefinition(crd *apiextensionsv1.CustomResourceDefinition) (*apiextensionsv1.CustomResourceDefinition, error)
CreateCustomResourceDefinition creates a CustomResourceDefinition resource with the given CustomResourceDefinition object
func (*DataStore) CreateDaemonSet ¶ added in v1.4.0
CreateDaemonSet creates a DaemonSet resource with the given DaemonSet object in the Longhorn namespace
func (*DataStore) CreateDefaultNode ¶
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 ¶
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 ¶
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
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 ¶
CreateNode creates a Longhorn Node resource and verifies creation
func (*DataStore) CreateOrphan ¶ added in v1.3.0
CreateOrphan creates a Longhorn Orphan resource and verifies creation
func (*DataStore) CreatePDB ¶ added in v1.1.0
func (s *DataStore) CreatePDB(pdp *policyv1.PodDisruptionBudget) (*policyv1.PodDisruptionBudget, error)
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
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 ¶
CreateReplica creates a Longhorn Replica resource and verifies creation
func (*DataStore) CreateRole ¶ added in v1.4.0
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
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 ¶
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
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 ¶
CreateVolume creates a Longhorn Volume resource and verifies creation
func (*DataStore) DeleteAllBackupsForBackupVolume ¶ added in v1.2.0
DeleteAllBackupsForBackupVolume won't result in immediately deletion since finalizer was set by default
func (*DataStore) DeleteBackingImage ¶ added in v1.1.1
DeleteBackingImage won't result in immediately deletion since finalizer was set by default
func (*DataStore) DeleteBackingImageDataSource ¶ added in v1.2.0
DeleteBackingImageDataSource won't result in immediately deletion since finalizer was set by default
func (*DataStore) DeleteBackingImageManager ¶ added in v1.1.1
DeleteBackingImageManager won't result in immediately deletion since finalizer was set by default
func (*DataStore) DeleteBackup ¶ added in v1.2.0
DeleteBackup won't result in immediately deletion since finalizer was set by default
func (*DataStore) DeleteBackupBackingImage ¶ added in v1.6.0
DeleteBackupBackingImage won't result in immediately deletion since finalizer was set by default
func (*DataStore) DeleteBackupTarget ¶ added in v1.2.0
DeleteBackupTarget won't result in immediately deletion since finalizer was set by default
func (*DataStore) DeleteBackupVolume ¶ added in v1.2.0
DeleteBackupVolume won't result in immediately deletion since finalizer was set by default
func (*DataStore) DeleteCSIDriver ¶ added in v0.7.0
DeleteCSIDriver deletes CSIDriver for the given name and namespace
func (*DataStore) DeleteConfigMap ¶ added in v1.4.0
DeleteConfigMap deletes the ConfigMap for the given name and namespace
func (*DataStore) DeleteCronJob ¶
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
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
DeleteDeployment deletes Deployment for the given name and namespace. The dependents will be deleted in the foreground
func (*DataStore) DeleteEngine ¶
DeleteEngine won't result in immediately deletion since finalizer was set by default
func (*DataStore) DeleteEngineImage ¶
DeleteEngineImage won't result in immediately deletion since finalizer was set by default
func (*DataStore) DeleteInstanceManager ¶ added in v0.6.0
DeleteInstanceManager deletes the InstanceManager. The dependents will be deleted in the foreground
func (*DataStore) DeleteJob ¶ added in v1.4.0
DeleteJob delete a Job resource for the given job name in the Longhorn namespace
func (*DataStore) DeleteLHVolumeAttachment ¶ added in v1.5.0
DeleteLHVolumeAttachment won't result in immediately deletion since finalizer was set by default
func (*DataStore) DeleteLease ¶ added in v1.1.0
DeleteLease deletes Lease with the given name in s.namespace
func (*DataStore) DeleteNode ¶ added in v0.3.1
DeleteNode deletes Node for the given name and namespace
func (*DataStore) DeleteOrphan ¶ added in v1.3.0
DeleteOrphan won't result in immediately deletion since finalizer was set by default
func (*DataStore) DeletePDB ¶ added in v1.1.0
DeletePDB deletes PodDisruptionBudget for the given name and namespace
func (*DataStore) DeletePersistentVolume ¶ added in v1.1.2
DeletePersistentVolume deletes the PersistentVolume for the given PersistentVolume name
func (*DataStore) DeletePersistentVolumeClaim ¶ added in v1.1.2
DeletePersistentVolumeClaim deletes the PersistentVolumeClaim for the given name and namespace
func (*DataStore) DeletePod ¶ added in v0.6.0
DeletePod deletes Pod for the given name and namespace
func (*DataStore) DeleteRecurringJob ¶ added in v1.2.0
DeleteRecurringJob deletes the RecurringJob. The dependents will be deleted in the foreground
func (*DataStore) DeleteReplica ¶
DeleteReplica won't result in immediately deletion since finalizer was set by default
func (*DataStore) DeleteSecret ¶ added in v1.5.4
DeleteSecret deletes the Secret for the given name and namespace
func (*DataStore) DeleteService ¶ added in v1.1.0
DeleteService deletes the Service for the given name and namespace
func (*DataStore) DeleteShareManager ¶ added in v1.1.0
DeleteShareManager won't result in immediately deletion since finalizer was set by default
func (*DataStore) DeleteSnapshot ¶ added in v1.3.0
DeleteSnapshot won't result in immediately deletion since finalizer was set by default
func (*DataStore) DeleteStorageClass ¶ added in v1.1.0
DeleteStorageClass deletes StorageClass with the given name
func (*DataStore) DeleteSupportBundle ¶ added in v1.4.0
DeleteSupportBundle won't result in immediately deletion since finalizer was set by default
func (*DataStore) DeleteSystemBackup ¶ added in v1.4.0
DeleteSystemBackup won't result in immediately deletion since finalizer was set by default
func (*DataStore) DeleteSystemRestore ¶ added in v1.4.0
DeleteSystemRestore won't result in immediately deletion since finalizer was set by default The dependents will be deleted in the foreground
func (*DataStore) DeleteVolume ¶
DeleteVolume won't result in immediately deletion since finalizer was set by default
func (*DataStore) GetAllClusterRoleBindingList ¶ added in v1.4.0
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
GetBackup returns a copy of Backup with the given backup name in the cluster
func (*DataStore) GetBackupBackingImage ¶ added in v1.6.0
func (s *DataStore) GetBackupBackingImage(name string) (*longhorn.BackupBackingImage, error)
GetBackupBackingImage returns a new BackupBackingImage object for the given name and namespace
func (*DataStore) GetBackupRO ¶ added in v1.2.0
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
GetConfigMap return a new ConfigMap object for the given namespace and name
func (*DataStore) GetConfigMapRO ¶ added in v1.1.0
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
GetConfigMapWithoutCache return a new ConfigMap via Kubernetes client object for the given namespace and name
func (*DataStore) GetCredentialFromSecret ¶
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
GetDaemonSet gets the DaemonSet for the given name and namespace
func (*DataStore) GetDataEngineImageCLIAPIVersion ¶ added in v1.6.0
func (s *DataStore) GetDataEngineImageCLIAPIVersion(imageName string, dataEngine longhorn.DataEngineType) (int, error)
GetDataEngineImageCLIAPIVersion get engine or instance manager image for the given name and returns the CLIAPIVersion
func (*DataStore) GetDataEngines ¶ added in v1.6.0
func (s *DataStore) GetDataEngines() map[longhorn.DataEngineType]struct{}
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, dataEngine longhorn.DataEngineType) (*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) 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
GetEngineImageCLIAPIVersion get engine image for the given name and returns the CLIAPIVersion
func (*DataStore) GetEngineImageDaemonSet ¶
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 (*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
GetJob get a Job resource for the given job name in the Longhorn namespace
func (*DataStore) GetKubernetesNodeRO ¶ added in v1.5.4
GetKubernetesNodeRO gets the Node from the index for the given name
func (*DataStore) GetKubernetesVersion ¶ added in v0.4.0
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
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
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
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
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 (*DataStore) GetManagerNodeIPMap ¶
GetManagerNodeIPMap returns an object contains podIPs from list of running pods with app=longhorn-manager
func (*DataStore) GetNamespace ¶ added in v1.4.0
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 ¶
GetNode gets Longhorn Node for the given name and namespace Returns a new Node object
func (*DataStore) GetOrphan ¶ added in v1.3.0
GetOrphan returns a copy of Orphan with the given orphan name in the cluster
func (*DataStore) GetOrphanRO ¶ added in v1.3.0
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
GetPod returns a mutable Pod object for the given name and namespace
func (*DataStore) GetPodContainerLog ¶ added in v1.2.0
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
GetPodContainerLogRequest returns the Pod log for the given pod name, container name and namespace
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
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
GetReadyDisk find disk name by the given nodeName and diskUUD Returns a disk name
func (*DataStore) GetReadyDiskNode ¶ added in v1.1.1
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 (*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 ¶
GetReplica gets Replica for the given name and namespace and returns a new Replica object
func (*DataStore) GetReplicaRO ¶ added in v1.5.0
func (*DataStore) GetRole ¶ added in v1.4.0
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
GetSecret return a new Secret object with the given namespace and name
func (*DataStore) GetSecretRO ¶ added in v1.1.1
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
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 ¶
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
GetSettingExact returns the Setting for the given name and namespace
func (*DataStore) GetSettingExactRO ¶ added in v1.5.4
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 (*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 (*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
GetSnapshot returns a copy of Snapshot with the given snapshot name in the cluster
func (*DataStore) GetSnapshotRO ¶ added in v1.3.0
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
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 (*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 ¶
GetVolume returns a new volume object for the given namespace and name
func (*DataStore) GetVolumeCurrentEngine ¶ added in v1.2.0
GetVolumeCurrentEngine returns the Engine for a volume with the given namespace
func (*DataStore) GetVolumeRO ¶ added in v1.2.4
func (*DataStore) IsDataEngineEnabled ¶ added in v1.6.0
func (s *DataStore) IsDataEngineEnabled(dataEngine longhorn.DataEngineType) (bool, error)
IsDataEngineEnabled returns true if the given dataEngine is enabled
func (*DataStore) IsEngineImageCLIAPIVersionOne ¶ added in v0.6.0
IsEngineImageCLIAPIVersionOne get engine image CLIAPIVersion for the given name. Returns true if CLIAPIVersion is 1
func (*DataStore) IsKubeNodeUnschedulable ¶ added in v1.2.4
IsKubeNodeUnschedulable checks if the Kubernetes Node resource is unschedulable
func (*DataStore) IsNodeDeleted ¶ added in v1.4.2
IsNodeDeleted checks whether the node does not exist by passing in the node name
func (*DataStore) IsNodeDownOrDeleted ¶ added in v0.3.2
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 (*DataStore) IsNodeSchedulable ¶ added in v1.1.1
func (*DataStore) IsV2DataEngineDisabledForNode ¶ added in v1.6.0
IsV2VolumeDisabledForNode returns true if the node disables v2 data engine
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 (*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) ListBackupBackingImages ¶ added in v1.6.0
func (s *DataStore) ListBackupBackingImages() (map[string]*longhorn.BackupBackingImage, error)
ListBackupBackingImages returns object includes all BackupBackingImage 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
ListBackups returns an object contains all backups in the cluster Backups CR
func (*DataStore) ListBackupsRO ¶ added in v1.3.0
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
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
ListDaemonSet gets a list of all DaemonSet for the given namespace
func (*DataStore) ListDaemonSetWithLabels ¶ added in v1.1.1
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 (*DataStore) ListEngineImageDaemonSetPodsFromEngineImageNameRO ¶ added in v1.6.2
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
ListEngines returns an object contains all Engine for the given namespace
func (*DataStore) ListEnginesByNodeRO ¶ added in v1.1.2
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
ListEnginesRO returns a list of all Engine for the given namespace
func (*DataStore) ListInstanceManagerPods ¶ added in v0.6.0
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, imImage string, imType longhorn.InstanceManagerType, dataEngine longhorn.DataEngineType) ([]*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, dataEngine longhorn.DataEngineType) (map[string]*longhorn.InstanceManager, error)
func (*DataStore) ListInstanceManagersBySelectorRO ¶ added in v1.5.4
func (s *DataStore) ListInstanceManagersBySelectorRO(node, imImage string, imType longhorn.InstanceManagerType, dataEngine longhorn.DataEngineType) (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
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) ListLHVolumeAttachmentsRO ¶ added in v1.6.0
func (s *DataStore) ListLHVolumeAttachmentsRO() ([]*longhorn.VolumeAttachment, error)
ListLHVolumeAttachmentsRO returns a list of all VolumeAttachments for the given namespace
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 ¶
ListManagerPods returns a list of Pods marked with app=longhorn-manager
func (*DataStore) ListManagerPodsRO ¶ added in v1.5.4
func (*DataStore) ListNodesContainingEngineImageRO ¶ added in v1.5.4
func (*DataStore) ListNodesRO ¶ added in v1.1.0
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
ListOrphans returns an object contains all Orphans for the given namespace
func (*DataStore) ListOrphansByNode ¶ added in v1.3.0
ListOrphansByNode gets a map of Orphans on the node Name for the given namespace.
func (*DataStore) ListOrphansByNodeRO ¶ added in v1.3.0
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
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 (*DataStore) ListPodsBySelectorRO ¶ added in v1.5.4
func (*DataStore) ListPodsRO ¶ added in v1.1.0
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 (*DataStore) ListReadyNodes ¶ added in v1.1.1
func (*DataStore) ListReadyNodesContainingEngineImageRO ¶ added in v1.5.4
func (*DataStore) ListReadyNodesRO ¶ added in v1.5.4
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
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
ListReplicasByDiskUUID gets a list of Replicas on a specific disk the given namespace.
func (*DataStore) ListReplicasByNode ¶
ListReplicasByNode gets a map of Replicas on the node Name for the given namespace.
func (*DataStore) ListReplicasByNodeRO ¶ added in v1.1.0
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
ListReplicasRO returns a list of all replicas for the given namespace
func (*DataStore) ListSettings ¶
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 (*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 (*DataStore) ListSnapshotsRO ¶ added in v1.3.0
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 ¶
ListVolumeEngines returns an object contains all Engines with the given LonghornLabelVolume name and namespace
func (*DataStore) ListVolumeEnginesRO ¶ added in v1.5.4
func (*DataStore) ListVolumeEnginesUncached ¶ added in v1.4.4
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 (*DataStore) ListVolumeReplicas ¶
ListVolumeReplicas returns an object contains all Replica with the given LonghornLabelVolume name and namespace
func (*DataStore) ListVolumeReplicasRO ¶ added in v1.5.4
func (*DataStore) ListVolumeSnapshotsRO ¶ added in v1.3.0
func (*DataStore) ListVolumes ¶
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
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
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
RemoveFinalizerForBackup will result in deletion if DeletionTimestamp was set
func (*DataStore) RemoveFinalizerForBackupBackingImage ¶ added in v1.6.0
func (s *DataStore) RemoveFinalizerForBackupBackingImage(obj *longhorn.BackupBackingImage) error
RemoveFinalizerForBackupBackingImage 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 ¶
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 ¶
RemoveFinalizerForNode will result in deletion if DeletionTimestamp was set
func (*DataStore) RemoveFinalizerForOrphan ¶ added in v1.3.0
RemoveFinalizerForOrphan will result in deletion if DeletionTimestamp was set
func (*DataStore) RemoveFinalizerForReplica ¶
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
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 ¶
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
ResetMonitoringEngineStatus clean and update Engine status
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
UpdateBackup updates the given Longhorn backup in the cluster Backup CR and verifies update
func (*DataStore) UpdateBackupBackingImage ¶ added in v1.6.0
func (s *DataStore) UpdateBackupBackingImage(backupBackingImage *longhorn.BackupBackingImage) (*longhorn.BackupBackingImage, error)
UpdateBackupBackingImage updates Longhorn BackupBackingImage and verifies update
func (*DataStore) UpdateBackupBackingImageStatus ¶ added in v1.6.0
func (s *DataStore) UpdateBackupBackingImageStatus(backupBackingImage *longhorn.BackupBackingImage) (*longhorn.BackupBackingImage, error)
UpdateBackupBackingImageStatus updates Longhorn BackupBackingImage resource status and verifies update
func (*DataStore) UpdateBackupStatus ¶ added in v1.2.0
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
UpdateConfigMap updates ConfigMap resource
func (*DataStore) UpdateCronJob ¶ added in v1.2.0
UpdateCronJob updates CronJob resource
func (*DataStore) UpdateCustomResourceDefinition ¶ added in v1.4.0
func (s *DataStore) UpdateCustomResourceDefinition(crd *apiextensionsv1.CustomResourceDefinition) (*apiextensionsv1.CustomResourceDefinition, error)
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
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 ¶
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
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 ¶
UpdateNode updates Longhorn Node resource and verifies update
func (*DataStore) UpdateNodeStatus ¶ added in v0.7.0
UpdateNodeStatus updates Longhorn Node status and verifies update
func (*DataStore) UpdateOrphan ¶ added in v1.3.0
UpdateOrphan updates the given Longhorn orphan in the cluster Orphan CR and verifies update
func (*DataStore) UpdateOrphanStatus ¶ added in v1.3.0
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 (*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
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 ¶
UpdateReplica updates Replica and verifies update
func (*DataStore) UpdateReplicaStatus ¶ added in v0.7.0
UpdateReplicaStatus updates Replica status and verifies update
func (*DataStore) UpdateRole ¶ added in v1.4.0
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
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 ¶
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
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 ¶
UpdateVolume updates Longhorn Volume and verifies update
func (*DataStore) UpdateVolumeStatus ¶ added in v0.7.0
UpdateVolumeStatus updates Longhorn Volume status and verifies update
func (*DataStore) ValidateRecurringJobs ¶ added in v1.6.0
func (s *DataStore) ValidateRecurringJobs(jobs []longhorn.RecurringJobSpec) error
ValidateRecurringJobs validates data and formats for recurring jobs
func (*DataStore) ValidateSetting ¶ added in v0.6.0
ValidateSetting checks the given setting value types and condition
func (*DataStore) ValidateV1DataEngineEnabled ¶ added in v1.6.0
func (s *DataStore) ValidateV1DataEngineEnabled(dataEngineEnabled bool) (ims []*longhorn.InstanceManager, err error)
func (*DataStore) ValidateV2DataEngineEnabled ¶ added in v1.6.0
func (s *DataStore) ValidateV2DataEngineEnabled(dataEngineEnabled bool) (ims []*longhorn.InstanceManager, err error)