Documentation ¶
Index ¶
- Constants
- Variables
- func CheckInstanceManagerType(im *longhorn.InstanceManager) (types.InstanceManagerType, error)
- func ErrorIsConflict(err error) bool
- func ErrorIsNotFound(err error) bool
- 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 GetOwnerReferencesForShareManager(sm *longhorn.ShareManager, isController bool) []metav1.OwnerReference
- func GetOwnerReferencesForVolume(v *longhorn.Volume) []metav1.OwnerReference
- 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
- type DataStore
- func (s *DataStore) CheckEngineImageReadiness(image string, nodes ...string) (isReady bool, err error)
- func (s *DataStore) CheckEngineImageReadyOnAllVolumeReplicas(image, volumeName, nodeID string) (bool, error)
- func (s *DataStore) CheckEngineImageReadyOnAtLeastOneVolumeReplica(image, volumeName, nodeID string) (bool, error)
- func (s *DataStore) CreateBackingImage(backingImage *longhorn.BackingImage) (*longhorn.BackingImage, error)
- func (s *DataStore) CreateBackingImageManager(backingImageManager *longhorn.BackingImageManager) (*longhorn.BackingImageManager, error)
- func (s *DataStore) CreateDefaultNode(name string) (*longhorn.Node, 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) CreateNode(node *longhorn.Node) (*longhorn.Node, error)
- func (s *DataStore) CreatePDB(pdp *policyv1beta1.PodDisruptionBudget) (*policyv1beta1.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) CreateReplica(r *longhorn.Replica) (*longhorn.Replica, error)
- func (s *DataStore) CreateService(ns string, service *corev1.Service) (*corev1.Service, error)
- func (s *DataStore) CreateSetting(setting *longhorn.Setting) (*longhorn.Setting, error)
- func (s *DataStore) CreateShareManager(sm *longhorn.ShareManager) (*longhorn.ShareManager, error)
- func (s *DataStore) CreateStorageClass(sc *storagev1.StorageClass) (*storagev1.StorageClass, error)
- func (s *DataStore) CreateVolume(v *longhorn.Volume) (*longhorn.Volume, error)
- func (s *DataStore) CreateVolumeCronJob(volumeName string, cronJob *batchv1beta1.CronJob) (*batchv1beta1.CronJob, error)
- func (s *DataStore) DeleteBackingImage(name string) error
- func (s *DataStore) DeleteBackingImageManager(name string) error
- func (s *DataStore) DeleteCSIDriver(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) DeleteLease(name string) error
- func (s *DataStore) DeleteNode(name 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) DeleteReplica(name string) error
- func (s *DataStore) DeleteService(namespace, name string) error
- func (s *DataStore) DeleteShareManager(name string) error
- func (s *DataStore) DeleteStorageClass(scName string) error
- func (s *DataStore) DeleteVolume(name string) 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) GetAllNodesList() (runtime.Object, error)
- func (s *DataStore) GetAllPodsList() (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) GetBackingImageManager(name string) (*longhorn.BackingImageManager, error)
- func (s *DataStore) GetConfigMap(namespace, name string) (*corev1.ConfigMap, error)
- func (s *DataStore) GetConfigMapRO(namespace, name string) (*corev1.ConfigMap, error)
- func (s *DataStore) GetCredentialFromSecret(secretName string) (map[string]string, error)
- func (s *DataStore) GetDaemonSet(name string) (*appsv1.DaemonSet, 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) GetEngineImageCLIAPIVersion(imageName string) (int, error)
- func (s *DataStore) GetEngineImageDaemonSet(name string) (*appsv1.DaemonSet, error)
- func (s *DataStore) GetInstanceManager(name string) (*longhorn.InstanceManager, error)
- func (s *DataStore) GetInstanceManagerByInstance(obj interface{}) (*longhorn.InstanceManager, error)
- func (s *DataStore) GetKubernetesNode(name string) (*corev1.Node, error)
- func (s *DataStore) GetKubernetesVersion() (*version.Info, error)
- func (s *DataStore) GetLonghornEventList() (*corev1.EventList, error)
- func (s *DataStore) GetLonghornNamespace() (*corev1.Namespace, error)
- func (s *DataStore) GetManagerNodeIPMap() (map[string]string, error)
- func (s *DataStore) GetNode(name string) (*longhorn.Node, error)
- func (s *DataStore) GetNodeRO(name string) (*longhorn.Node, error)
- func (s *DataStore) GetPDBRO(name string) (*policyv1beta1.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) GetPodContainerLogRequest(podName, containerName string) *rest.Request
- func (s *DataStore) GetPriorityClass(pcName string) (*schedulingv1.PriorityClass, error)
- func (s *DataStore) GetRandomReadyNode() (*longhorn.Node, error)
- func (s *DataStore) GetReadyDiskNode(diskUUID string) (*longhorn.Node, string, error)
- func (s *DataStore) GetReplica(name string) (*longhorn.Replica, error)
- func (s *DataStore) GetSecret(namespace, name string) (*corev1.Secret, error)
- func (s *DataStore) GetSecretRO(namespace, name string) (*corev1.Secret, error)
- func (s *DataStore) GetService(namespace, name string) (*corev1.Service, 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) 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) GetShareManager(name string) (*longhorn.ShareManager, error)
- func (s *DataStore) GetStorageClassRO(scName string) (*storagev1.StorageClass, error)
- func (s *DataStore) GetVolume(name string) (*longhorn.Volume, error)
- func (s *DataStore) InitSettings() error
- func (s *DataStore) IsEngineImageCLIAPIVersionOne(imageName 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) 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) ListBackingImages() (map[string]*longhorn.BackingImage, error)
- func (s *DataStore) ListDaemonSet() ([]*appsv1.DaemonSet, error)
- func (s *DataStore) ListDaemonSetWithLabels(labels map[string]string) ([]*appsv1.DaemonSet, error)
- func (s *DataStore) ListDefaultBackingImageManagers() (map[string]*longhorn.BackingImageManager, error)
- func (s *DataStore) ListDeployment() ([]*appsv1.Deployment, error)
- func (s *DataStore) ListDeploymentWithLabels(labels map[string]string) ([]*appsv1.Deployment, error)
- func (s *DataStore) ListEngineImageDaemonSetPodsFromEngineImageName(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, image string, imType types.InstanceManagerType) ([]*corev1.Pod, error)
- func (s *DataStore) ListInstanceManagers() (map[string]*longhorn.InstanceManager, error)
- func (s *DataStore) ListInstanceManagersByNode(node string, imType types.InstanceManagerType) (map[string]*longhorn.InstanceManager, error)
- func (s *DataStore) ListInstanceManagersBySelector(node, instanceManagerImage string, managerType types.InstanceManagerType) (map[string]*longhorn.InstanceManager, error)
- func (s *DataStore) ListKubeNodesRO() ([]*corev1.Node, error)
- func (s *DataStore) ListManagerPods() ([]*corev1.Pod, error)
- func (s *DataStore) ListNodes() (map[string]*longhorn.Node, error)
- func (s *DataStore) ListNodesRO() ([]*longhorn.Node, error)
- func (s *DataStore) ListNodesWithEngineImage(image string) (map[string]*longhorn.Node, error)
- func (s *DataStore) ListPDBs() (map[string]*policyv1beta1.PodDisruptionBudget, error)
- func (s *DataStore) ListPodsBySelector(selector labels.Selector) ([]*corev1.Pod, error)
- func (s *DataStore) ListPodsRO() ([]*corev1.Pod, error)
- func (s *DataStore) ListReadyAndSchedulableNodes() (map[string]*longhorn.Node, error)
- func (s *DataStore) ListReadyNodes() (map[string]*longhorn.Node, error)
- func (s *DataStore) ListReadyNodesWithEngineImage(image string) (map[string]*longhorn.Node, 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) 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) ListStandbyVolumesRO() (map[string]*longhorn.Volume, error)
- func (s *DataStore) ListVolumeCronJobROs(volumeName string) (map[string]*batchv1beta1.CronJob, error)
- func (s *DataStore) ListVolumeEngines(volumeName string) (map[string]*longhorn.Engine, error)
- func (s *DataStore) ListVolumeReplicas(volumeName string) (map[string]*longhorn.Replica, error)
- func (s *DataStore) ListVolumes() (map[string]*longhorn.Volume, error)
- func (s *DataStore) ListVolumesRO() ([]*longhorn.Volume, error)
- func (s *DataStore) RemoveFinalizerForBackingImage(obj *longhorn.BackingImage) error
- func (s *DataStore) RemoveFinalizerForBackingImageManager(obj *longhorn.BackingImageManager) error
- func (s *DataStore) RemoveFinalizerForEngine(obj *longhorn.Engine) error
- func (s *DataStore) RemoveFinalizerForEngineImage(obj *longhorn.EngineImage) error
- func (s *DataStore) RemoveFinalizerForNode(obj *longhorn.Node) error
- func (s *DataStore) RemoveFinalizerForReplica(obj *longhorn.Replica) error
- func (s *DataStore) RemoveFinalizerForShareManager(obj *longhorn.ShareManager) error
- func (s *DataStore) RemoveFinalizerForVolume(obj *longhorn.Volume) 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) 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) 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) UpdateNode(node *longhorn.Node) (*longhorn.Node, error)
- func (s *DataStore) UpdateNodeStatus(node *longhorn.Node) (*longhorn.Node, 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) UpdateReplica(r *longhorn.Replica) (*longhorn.Replica, error)
- func (s *DataStore) UpdateReplicaStatus(r *longhorn.Replica) (*longhorn.Replica, 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) UpdateVolume(v *longhorn.Volume) (*longhorn.Volume, error)
- func (s *DataStore) UpdateVolumeCronJob(volumeName string, cronJob *batchv1beta1.CronJob) (*batchv1beta1.CronJob, error)
- func (s *DataStore) UpdateVolumeStatus(v *longhorn.Volume) (*longhorn.Volume, error)
- func (s *DataStore) ValidateSetting(name, value string) (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 ( // 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 )
var ( // SkipListerCheck bypass the created longhorn resource validation SkipListerCheck = false )
Functions ¶
func CheckInstanceManagerType ¶ added in v0.6.0
func CheckInstanceManagerType(im *longhorn.InstanceManager) (types.InstanceManagerType, error)
CheckInstanceManagerType checks and returns InstanceManager labels type Returns error if the InstanceManager type is not engine or replica
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 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 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 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 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
Types ¶
type DataStore ¶
type DataStore struct {
// contains filtered or unexported fields
}
DataStore object
func NewDataStore ¶
func NewDataStore( volumeInformer lhinformers.VolumeInformer, engineInformer lhinformers.EngineInformer, replicaInformer lhinformers.ReplicaInformer, engineImageInformer lhinformers.EngineImageInformer, nodeInformer lhinformers.NodeInformer, settingInformer lhinformers.SettingInformer, imInformer lhinformers.InstanceManagerInformer, smInformer lhinformers.ShareManagerInformer, biInformer lhinformers.BackingImageInformer, bimInformer lhinformers.BackingImageManagerInformer, lhClient lhclientset.Interface, podInformer coreinformers.PodInformer, cronJobInformer batchinformers_v1beta1.CronJobInformer, daemonSetInformer appsinformers.DaemonSetInformer, deploymentInformer appsinformers.DeploymentInformer, persistentVolumeInformer coreinformers.PersistentVolumeInformer, persistentVolumeClaimInformer coreinformers.PersistentVolumeClaimInformer, configMapInformer coreinformers.ConfigMapInformer, secretInformer coreinformers.SecretInformer, kubeNodeInformer coreinformers.NodeInformer, priorityClassInformer schedulinginformers.PriorityClassInformer, csiDriverInformer storageinformers.CSIDriverInformer, storageclassInformer storageinformers_v1.StorageClassInformer, pdbInformer policyinformers.PodDisruptionBudgetInformer, serviceInformer coreinformers.ServiceInformer, kubeClient clientset.Interface, namespace string) *DataStore
NewDataStore creates new DataStore object
func (*DataStore) CheckEngineImageReadiness ¶ added in v1.1.1
func (s *DataStore) CheckEngineImageReadiness(image string, nodes ...string) (isReady bool, err error)
CheckEngineImageReadiness return true if the engine IMAGE is deployed on all nodes in the NODES list
func (*DataStore) CheckEngineImageReadyOnAllVolumeReplicas ¶ added in v1.1.1
func (s *DataStore) CheckEngineImageReadyOnAllVolumeReplicas(image, volumeName, nodeID string) (bool, error)
CheckEngineImageReadyOnAllVolumeReplicas checks if the IMAGE is deployed on the NODEID as well as all the volume's replicas
func (*DataStore) CheckEngineImageReadyOnAtLeastOneVolumeReplica ¶ added in v1.1.1
func (s *DataStore) CheckEngineImageReadyOnAtLeastOneVolumeReplica(image, volumeName, nodeID string) (bool, error)
CheckEngineImageReadyOnAtLeastOneVolumeReplica checks if the IMAGE is deployed on the NODEID and on at least one of the the volume's replicas
func (*DataStore) CreateBackingImage ¶ added in v1.1.1
func (s *DataStore) CreateBackingImage(backingImage *longhorn.BackingImage) (*longhorn.BackingImage, error)
CreateBackingImage creates a Longhorn BackingImage resource and verifies creation
func (*DataStore) 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) 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) 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) CreateNode ¶
CreateNode creates a Longhorn Node resource and verifies creation
func (*DataStore) CreatePDB ¶ added in v1.1.0
func (s *DataStore) CreatePDB(pdp *policyv1beta1.PodDisruptionBudget) (*policyv1beta1.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) CreateReplica ¶
CreateReplica creates a Longhorn Replica resource and verifies creation
func (*DataStore) CreateService ¶ added in v1.1.0
CreateService creates a Service resource for the given CreateService object and 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) 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) CreateVolume ¶
CreateVolume creates a Longhorn Volume resource and verifies creation
func (*DataStore) CreateVolumeCronJob ¶
func (s *DataStore) CreateVolumeCronJob(volumeName string, cronJob *batchv1beta1.CronJob) (*batchv1beta1.CronJob, error)
CreateVolumeCronJob creates a CronJob resource for the given namespace
func (*DataStore) DeleteBackingImage ¶ added in v1.1.1
DeleteBackingImage 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) DeleteCSIDriver ¶ added in v0.7.0
DeleteCSIDriver deletes CSIDriver 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) 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) 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) DeleteReplica ¶
DeleteReplica won't result in immediately deletion since finalizer was set by default
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) DeleteStorageClass ¶ added in v1.1.0
DeleteStorageClass deletes StorageClass with the given name
func (*DataStore) DeleteVolume ¶
DeleteVolume won't result in immediately deletion since finalizer was set by default
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) 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) 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) 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) 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) 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) GetCredentialFromSecret ¶
GetCredentialFromSecret gets the Secret of the given name and namespace Returns a new credential object or error
func (*DataStore) GetDaemonSet ¶ added in v0.3.2
GetDaemonSet gets the DaemonSet for the given name and namespace
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) 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 namspace, and returns a new DaemonSet object
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 gets a list of InstanceManager for the given object. Returns error if more than one InstanceManager is found
func (*DataStore) GetKubernetesNode ¶ added in v0.3.1
GetKubernetesNode 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) 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 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) GetManagerNodeIPMap ¶
GetManagerNodeIPMap returns an object contains podIPs from list of running pods with app=longhorn-manager
func (*DataStore) GetNode ¶
GetNode gets Longhorn Node for the given name and namespace Returns a new Node object
func (*DataStore) GetPDBRO ¶ added in v1.1.0
func (s *DataStore) GetPDBRO(name string) (*policyv1beta1.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 namspace
func (*DataStore) GetPodContainerLogRequest ¶ added in v0.4.0
GetPodContainerLogRequest returns the Pod log for the given pod name, container name and namespace
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) GetRandomReadyNode ¶ added in v0.6.0
GetRandomReadyNode gets a list of all Node in the given namespace and returns the first Node marked with condition ready and allow scheduling
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) GetReplica ¶
GetReplica gets Replica for the given name and namespace and returns a new Replica object
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) 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) 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) 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) 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) GetVolume ¶
GetVolume returns a new volume object for the given namespace and name
func (*DataStore) InitSettings ¶ added in v0.3.2
InitSettings creates all Settings in SettingNameList if not already exist
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) 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) 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) 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) 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) ListDefaultBackingImageManagers ¶ added in v1.1.1
func (s *DataStore) ListDefaultBackingImageManagers() (map[string]*longhorn.BackingImageManager, error)
ListDefaultBackingImageManagers gets a list of BackingImageManager using default image with the given namespace.
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) ListEngineImageDaemonSetPodsFromEngineImageName ¶ added in v1.1.1
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, image string, imType types.InstanceManagerType) ([]*corev1.Pod, error)
ListInstanceManagerPodsBy returns a list of instance manager pods that fullfill 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) ListInstanceManagersByNode ¶ added in v0.8.0
func (s *DataStore) ListInstanceManagersByNode(node string, imType types.InstanceManagerType) (map[string]*longhorn.InstanceManager, error)
ListInstanceManagersByNode returns ListInstanceManagersBySelector
func (*DataStore) ListInstanceManagersBySelector ¶ added in v0.8.0
func (s *DataStore) ListInstanceManagersBySelector(node, instanceManagerImage string, managerType types.InstanceManagerType) (map[string]*longhorn.InstanceManager, error)
ListInstanceManagersBySelector gets a list of InstanceManager by labels for the given namespace. Returns an object contains all InstanceManager
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) ListManagerPods ¶
ListManagerPods returns a list of Pods marked with app=longhorn-manager
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) ListNodesWithEngineImage ¶ added in v1.1.1
func (*DataStore) ListPDBs ¶ added in v1.1.0
func (s *DataStore) ListPDBs() (map[string]*policyv1beta1.PodDisruptionBudget, error)
ListPDBs gets a map of PDB in s.namespace
func (*DataStore) ListPodsBySelector ¶ added in v1.1.0
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) ListReadyAndSchedulableNodes ¶ added in v1.1.1
func (*DataStore) ListReadyNodes ¶ added in v1.1.1
func (*DataStore) ListReadyNodesWithEngineImage ¶ added in v1.1.1
ListReadyNodesWithEngineImage returns list of ready nodes that have the corresponding engine image deployed
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) 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) ListStandbyVolumesRO ¶ added in v0.5.0
ListStandbyVolumesRO returns a single object contains all standby Volumes
func (*DataStore) ListVolumeCronJobROs ¶
func (s *DataStore) ListVolumeCronJobROs(volumeName string) (map[string]*batchv1beta1.CronJob, error)
ListVolumeCronJobROs returns a map of read-only CronJobs for the volume
func (*DataStore) ListVolumeEngines ¶
ListVolumeEngines returns an object contains all Engines with the given LonghornLabelVolume name and namespace
func (*DataStore) ListVolumeReplicas ¶
ListVolumeReplicas returns an object contains all Replica with the given LonghornLabelVolume name and namespace
func (*DataStore) ListVolumes ¶
ListVolumes returns an object contains all Volume
func (*DataStore) ListVolumesRO ¶ added in v0.3.2
ListVolumesRO returns a list of all Volumes for 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) 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) 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) RemoveFinalizerForNode ¶
RemoveFinalizerForNode 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) RemoveFinalizerForVolume ¶
RemoveFinalizerForVolume will result in deletion if DeletionTimestamp was set
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) 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) 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) 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) 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) UpdateReplica ¶
UpdateReplica updates Replica and verifies update
func (*DataStore) UpdateReplicaStatus ¶ added in v0.7.0
UpdateReplicaStatus updates Replica status and verifies update
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) UpdateVolume ¶
UpdateVolume updates Longhorn Volume and verifies update
func (*DataStore) UpdateVolumeCronJob ¶
func (s *DataStore) UpdateVolumeCronJob(volumeName string, cronJob *batchv1beta1.CronJob) (*batchv1beta1.CronJob, error)
UpdateVolumeCronJob updates CronJobs for the given namespace
func (*DataStore) UpdateVolumeStatus ¶ added in v0.7.0
UpdateVolumeStatus updates Longhorn Volume status and verifies update
func (*DataStore) ValidateSetting ¶ added in v0.6.0
ValidateSetting checks the given setting value types and condition