Documentation
¶
Index ¶
- Variables
- func ConvertLabelKey(key string) string
- func ConvertNamespacedLabelKey(physicalNamespace, key string) string
- func EqualExcept(a map[string]string, b map[string]string, except ...string) bool
- func IsManaged(obj runtime.Object) bool
- func IsManagedCluster(physicalNamespace string, obj runtime.Object) bool
- func LabelsClusterEqual(physicalNamespace string, virtualLabels map[string]string, ...) bool
- func LabelsEqual(virtualNamespace string, virtualLabels map[string]string, ...) bool
- func NamespaceLabelValue(virtualNamespace string) string
- 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 SetExcept(from map[string]string, to map[string]string, except ...string) map[string]string
- func SetupMetadata(targetNamespace string, obj runtime.Object) (runtime.Object, error)
- func SetupMetadataCluster(targetNamespace string, vObj runtime.Object, translator PhysicalNameTranslator) (runtime.Object, error)
- func Split(s, sep string) (string, string)
- func TranslateLabelSelector(labelSelector *metav1.LabelSelector) *metav1.LabelSelector
- func TranslateLabelSelectorCluster(physicalNamespace string, labelSelector *metav1.LabelSelector) *metav1.LabelSelector
- func TranslateLabels(virtualNamespace string, labels map[string]string) map[string]string
- func TranslateLabelsCluster(physicalNamespace string, labels map[string]string) map[string]string
- func UniqueSlice(stringSlice []string) []string
- type PhysicalNameTranslator
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 ConvertNamespacedLabelKey ¶ added in v0.4.0
func ConvertNamespacedLabelKey(physicalNamespace, key string) string
func EqualExcept ¶
func EqualExcept(a map[string]string, b map[string]string, except ...string) bool
func IsManagedCluster ¶ added in v0.4.0
func IsManagedCluster(physicalNamespace string, obj runtime.Object) bool
func LabelsClusterEqual ¶ added in v0.4.0
func LabelsClusterEqual(physicalNamespace string, virtualLabels map[string]string, physicalLabels map[string]string) 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 PhysicalNameClusterScoped ¶ added in v0.4.0
func PhysicalNameClusterScoped(name, physicalNamespace string) string
PhysicalNameClusterScoped returns the physical name of a cluster scoped object in the host cluster
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 SetupMetadataCluster ¶ added in v0.4.0
func SetupMetadataCluster(targetNamespace string, vObj runtime.Object, translator PhysicalNameTranslator) (runtime.Object, error)
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 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 TranslateLabelsCluster ¶ added in v0.4.0
func TranslateLabelsCluster(physicalNamespace string, labels map[string]string) map[string]string
TranslateLabelsCluster transforms the virtual labels into physical ones
func UniqueSlice ¶
func UniqueSlice(stringSlice []string) []string
Types ¶
type PhysicalNameTranslator ¶ added in v0.4.0
type PhysicalNameTranslator interface {
PhysicalName(vName string, vObj runtime.Object) string
}
Click to show internal directories.
Click to hide internal directories.