Documentation ¶
Index ¶
- Variables
- func ConvertLabelKey(key string) string
- func ConvertLabelKeyWithPrefix(prefix, key string) string
- func DefaultImageRegistry() string
- func DefaultPhysicalName(vName string, vObj client.Object) string
- func GetOwnerReference() []metav1.OwnerReference
- func IsManaged(obj runtime.Object) bool
- func IsManagedCluster(physicalNamespace string, obj runtime.Object) bool
- func MergeLabelSelectors(elems ...*metav1.LabelSelector) *metav1.LabelSelector
- func ObjectPhysicalName(obj runtime.Object) string
- func PhysicalName(name, namespace string) string
- func PhysicalNameClusterScoped(name, physicalNamespace string) string
- func ResetObjectMetadata(obj metav1.Object)
- func SafeConcatGenerateName(name ...string) string
- func SafeConcatName(name ...string) string
- func Split(s, sep string) (string, string)
- func TranslateLabelSelector(labelSelector *metav1.LabelSelector) *metav1.LabelSelector
- func TranslateLabelSelectorCluster(physicalNamespace string, labelSelector *metav1.LabelSelector) *metav1.LabelSelector
- func TranslateLabelSelectorWithPrefix(labelPrefix string, labelSelector *metav1.LabelSelector) *metav1.LabelSelector
- func UniqueSlice(stringSlice []string) []string
- type PhysicalNameTranslator
- type Translator
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ManagedAnnotationsAnnotation = "vcluster.loft.sh/managed-annotations" NamespaceAnnotation = "vcluster.loft.sh/object-namespace" NameAnnotation = "vcluster.loft.sh/object-name" LabelPrefix = "vcluster.loft.sh/label" )
View Source
var ( NamespaceLabel = "vcluster.loft.sh/namespace" MarkerLabel = "vcluster.loft.sh/managed-by" Suffix = "suffix" )
View Source
var Owner client.Object
Functions ¶
func ConvertLabelKey ¶ added in v0.3.0
func ConvertLabelKeyWithPrefix ¶ added in v0.5.0
func DefaultImageRegistry ¶ added in v0.5.0
func DefaultImageRegistry() string
func DefaultPhysicalName ¶ added in v0.4.5
func GetOwnerReference ¶ added in v0.4.4
func GetOwnerReference() []metav1.OwnerReference
func IsManagedCluster ¶ added in v0.4.0
func MergeLabelSelectors ¶ added in v0.5.0
func MergeLabelSelectors(elems ...*metav1.LabelSelector) *metav1.LabelSelector
func ObjectPhysicalName ¶
ObjectPhysicalName returns the translated physical name of this object
func PhysicalName ¶
PhysicalName returns the physical name of the name / namespace resource
func PhysicalNameClusterScoped ¶ added in v0.4.0
PhysicalNameClusterScoped returns the physical name of a cluster scoped object in the host cluster
func ResetObjectMetadata ¶
ResetObjectMetadata resets the objects metadata except name, namespace and annotations
func SafeConcatGenerateName ¶ added in v0.3.0
func SafeConcatName ¶
func TranslateLabelSelector ¶ added in v0.3.0
func TranslateLabelSelector(labelSelector *metav1.LabelSelector) *metav1.LabelSelector
func TranslateLabelSelectorCluster ¶ added in v0.4.0
func TranslateLabelSelectorCluster(physicalNamespace string, labelSelector *metav1.LabelSelector) *metav1.LabelSelector
func TranslateLabelSelectorWithPrefix ¶ added in v0.5.0
func TranslateLabelSelectorWithPrefix(labelPrefix string, labelSelector *metav1.LabelSelector) *metav1.LabelSelector
func UniqueSlice ¶
Types ¶
type PhysicalNameTranslator ¶ added in v0.4.0
type Translator ¶ added in v0.4.4
type Translator interface { Translate(vObj client.Object) (runtime.Object, error) TranslateLabels(vObj client.Object) map[string]string TranslateAnnotations(vObj client.Object, pObj client.Object) map[string]string }
func NewDefaultClusterTranslator ¶ added in v0.4.4
func NewDefaultClusterTranslator(physicalNamespace string, nameTranslator PhysicalNameTranslator, excludedAnnotations ...string) Translator
func NewDefaultTranslator ¶ added in v0.4.4
func NewDefaultTranslator(physicalNamespace string, excludedAnnotations ...string) Translator
Click to show internal directories.
Click to hide internal directories.