Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
helm3
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
helm3
Commits
62edd098
Unverified
Commit
62edd098
authored
Apr 17, 2019
by
Matthew Fisher
Committed by
GitHub
Apr 17, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5606 from xichengliudui/update-go-const
Using const() defines constants together (part:1)
parents
274d8da4
5edb79df
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
25 deletions
+31
-25
resource_policy.go
pkg/kube/resource_policy.go
+11
-9
environment.go
pkg/tiller/environment/environment.go
+6
-4
release_server.go
pkg/tiller/release_server.go
+14
-12
No files found.
pkg/kube/resource_policy.go
View file @
62edd098
...
...
@@ -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
...
...
pkg/tiller/environment/environment.go
View file @
62edd098
...
...
@@ -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
...
...
pkg/tiller/release_server.go
View file @
62edd098
...
...
@@ -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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment