Documentation ¶
Index ¶
- Variables
- type BundleMeta
- type GetObjectMapFunc
- type GetRuntimeObjectListFunc
- type VolumeManager
- func (m *VolumeManager) Attach(name, nodeID string) (v *longhorn.Volume, err error)
- func (m *VolumeManager) BackupSnapshot(snapshotName string, labels map[string]string, volumeName string) error
- func (m *VolumeManager) CheckEngineImageReadiness(image string) error
- func (m *VolumeManager) Create(name string, spec *types.VolumeSpec) (v *longhorn.Volume, err error)
- func (m *VolumeManager) CreateEngineImage(image string) (*longhorn.EngineImage, error)
- func (m *VolumeManager) CreateOrUpdateSetting(s *longhorn.Setting) (*longhorn.Setting, error)
- func (m *VolumeManager) CreateSnapshot(snapshotName string, labels map[string]string, volumeName string) (*engineapi.Snapshot, error)
- func (m *VolumeManager) Delete(name string) error
- func (m *VolumeManager) DeleteBackup(backupName, volumeName string) error
- func (m *VolumeManager) DeleteEngineImageByName(name string) error
- func (m *VolumeManager) DeleteNode(name string) error
- func (m *VolumeManager) DeleteReplica(replicaName string) error
- func (m *VolumeManager) DeleteSnapshot(snapshotName, volumeName string) error
- func (m *VolumeManager) DeployAndWaitForEngineImage(image string) error
- func (m *VolumeManager) Detach(name string) (v *longhorn.Volume, err error)
- func (m *VolumeManager) DiskUpdate(name string, updateDisks []types.DiskSpec) (*longhorn.Node, error)
- func (m *VolumeManager) EngineUpgrade(volumeName, image string) (v *longhorn.Volume, err error)
- func (m *VolumeManager) GenerateSupportBundle() (io.ReadCloser, string, int64, error)
- func (m *VolumeManager) Get(vName string) (*longhorn.Volume, error)
- func (m *VolumeManager) GetBackup(backupName, volumeName string) (*engineapi.Backup, error)
- func (m *VolumeManager) GetBackupVolume(volumeName string) (*engineapi.BackupVolume, error)
- func (m *VolumeManager) GetCurrentNodeID() string
- func (m *VolumeManager) GetEngineClient(volumeName string) (client engineapi.EngineClient, err error)
- func (m *VolumeManager) GetEngineImage(image string) (*longhorn.EngineImage, error)
- func (m *VolumeManager) GetEngineImageByName(name string) (*longhorn.EngineImage, error)
- func (m *VolumeManager) GetEngines(vName string) (map[string]*longhorn.Engine, error)
- func (m *VolumeManager) GetEnginesSorted(vName string) ([]*longhorn.Engine, error)
- func (m *VolumeManager) GetLonghornEventList() (*v1.EventList, error)
- func (m *VolumeManager) GetManagerNodeIPMap() (map[string]string, error)
- func (m *VolumeManager) GetNode(name string) (*longhorn.Node, error)
- func (m *VolumeManager) GetReplicas(vName string) (map[string]*longhorn.Replica, error)
- func (m *VolumeManager) GetReplicasSorted(vName string) ([]*longhorn.Replica, error)
- func (m *VolumeManager) GetSetting(sName types.SettingName) (*longhorn.Setting, error)
- func (m *VolumeManager) GetSettingValueExisted(sName types.SettingName) (string, error)
- func (m *VolumeManager) GetSnapshot(snapshotName, volumeName string) (*engineapi.Snapshot, error)
- func (m *VolumeManager) List() (map[string]*longhorn.Volume, error)
- func (m *VolumeManager) ListBackupVolumes() ([]*engineapi.BackupVolume, error)
- func (m *VolumeManager) ListBackupsForVolume(volumeName string) ([]*engineapi.Backup, error)
- func (m *VolumeManager) ListEngineImagesByName() (map[string]*longhorn.EngineImage, error)
- func (m *VolumeManager) ListEngineImagesSorted() ([]*longhorn.EngineImage, error)
- func (m *VolumeManager) ListNodes() (map[string]*longhorn.Node, error)
- func (m *VolumeManager) ListNodesSorted() ([]*longhorn.Node, error)
- func (m *VolumeManager) ListSettings() (map[types.SettingName]*longhorn.Setting, error)
- func (m *VolumeManager) ListSettingsSorted() ([]*longhorn.Setting, error)
- func (m *VolumeManager) ListSnapshots(volumeName string) (map[string]*engineapi.Snapshot, error)
- func (m *VolumeManager) ListSorted() ([]*longhorn.Volume, error)
- func (m *VolumeManager) MigrationConfirm(name string) (v *longhorn.Volume, err error)
- func (m *VolumeManager) MigrationRollback(name string) (v *longhorn.Volume, err error)
- func (m *VolumeManager) MigrationStart(name, nodeID string) (v *longhorn.Volume, err error)
- func (m *VolumeManager) Node2APIAddress(nodeID string) (string, error)
- func (m *VolumeManager) PurgeSnapshot(volumeName string) error
- func (m *VolumeManager) RevertSnapshot(snapshotName, volumeName string) error
- func (m *VolumeManager) Salvage(volumeName string, replicaNames []string) (v *longhorn.Volume, err error)
- func (m *VolumeManager) SettingValidation(name, value string) (err error)
- func (m *VolumeManager) UpdateNode(name string, allowScheduling bool) (*longhorn.Node, error)
- func (m *VolumeManager) UpdateRecurringJobs(volumeName string, jobs []types.RecurringJob) (v *longhorn.Volume, err error)
- func (m *VolumeManager) UpdateReplicaCount(name string, count int) (v *longhorn.Volume, err error)
- func (m *VolumeManager) WaitForEngineImage(image string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( WaitForEngineImageCount = 20 WaitForEngineImageInterval = 6 * time.Second )
View Source
var VERSION = "v0.3.0"
Functions ¶
This section is empty.
Types ¶
type BundleMeta ¶ added in v0.4.0
type GetObjectMapFunc ¶ added in v0.4.0
type GetObjectMapFunc func() (interface{}, error)
type GetRuntimeObjectListFunc ¶ added in v0.4.0
type VolumeManager ¶
type VolumeManager struct {
// contains filtered or unexported fields
}
func NewVolumeManager ¶
func NewVolumeManager(currentNodeID string, ds *datastore.DataStore) *VolumeManager
func (*VolumeManager) Attach ¶
func (m *VolumeManager) Attach(name, nodeID string) (v *longhorn.Volume, err error)
func (*VolumeManager) BackupSnapshot ¶
func (*VolumeManager) CheckEngineImageReadiness ¶
func (m *VolumeManager) CheckEngineImageReadiness(image string) error
func (*VolumeManager) Create ¶
func (m *VolumeManager) Create(name string, spec *types.VolumeSpec) (v *longhorn.Volume, err error)
func (*VolumeManager) CreateEngineImage ¶
func (m *VolumeManager) CreateEngineImage(image string) (*longhorn.EngineImage, error)
func (*VolumeManager) CreateOrUpdateSetting ¶
func (*VolumeManager) CreateSnapshot ¶
func (*VolumeManager) Delete ¶
func (m *VolumeManager) Delete(name string) error
func (*VolumeManager) DeleteBackup ¶
func (m *VolumeManager) DeleteBackup(backupName, volumeName string) error
func (*VolumeManager) DeleteEngineImageByName ¶
func (m *VolumeManager) DeleteEngineImageByName(name string) error
func (*VolumeManager) DeleteNode ¶ added in v0.3.1
func (m *VolumeManager) DeleteNode(name string) error
func (*VolumeManager) DeleteReplica ¶
func (m *VolumeManager) DeleteReplica(replicaName string) error
func (*VolumeManager) DeleteSnapshot ¶
func (m *VolumeManager) DeleteSnapshot(snapshotName, volumeName string) error
func (*VolumeManager) DeployAndWaitForEngineImage ¶
func (m *VolumeManager) DeployAndWaitForEngineImage(image string) error
func (*VolumeManager) Detach ¶
func (m *VolumeManager) Detach(name string) (v *longhorn.Volume, err error)
func (*VolumeManager) DiskUpdate ¶
func (*VolumeManager) EngineUpgrade ¶
func (m *VolumeManager) EngineUpgrade(volumeName, image string) (v *longhorn.Volume, err error)
func (*VolumeManager) GenerateSupportBundle ¶ added in v0.4.0
func (m *VolumeManager) GenerateSupportBundle() (io.ReadCloser, string, int64, error)
GenerateSupportBundle covers: 1. YAMLs of the Longhorn related CRDs 2. YAMLs of pods, services, daemonset, deployment in longhorn namespace 3. All the logs of pods in the longhorn namespace 4. Recent events happens in the longhorn namespace
Directories are organized like this: root |- yamls
|- events.yaml |- crds |- <list of top level CRD objects> |- <name of each crd>.yaml |- pods |- <name of each pod>.yaml |- <other workloads>...
|- logs
|- <name of each pod>.log |- <directory by the name of pod, if multiple containers exists> |- <container1>.log |- ...
The bundle would be compressed to a zip file for download.
func (*VolumeManager) GetBackup ¶
func (m *VolumeManager) GetBackup(backupName, volumeName string) (*engineapi.Backup, error)
func (*VolumeManager) GetBackupVolume ¶
func (m *VolumeManager) GetBackupVolume(volumeName string) (*engineapi.BackupVolume, error)
func (*VolumeManager) GetCurrentNodeID ¶
func (m *VolumeManager) GetCurrentNodeID() string
func (*VolumeManager) GetEngineClient ¶
func (m *VolumeManager) GetEngineClient(volumeName string) (client engineapi.EngineClient, err error)
func (*VolumeManager) GetEngineImage ¶
func (m *VolumeManager) GetEngineImage(image string) (*longhorn.EngineImage, error)
func (*VolumeManager) GetEngineImageByName ¶
func (m *VolumeManager) GetEngineImageByName(name string) (*longhorn.EngineImage, error)
func (*VolumeManager) GetEngines ¶
func (*VolumeManager) GetEnginesSorted ¶
func (m *VolumeManager) GetEnginesSorted(vName string) ([]*longhorn.Engine, error)
func (*VolumeManager) GetLonghornEventList ¶ added in v0.4.0
func (m *VolumeManager) GetLonghornEventList() (*v1.EventList, error)
func (*VolumeManager) GetManagerNodeIPMap ¶
func (m *VolumeManager) GetManagerNodeIPMap() (map[string]string, error)
func (*VolumeManager) GetNode ¶
func (m *VolumeManager) GetNode(name string) (*longhorn.Node, error)
func (*VolumeManager) GetReplicas ¶
func (*VolumeManager) GetReplicasSorted ¶
func (m *VolumeManager) GetReplicasSorted(vName string) ([]*longhorn.Replica, error)
func (*VolumeManager) GetSetting ¶
func (m *VolumeManager) GetSetting(sName types.SettingName) (*longhorn.Setting, error)
func (*VolumeManager) GetSettingValueExisted ¶
func (m *VolumeManager) GetSettingValueExisted(sName types.SettingName) (string, error)
func (*VolumeManager) GetSnapshot ¶
func (m *VolumeManager) GetSnapshot(snapshotName, volumeName string) (*engineapi.Snapshot, error)
func (*VolumeManager) ListBackupVolumes ¶
func (m *VolumeManager) ListBackupVolumes() ([]*engineapi.BackupVolume, error)
func (*VolumeManager) ListBackupsForVolume ¶
func (m *VolumeManager) ListBackupsForVolume(volumeName string) ([]*engineapi.Backup, error)
func (*VolumeManager) ListEngineImagesByName ¶
func (m *VolumeManager) ListEngineImagesByName() (map[string]*longhorn.EngineImage, error)
func (*VolumeManager) ListEngineImagesSorted ¶
func (m *VolumeManager) ListEngineImagesSorted() ([]*longhorn.EngineImage, error)
func (*VolumeManager) ListNodes ¶
func (m *VolumeManager) ListNodes() (map[string]*longhorn.Node, error)
func (*VolumeManager) ListNodesSorted ¶
func (m *VolumeManager) ListNodesSorted() ([]*longhorn.Node, error)
func (*VolumeManager) ListSettings ¶
func (m *VolumeManager) ListSettings() (map[types.SettingName]*longhorn.Setting, error)
func (*VolumeManager) ListSettingsSorted ¶
func (m *VolumeManager) ListSettingsSorted() ([]*longhorn.Setting, error)
func (*VolumeManager) ListSnapshots ¶
func (*VolumeManager) ListSorted ¶
func (m *VolumeManager) ListSorted() ([]*longhorn.Volume, error)
func (*VolumeManager) MigrationConfirm ¶
func (m *VolumeManager) MigrationConfirm(name string) (v *longhorn.Volume, err error)
func (*VolumeManager) MigrationRollback ¶
func (m *VolumeManager) MigrationRollback(name string) (v *longhorn.Volume, err error)
func (*VolumeManager) MigrationStart ¶
func (m *VolumeManager) MigrationStart(name, nodeID string) (v *longhorn.Volume, err error)
func (*VolumeManager) Node2APIAddress ¶
func (m *VolumeManager) Node2APIAddress(nodeID string) (string, error)
func (*VolumeManager) PurgeSnapshot ¶
func (m *VolumeManager) PurgeSnapshot(volumeName string) error
func (*VolumeManager) RevertSnapshot ¶
func (m *VolumeManager) RevertSnapshot(snapshotName, volumeName string) error
func (*VolumeManager) SettingValidation ¶
func (m *VolumeManager) SettingValidation(name, value string) (err error)
func (*VolumeManager) UpdateNode ¶
func (*VolumeManager) UpdateRecurringJobs ¶
func (m *VolumeManager) UpdateRecurringJobs(volumeName string, jobs []types.RecurringJob) (v *longhorn.Volume, err error)
func (*VolumeManager) UpdateReplicaCount ¶ added in v0.3.3
func (*VolumeManager) WaitForEngineImage ¶
func (m *VolumeManager) WaitForEngineImage(image string) error
Click to show internal directories.
Click to hide internal directories.