common

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HostStateBaseDir = "/var/lib/rancher/vm"

	FinalizerDeletion = "deletion.vm.rancher.io"
	NamespaceVM       = "default"
	NameDelimiter     = "-"

	RancherOUI = "06:fe"

	LabelApp              = "ranchervm"
	LabelRoleMigrate      = "migrate"
	LabelRoleVM           = "vm"
	LabelRoleNoVNC        = "novnc"
	LabelRoleMachineImage = "machineimage"
	LabelNodeHostname     = "kubernetes.io/hostname"
)

Variables

View Source
var (
	ImageVM      = flag.String("image-vm", "rancher/vm:latest", "VM Docker Image")
	ImageNoVNC   = flag.String("image-novnc", "rancher/vm-novnc:latest", "NoVNC Docker Image")
	ImageVMTools = flag.String("image-tools", "rancher/vm-tools:latest", "Tools Docker Image")
)

Functions

func IsPodReady

func IsPodReady(pod *corev1.Pod) bool

IsPodReady returns the PodReady condition status as a boolean

func MakeEnvVar

func MakeEnvVar(name, value string, valueFrom *corev1.EnvVarSource) corev1.EnvVar

func MakeEnvVarFieldPath

func MakeEnvVarFieldPath(name, fieldPath string) corev1.EnvVar

func MakeHostStateVol

func MakeHostStateVol(vmName, volName string) corev1.Volume

func MakePvcVol added in v0.2.0

func MakePvcVol(name, pvcname string) corev1.Volume

func MakeVolEmptyDir

func MakeVolEmptyDir(name string) corev1.Volume

func MakeVolEmptyDirHugePages added in v0.2.0

func MakeVolEmptyDirHugePages(name string) corev1.Volume

func MakeVolFieldPath

func MakeVolFieldPath(name, path, fieldPath string) corev1.Volume

func MakeVolHostPath

func MakeVolHostPath(name, path string) corev1.Volume

func MakeVolumeMount

func MakeVolumeMount(name, mountPath, subPath string, readOnly bool) corev1.VolumeMount

Types

This section is empty.

Jump to

Keyboard shortcuts

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