Unverified Commit 62edd098 authored by Matthew Fisher's avatar Matthew Fisher Committed by GitHub

Merge pull request #5606 from xichengliudui/update-go-const

Using const() defines constants together (part:1)
parents 274d8da4 5edb79df
......@@ -16,16 +16,18 @@ limitations under the License.
package kube
// ResourcePolicyAnno is the annotation name for a resource policy
const ResourcePolicyAnno = "helm.sh/resource-policy"
const (
// ResourcePolicyAnno is the annotation name for a resource policy
ResourcePolicyAnno = "helm.sh/resource-policy"
// deletePolicy is the resource policy type for delete
//
// This resource policy type allows explicitly opting in to the default
// resource deletion behavior, for example when overriding a chart's
// default annotations. Any other value allows resources to skip being
// deleted during an uninstallRelease action.
const deletePolicy = "delete"
// deletePolicy is the resource policy type for delete
//
// This resource policy type allows explicitly opting in to the default
// resource deletion behavior, for example when overriding a chart's
// default annotations. Any other value allows resources to skip being
// deleted during an uninstallRelease action.
deletePolicy = "delete"
)
// ResourcePolicyIsKeep accepts a map of Kubernetes resource annotations and
// returns true if the resource should be kept, otherwise false if it is safe
......
......@@ -37,11 +37,13 @@ import (
"k8s.io/helm/pkg/storage/driver"
)
// DefaultTillerNamespace is the default namespace for Tiller.
const DefaultTillerNamespace = "kube-system"
const (
// DefaultTillerNamespace is the default namespace for Tiller.
DefaultTillerNamespace = "kube-system"
// GoTplEngine is the name of the Go template engine, as registered in the EngineYard.
const GoTplEngine = "gotpl"
// GoTplEngine is the name of the Go template engine, as registered in the EngineYard.
GoTplEngine = "gotpl"
)
// DefaultEngine points to the engine that the EngineYard should treat as the
// default. A chart that does not specify an engine may be run through the
......
......@@ -41,18 +41,20 @@ import (
"k8s.io/helm/pkg/version"
)
// releaseNameMaxLen is the maximum length of a release name.
//
// As of Kubernetes 1.4, the max limit on a name is 63 chars. We reserve 10 for
// charts to add data. Effectively, that gives us 53 chars.
// See https://github.com/kubernetes/helm/issues/1528
const releaseNameMaxLen = 53
// 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
// wants to see this file after rendering in the status command. However, it must be a suffix
// since there can be filepath in front of it.
const notesFileSuffix = "NOTES.txt"
const (
// releaseNameMaxLen is the maximum length of a release name.
//
// As of Kubernetes 1.4, the max limit on a name is 63 chars. We reserve 10 for
// charts to add data. Effectively, that gives us 53 chars.
// See https://github.com/kubernetes/helm/issues/1528
releaseNameMaxLen = 53
// 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
// wants to see this file after rendering in the status command. However, it must be a suffix
// since there can be filepath in front of it.
notesFileSuffix = "NOTES.txt"
)
var (
// errMissingChart indicates that a chart was not provided.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment