translate

package
v0.3.1-beta.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2021 License: Apache-2.0 Imports: 7 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NamespaceLabel = "vcluster.loft.sh/namespace"
	MarkerLabel    = "vcluster.loft.sh/managed-by"
	Suffix         = "suffix"
)
View Source
var OwningStatefulSet *appsv1.StatefulSet

Functions

func ConvertLabelKey added in v0.3.0

func ConvertLabelKey(key string) string

func EqualExcept

func EqualExcept(a map[string]string, b map[string]string, except ...string) bool

func IsManaged

func IsManaged(obj runtime.Object) bool

func LabelsEqual added in v0.3.0

func LabelsEqual(virtualNamespace string, virtualLabels map[string]string, physicalLabels map[string]string) bool

func NamespaceLabelValue added in v0.3.0

func NamespaceLabelValue(virtualNamespace string) string

func ObjectPhysicalName

func ObjectPhysicalName(obj runtime.Object) string

ObjectPhysicalName returns the translated physical name of this object

func PhysicalName

func PhysicalName(name, namespace string) string

PhysicalName returns the physical name of the name / namespace resource

func ResetObjectMetadata

func ResetObjectMetadata(obj metav1.Object)

ResetObjectMetadata resets the objects metadata except name, namespace and annotations

func SafeConcatGenerateName added in v0.3.0

func SafeConcatGenerateName(name ...string) string

func SafeConcatName

func SafeConcatName(name ...string) string

func SetExcept

func SetExcept(from map[string]string, to map[string]string, except ...string) map[string]string

func SetupMetadata

func SetupMetadata(targetNamespace string, obj runtime.Object) (runtime.Object, error)

func Split

func Split(s, sep string) (string, string)

func TranslateLabelSelector added in v0.3.0

func TranslateLabelSelector(labelSelector *metav1.LabelSelector) *metav1.LabelSelector

func TranslateLabels added in v0.3.0

func TranslateLabels(virtualNamespace string, labels map[string]string) map[string]string

TranslateLabels transforms the virtual labels into physical ones

func UniqueSlice

func UniqueSlice(stringSlice []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