Skip to content

Commit 53b3b5b

Browse files
committed
Adding documentation on using domains and / in taint/label keys; Also clarified both key and value to labels can be 63 characters long
1 parent 3af06cc commit 53b3b5b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

pkg/kubectl/cmd/label.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ var (
7070
labelLong = templates.LongDesc(i18n.T(`
7171
Update the labels on a resource.
7272
73-
* A label must begin with a letter or number, and may contain letters, numbers, hyphens, dots, and underscores, up to %[1]d characters.
73+
* A label key and value must begin with a letter or number, and may contain letters, numbers, hyphens, dots, and underscores, up to %[1]d characters each.
74+
* Optionally, the key can begin with a DNS subdomain prefix and a single '/', like example.com/my-app
7475
* If --overwrite is true, then existing labels can be overwritten, otherwise attempting to overwrite a label will result in an error.
7576
* If --resource-version is specified, then updates will use this resource version, otherwise the existing resource-version will be used.`))
7677

pkg/kubectl/cmd/taint.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ var (
5858
5959
* A taint consists of a key, value, and effect. As an argument here, it is expressed as key=value:effect.
6060
* The key must begin with a letter or number, and may contain letters, numbers, hyphens, dots, and underscores, up to %[1]d characters.
61+
* Optionally, the key can begin with a DNS subdomain prefix and a single '/', like example.com/my-app
6162
* The value must begin with a letter or number, and may contain letters, numbers, hyphens, dots, and underscores, up to %[2]d characters.
6263
* The effect must be NoSchedule, PreferNoSchedule or NoExecute.
6364
* Currently taint can only apply to node.`))

0 commit comments

Comments
 (0)