namespaces

package
v0.27.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Name placeholder will be replaced with this virtual cluster name
	NamePlaceholder string = "${name}"

	// WildcardChar is used in pattern mappings.
	WildcardChar string = "*"
)

Variables

This section is empty.

Functions

func IsPattern

func IsPattern(val string) bool

IsPattern checks if a string contains a wildcard character '*'.

func MatchAndExtractWildcard

func MatchAndExtractWildcard(name, pattern string) (wildcardValue string, matched bool)

MatchAndExtractWildcard checks if a given name matches a pattern that contains a single wildcard. It returns the string captured by the wildcard and a boolean indicating if the match was successful. If the provided pattern string does not contain a wildcard, it's not considered a pattern by this function, and it will return matched = false.

func ProcessNamespaceName

func ProcessNamespaceName(namespaceName string, vclusterName string) string

ProcessNamespaceName returns namespace name after applying all pre-processing to it

func TranslateHostNamespace

func TranslateHostNamespace(vClusterName, hostNamespace string, mappings map[string]string) (string, bool)

TranslateHostNamespace returns virtual namespace name based on host namespace and mappings

func ValidateNamespaceSyncConfig

func ValidateNamespaceSyncConfig(c *config.Config, name, namespace string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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