uniquename

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

package uniquename features some utilities that are used to generate unique names in use by the scheduler.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClusterResourceBindingName

func NewClusterResourceBindingName(CRPName string, clusterName string) (string, error)

NewClusterResourceBindingName returns a unique name for a cluster resource binding in the format of DNS label names (RFC 1123). It will be used as a label on the work resource.

The name is generated using the following format: * [CRP-NAME] - [TARGET-CLUSTER-NAME] - [RANDOM-SUFFIX]

Segments will be truncated if necessary.

Note that the name generation is, in essence, a best-effort process, though the chances of name collisions are extremely low.

In addition, note that this function assumes that both the CRP name and the cluster name are valid DNS label names (RFC 1123).

Types

This section is empty.

Jump to

Keyboard shortcuts

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