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
b28c3793
Commit
b28c3793
authored
Aug 08, 2016
by
fibonacci1729
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add feature flag to use storage driver configmaps
parent
8c56533a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
2 deletions
+23
-2
environment.go
cmd/tiller/environment/environment.go
+23
-2
No files found.
cmd/tiller/environment/environment.go
View file @
b28c3793
...
...
@@ -33,6 +33,12 @@ import (
"k8s.io/helm/pkg/storage/driver"
)
// Feature flags for configmaps storage driver
const
UseConfigMaps
=
false
// Tiller's namespace
const
TillerNamespace
=
"kube-system"
// GoTplEngine is the name of the Go template engine, as registered in the EngineYard.
const
GoTplEngine
=
"gotpl"
...
...
@@ -159,9 +165,24 @@ func New() *Environment {
// we can easily add some here.
GoTplEngine
:
e
,
}
kbc
:=
kube
.
New
(
nil
)
var
sd
*
storage
.
Storage
if
UseConfigMaps
{
c
,
err
:=
kbc
.
Client
()
if
err
!=
nil
{
// panic because we cant initliaze driver with no client
panic
(
err
)
}
sd
=
storage
.
Init
(
driver
.
NewConfigMaps
(
c
.
ConfigMaps
(
TillerNamespace
)))
}
else
{
sd
=
storage
.
Init
(
driver
.
NewMemory
())
}
return
&
Environment
{
EngineYard
:
ey
,
Releases
:
storage
.
Init
(
driver
.
NewMemory
()),
KubeClient
:
kube
.
New
(
nil
),
//&PrintingKubeClient{Out: os.Stdout},
Releases
:
s
d
,
//s
torage.Init(driver.NewMemory()),
KubeClient
:
k
bc
,
//k
ube.New(nil), //&PrintingKubeClient{Out: os.Stdout},
}
}
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