translate

package
v0.12.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2022 License: Apache-2.0 Imports: 8 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"
	ControllerLabel = "vcluster.loft.sh/controlled-by"
	Suffix          = "suffix"

	ManagedAnnotationsAnnotation = "vcluster.loft.sh/managed-annotations"
	ManagedLabelsAnnotation      = "vcluster.loft.sh/managed-labels"
)

Functions

func ApplyAnnotations added in v0.9.0

func ApplyAnnotations(fromAnnotations map[string]string, toAnnotations map[string]string, excludeAnnotations ...string) map[string]string

func ApplyLabels added in v0.9.0

func ApplyLabels(fromLabels map[string]string, toLabels map[string]string, toAnnotations map[string]string) (labels map[string]string, annotations map[string]string)

func ApplyMaps added in v0.9.0

func ApplyMaps(fromMap map[string]string, toMap map[string]string, opts ApplyMapsOptions) (map[string]string, string)

func ApplyMetadata added in v0.9.0

func ApplyMetadata(fromAnnotations map[string]string, toAnnotations map[string]string, fromLabels map[string]string, toLabels map[string]string, excludeAnnotations ...string) (labels map[string]string, annotations map[string]string)

func Exists added in v0.9.0

func Exists(a []string, k string) bool

func GetOwnerReference added in v0.4.4

func GetOwnerReference(object client.Object) []metav1.OwnerReference

func IsManaged

func IsManaged(obj runtime.Object) bool

func IsManagedCluster added in v0.4.0

func IsManagedCluster(physicalNamespace string, obj runtime.Object) bool

func ObjectPhysicalName

func ObjectPhysicalName(obj client.Object) string

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 SafeConcatGenerateName added in v0.3.0

func SafeConcatGenerateName(name ...string) string

func SafeConcatName

func SafeConcatName(name ...string) string

Types

type ApplyMapsOptions added in v0.9.0

type ApplyMapsOptions struct {
	ManagedKeys []string
	ExcludeKeys []string
}

Jump to

Keyboard shortcuts

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