templates

package
v0.0.0-...-7a8ee34 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

View Source
const (
	OpenshiftDocURL              = "openshift.io/documentation-url"
	OpenshiftProviderDisplayName = "openshift.io/provider-display-name"
	OpenshiftSupportURL          = "openshift.io/support-url"

	KubevirtDefaultOSVariant = "template.kubevirt.io/default-os-variant"

	TemplateKubevirtProvider             = "template.kubevirt.io/provider"
	TemplateKubevirtProviderSupportLevel = "template.kubevirt.io/provider-support-level"
	TemplateKubevirtProviderURL          = "template.kubevirt.io/provider-url"

	OperatorSDKPrimaryResource     = "operator-sdk/primary-resource"
	OperatorSDKPrimaryResourceType = "operator-sdk/primary-resource-type"

	AppKubernetesComponent = "app.kubernetes.io/component"
	AppKubernetesManagedBy = "app.kubernetes.io/managed-by"
	AppKubernetesName      = "app.kubernetes.io/name"
	AppKubernetesPartOf    = "app.kubernetes.io/part-of"
	AppKubernetesVersion   = "app.kubernetes.io/version"

	TemplateVersionLabel         = "template.kubevirt.io/version"
	TemplateTypeLabel            = "template.kubevirt.io/type"
	VMTypeLabelValue             = "vm"
	TemplateOsLabelPrefix        = "os.template.kubevirt.io/"
	TemplateFlavorLabelPrefix    = "flavor.template.kubevirt.io/"
	TemplateWorkloadLabelPrefix  = "workload.template.kubevirt.io/"
	TemplateDeprecatedAnnotation = "template.kubevirt.io/deprecated"

	VMFlavorAnnotation   = "vm.kubevirt.io/flavor"
	VMOSAnnotation       = "vm.kubevirt.io/os"
	VMWorkloadAnnotation = "vm.kubevirt.io/workload"

	VMDomainLabel = "kubevirt.io/domain"
	VMSizeLabel   = "kubevirt.io/size"

	VMTemplateNameLabel     = "vm.kubevirt.io/template"
	VMTemplateRevisionLabel = "vm.kubevirt.io/template.revision"
	VMTemplateVersionLabel  = "vm.kubevirt.io/template.version"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type TemplateCreator

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

func NewTemplateCreator

func NewTemplateCreator(cliOptions *parse.CLIOptions) (*TemplateCreator, error)

func (*TemplateCreator) CopyTemplate

func (t *TemplateCreator) CopyTemplate() (*v1.Template, error)

func (*TemplateCreator) EncodeVMToTemplate

func (t *TemplateCreator) EncodeVMToTemplate(template *templatev1.Template, unstructuredVM *unstructured.Unstructured) (*v1.Template, error)

func (*TemplateCreator) UpdateTemplateMetadata

func (t *TemplateCreator) UpdateTemplateMetadata(template *v1.Template) *v1.Template

func (*TemplateCreator) UpdateVMMetadata

func (t *TemplateCreator) UpdateVMMetadata(unstructuredVM *unstructured.Unstructured) error

type TemplateProvider

type TemplateProvider interface {
	Get(string, string) (*templatev1.Template, error)
	Create(*templatev1.Template) (*templatev1.Template, error)
	Update(*templatev1.Template) (*templatev1.Template, error)
}

func NewTemplateProvider

func NewTemplateProvider(client tempclient.TemplateV1Interface) TemplateProvider

Jump to

Keyboard shortcuts

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