Documentation
¶
Index ¶
- func BuildLabelKey(customDomain, suffix string) string
- func ClusterLabelKey(customDomain string) string
- func ComputeEgressCIDRs(ips []string) []string
- func IsEmptyString(s *string) bool
- func IsStringPtrValueEqual(a *string, b string) bool
- func SetStringValue(values map[string]any, key string, value *string)
- func SimpleMatch(pattern, text string) (bool, int)
- func StringEqual(a, b *string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildLabelKey ¶
BuildLabelKey constructs a label key from a custom domain and suffix. If customDomain is empty, it defaults to "kubernetes.io". Example: BuildLabelKey("ske.stackit.cloud", "cluster") returns "ske.stackit.cloud/cluster"
func ClusterLabelKey ¶
ClusterLabelKey returns the cluster label key using the provided custom domain. It is a convenience wrapper around BuildLabelKey with suffix "cluster". Example: ClusterLabelKey("kubernetes.io" returns "kubernetes.io/cluster"
func ComputeEgressCIDRs ¶
ComputeEgressCIDRs converts an IP to a CIDR depending on the IP family.
func IsEmptyString ¶
IsEmptyString checks whether a string is empty
func IsStringPtrValueEqual ¶
IsStringPtrValueEqual checks whether the value of string pointer `a` is equal to value of string `b`.
func SetStringValue ¶
SetStringValue sets an optional string value in a string map if the value is defined and not empty
func SimpleMatch ¶
SimpleMatch returns whether the given pattern matches the given text. It also returns a score indicating the match between `pattern` and `text`. The higher the score the higher the match. Only simple wildcard patterns are supposed to be passed, e.g. '*', 'tex*'.
Types ¶
This section is empty.