Skip to content

Commit 3d024e6

Browse files
committed
fix: point to the right doc in formatting
The function `CleanValueKubernetes` from the `formatting` package is poiting to the wrong documentation. This change updates the comment only. Signed-off-by: Francesco Ilario <filario@redhat.com>
1 parent a43ae55 commit 3d024e6

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

pkg/formatting/k8labels.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,11 @@ var (
2323
)
2424

2525
// CleanValueKubernetes conforms a string to kubernetes naming convention
26-
// see https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-subdomain-names
27-
// rules are:
28-
// • contain at most 63 characters
29-
// • contain only alphanumeric characters or '-', '.', and '_'
30-
// • start with an alphanumeric character
31-
// • end with an alphanumeric character.
26+
// see https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set.
27+
// Valid label value:
28+
// * must be 63 characters or less (can be empty),
29+
// * unless empty, must begin and end with an alphanumeric character ([a-z0-9A-Z]),
30+
// * could contain dashes (-), underscores (_), dots (.), and alphanumerics between.
3231
func CleanValueKubernetes(s string) string {
3332
// cut short if the string is already a valid label
3433
if len(validation.IsValidLabelValue(s)) == 0 {

0 commit comments

Comments
 (0)