Merge pull request #1560 from technosophos/fix/1528-increase-release-name-limit

fix(tiller): allow release name to be up to 53 chars
pull/1562/head
Matt Butcher 8 years ago committed by GitHub
commit a772697f4d

@ -141,9 +141,9 @@ Hard-coding the `name:` into a resource is usually considered to be bad practice
Names should be unique to a release. So we might want to generate a name field Names should be unique to a release. So we might want to generate a name field
by inserting the release name. by inserting the release name.
**TIP:** The `name:` field is limited to 24 characters because of limitations to **TIP:** The `name:` field is limited to 63 characters because of limitations to
the DNS system (long story). For that reason, release names are limited to the DNS system. For that reason, release names are limited to 53 characters.
14 characters. Kubernetes 1.3 and earlier limited to only 24 characters (thus 14 character names).
Let's alter `configmap.yaml` accordingly. Let's alter `configmap.yaml` accordingly.

@ -45,10 +45,10 @@ import (
// releaseNameMaxLen is the maximum length of a release name. // releaseNameMaxLen is the maximum length of a release name.
// //
// This is designed to accommodate the usage of release name in the 'name:' // As of Kubernetes 1.4, the max limit on a name is 63 chars. We reserve 10 for
// field of Kubernetes resources. Many of those fields are limited to 24 // charts to add data. Effectively, that gives us 53 chars.
// characters in length. See https://github.com/kubernetes/helm/issues/1071 // See https://github.com/kubernetes/helm/issues/1528
const releaseNameMaxLen = 14 const releaseNameMaxLen = 53
// NOTESFILE_SUFFIX that we want to treat special. It goes through the templating engine // NOTESFILE_SUFFIX that we want to treat special. It goes through the templating engine
// but it's not a yaml file (resource) hence can't have hooks, etc. And the user actually // but it's not a yaml file (resource) hence can't have hooks, etc. And the user actually

@ -180,7 +180,7 @@ func TestUniqName(t *testing.T) {
{"angry-panda", "", false, true}, {"angry-panda", "", false, true},
{"happy-panda", "", false, true}, {"happy-panda", "", false, true},
{"happy-panda", "happy-panda", true, false}, {"happy-panda", "happy-panda", true, false},
{"hungry-hungry-hippos", "", true, true}, // Exceeds max name length {"hungry-hungry-hungry-hungry-hungry-hungry-hungry-hungry-hippos", "", true, true}, // Exceeds max name length
} }
for _, tt := range tests { for _, tt := range tests {

Loading…
Cancel
Save