utils

package
v0.0.0-...-98c04c6 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CreatedByLabel label is used as a marker for VMs that are managed by Fedora CR
	CreatedByLabel = "apis.guest.fedora/created-by"
)

Variables

This section is empty.

Functions

func AddContainerDisk

func AddContainerDisk(vm *v1.VirtualMachine, image string)

AddContainerDisk extends virtual machine with disk and volume based on a given image TODO: This should be replaced with DataVolume

func AddNoCloudDiskWitUserData

func AddNoCloudDiskWitUserData(vm *v1.VirtualMachine, data string)

AddNoCloudDiskWitUserData adds Cloud-Init data source to a given virtual machine

func AddVmPodNetwork

func AddVmPodNetwork(vm *v1.VirtualMachine)

AddVmPodNetwork adds a default pod network to the given vm

func GetFedoraImage

func GetFedoraImage(OSVersion string) string

GetFedoraImage returns the image for Fedora based on the required version TODO: add webhook validation for the existance if an image for the specific version TODO: implement mapping between the OS version to the image

func GetVirtualMachine

func GetVirtualMachine(cr *guestv1alpha1.Fedora) *v1.VirtualMachine

GetVirtualMachine creates a VirtualMachine instance based on the given spec provided by the CR. The VirtualMachine will be created under the given namespace with the provided name and specification. It returns a reference to the created VirtualMachine.

Types

This section is empty.

Jump to

Keyboard shortcuts

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