meta

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: MIT Imports: 5 Imported by: 1

Documentation

Overview

Package meta defines shared metadata keys and naming rules used across Cocoon controllers, webhooks, dashboards, and providers.

Index

Constants

View Source
const (
	APIVersion    = "cocoon.cis/v1alpha1"
	KindCocoonSet = "CocoonSet"

	TolerationKey = "virtual-kubelet.io/provider"

	LabelCocoonSet = "cocoon.cis/cocoonset"
	LabelRole      = "cocoon.cis/role"
	LabelSlot      = "cocoon.cis/slot"

	AnnotationMode           = "cocoon.cis/mode"
	AnnotationImage          = "cocoon.cis/image"
	AnnotationStorage        = "cocoon.cis/storage"
	AnnotationManaged        = "cocoon.cis/managed"
	AnnotationOS             = "cocoon.cis/os"
	AnnotationForkFrom       = "cocoon.cis/fork-from"
	AnnotationSnapshotPolicy = "cocoon.cis/snapshot-policy"
	AnnotationIP             = "cocoon.cis/ip"
	AnnotationVMID           = "cocoon.cis/vm-id"
	AnnotationVMName         = "cocoon.cis/vm-name"
	AnnotationVNCPort        = "cocoon.cis/vnc-port"
	AnnotationHibernate      = "cocoon.cis/hibernate"

	RoleMain     = "main"
	RoleSubAgent = "sub-agent"
	RoleToolbox  = "toolbox"
)

Variables

This section is empty.

Functions

func ConnectionType

func ConnectionType(osType string, hasVNCPort bool) string

func ExtractSlotFromVMName

func ExtractSlotFromVMName(vmName string) int

func HasCocoonToleration

func HasCocoonToleration(tolerations []corev1.Toleration) bool

func InferRoleFromVMName

func InferRoleFromVMName(vmName string) string

func MainAgentVMName

func MainAgentVMName(vmName string) string

func OwnerDeploymentName added in v0.1.2

func OwnerDeploymentName(ownerRefs []metav1.OwnerReference) string

func VMNameForDeployment

func VMNameForDeployment(namespace, deployment string, slot int) string

func VMNameForPod

func VMNameForPod(namespace, podName string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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