app

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2019 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FlagEngineImage    = "engine-image"
	FlagManagerImage   = "manager-image"
	FlagServiceAccount = "service-account"
	FlagKubeConfig     = "kube-config"
)
View Source
const (
	LonghornFlexvolumeDriver = "longhorn-flexvolume-driver"

	EnvFlexvolumeDir  = "FLEXVOLUME_DIR"
	EnvKubeletRootDir = "KUBELET_ROOT_DIR"

	FlagManagerURL = "manager-url"

	FlagDriver           = "driver"
	FlagDriverCSI        = "csi"
	FlagDriverFlexvolume = "flexvolume"

	FlagFlexvolumeDir  = "flexvolume-dir"
	FlagKubeletRootDir = "kubelet-root-dir"

	FlagCSIAttacherImage        = "csi-attacher-image"
	FlagCSIProvisionerImage     = "csi-provisioner-image"
	FlagCSIDriverRegistrarImage = "csi-driver-registrar-image"
	FlagCSIProvisionerName      = "csi-provisioner-name"
	EnvCSIAttacherImage         = "CSI_ATTACHER_IMAGE"
	EnvCSIProvisionerImage      = "CSI_PROVISIONER_IMAGE"
	EnvCSIDriverRegistrarImage  = "CSI_DRIVER_REGISTRAR_IMAGE"
	EnvCSIProvisionerName       = "CSI_PROVISIONER_NAME"

	FlagCSIAttacherReplicaCount    = "csi-attacher-replica-count"
	FlagCSIProvisionerReplicaCount = "csi-provisioner-replica-count"
	EnvCSIAttacherReplicaCount     = "CSI_ATTACHER_REPLICA_COUNT"
	EnvCSIProvisionerReplicaCount  = "CSI_PROVISIONER_REPLICA_COUNT"
)
View Source
const (
	DetectPodMaxPolls = 120

	ArgFlexvolumePluginDir = "volume-plugin-dir"
	ArgKubeletRootDir      = "root-dir"

	ArgNameFlexvolumePluginDir = "--volume-plugin-dir"
	ArgNameKubeletRootDir      = "--root-dir"
	ArgNameK3SDataDir          = "--data-dir"
	ArgShortNameK3SDataDir     = "-d"

	DefaultFlexvolumeDir  = "/usr/libexec/kubernetes/kubelet-plugins/volume/exec/"
	DefaultKubeletRootDir = "/var/lib/kubelet"
	DefaultK3SDataDir     = "/var/lib/rancher/k3s"

	KubeletDetectionPodName = "discover-proc-kubelet-cmdline"
	K3SDetectionPodName     = "discover-proc-k3s-cmdline"

	GetKubeletCmdlineScript = `` /* 453-byte string literal not displayed */

	GetK3SCmdlineScript = `` /* 602-byte string literal not displayed */

)
View Source
const (
	FlagFromVersion = "from-version"
	FlagToVersion   = "to-version"
)
View Source
const (
	FlagForce     = "force"
	FlagNamespace = "namespace"

	EnvLonghornNamespace = "LONGHORN_NAMESPACE"
)
View Source
const (
	FlagSnapshotName = "snapshot-name"
	FlagLabels       = "labels"
	FlagRetain       = "retain"
	FlagBackupTarget = "backuptarget"

	SnapshotPurgeStatusInterval = 5 * time.Second

	WaitInterval = 5 * time.Second
)

Variables

View Source
var VERSION = "v0.3.0"

Functions

func CSICommand

func CSICommand() cli.Command

func DaemonCmd

func DaemonCmd() cli.Command

func DeployDriverCmd

func DeployDriverCmd() cli.Command

func PostUpgradeCmd added in v0.3.3

func PostUpgradeCmd() cli.Command

func SnapshotCmd

func SnapshotCmd() cli.Command

func UninstallCmd added in v0.3.2

func UninstallCmd() cli.Command

Types

type DaemonSetOps

type DaemonSetOps struct {
	// contains filtered or unexported fields
}

func (*DaemonSetOps) Create

func (ops *DaemonSetOps) Create(name string, d *appsv1.DaemonSet) (*appsv1.DaemonSet, error)

func (*DaemonSetOps) Delete

func (ops *DaemonSetOps) Delete(name string) error

func (*DaemonSetOps) Get

func (ops *DaemonSetOps) Get(name string) (*appsv1.DaemonSet, error)

type Job

type Job struct {
	// contains filtered or unexported fields
}

func NewJob

func NewJob(volumeName, snapshotName, backupTarget string, labels map[string]string, retain int) (*Job, error)

func (*Job) GetVolume added in v0.5.0

func (job *Job) GetVolume(name string) (*longhorn.Volume, error)

func (*Job) UpdateVolume added in v0.5.0

func (job *Job) UpdateVolume(v *longhorn.Volume) (*longhorn.Volume, error)

type NameWithTimestamp

type NameWithTimestamp struct {
	Name      string
	Timestamp time.Time
}

Jump to

Keyboard shortcuts

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