Merge remote-tracking branch 'upstream/master'

reviewable/pr2421/r4
devinyan 8 years ago
commit ee66954001

@ -88,6 +88,8 @@ test: test-unit
.PHONY: test-unit .PHONY: test-unit
test-unit: test-unit:
@echo
@echo "==> Running unit tests <=="
HELM_HOME=/no/such/dir $(GO) test $(GOFLAGS) -run $(TESTS) $(PKG) $(TESTFLAGS) HELM_HOME=/no/such/dir $(GO) test $(GOFLAGS) -run $(TESTS) $(PKG) $(TESTFLAGS)
.PHONY: test-style .PHONY: test-style

@ -33,9 +33,9 @@ Think of it like apt/yum/homebrew for Kubernetes.
Binary downloads of the Helm client can be found at the following links: Binary downloads of the Helm client can be found at the following links:
- [OSX](https://kubernetes-helm.storage.googleapis.com/helm-v2.4.1-darwin-amd64.tar.gz) - [OSX](https://kubernetes-helm.storage.googleapis.com/helm-v2.4.2-darwin-amd64.tar.gz)
- [Linux](https://kubernetes-helm.storage.googleapis.com/helm-v2.4.1-linux-amd64.tar.gz) - [Linux](https://kubernetes-helm.storage.googleapis.com/helm-v2.4.2-linux-amd64.tar.gz)
- [Linux 32-bit](https://kubernetes-helm.storage.googleapis.com/helm-v2.4.1-linux-386.tar.gz) - [Linux 32-bit](https://kubernetes-helm.storage.googleapis.com/helm-v2.4.2-linux-386.tar.gz)
Unpack the `helm` binary and add it to your PATH and you are good to go! Unpack the `helm` binary and add it to your PATH and you are good to go!
macOS/[homebrew](https://brew.sh/) users can also use `brew install kubernetes-helm`. macOS/[homebrew](https://brew.sh/) users can also use `brew install kubernetes-helm`.

@ -26,6 +26,7 @@ message TestRun {
UNKNOWN = 0; UNKNOWN = 0;
SUCCESS = 1; SUCCESS = 1;
FAILURE = 2; FAILURE = 2;
RUNNING = 3;
} }
string name = 1; string name = 1;

@ -91,6 +91,7 @@ message UpgradeReleaseRequest{
int64 Timeout = 3; int64 Timeout = 3;
bool Wait = 4; bool Wait = 4;
bool Recreate = 5; bool Recreate = 5;
bool Force = 6;
} }
message UpgradeReleaseResponse{ message UpgradeReleaseResponse{
hapi.release.Release release = 1; hapi.release.Release release = 1;
@ -103,6 +104,7 @@ message RollbackReleaseRequest{
int64 Timeout = 3; int64 Timeout = 3;
bool Wait = 4; bool Wait = 4;
bool Recreate = 5; bool Recreate = 5;
bool Force = 6;
} }
message RollbackReleaseResponse{ message RollbackReleaseResponse{
hapi.release.Release release = 1; hapi.release.Release release = 1;

@ -20,6 +20,7 @@ import "hapi/chart/chart.proto";
import "hapi/chart/config.proto"; import "hapi/chart/config.proto";
import "hapi/release/release.proto"; import "hapi/release/release.proto";
import "hapi/release/info.proto"; import "hapi/release/info.proto";
import "hapi/release/test_run.proto";
import "hapi/release/status.proto"; import "hapi/release/status.proto";
import "hapi/version/version.proto"; import "hapi/version/version.proto";
@ -206,6 +207,8 @@ message UpdateReleaseRequest {
// ReuseValues will cause Tiller to reuse the values from the last release. // ReuseValues will cause Tiller to reuse the values from the last release.
// This is ignored if reset_values is set. // This is ignored if reset_values is set.
bool reuse_values = 10; bool reuse_values = 10;
// Force resource update through delete/recreate if needed.
bool force = 11;
} }
// UpdateReleaseResponse is the response to an update request. // UpdateReleaseResponse is the response to an update request.
@ -229,6 +232,8 @@ message RollbackReleaseRequest {
// wait, if true, will wait until all Pods, PVCs, and Services are in a ready state // wait, if true, will wait until all Pods, PVCs, and Services are in a ready state
// before marking the release as successful. It will wait for as long as timeout // before marking the release as successful. It will wait for as long as timeout
bool wait = 7; bool wait = 7;
// Force resource update through delete/recreate if needed.
bool force = 8;
} }
// RollbackReleaseResponse is the response to an update request. // RollbackReleaseResponse is the response to an update request.
@ -327,4 +332,6 @@ message TestReleaseRequest {
// TestReleaseResponse represents a message from executing a test // TestReleaseResponse represents a message from executing a test
message TestReleaseResponse { message TestReleaseResponse {
string msg = 1; string msg = 1;
hapi.release.TestRun.Status status = 2;
} }

@ -53,7 +53,7 @@ func newCompletionCmd(out io.Writer) *cobra.Command {
Short: "Generate autocompletions script for the specified shell (bash or zsh)", Short: "Generate autocompletions script for the specified shell (bash or zsh)",
Long: completionDesc, Long: completionDesc,
RunE: func(cmd *cobra.Command, args []string) error { RunE: func(cmd *cobra.Command, args []string) error {
return RunCompletion(out, cmd, args) return runCompletion(out, cmd, args)
}, },
ValidArgs: shells, ValidArgs: shells,
} }
@ -61,16 +61,16 @@ func newCompletionCmd(out io.Writer) *cobra.Command {
return cmd return cmd
} }
func RunCompletion(out io.Writer, cmd *cobra.Command, args []string) error { func runCompletion(out io.Writer, cmd *cobra.Command, args []string) error {
if len(args) == 0 { if len(args) == 0 {
return fmt.Errorf("Shell not specified.") return fmt.Errorf("shell not specified")
} }
if len(args) > 1 { if len(args) > 1 {
return fmt.Errorf("Too many arguments. Expected only the shell type.") return fmt.Errorf("too many arguments, expected only the shell type")
} }
run, found := completionShells[args[0]] run, found := completionShells[args[0]]
if !found { if !found {
return fmt.Errorf("Unsupported shell type %q.", args[0]) return fmt.Errorf("unsupported shell type %q", args[0])
} }
return run(out, cmd) return run(out, cmd)

@ -61,6 +61,8 @@ type fetchCmd struct {
keyFile string keyFile string
caFile string caFile string
devel bool
out io.Writer out io.Writer
} }
@ -73,8 +75,14 @@ func newFetchCmd(out io.Writer) *cobra.Command {
Long: fetchDesc, Long: fetchDesc,
RunE: func(cmd *cobra.Command, args []string) error { RunE: func(cmd *cobra.Command, args []string) error {
if len(args) == 0 { if len(args) == 0 {
return fmt.Errorf("This command needs at least one argument, url or repo/name of the chart.") return fmt.Errorf("need at least one argument, url or repo/name of the chart")
}
if fch.version == "" && fch.devel {
debug("setting version to >0.0.0-a")
fch.version = ">0.0.0-a"
} }
for i := 0; i < len(args); i++ { for i := 0; i < len(args); i++ {
fch.chartRef = args[i] fch.chartRef = args[i]
if err := fch.run(); err != nil { if err := fch.run(); err != nil {
@ -97,6 +105,7 @@ func newFetchCmd(out io.Writer) *cobra.Command {
f.StringVar(&fch.certFile, "cert-file", "", "identify HTTPS client using this SSL certificate file") f.StringVar(&fch.certFile, "cert-file", "", "identify HTTPS client using this SSL certificate file")
f.StringVar(&fch.keyFile, "key-file", "", "identify HTTPS client using this SSL key file") f.StringVar(&fch.keyFile, "key-file", "", "identify HTTPS client using this SSL key file")
f.StringVar(&fch.caFile, "ca-file", "", "verify certificates of HTTPS-enabled servers using this CA bundle") f.StringVar(&fch.caFile, "ca-file", "", "verify certificates of HTTPS-enabled servers using this CA bundle")
f.BoolVar(&fch.devel, "devel", false, "use development versions, too. Equivalent to version '>0.0.0-a'. If --version is set, this is ignored.")
return cmd return cmd
} }

@ -33,7 +33,6 @@ import (
"k8s.io/helm/pkg/helm" "k8s.io/helm/pkg/helm"
helm_env "k8s.io/helm/pkg/helm/environment" helm_env "k8s.io/helm/pkg/helm/environment"
"k8s.io/helm/pkg/helm/helmpath"
"k8s.io/helm/pkg/helm/portforwarder" "k8s.io/helm/pkg/helm/portforwarder"
"k8s.io/helm/pkg/kube" "k8s.io/helm/pkg/kube"
tiller_env "k8s.io/helm/pkg/tiller/environment" tiller_env "k8s.io/helm/pkg/tiller/environment"
@ -84,8 +83,6 @@ Environment:
` `
func newRootCmd(out io.Writer) *cobra.Command { func newRootCmd(out io.Writer) *cobra.Command {
var helmHomeTemp string
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "helm", Use: "helm",
Short: "The Helm package manager for Kubernetes.", Short: "The Helm package manager for Kubernetes.",
@ -101,8 +98,7 @@ func newRootCmd(out io.Writer) *cobra.Command {
}, },
} }
p := cmd.PersistentFlags() p := cmd.PersistentFlags()
p.StringVar(&helmHomeTemp, "home", helm_env.DefaultHelmHome(), "location of your Helm config. Overrides $HELM_HOME") p.StringVar((*string)(&settings.Home), "home", helm_env.DefaultHelmHome(), "location of your Helm config. Overrides $HELM_HOME")
settings.Home = helmpath.Home(helmHomeTemp)
p.StringVar(&settings.TillerHost, "host", helm_env.DefaultHelmHost(), "address of tiller. Overrides $HELM_HOST") p.StringVar(&settings.TillerHost, "host", helm_env.DefaultHelmHost(), "address of tiller. Overrides $HELM_HOST")
p.StringVar(&kubeContext, "kube-context", "", "name of the kubeconfig context to use") p.StringVar(&kubeContext, "kube-context", "", "name of the kubeconfig context to use")
p.BoolVar(&settings.Debug, "debug", false, "enable verbose output") p.BoolVar(&settings.Debug, "debug", false, "enable verbose output")

@ -24,6 +24,7 @@ import (
"math/rand" "math/rand"
"os" "os"
"regexp" "regexp"
"sync"
"testing" "testing"
"github.com/golang/protobuf/ptypes/timestamp" "github.com/golang/protobuf/ptypes/timestamp"
@ -123,6 +124,7 @@ func releaseMock(opts *releaseOptions) *release.Release {
type fakeReleaseClient struct { type fakeReleaseClient struct {
rels []*release.Release rels []*release.Release
responses map[string]release.TestRun_Status
err error err error
} }
@ -198,7 +200,27 @@ func (c *fakeReleaseClient) ReleaseHistory(rlsName string, opts ...helm.HistoryO
} }
func (c *fakeReleaseClient) RunReleaseTest(rlsName string, opts ...helm.ReleaseTestOption) (<-chan *rls.TestReleaseResponse, <-chan error) { func (c *fakeReleaseClient) RunReleaseTest(rlsName string, opts ...helm.ReleaseTestOption) (<-chan *rls.TestReleaseResponse, <-chan error) {
return nil, nil
results := make(chan *rls.TestReleaseResponse)
errc := make(chan error, 1)
go func() {
var wg sync.WaitGroup
for m, s := range c.responses {
wg.Add(1)
go func(msg string, status release.TestRun_Status) {
defer wg.Done()
results <- &rls.TestReleaseResponse{Msg: msg, Status: status}
}(m, s)
}
wg.Wait()
close(results)
close(errc)
}()
return results, errc
} }
func (c *fakeReleaseClient) Option(opt ...helm.Option) helm.Interface { func (c *fakeReleaseClient) Option(opt ...helm.Option) helm.Interface {

@ -117,6 +117,7 @@ type installCmd struct {
timeout int64 timeout int64
wait bool wait bool
repoURL string repoURL string
devel bool
certFile string certFile string
keyFile string keyFile string
@ -155,6 +156,13 @@ func newInstallCmd(c helm.Interface, out io.Writer) *cobra.Command {
if err := checkArgsLength(len(args), "chart name"); err != nil { if err := checkArgsLength(len(args), "chart name"); err != nil {
return err return err
} }
debug("Original chart version: %q", inst.version)
if inst.version == "" && inst.devel {
debug("setting version to >0.0.0-a")
inst.version = ">0.0.0-a"
}
cp, err := locateChartPath(inst.repoURL, args[0], inst.version, inst.verify, inst.keyring, cp, err := locateChartPath(inst.repoURL, args[0], inst.version, inst.verify, inst.keyring,
inst.certFile, inst.keyFile, inst.caFile) inst.certFile, inst.keyFile, inst.caFile)
if err != nil { if err != nil {
@ -184,6 +192,7 @@ func newInstallCmd(c helm.Interface, out io.Writer) *cobra.Command {
f.StringVar(&inst.certFile, "cert-file", "", "identify HTTPS client using this SSL certificate file") f.StringVar(&inst.certFile, "cert-file", "", "identify HTTPS client using this SSL certificate file")
f.StringVar(&inst.keyFile, "key-file", "", "identify HTTPS client using this SSL key file") f.StringVar(&inst.keyFile, "key-file", "", "identify HTTPS client using this SSL key file")
f.StringVar(&inst.caFile, "ca-file", "", "verify certificates of HTTPS-enabled servers using this CA bundle") f.StringVar(&inst.caFile, "ca-file", "", "verify certificates of HTTPS-enabled servers using this CA bundle")
f.BoolVar(&inst.devel, "devel", false, "use development versions, too. Equivalent to version '>0.0.0-a'. If --version is set, this is ignored.")
return cmd return cmd
} }
@ -223,6 +232,8 @@ func (i *installCmd) run() error {
if err := checkDependencies(chartRequested, req, i.out); err != nil { if err := checkDependencies(chartRequested, req, i.out); err != nil {
return prettyError(err) return prettyError(err)
} }
} else if err != chartutil.ErrRequirementsNotFound {
return fmt.Errorf("cannot load requirements: %v", err)
} }
res, err := i.client.InstallReleaseFromChart( res, err := i.client.InstallReleaseFromChart(

@ -138,6 +138,12 @@ func TestInstall(t *testing.T) {
args: []string{"testdata/testcharts/chart-missing-deps"}, args: []string{"testdata/testcharts/chart-missing-deps"},
err: true, err: true,
}, },
// Install, chart with bad requirements.yaml in /charts
{
name: "install chart with bad requirements.yaml",
args: []string{"testdata/testcharts/chart-bad-requirements"},
err: true,
},
} }
runReleaseCases(t, tests, func(c *fakeReleaseClient, out io.Writer) *cobra.Command { runReleaseCases(t, tests, func(c *fakeReleaseClient, out io.Writer) *cobra.Command {

@ -58,6 +58,7 @@ func Upgrade(client internalclientset.Interface, opts *Options) error {
} }
obj.Spec.Template.Spec.Containers[0].Image = opts.selectImage() obj.Spec.Template.Spec.Containers[0].Image = opts.selectImage()
obj.Spec.Template.Spec.Containers[0].ImagePullPolicy = opts.pullPolicy() obj.Spec.Template.Spec.Containers[0].ImagePullPolicy = opts.pullPolicy()
obj.Spec.Template.Spec.ServiceAccountName = opts.ServiceAccount
if _, err := client.Extensions().Deployments(opts.Namespace).Update(obj); err != nil { if _, err := client.Extensions().Deployments(opts.Namespace).Update(obj); err != nil {
return err return err
} }

@ -329,10 +329,11 @@ func TestInstall_canary(t *testing.T) {
func TestUpgrade(t *testing.T) { func TestUpgrade(t *testing.T) {
image := "gcr.io/kubernetes-helm/tiller:v2.0.0" image := "gcr.io/kubernetes-helm/tiller:v2.0.0"
serviceAccount := "newServiceAccount"
existingDeployment := deployment(&Options{ existingDeployment := deployment(&Options{
Namespace: api.NamespaceDefault, Namespace: api.NamespaceDefault,
ImageSpec: "imageToReplace", ImageSpec: "imageToReplace",
ServiceAccount: "serviceAccountToReplace",
UseCanary: false, UseCanary: false,
}) })
existingService := service(api.NamespaceDefault) existingService := service(api.NamespaceDefault)
@ -347,13 +348,17 @@ func TestUpgrade(t *testing.T) {
if i != image { if i != image {
t.Errorf("expected image = '%s', got '%s'", image, i) t.Errorf("expected image = '%s', got '%s'", image, i)
} }
sa := obj.Spec.Template.Spec.ServiceAccountName
if sa != serviceAccount {
t.Errorf("expected serviceAccountName = '%s', got '%s'", serviceAccount, sa)
}
return true, obj, nil return true, obj, nil
}) })
fc.AddReactor("get", "services", func(action testcore.Action) (bool, runtime.Object, error) { fc.AddReactor("get", "services", func(action testcore.Action) (bool, runtime.Object, error) {
return true, existingService, nil return true, existingService, nil
}) })
opts := &Options{Namespace: api.NamespaceDefault, ImageSpec: image} opts := &Options{Namespace: api.NamespaceDefault, ImageSpec: image, ServiceAccount: serviceAccount}
if err := Upgrade(fc, opts); err != nil { if err := Upgrade(fc, opts); err != nil {
t.Errorf("unexpected error: %#+v", err) t.Errorf("unexpected error: %#+v", err)
} }

@ -72,7 +72,7 @@ func newPackageCmd(out io.Writer) *cobra.Command {
RunE: func(cmd *cobra.Command, args []string) error { RunE: func(cmd *cobra.Command, args []string) error {
pkg.home = settings.Home pkg.home = settings.Home
if len(args) == 0 { if len(args) == 0 {
return fmt.Errorf("This command needs at least one argument, the path to the chart.") return fmt.Errorf("need at least one argument, the path to the chart")
} }
if pkg.sign { if pkg.sign {
if pkg.key == "" { if pkg.key == "" {
@ -130,6 +130,10 @@ func (p *packageCmd) run(cmd *cobra.Command, args []string) error {
if err := checkDependencies(ch, reqs, p.out); err != nil { if err := checkDependencies(ch, reqs, p.out); err != nil {
return err return err
} }
} else {
if err != chartutil.ErrRequirementsNotFound {
return err
}
} }
var dest string var dest string
@ -146,7 +150,9 @@ func (p *packageCmd) run(cmd *cobra.Command, args []string) error {
name, err := chartutil.Save(ch, dest) name, err := chartutil.Save(ch, dest)
if err == nil { if err == nil {
debug("Saved %s to current directory\n", name) fmt.Fprintf(p.out, "Successfully packaged chart and saved it to: %s\n", name)
} else {
return fmt.Errorf("Failed to save: %s", err)
} }
// Save to $HELM_HOME/local directory. This is second, because we don't want // Save to $HELM_HOME/local directory. This is second, because we don't want
@ -156,7 +162,7 @@ func (p *packageCmd) run(cmd *cobra.Command, args []string) error {
if err := repo.AddChartToLocalRepo(ch, lr); err != nil { if err := repo.AddChartToLocalRepo(ch, lr); err != nil {
return err return err
} }
debug("Saved %s to %s\n", name, lr) debug("Successfully saved %s to %s\n", name, lr)
} }
if p.sign { if p.sign {

@ -64,7 +64,7 @@ func TestPackage(t *testing.T) {
name: "package without chart path", name: "package without chart path",
args: []string{}, args: []string{},
flags: map[string]string{}, flags: map[string]string{},
expect: "This command needs at least one argument, the path to the chart.", expect: "need at least one argument, the path to the chart",
err: true, err: true,
}, },
{ {

@ -41,6 +41,7 @@ func newPluginCmd(out io.Writer) *cobra.Command {
newPluginInstallCmd(out), newPluginInstallCmd(out),
newPluginListCmd(out), newPluginListCmd(out),
newPluginRemoveCmd(out), newPluginRemoveCmd(out),
newPluginUpdateCmd(out),
) )
return cmd return cmd
} }

@ -0,0 +1,114 @@
/*
Copyright 2017 The Kubernetes Authors All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package main
import (
"errors"
"fmt"
"io"
"path/filepath"
"strings"
"k8s.io/helm/pkg/helm/helmpath"
"k8s.io/helm/pkg/plugin"
"k8s.io/helm/pkg/plugin/installer"
"github.com/spf13/cobra"
)
type pluginUpdateCmd struct {
names []string
home helmpath.Home
out io.Writer
}
func newPluginUpdateCmd(out io.Writer) *cobra.Command {
pcmd := &pluginUpdateCmd{out: out}
cmd := &cobra.Command{
Use: "update <plugin>...",
Short: "update one or more Helm plugins",
PreRunE: func(cmd *cobra.Command, args []string) error {
return pcmd.complete(args)
},
RunE: func(cmd *cobra.Command, args []string) error {
return pcmd.run()
},
}
return cmd
}
func (pcmd *pluginUpdateCmd) complete(args []string) error {
if len(args) == 0 {
return errors.New("please provide plugin name to update")
}
pcmd.names = args
pcmd.home = settings.Home
return nil
}
func (pcmd *pluginUpdateCmd) run() error {
installer.Debug = settings.Debug
plugdirs := pluginDirs(pcmd.home)
debug("loading installed plugins from %s", plugdirs)
plugins, err := findPlugins(plugdirs)
if err != nil {
return err
}
var errorPlugins []string
for _, name := range pcmd.names {
if found := findPlugin(plugins, name); found != nil {
if err := updatePlugin(found, pcmd.home); err != nil {
errorPlugins = append(errorPlugins, fmt.Sprintf("Failed to update plugin %s, got error (%v)", name, err))
} else {
fmt.Fprintf(pcmd.out, "Updated plugin: %s\n", name)
}
} else {
errorPlugins = append(errorPlugins, fmt.Sprintf("Plugin: %s not found", name))
}
}
if len(errorPlugins) > 0 {
return fmt.Errorf(strings.Join(errorPlugins, "\n"))
}
return nil
}
func updatePlugin(p *plugin.Plugin, home helmpath.Home) error {
exactLocation, err := filepath.EvalSymlinks(p.Dir)
if err != nil {
return err
}
absExactLocation, err := filepath.Abs(exactLocation)
if err != nil {
return err
}
i, err := installer.FindSource(absExactLocation, home)
if err != nil {
return err
}
if err := installer.Update(i); err != nil {
return err
}
debug("loading plugin from %s", i.Path())
updatedPlugin, err := plugin.LoadDir(i.Path())
if err != nil {
return err
}
return runHook(updatedPlugin, plugin.Update, home)
}

@ -23,6 +23,7 @@ import (
"github.com/spf13/cobra" "github.com/spf13/cobra"
"k8s.io/helm/pkg/helm" "k8s.io/helm/pkg/helm"
"k8s.io/helm/pkg/proto/hapi/release"
) )
const releaseTestDesc = ` const releaseTestDesc = `
@ -75,16 +76,35 @@ func (t *releaseTestCmd) run() (err error) {
helm.ReleaseTestTimeout(t.timeout), helm.ReleaseTestTimeout(t.timeout),
helm.ReleaseTestCleanup(t.cleanup), helm.ReleaseTestCleanup(t.cleanup),
) )
testErr := &testErr{}
for { for {
select { select {
case err := <-errc: case err := <-errc:
if prettyError(err) == nil && testErr.failed > 0 {
return testErr.Error()
}
return prettyError(err) return prettyError(err)
case res, ok := <-c: case res, ok := <-c:
if !ok { if !ok {
break break
} }
if res.Status == release.TestRun_FAILURE {
testErr.failed++
}
fmt.Fprintf(t.out, res.Msg+"\n") fmt.Fprintf(t.out, res.Msg+"\n")
} }
} }
}
type testErr struct {
failed int
}
func (err *testErr) Error() error {
return fmt.Errorf("%v test(s) failed", err.failed)
} }

@ -0,0 +1,105 @@
/*
Copyright 2016 The Kubernetes Authors All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package main
import (
"bytes"
"testing"
"k8s.io/helm/pkg/proto/hapi/release"
)
func TestReleaseTesting(t *testing.T) {
tests := []struct {
name string
args []string
flags []string
responses map[string]release.TestRun_Status
fail bool
}{
{
name: "basic test",
args: []string{"example-release"},
flags: []string{},
responses: map[string]release.TestRun_Status{"PASSED: green lights everywhere": release.TestRun_SUCCESS},
fail: false,
},
{
name: "test failure",
args: []string{"example-fail"},
flags: []string{},
responses: map[string]release.TestRun_Status{"FAILURE: red lights everywhere": release.TestRun_FAILURE},
fail: true,
},
{
name: "test unknown",
args: []string{"example-unknown"},
flags: []string{},
responses: map[string]release.TestRun_Status{"UNKNOWN: yellow lights everywhere": release.TestRun_UNKNOWN},
fail: false,
},
{
name: "test error",
args: []string{"example-error"},
flags: []string{},
responses: map[string]release.TestRun_Status{"ERROR: yellow lights everywhere": release.TestRun_FAILURE},
fail: true,
},
{
name: "test running",
args: []string{"example-running"},
flags: []string{},
responses: map[string]release.TestRun_Status{"RUNNING: things are happpeningggg": release.TestRun_RUNNING},
fail: false,
},
{
name: "multiple tests example",
args: []string{"example-suite"},
flags: []string{},
responses: map[string]release.TestRun_Status{
"RUNNING: things are happpeningggg": release.TestRun_RUNNING,
"PASSED: party time": release.TestRun_SUCCESS,
"RUNNING: things are happening again": release.TestRun_RUNNING,
"FAILURE: good thing u checked :)": release.TestRun_FAILURE,
"RUNNING: things are happpeningggg yet again": release.TestRun_RUNNING,
"PASSED: feel free to party again": release.TestRun_SUCCESS},
fail: true,
},
}
for _, tt := range tests {
c := &fakeReleaseClient{responses: tt.responses}
buf := bytes.NewBuffer(nil)
cmd := newReleaseTestCmd(c, buf)
cmd.ParseFlags(tt.flags)
err := cmd.RunE(cmd, tt.args)
if err == nil && tt.fail {
t.Errorf("%q did not fail but should have failed", tt.name)
}
if err != nil {
if tt.fail {
continue
} else {
t.Errorf("%q reported error: %s", tt.name, err)
}
}
}
}

@ -85,7 +85,7 @@ func addRepository(name, url string, home helmpath.Home, certFile, keyFile, caFi
} }
if noUpdate && f.Has(name) { if noUpdate && f.Has(name) {
return fmt.Errorf("The repository name you provided (%s) already exists. Please specify a different name.", name) return fmt.Errorf("repository name (%s) already exists, please specify a different name", name)
} }
cif := home.CacheIndex(name) cif := home.CacheIndex(name)

@ -57,7 +57,12 @@ func newResetCmd(client helm.Interface, out io.Writer) *cobra.Command {
Use: "reset", Use: "reset",
Short: "uninstalls Tiller from a cluster", Short: "uninstalls Tiller from a cluster",
Long: resetDesc, Long: resetDesc,
PersistentPreRunE: setupConnection, PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
if err := setupConnection(cmd, args); !d.force && err != nil {
return err
}
return nil
},
RunE: func(cmd *cobra.Command, args []string) error { RunE: func(cmd *cobra.Command, args []string) error {
if len(args) != 0 { if len(args) != 0 {
return errors.New("This command does not accept arguments") return errors.New("This command does not accept arguments")
@ -72,7 +77,7 @@ func newResetCmd(client helm.Interface, out io.Writer) *cobra.Command {
} }
f := cmd.Flags() f := cmd.Flags()
f.BoolVarP(&d.force, "force", "f", false, "forces Tiller uninstall even if there are releases installed") f.BoolVarP(&d.force, "force", "f", false, "forces Tiller uninstall even if there are releases installed, or if tiller is not in ready state")
f.BoolVar(&d.removeHelmHome, "remove-helm-home", false, "if set deletes $HELM_HOME") f.BoolVar(&d.removeHelmHome, "remove-helm-home", false, "if set deletes $HELM_HOME")
return cmd return cmd
@ -91,12 +96,12 @@ func (d *resetCmd) run() error {
res, err := d.client.ListReleases( res, err := d.client.ListReleases(
helm.ReleaseListStatuses([]release.Status_Code{release.Status_DEPLOYED}), helm.ReleaseListStatuses([]release.Status_Code{release.Status_DEPLOYED}),
) )
if err != nil { if !d.force && err != nil {
return prettyError(err) return prettyError(err)
} }
if len(res.Releases) > 0 && !d.force { if !d.force && res != nil && len(res.Releases) > 0 {
return fmt.Errorf("There are still %d deployed releases (Tip: use --force).", len(res.Releases)) return fmt.Errorf("there are still %d deployed releases (Tip: use --force)", len(res.Releases))
} }
if err := installer.Uninstall(d.kubeClient, &installer.Options{Namespace: d.namespace}); err != nil { if err := installer.Uninstall(d.kubeClient, &installer.Options{Namespace: d.namespace}); err != nil {

@ -120,7 +120,7 @@ func TestReset_deployedReleases(t *testing.T) {
namespace: api.NamespaceDefault, namespace: api.NamespaceDefault,
} }
err = cmd.run() err = cmd.run()
expected := "There are still 1 deployed releases (Tip: use --force)" expected := "there are still 1 deployed releases (Tip: use --force)"
if !strings.Contains(err.Error(), expected) { if !strings.Contains(err.Error(), expected) {
t.Errorf("unexpected error: %v", err) t.Errorf("unexpected error: %v", err)
} }

@ -39,6 +39,7 @@ type rollbackCmd struct {
revision int32 revision int32
dryRun bool dryRun bool
recreate bool recreate bool
force bool
disableHooks bool disableHooks bool
out io.Writer out io.Writer
client helm.Interface client helm.Interface
@ -78,6 +79,7 @@ func newRollbackCmd(c helm.Interface, out io.Writer) *cobra.Command {
f := cmd.Flags() f := cmd.Flags()
f.BoolVar(&rollback.dryRun, "dry-run", false, "simulate a rollback") f.BoolVar(&rollback.dryRun, "dry-run", false, "simulate a rollback")
f.BoolVar(&rollback.recreate, "recreate-pods", false, "performs pods restart for the resource if applicable") f.BoolVar(&rollback.recreate, "recreate-pods", false, "performs pods restart for the resource if applicable")
f.BoolVar(&rollback.force, "force", false, "force resource update through delete/recreate if needed")
f.BoolVar(&rollback.disableHooks, "no-hooks", false, "prevent hooks from running during rollback") f.BoolVar(&rollback.disableHooks, "no-hooks", false, "prevent hooks from running during rollback")
f.Int64Var(&rollback.timeout, "timeout", 300, "time in seconds to wait for any individual kubernetes operation (like Jobs for hooks)") f.Int64Var(&rollback.timeout, "timeout", 300, "time in seconds to wait for any individual kubernetes operation (like Jobs for hooks)")
f.BoolVar(&rollback.wait, "wait", false, "if set, will wait until all Pods, PVCs, Services, and minimum number of Pods of a Deployment are in a ready state before marking the release as successful. It will wait for as long as --timeout") f.BoolVar(&rollback.wait, "wait", false, "if set, will wait until all Pods, PVCs, Services, and minimum number of Pods of a Deployment are in a ready state before marking the release as successful. It will wait for as long as --timeout")
@ -90,6 +92,7 @@ func (r *rollbackCmd) run() error {
r.name, r.name,
helm.RollbackDryRun(r.dryRun), helm.RollbackDryRun(r.dryRun),
helm.RollbackRecreate(r.recreate), helm.RollbackRecreate(r.recreate),
helm.RollbackForce(r.force),
helm.RollbackDisableHooks(r.disableHooks), helm.RollbackDisableHooks(r.disableHooks),
helm.RollbackVersion(r.revision), helm.RollbackVersion(r.revision),
helm.RollbackTimeout(r.timeout), helm.RollbackTimeout(r.timeout),

@ -55,19 +55,29 @@ func newServeCmd(out io.Writer) *cobra.Command {
Use: "serve", Use: "serve",
Short: "start a local http web server", Short: "start a local http web server",
Long: serveDesc, Long: serveDesc,
PreRunE: func(cmd *cobra.Command, args []string) error {
return srv.complete(args)
},
RunE: func(cmd *cobra.Command, args []string) error { RunE: func(cmd *cobra.Command, args []string) error {
return srv.run() return srv.run()
}, },
} }
f := cmd.Flags() f := cmd.Flags()
f.StringVar(&srv.repoPath, "repo-path", settings.Home.LocalRepository(), "local directory path from which to serve charts") f.StringVar(&srv.repoPath, "repo-path", "", "local directory path from which to serve charts")
f.StringVar(&srv.address, "address", "127.0.0.1:8879", "address to listen on") f.StringVar(&srv.address, "address", "127.0.0.1:8879", "address to listen on")
f.StringVar(&srv.url, "url", "", "external URL of chart repository") f.StringVar(&srv.url, "url", "", "external URL of chart repository")
return cmd return cmd
} }
func (s *serveCmd) complete(args []string) error {
if s.repoPath == "" {
s.repoPath = settings.Home.LocalRepository()
}
return nil
}
func (s *serveCmd) run() error { func (s *serveCmd) run() error {
repoPath, err := filepath.Abs(s.repoPath) repoPath, err := filepath.Abs(s.repoPath)
if err != nil { if err != nil {

@ -0,0 +1,21 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj

@ -0,0 +1,3 @@
description: A Helm chart for Kubernetes
name: chart-missing-deps
version: 0.1.0

@ -0,0 +1,21 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj

@ -0,0 +1,3 @@
description: A Helm chart for Kubernetes
name: reqsubchart
version: 0.1.0

@ -0,0 +1,4 @@
# Default values for reqsubchart.
# This is a YAML-formatted file.
# Declare name/value pairs to be passed into your templates.
# name: value

@ -0,0 +1,4 @@
dependencies:
- name: reqsubchart
version: 0.1.0
repository: "https://example.com/charts"

@ -0,0 +1,4 @@
# Default values for reqtest.
# This is a YAML-formatted file.
# Declare name/value pairs to be passed into your templates.
# name: value

@ -62,6 +62,7 @@ type upgradeCmd struct {
client helm.Interface client helm.Interface
dryRun bool dryRun bool
recreate bool recreate bool
force bool
disableHooks bool disableHooks bool
valueFiles valueFiles valueFiles valueFiles
values []string values []string
@ -75,6 +76,7 @@ type upgradeCmd struct {
reuseValues bool reuseValues bool
wait bool wait bool
repoURL string repoURL string
devel bool
certFile string certFile string
keyFile string keyFile string
@ -98,6 +100,11 @@ func newUpgradeCmd(client helm.Interface, out io.Writer) *cobra.Command {
return err return err
} }
if upgrade.version == "" && upgrade.devel {
debug("setting version to >0.0.0-a")
upgrade.version = ">0.0.0-a"
}
upgrade.release = args[0] upgrade.release = args[0]
upgrade.chart = args[1] upgrade.chart = args[1]
upgrade.client = ensureHelmClient(upgrade.client) upgrade.client = ensureHelmClient(upgrade.client)
@ -110,6 +117,7 @@ func newUpgradeCmd(client helm.Interface, out io.Writer) *cobra.Command {
f.VarP(&upgrade.valueFiles, "values", "f", "specify values in a YAML file (can specify multiple)") f.VarP(&upgrade.valueFiles, "values", "f", "specify values in a YAML file (can specify multiple)")
f.BoolVar(&upgrade.dryRun, "dry-run", false, "simulate an upgrade") f.BoolVar(&upgrade.dryRun, "dry-run", false, "simulate an upgrade")
f.BoolVar(&upgrade.recreate, "recreate-pods", false, "performs pods restart for the resource if applicable") f.BoolVar(&upgrade.recreate, "recreate-pods", false, "performs pods restart for the resource if applicable")
f.BoolVar(&upgrade.force, "force", false, "force resource update through delete/recreate if needed")
f.StringArrayVar(&upgrade.values, "set", []string{}, "set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)") f.StringArrayVar(&upgrade.values, "set", []string{}, "set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)")
f.BoolVar(&upgrade.disableHooks, "disable-hooks", false, "disable pre/post upgrade hooks. DEPRECATED. Use no-hooks") f.BoolVar(&upgrade.disableHooks, "disable-hooks", false, "disable pre/post upgrade hooks. DEPRECATED. Use no-hooks")
f.BoolVar(&upgrade.disableHooks, "no-hooks", false, "disable pre/post upgrade hooks") f.BoolVar(&upgrade.disableHooks, "no-hooks", false, "disable pre/post upgrade hooks")
@ -126,6 +134,7 @@ func newUpgradeCmd(client helm.Interface, out io.Writer) *cobra.Command {
f.StringVar(&upgrade.certFile, "cert-file", "", "identify HTTPS client using this SSL certificate file") f.StringVar(&upgrade.certFile, "cert-file", "", "identify HTTPS client using this SSL certificate file")
f.StringVar(&upgrade.keyFile, "key-file", "", "identify HTTPS client using this SSL key file") f.StringVar(&upgrade.keyFile, "key-file", "", "identify HTTPS client using this SSL key file")
f.StringVar(&upgrade.caFile, "ca-file", "", "verify certificates of HTTPS-enabled servers using this CA bundle") f.StringVar(&upgrade.caFile, "ca-file", "", "verify certificates of HTTPS-enabled servers using this CA bundle")
f.BoolVar(&upgrade.devel, "devel", false, "use development versions, too. Equivalent to version '>0.0.0-a'. If --version is set, this is ignored.")
f.MarkDeprecated("disable-hooks", "use --no-hooks instead") f.MarkDeprecated("disable-hooks", "use --no-hooks instead")
@ -178,7 +187,11 @@ func (u *upgradeCmd) run() error {
if err := checkDependencies(ch, req, u.out); err != nil { if err := checkDependencies(ch, req, u.out); err != nil {
return err return err
} }
} else if err != chartutil.ErrRequirementsNotFound {
return fmt.Errorf("cannot load requirements: %v", err)
} }
} else {
return prettyError(err)
} }
resp, err := u.client.UpdateRelease( resp, err := u.client.UpdateRelease(
@ -187,6 +200,7 @@ func (u *upgradeCmd) run() error {
helm.UpdateValueOverrides(rawVals), helm.UpdateValueOverrides(rawVals),
helm.UpgradeDryRun(u.dryRun), helm.UpgradeDryRun(u.dryRun),
helm.UpgradeRecreate(u.recreate), helm.UpgradeRecreate(u.recreate),
helm.UpgradeForce(u.force),
helm.UpgradeDisableHooks(u.disableHooks), helm.UpgradeDisableHooks(u.disableHooks),
helm.UpgradeTimeout(u.timeout), helm.UpgradeTimeout(u.timeout),
helm.ResetValues(u.resetValues), helm.ResetValues(u.resetValues),

@ -82,6 +82,7 @@ func TestUpgradeCmd(t *testing.T) {
originalDepsPath := filepath.Join("testdata/testcharts/reqtest") originalDepsPath := filepath.Join("testdata/testcharts/reqtest")
missingDepsPath := filepath.Join("testdata/testcharts/chart-missing-deps") missingDepsPath := filepath.Join("testdata/testcharts/chart-missing-deps")
badDepsPath := filepath.Join("testdata/testcharts/chart-bad-requirements")
var ch3 *chart.Chart var ch3 *chart.Chart
ch3, err = chartutil.Load(originalDepsPath) ch3, err = chartutil.Load(originalDepsPath)
if err != nil { if err != nil {
@ -143,6 +144,12 @@ func TestUpgradeCmd(t *testing.T) {
resp: releaseMock(&releaseOptions{name: "bonkers-bunny", version: 1, chart: ch3}), resp: releaseMock(&releaseOptions{name: "bonkers-bunny", version: 1, chart: ch3}),
err: true, err: true,
}, },
{
name: "upgrade a release with bad dependencies",
args: []string{"bonkers-bunny", badDepsPath},
resp: releaseMock(&releaseOptions{name: "bonkers-bunny", version: 1, chart: ch3}),
err: true,
},
} }
cmd := func(c *fakeReleaseClient, out io.Writer) *cobra.Command { cmd := func(c *fakeReleaseClient, out io.Writer) *cobra.Command {

@ -112,7 +112,7 @@ func (r *ReleaseModuleServiceServer) RollbackRelease(ctx context.Context, in *ru
grpclog.Print("rollback") grpclog.Print("rollback")
c := bytes.NewBufferString(in.Current.Manifest) c := bytes.NewBufferString(in.Current.Manifest)
t := bytes.NewBufferString(in.Target.Manifest) t := bytes.NewBufferString(in.Target.Manifest)
err := kubeClient.Update(in.Target.Namespace, c, t, in.Recreate, in.Timeout, in.Wait) err := kubeClient.Update(in.Target.Namespace, c, t, in.Force, in.Recreate, in.Timeout, in.Wait)
return &rudderAPI.RollbackReleaseResponse{}, err return &rudderAPI.RollbackReleaseResponse{}, err
} }
@ -121,11 +121,12 @@ func (r *ReleaseModuleServiceServer) UpgradeRelease(ctx context.Context, in *rud
grpclog.Print("upgrade") grpclog.Print("upgrade")
c := bytes.NewBufferString(in.Current.Manifest) c := bytes.NewBufferString(in.Current.Manifest)
t := bytes.NewBufferString(in.Target.Manifest) t := bytes.NewBufferString(in.Target.Manifest)
err := kubeClient.Update(in.Target.Namespace, c, t, in.Recreate, in.Timeout, in.Wait) err := kubeClient.Update(in.Target.Namespace, c, t, in.Force, in.Recreate, in.Timeout, in.Wait)
// upgrade response object should be changed to include status // upgrade response object should be changed to include status
return &rudderAPI.UpgradeReleaseResponse{}, err return &rudderAPI.UpgradeReleaseResponse{}, err
} }
// ReleaseStatus retrieves release status
func (r *ReleaseModuleServiceServer) ReleaseStatus(ctx context.Context, in *rudderAPI.ReleaseStatusRequest) (*rudderAPI.ReleaseStatusResponse, error) { func (r *ReleaseModuleServiceServer) ReleaseStatus(ctx context.Context, in *rudderAPI.ReleaseStatusRequest) (*rudderAPI.ReleaseStatusResponse, error) {
grpclog.Print("status") grpclog.Print("status")

@ -29,6 +29,7 @@ import (
goprom "github.com/grpc-ecosystem/go-grpc-prometheus" goprom "github.com/grpc-ecosystem/go-grpc-prometheus"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"github.com/spf13/pflag"
"google.golang.org/grpc" "google.golang.org/grpc"
"google.golang.org/grpc/credentials" "google.golang.org/grpc/credentials"
@ -69,6 +70,8 @@ var rootServer *grpc.Server
// Any changes to env should be done before rootServer.Serve() is called. // Any changes to env should be done before rootServer.Serve() is called.
var env = environment.New() var env = environment.New()
var logger *log.Logger
var ( var (
grpcAddr = ":44134" grpcAddr = ":44134"
probeAddr = ":44135" probeAddr = ":44135"
@ -93,64 +96,83 @@ Tiller is the server for Helm. It provides in-cluster resource management.
By default, Tiller listens for gRPC connections on port 44134. By default, Tiller listens for gRPC connections on port 44134.
` `
var rootCommand = &cobra.Command{ func addFlags(flags *pflag.FlagSet) {
flags.StringVarP(&grpcAddr, "listen", "l", ":44134", "address:port to listen on")
flags.StringVar(&store, "storage", storageConfigMap, "storage driver to use. One of 'configmap' or 'memory'")
flags.BoolVar(&enableTracing, "trace", false, "enable rpc tracing")
flags.BoolVar(&remoteReleaseModules, "experimental-release", false, "enable experimental release modules")
flags.BoolVar(&tlsEnable, "tls", tlsEnableEnvVarDefault(), "enable TLS")
flags.BoolVar(&tlsVerify, "tls-verify", tlsVerifyEnvVarDefault(), "enable TLS and verify remote certificate")
flags.StringVar(&keyFile, "tls-key", tlsDefaultsFromEnv("tls-key"), "path to TLS private key file")
flags.StringVar(&certFile, "tls-cert", tlsDefaultsFromEnv("tls-cert"), "path to TLS certificate file")
flags.StringVar(&caCertFile, "tls-ca-cert", tlsDefaultsFromEnv("tls-ca-cert"), "trust certificates signed by this CA")
}
func initLog() {
if enableTracing {
log.SetFlags(log.Lshortfile)
}
logger = newLogger("main")
}
func main() {
root := &cobra.Command{
Use: "tiller", Use: "tiller",
Short: "The Kubernetes Helm server.", Short: "The Kubernetes Helm server.",
Long: globalUsage, Long: globalUsage,
Run: start, Run: start,
} PreRun: func(_ *cobra.Command, _ []string) {
initLog()
},
}
addFlags(root.Flags())
func init() { if err := root.Execute(); err != nil {
log.SetFlags(log.Flags() | log.Lshortfile) logger.Fatal(err)
}
} }
func main() { func newLogger(prefix string) *log.Logger {
p := rootCommand.PersistentFlags() if len(prefix) > 0 {
p.StringVarP(&grpcAddr, "listen", "l", ":44134", "address:port to listen on") prefix = fmt.Sprintf("[%s] ", prefix)
p.StringVar(&store, "storage", storageConfigMap, "storage driver to use. One of 'configmap' or 'memory'")
p.BoolVar(&enableTracing, "trace", false, "enable rpc tracing")
p.BoolVar(&remoteReleaseModules, "experimental-release", false, "enable experimental release modules")
p.BoolVar(&tlsEnable, "tls", tlsEnableEnvVarDefault(), "enable TLS")
p.BoolVar(&tlsVerify, "tls-verify", tlsVerifyEnvVarDefault(), "enable TLS and verify remote certificate")
p.StringVar(&keyFile, "tls-key", tlsDefaultsFromEnv("tls-key"), "path to TLS private key file")
p.StringVar(&certFile, "tls-cert", tlsDefaultsFromEnv("tls-cert"), "path to TLS certificate file")
p.StringVar(&caCertFile, "tls-ca-cert", tlsDefaultsFromEnv("tls-ca-cert"), "trust certificates signed by this CA")
if err := rootCommand.Execute(); err != nil {
fmt.Fprint(os.Stderr, err)
os.Exit(1)
} }
return log.New(os.Stderr, prefix, log.Flags())
} }
func start(c *cobra.Command, args []string) { func start(c *cobra.Command, args []string) {
clientset, err := kube.New(nil).ClientSet() clientset, err := kube.New(nil).ClientSet()
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Cannot initialize Kubernetes connection: %s\n", err) logger.Fatalf("Cannot initialize Kubernetes connection: %s", err)
os.Exit(1)
} }
switch store { switch store {
case storageMemory: case storageMemory:
env.Releases = storage.Init(driver.NewMemory()) env.Releases = storage.Init(driver.NewMemory())
case storageConfigMap: case storageConfigMap:
env.Releases = storage.Init(driver.NewConfigMaps(clientset.Core().ConfigMaps(namespace()))) cfgmaps := driver.NewConfigMaps(clientset.Core().ConfigMaps(namespace()))
cfgmaps.Log = newLogger("storage/driver").Printf
env.Releases = storage.Init(cfgmaps)
env.Releases.Log = newLogger("storage").Printf
} }
kubeClient := kube.New(nil)
kubeClient.Log = newLogger("kube").Printf
env.KubeClient = kubeClient
if tlsEnable || tlsVerify { if tlsEnable || tlsVerify {
opts := tlsutil.Options{CertFile: certFile, KeyFile: keyFile} opts := tlsutil.Options{CertFile: certFile, KeyFile: keyFile}
if tlsVerify { if tlsVerify {
opts.CaCertFile = caCertFile opts.CaCertFile = caCertFile
} }
} }
var opts []grpc.ServerOption var opts []grpc.ServerOption
if tlsEnable || tlsVerify { if tlsEnable || tlsVerify {
cfg, err := tlsutil.ServerConfig(tlsOptions()) cfg, err := tlsutil.ServerConfig(tlsOptions())
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Could not create server TLS configuration: %v\n", err) logger.Fatalf("Could not create server TLS configuration: %v", err)
os.Exit(1)
} }
opts = append(opts, grpc.Creds(credentials.NewTLS(cfg))) opts = append(opts, grpc.Creds(credentials.NewTLS(cfg)))
} }
@ -159,14 +181,13 @@ func start(c *cobra.Command, args []string) {
lstn, err := net.Listen("tcp", grpcAddr) lstn, err := net.Listen("tcp", grpcAddr)
if err != nil { if err != nil {
fmt.Fprintf(os.Stderr, "Server died: %s\n", err) logger.Fatalf("Server died: %s", err)
os.Exit(1)
} }
fmt.Printf("Starting Tiller %s (tls=%t)\n", version.GetVersion(), tlsEnable || tlsVerify) logger.Printf("Starting Tiller %s (tls=%t)", version.GetVersion(), tlsEnable || tlsVerify)
fmt.Printf("GRPC listening on %s\n", grpcAddr) logger.Printf("GRPC listening on %s", grpcAddr)
fmt.Printf("Probes listening on %s\n", probeAddr) logger.Printf("Probes listening on %s", probeAddr)
fmt.Printf("Storage driver is %s\n", env.Releases.Name()) logger.Printf("Storage driver is %s", env.Releases.Name())
if enableTracing { if enableTracing {
startTracing(traceAddr) startTracing(traceAddr)
@ -176,6 +197,7 @@ func start(c *cobra.Command, args []string) {
probeErrCh := make(chan error) probeErrCh := make(chan error)
go func() { go func() {
svc := tiller.NewReleaseServer(env, clientset, remoteReleaseModules) svc := tiller.NewReleaseServer(env, clientset, remoteReleaseModules)
svc.Log = newLogger("tiller").Printf
services.RegisterReleaseServiceServer(rootServer, svc) services.RegisterReleaseServiceServer(rootServer, svc)
if err := rootServer.Serve(lstn); err != nil { if err := rootServer.Serve(lstn); err != nil {
srvErrCh <- err srvErrCh <- err
@ -196,10 +218,9 @@ func start(c *cobra.Command, args []string) {
select { select {
case err := <-srvErrCh: case err := <-srvErrCh:
fmt.Fprintf(os.Stderr, "Server died: %s\n", err) logger.Fatalf("Server died: %s", err)
os.Exit(1)
case err := <-probeErrCh: case err := <-probeErrCh:
fmt.Fprintf(os.Stderr, "Probes server died: %s\n", err) logger.Printf("Probes server died: %s", err)
} }
} }

@ -17,8 +17,6 @@ limitations under the License.
package main // import "k8s.io/helm/cmd/tiller" package main // import "k8s.io/helm/cmd/tiller"
import ( import (
"fmt"
"log"
"net/http" "net/http"
_ "net/http/pprof" _ "net/http/pprof"
@ -27,7 +25,7 @@ import (
) )
func startTracing(addr string) { func startTracing(addr string) {
fmt.Printf("Tracing server is listening on %s\n", addr) logger.Printf("Tracing server is listening on %s\n", addr)
grpc.EnableTracing = true grpc.EnableTracing = true
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
@ -41,7 +39,7 @@ func startTracing(addr string) {
go func() { go func() {
if err := http.ListenAndServe(addr, nil); err != nil { if err := http.ListenAndServe(addr, nil); err != nil {
log.Printf("tracing error: %s", err) logger.Printf("tracing error: %s", err)
} }
}() }()
} }

@ -0,0 +1,15 @@
# Chart Repositories: Frequently Asked Questions
This section tracks some of the more frequently encountered issues with using chart repositories.
**We'd love your help** making this document better. To add, correct, or remove
information, [file an issue](https://github.com/kubernetes/helm/issues) or
send us a pull request.
## Fetching
**Q: Why do I get a `unsupported protocol scheme ""` error when trying to fetch a chart from my custom repo?**
A: This is likely caused by you creating your chart repo index without specifying the `--url` flag.
Try recreating your `index.yaml` file with a command like `heml repo index --url http://my-repo/charts .`,
and then re-uploading it to your custom charts repo.

@ -170,7 +170,7 @@ data:
{{- end}} {{- end}}
``` ```
Just for the same of making this point clear, let's adjust the above, and substitute an `*` for each whitespace that will be deleted following this rule. an `*` at the end of the line indicates a newline character that would be removed Just for the sake of making this point clear, let's adjust the above, and substitute an `*` for each whitespace that will be deleted following this rule. an `*` at the end of the line indicates a newline character that would be removed
```yaml ```yaml
apiVersion: v1 apiVersion: v1

@ -1,8 +1,8 @@
# Chart Tests # Chart Tests
A chart contains a number of Kubernetes resources and components that work together. As a chart author, you may want to write some tests that validate that your charts works as expected when it is installed. These tests also help the chart consumer understand what your chart is supposed to do. A chart contains a number of Kubernetes resources and components that work together. As a chart author, you may want to write some tests that validate that your chart works as expected when it is installed. These tests also help the chart consumer understand what your chart is supposed to do.
A **test** in a helm chart lives under the `templates/` directory and is a pod definition that specifies a container with a given command to run. The container should exist successfully (exit 0) for a test to be considered a success. The pod definiton must contain one of the helm test hook annotations: `helm.sh/hooks: test-success` or `helm.sh/hooks: test-failure`. A **test** in a helm chart lives under the `templates/` directory and is a pod definition that specifies a container with a given command to run. The container should exit successfully (exit 0) for a test to be considered a success. The pod definiton must contain one of the helm test hook annotations: `helm.sh/hooks: test-success` or `helm.sh/hooks: test-failure`.
Example tests: Example tests:
- Validate that your configuration from the values.yaml file was properly injected. - Validate that your configuration from the values.yaml file was properly injected.
@ -17,12 +17,12 @@ You can run the pre-defined tests in Helm on a release using the command `helm t
In Helm, there are two test hooks: `test-success` and `test-failure` In Helm, there are two test hooks: `test-success` and `test-failure`
`test-success` indiciates that test pod should complete successfully. In other words, the containers in the pod should exit 0. `test-success` indicates that test pod should complete successfully. In other words, the containers in the pod should exit 0.
`test-failure` is a way to assert that a test pod should not complete successfully. If the containers in the pod do not exit 0, that indiciates success. `test-failure` is a way to assert that a test pod should not complete successfully. If the containers in the pod do not exit 0, that indicates success.
## Example Test ## Example Test
Here is an example of a helm test pod definition in an example maraidb chart: Here is an example of a helm test pod definition in an example mariadb chart:
``` ```
mariadb/ mariadb/

@ -229,6 +229,38 @@ Managing charts with `requirements.yaml` is a good way to easily keep
charts updated, and also share requirements information throughout a charts updated, and also share requirements information throughout a
team. team.
#### Alias field in requirements.yaml
In addition to the other fields above, each requirements entry may contain
the optional field `alias`.
Adding an alias for a dependency chart would add another copy
of the chart as a new depdendency using alias as name of new dependency.
One can use `alias` in cases where they need multiple copies of same chart
as dependencies all independent of one another.
````
# parentchart/requirements.yaml
dependencies:
- name: subchart
repository: http://localhost:10191
version: 0.1.0
alias:
- one-more-subchart
- another-subchart
````
In the above example we will get 3 depenendencies in all for `parentchart`
```
subchart
one-more-subchart
another-subchart
```
Manual way of achieving this is copy/pasting same chart in
`charts/` directory multiple times with different name.
#### Tags and Condition fields in requirements.yaml #### Tags and Condition fields in requirements.yaml
In addition to the other fields above, each requirements entry may contain In addition to the other fields above, each requirements entry may contain
@ -687,17 +719,6 @@ parent chart.
Also, global variables of parent charts take precedence over the global variables from subcharts. Also, global variables of parent charts take precedence over the global variables from subcharts.
_Global sections are restricted to only simple key/value pairs. They do
not support nesting._
For example, the following is **illegal** and will not work:
```yaml
global:
foo: # It is illegal to nest an object inside of global.
bar: baz
```
### References ### References
When it comes to writing templates and values files, there are several When it comes to writing templates and values files, there are several

@ -174,6 +174,7 @@ Common commit types:
- feat: Add a new feature - feat: Add a new feature
- docs: Change documentation - docs: Change documentation
- test: Improve testing - test: Improve testing
- ref: refactor existing code
Common scopes: Common scopes:

@ -1,4 +1,4 @@
#Alpine: A simple Helm chart # Alpine: A simple Helm chart
Run a single pod of Alpine Linux. Run a single pod of Alpine Linux.

@ -66,4 +66,4 @@ Environment:
* [helm verify](helm_verify.md) - verify that a chart at the given path has been signed and is valid * [helm verify](helm_verify.md) - verify that a chart at the given path has been signed and is valid
* [helm version](helm_version.md) - print the client/server version information * [helm version](helm_version.md) - print the client/server version information
###### Auto generated by spf13/cobra on 16-Apr-2017 ###### Auto generated by spf13/cobra on 26-May-2017

@ -34,4 +34,4 @@ helm completion SHELL
### SEE ALSO ### SEE ALSO
* [helm](helm.md) - The Helm package manager for Kubernetes. * [helm](helm.md) - The Helm package manager for Kubernetes.
###### Auto generated by spf13/cobra on 16-Apr-2017 ###### Auto generated by spf13/cobra on 26-May-2017

@ -53,4 +53,4 @@ helm create NAME
### SEE ALSO ### SEE ALSO
* [helm](helm.md) - The Helm package manager for Kubernetes. * [helm](helm.md) - The Helm package manager for Kubernetes.
###### Auto generated by spf13/cobra on 16-Apr-2017 ###### Auto generated by spf13/cobra on 26-May-2017

@ -44,4 +44,4 @@ helm delete [flags] RELEASE_NAME [...]
### SEE ALSO ### SEE ALSO
* [helm](helm.md) - The Helm package manager for Kubernetes. * [helm](helm.md) - The Helm package manager for Kubernetes.
###### Auto generated by spf13/cobra on 16-Apr-2017 ###### Auto generated by spf13/cobra on 26-May-2017

@ -70,4 +70,4 @@ for this case.
* [helm dependency list](helm_dependency_list.md) - list the dependencies for the given chart * [helm dependency list](helm_dependency_list.md) - list the dependencies for the given chart
* [helm dependency update](helm_dependency_update.md) - update charts/ based on the contents of requirements.yaml * [helm dependency update](helm_dependency_update.md) - update charts/ based on the contents of requirements.yaml
###### Auto generated by spf13/cobra on 16-Apr-2017 ###### Auto generated by spf13/cobra on 26-May-2017

@ -40,4 +40,4 @@ helm dependency build [flags] CHART
### SEE ALSO ### SEE ALSO
* [helm dependency](helm_dependency.md) - manage a chart's dependencies * [helm dependency](helm_dependency.md) - manage a chart's dependencies
###### Auto generated by spf13/cobra on 16-Apr-2017 ###### Auto generated by spf13/cobra on 26-May-2017

@ -32,4 +32,4 @@ helm dependency list [flags] CHART
### SEE ALSO ### SEE ALSO
* [helm dependency](helm_dependency.md) - manage a chart's dependencies * [helm dependency](helm_dependency.md) - manage a chart's dependencies
###### Auto generated by spf13/cobra on 16-Apr-2017 ###### Auto generated by spf13/cobra on 26-May-2017

@ -45,4 +45,4 @@ helm dependency update [flags] CHART
### SEE ALSO ### SEE ALSO
* [helm dependency](helm_dependency.md) - manage a chart's dependencies * [helm dependency](helm_dependency.md) - manage a chart's dependencies
###### Auto generated by spf13/cobra on 16-Apr-2017 ###### Auto generated by spf13/cobra on 26-May-2017

@ -30,6 +30,7 @@ helm fetch [flags] [chart URL | repo/chartname] [...]
--ca-file string verify certificates of HTTPS-enabled servers using this CA bundle --ca-file string verify certificates of HTTPS-enabled servers using this CA bundle
--cert-file string identify HTTPS client using this SSL certificate file --cert-file string identify HTTPS client using this SSL certificate file
-d, --destination string location to write the chart. If this and tardir are specified, tardir is appended to this (default ".") -d, --destination string location to write the chart. If this and tardir are specified, tardir is appended to this (default ".")
--devel use development versions, too. Equivalent to version '>0.0.0-a'. If --version is set, this is ignored.
--key-file string identify HTTPS client using this SSL key file --key-file string identify HTTPS client using this SSL key file
--keyring string keyring containing public keys (default "~/.gnupg/pubring.gpg") --keyring string keyring containing public keys (default "~/.gnupg/pubring.gpg")
--prov fetch the provenance file, but don't perform verification --prov fetch the provenance file, but don't perform verification
@ -53,4 +54,4 @@ helm fetch [flags] [chart URL | repo/chartname] [...]
### SEE ALSO ### SEE ALSO
* [helm](helm.md) - The Helm package manager for Kubernetes. * [helm](helm.md) - The Helm package manager for Kubernetes.
###### Auto generated by spf13/cobra on 24-Apr-2017 ###### Auto generated by spf13/cobra on 26-May-2017

@ -49,4 +49,4 @@ helm get [flags] RELEASE_NAME
* [helm get manifest](helm_get_manifest.md) - download the manifest for a named release * [helm get manifest](helm_get_manifest.md) - download the manifest for a named release
* [helm get values](helm_get_values.md) - download the values file for a named release * [helm get values](helm_get_values.md) - download the values file for a named release
###### Auto generated by spf13/cobra on 16-Apr-2017 ###### Auto generated by spf13/cobra on 26-May-2017

@ -34,4 +34,4 @@ helm get hooks [flags] RELEASE_NAME
### SEE ALSO ### SEE ALSO
* [helm get](helm_get.md) - download a named release * [helm get](helm_get.md) - download a named release
###### Auto generated by spf13/cobra on 16-Apr-2017 ###### Auto generated by spf13/cobra on 26-May-2017

@ -36,4 +36,4 @@ helm get manifest [flags] RELEASE_NAME
### SEE ALSO ### SEE ALSO
* [helm get](helm_get.md) - download a named release * [helm get](helm_get.md) - download a named release
###### Auto generated by spf13/cobra on 16-Apr-2017 ###### Auto generated by spf13/cobra on 26-May-2017

@ -33,4 +33,4 @@ helm get values [flags] RELEASE_NAME
### SEE ALSO ### SEE ALSO
* [helm get](helm_get.md) - download a named release * [helm get](helm_get.md) - download a named release
###### Auto generated by spf13/cobra on 16-Apr-2017 ###### Auto generated by spf13/cobra on 26-May-2017

@ -49,4 +49,4 @@ helm history [flags] RELEASE_NAME
### SEE ALSO ### SEE ALSO
* [helm](helm.md) - The Helm package manager for Kubernetes. * [helm](helm.md) - The Helm package manager for Kubernetes.
###### Auto generated by spf13/cobra on 16-Apr-2017 ###### Auto generated by spf13/cobra on 26-May-2017

@ -27,4 +27,4 @@ helm home
### SEE ALSO ### SEE ALSO
* [helm](helm.md) - The Helm package manager for Kubernetes. * [helm](helm.md) - The Helm package manager for Kubernetes.
###### Auto generated by spf13/cobra on 16-Apr-2017 ###### Auto generated by spf13/cobra on 26-May-2017

@ -63,4 +63,4 @@ helm init
### SEE ALSO ### SEE ALSO
* [helm](helm.md) - The Helm package manager for Kubernetes. * [helm](helm.md) - The Helm package manager for Kubernetes.
###### Auto generated by spf13/cobra on 1-May-2017 ###### Auto generated by spf13/cobra on 26-May-2017

@ -43,4 +43,4 @@ helm inspect [CHART]
* [helm inspect chart](helm_inspect_chart.md) - shows inspect chart * [helm inspect chart](helm_inspect_chart.md) - shows inspect chart
* [helm inspect values](helm_inspect_values.md) - shows inspect values * [helm inspect values](helm_inspect_values.md) - shows inspect values
###### Auto generated by spf13/cobra on 24-Apr-2017 ###### Auto generated by spf13/cobra on 26-May-2017

@ -39,4 +39,4 @@ helm inspect chart [CHART]
### SEE ALSO ### SEE ALSO
* [helm inspect](helm_inspect.md) - inspect a chart * [helm inspect](helm_inspect.md) - inspect a chart
###### Auto generated by spf13/cobra on 24-Apr-2017 ###### Auto generated by spf13/cobra on 26-May-2017

@ -39,4 +39,4 @@ helm inspect values [CHART]
### SEE ALSO ### SEE ALSO
* [helm inspect](helm_inspect.md) - inspect a chart * [helm inspect](helm_inspect.md) - inspect a chart
###### Auto generated by spf13/cobra on 24-Apr-2017 ###### Auto generated by spf13/cobra on 26-May-2017

@ -70,6 +70,7 @@ helm install [CHART]
``` ```
--ca-file string verify certificates of HTTPS-enabled servers using this CA bundle --ca-file string verify certificates of HTTPS-enabled servers using this CA bundle
--cert-file string identify HTTPS client using this SSL certificate file --cert-file string identify HTTPS client using this SSL certificate file
--devel use development versions, too. Equivalent to version '>0.0.0-a'. If --version is set, this is ignored.
--dry-run simulate an install --dry-run simulate an install
--key-file string identify HTTPS client using this SSL key file --key-file string identify HTTPS client using this SSL key file
--keyring string location of public keys used for verification (default "~/.gnupg/pubring.gpg") --keyring string location of public keys used for verification (default "~/.gnupg/pubring.gpg")
@ -105,4 +106,4 @@ helm install [CHART]
### SEE ALSO ### SEE ALSO
* [helm](helm.md) - The Helm package manager for Kubernetes. * [helm](helm.md) - The Helm package manager for Kubernetes.
###### Auto generated by spf13/cobra on 24-Apr-2017 ###### Auto generated by spf13/cobra on 26-May-2017

@ -37,4 +37,4 @@ helm lint [flags] PATH
### SEE ALSO ### SEE ALSO
* [helm](helm.md) - The Helm package manager for Kubernetes. * [helm](helm.md) - The Helm package manager for Kubernetes.
###### Auto generated by spf13/cobra on 16-Apr-2017 ###### Auto generated by spf13/cobra on 26-May-2017

@ -70,4 +70,4 @@ helm list [flags] [FILTER]
### SEE ALSO ### SEE ALSO
* [helm](helm.md) - The Helm package manager for Kubernetes. * [helm](helm.md) - The Helm package manager for Kubernetes.
###### Auto generated by spf13/cobra on 16-Apr-2017 ###### Auto generated by spf13/cobra on 26-May-2017

@ -44,4 +44,4 @@ helm package [flags] [CHART_PATH] [...]
### SEE ALSO ### SEE ALSO
* [helm](helm.md) - The Helm package manager for Kubernetes. * [helm](helm.md) - The Helm package manager for Kubernetes.
###### Auto generated by spf13/cobra on 16-Apr-2017 ###### Auto generated by spf13/cobra on 26-May-2017

@ -24,5 +24,6 @@ Manage client-side Helm plugins.
* [helm plugin install](helm_plugin_install.md) - install one or more Helm plugins * [helm plugin install](helm_plugin_install.md) - install one or more Helm plugins
* [helm plugin list](helm_plugin_list.md) - list installed Helm plugins * [helm plugin list](helm_plugin_list.md) - list installed Helm plugins
* [helm plugin remove](helm_plugin_remove.md) - remove one or more Helm plugins * [helm plugin remove](helm_plugin_remove.md) - remove one or more Helm plugins
* [helm plugin update](helm_plugin_update.md) - update one or more Helm plugins
###### Auto generated by spf13/cobra on 16-Apr-2017 ###### Auto generated by spf13/cobra on 26-May-2017

@ -30,4 +30,4 @@ helm plugin install [options] <path|url>...
### SEE ALSO ### SEE ALSO
* [helm plugin](helm_plugin.md) - add, list, or remove Helm plugins * [helm plugin](helm_plugin.md) - add, list, or remove Helm plugins
###### Auto generated by spf13/cobra on 16-Apr-2017 ###### Auto generated by spf13/cobra on 26-May-2017

@ -24,4 +24,4 @@ helm plugin list
### SEE ALSO ### SEE ALSO
* [helm plugin](helm_plugin.md) - add, list, or remove Helm plugins * [helm plugin](helm_plugin.md) - add, list, or remove Helm plugins
###### Auto generated by spf13/cobra on 16-Apr-2017 ###### Auto generated by spf13/cobra on 26-May-2017

@ -24,4 +24,4 @@ helm plugin remove <plugin>...
### SEE ALSO ### SEE ALSO
* [helm plugin](helm_plugin.md) - add, list, or remove Helm plugins * [helm plugin](helm_plugin.md) - add, list, or remove Helm plugins
###### Auto generated by spf13/cobra on 16-Apr-2017 ###### Auto generated by spf13/cobra on 26-May-2017

@ -0,0 +1,27 @@
## helm plugin update
update one or more Helm plugins
### Synopsis
update one or more Helm plugins
```
helm plugin update <plugin>...
```
### Options inherited from parent commands
```
--debug enable verbose output
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use
--tiller-namespace string namespace of tiller (default "kube-system")
```
### SEE ALSO
* [helm plugin](helm_plugin.md) - add, list, or remove Helm plugins
###### Auto generated by spf13/cobra on 26-May-2017

@ -31,4 +31,4 @@ Example usage:
* [helm repo remove](helm_repo_remove.md) - remove a chart repository * [helm repo remove](helm_repo_remove.md) - remove a chart repository
* [helm repo update](helm_repo_update.md) - update information on available charts in the chart repositories * [helm repo update](helm_repo_update.md) - update information on available charts in the chart repositories
###### Auto generated by spf13/cobra on 16-Apr-2017 ###### Auto generated by spf13/cobra on 26-May-2017

@ -33,4 +33,4 @@ helm repo add [flags] [NAME] [URL]
### SEE ALSO ### SEE ALSO
* [helm repo](helm_repo.md) - add, list, remove, update, and index chart repositories * [helm repo](helm_repo.md) - add, list, remove, update, and index chart repositories
###### Auto generated by spf13/cobra on 16-Apr-2017 ###### Auto generated by spf13/cobra on 26-May-2017

@ -40,4 +40,4 @@ helm repo index [flags] [DIR]
### SEE ALSO ### SEE ALSO
* [helm repo](helm_repo.md) - add, list, remove, update, and index chart repositories * [helm repo](helm_repo.md) - add, list, remove, update, and index chart repositories
###### Auto generated by spf13/cobra on 16-Apr-2017 ###### Auto generated by spf13/cobra on 26-May-2017

@ -24,4 +24,4 @@ helm repo list [flags]
### SEE ALSO ### SEE ALSO
* [helm repo](helm_repo.md) - add, list, remove, update, and index chart repositories * [helm repo](helm_repo.md) - add, list, remove, update, and index chart repositories
###### Auto generated by spf13/cobra on 16-Apr-2017 ###### Auto generated by spf13/cobra on 26-May-2017

@ -24,4 +24,4 @@ helm repo remove [flags] [NAME]
### SEE ALSO ### SEE ALSO
* [helm repo](helm_repo.md) - add, list, remove, update, and index chart repositories * [helm repo](helm_repo.md) - add, list, remove, update, and index chart repositories
###### Auto generated by spf13/cobra on 16-Apr-2017 ###### Auto generated by spf13/cobra on 26-May-2017

@ -30,4 +30,4 @@ helm repo update
### SEE ALSO ### SEE ALSO
* [helm repo](helm_repo.md) - add, list, remove, update, and index chart repositories * [helm repo](helm_repo.md) - add, list, remove, update, and index chart repositories
###### Auto generated by spf13/cobra on 16-Apr-2017 ###### Auto generated by spf13/cobra on 26-May-2017

@ -18,7 +18,7 @@ helm reset
### Options ### Options
``` ```
-f, --force forces Tiller uninstall even if there are releases installed -f, --force forces Tiller uninstall even if there are releases installed, or if tiller is not in ready state
--remove-helm-home if set deletes $HELM_HOME --remove-helm-home if set deletes $HELM_HOME
--tls enable TLS for request --tls enable TLS for request
--tls-ca-cert string path to TLS CA certificate file (default "$HELM_HOME/ca.pem") --tls-ca-cert string path to TLS CA certificate file (default "$HELM_HOME/ca.pem")
@ -40,4 +40,4 @@ helm reset
### SEE ALSO ### SEE ALSO
* [helm](helm.md) - The Helm package manager for Kubernetes. * [helm](helm.md) - The Helm package manager for Kubernetes.
###### Auto generated by spf13/cobra on 16-Apr-2017 ###### Auto generated by spf13/cobra on 26-May-2017

@ -21,6 +21,7 @@ helm rollback [flags] [RELEASE] [REVISION]
``` ```
--dry-run simulate a rollback --dry-run simulate a rollback
--force force resource update through delete/recreate if needed
--no-hooks prevent hooks from running during rollback --no-hooks prevent hooks from running during rollback
--recreate-pods performs pods restart for the resource if applicable --recreate-pods performs pods restart for the resource if applicable
--timeout int time in seconds to wait for any individual kubernetes operation (like Jobs for hooks) (default 300) --timeout int time in seconds to wait for any individual kubernetes operation (like Jobs for hooks) (default 300)
@ -45,4 +46,4 @@ helm rollback [flags] [RELEASE] [REVISION]
### SEE ALSO ### SEE ALSO
* [helm](helm.md) - The Helm package manager for Kubernetes. * [helm](helm.md) - The Helm package manager for Kubernetes.
###### Auto generated by spf13/cobra on 16-Apr-2017 ###### Auto generated by spf13/cobra on 26-May-2017

@ -37,4 +37,4 @@ helm search [keyword]
### SEE ALSO ### SEE ALSO
* [helm](helm.md) - The Helm package manager for Kubernetes. * [helm](helm.md) - The Helm package manager for Kubernetes.
###### Auto generated by spf13/cobra on 18-Apr-2017 ###### Auto generated by spf13/cobra on 26-May-2017

@ -28,7 +28,7 @@ helm serve
``` ```
--address string address to listen on (default "127.0.0.1:8879") --address string address to listen on (default "127.0.0.1:8879")
--repo-path string local directory path from which to serve charts (default "~/.helm/repository/local") --repo-path string local directory path from which to serve charts
--url string external URL of chart repository --url string external URL of chart repository
``` ```
@ -45,4 +45,4 @@ helm serve
### SEE ALSO ### SEE ALSO
* [helm](helm.md) - The Helm package manager for Kubernetes. * [helm](helm.md) - The Helm package manager for Kubernetes.
###### Auto generated by spf13/cobra on 16-Apr-2017 ###### Auto generated by spf13/cobra on 26-May-2017

@ -44,4 +44,4 @@ helm status [flags] RELEASE_NAME
### SEE ALSO ### SEE ALSO
* [helm](helm.md) - The Helm package manager for Kubernetes. * [helm](helm.md) - The Helm package manager for Kubernetes.
###### Auto generated by spf13/cobra on 16-Apr-2017 ###### Auto generated by spf13/cobra on 26-May-2017

@ -41,4 +41,4 @@ helm test [RELEASE]
### SEE ALSO ### SEE ALSO
* [helm](helm.md) - The Helm package manager for Kubernetes. * [helm](helm.md) - The Helm package manager for Kubernetes.
###### Auto generated by spf13/cobra on 16-Apr-2017 ###### Auto generated by spf13/cobra on 26-May-2017

@ -38,7 +38,9 @@ helm upgrade [RELEASE] [CHART]
``` ```
--ca-file string verify certificates of HTTPS-enabled servers using this CA bundle --ca-file string verify certificates of HTTPS-enabled servers using this CA bundle
--cert-file string identify HTTPS client using this SSL certificate file --cert-file string identify HTTPS client using this SSL certificate file
--devel use development versions, too. Equivalent to version '>0.0.0-a'. If --version is set, this is ignored.
--dry-run simulate an upgrade --dry-run simulate an upgrade
--force force resource update through delete/recreate if needed
-i, --install if a release by this name doesn't already exist, run an install -i, --install if a release by this name doesn't already exist, run an install
--key-file string identify HTTPS client using this SSL key file --key-file string identify HTTPS client using this SSL key file
--keyring string path to the keyring that contains public signing keys (default "~/.gnupg/pubring.gpg") --keyring string path to the keyring that contains public signing keys (default "~/.gnupg/pubring.gpg")
@ -74,4 +76,4 @@ helm upgrade [RELEASE] [CHART]
### SEE ALSO ### SEE ALSO
* [helm](helm.md) - The Helm package manager for Kubernetes. * [helm](helm.md) - The Helm package manager for Kubernetes.
###### Auto generated by spf13/cobra on 24-Apr-2017 ###### Auto generated by spf13/cobra on 26-May-2017

@ -39,4 +39,4 @@ helm verify [flags] PATH
### SEE ALSO ### SEE ALSO
* [helm](helm.md) - The Helm package manager for Kubernetes. * [helm](helm.md) - The Helm package manager for Kubernetes.
###### Auto generated by spf13/cobra on 16-Apr-2017 ###### Auto generated by spf13/cobra on 26-May-2017

@ -53,4 +53,4 @@ helm version
### SEE ALSO ### SEE ALSO
* [helm](helm.md) - The Helm package manager for Kubernetes. * [helm](helm.md) - The Helm package manager for Kubernetes.
###### Auto generated by spf13/cobra on 16-Apr-2017 ###### Auto generated by spf13/cobra on 26-May-2017

@ -1,4 +1,4 @@
.TH "HELM" "1" "Apr 2017" "Auto generated by spf13/cobra" "" .TH "HELM" "1" "May 2017" "Auto generated by spf13/cobra" ""
.nh .nh
.ad l .ad l
@ -63,7 +63,7 @@ Environment:
location of your Helm config. Overrides $HELM\_HOME location of your Helm config. Overrides $HELM\_HOME
.PP .PP
\fB\-\-host\fP="" \fB\-\-host\fP="localhost:44134"
address of tiller. Overrides $HELM\_HOST address of tiller. Overrides $HELM\_HOST
.PP .PP
@ -82,4 +82,4 @@ Environment:
.SH HISTORY .SH HISTORY
.PP .PP
16\-Apr\-2017 Auto generated by spf13/cobra 19\-May\-2017 Auto generated by spf13/cobra

@ -1,4 +1,4 @@
.TH "HELM" "1" "Apr 2017" "Auto generated by spf13/cobra" "" .TH "HELM" "1" "May 2017" "Auto generated by spf13/cobra" ""
.nh .nh
.ad l .ad l
@ -52,7 +52,7 @@ $ source <(helm completion bash)
location of your Helm config. Overrides $HELM\_HOME location of your Helm config. Overrides $HELM\_HOME
.PP .PP
\fB\-\-host\fP="" \fB\-\-host\fP="localhost:44134"
address of tiller. Overrides $HELM\_HOST address of tiller. Overrides $HELM\_HOST
.PP .PP
@ -71,4 +71,4 @@ $ source <(helm completion bash)
.SH HISTORY .SH HISTORY
.PP .PP
16\-Apr\-2017 Auto generated by spf13/cobra 19\-May\-2017 Auto generated by spf13/cobra

@ -1,4 +1,4 @@
.TH "HELM" "1" "Apr 2017" "Auto generated by spf13/cobra" "" .TH "HELM" "1" "May 2017" "Auto generated by spf13/cobra" ""
.nh .nh
.ad l .ad l
@ -64,7 +64,7 @@ will be overwritten, but other files will be left alone.
location of your Helm config. Overrides $HELM\_HOME location of your Helm config. Overrides $HELM\_HOME
.PP .PP
\fB\-\-host\fP="" \fB\-\-host\fP="localhost:44134"
address of tiller. Overrides $HELM\_HOST address of tiller. Overrides $HELM\_HOST
.PP .PP
@ -83,4 +83,4 @@ will be overwritten, but other files will be left alone.
.SH HISTORY .SH HISTORY
.PP .PP
16\-Apr\-2017 Auto generated by spf13/cobra 19\-May\-2017 Auto generated by spf13/cobra

@ -1,4 +1,4 @@
.TH "HELM" "1" "Apr 2017" "Auto generated by spf13/cobra" "" .TH "HELM" "1" "May 2017" "Auto generated by spf13/cobra" ""
.nh .nh
.ad l .ad l
@ -71,7 +71,7 @@ deleting them.
location of your Helm config. Overrides $HELM\_HOME location of your Helm config. Overrides $HELM\_HOME
.PP .PP
\fB\-\-host\fP="" \fB\-\-host\fP="localhost:44134"
address of tiller. Overrides $HELM\_HOST address of tiller. Overrides $HELM\_HOST
.PP .PP
@ -90,4 +90,4 @@ deleting them.
.SH HISTORY .SH HISTORY
.PP .PP
16\-Apr\-2017 Auto generated by spf13/cobra 19\-May\-2017 Auto generated by spf13/cobra

@ -1,4 +1,4 @@
.TH "HELM" "1" "Apr 2017" "Auto generated by spf13/cobra" "" .TH "HELM" "1" "May 2017" "Auto generated by spf13/cobra" ""
.nh .nh
.ad l .ad l
@ -95,7 +95,7 @@ for this case.
location of your Helm config. Overrides $HELM\_HOME location of your Helm config. Overrides $HELM\_HOME
.PP .PP
\fB\-\-host\fP="" \fB\-\-host\fP="localhost:44134"
address of tiller. Overrides $HELM\_HOST address of tiller. Overrides $HELM\_HOST
.PP .PP
@ -114,4 +114,4 @@ for this case.
.SH HISTORY .SH HISTORY
.PP .PP
16\-Apr\-2017 Auto generated by spf13/cobra 19\-May\-2017 Auto generated by spf13/cobra

@ -1,4 +1,4 @@
.TH "HELM" "1" "Apr 2017" "Auto generated by spf13/cobra" "" .TH "HELM" "1" "May 2017" "Auto generated by spf13/cobra" ""
.nh .nh
.ad l .ad l
@ -47,7 +47,7 @@ of 'helm dependency update'.
location of your Helm config. Overrides $HELM\_HOME location of your Helm config. Overrides $HELM\_HOME
.PP .PP
\fB\-\-host\fP="" \fB\-\-host\fP="localhost:44134"
address of tiller. Overrides $HELM\_HOST address of tiller. Overrides $HELM\_HOST
.PP .PP
@ -66,4 +66,4 @@ of 'helm dependency update'.
.SH HISTORY .SH HISTORY
.PP .PP
16\-Apr\-2017 Auto generated by spf13/cobra 19\-May\-2017 Auto generated by spf13/cobra

@ -1,4 +1,4 @@
.TH "HELM" "1" "Apr 2017" "Auto generated by spf13/cobra" "" .TH "HELM" "1" "May 2017" "Auto generated by spf13/cobra" ""
.nh .nh
.ad l .ad l
@ -36,7 +36,7 @@ if it cannot find a requirements.yaml.
location of your Helm config. Overrides $HELM\_HOME location of your Helm config. Overrides $HELM\_HOME
.PP .PP
\fB\-\-host\fP="" \fB\-\-host\fP="localhost:44134"
address of tiller. Overrides $HELM\_HOST address of tiller. Overrides $HELM\_HOST
.PP .PP
@ -55,4 +55,4 @@ if it cannot find a requirements.yaml.
.SH HISTORY .SH HISTORY
.PP .PP
16\-Apr\-2017 Auto generated by spf13/cobra 19\-May\-2017 Auto generated by spf13/cobra

@ -1,4 +1,4 @@
.TH "HELM" "1" "Apr 2017" "Auto generated by spf13/cobra" "" .TH "HELM" "1" "May 2017" "Auto generated by spf13/cobra" ""
.nh .nh
.ad l .ad l
@ -56,7 +56,7 @@ in the requirements.yaml file, but (b) at the wrong version.
location of your Helm config. Overrides $HELM\_HOME location of your Helm config. Overrides $HELM\_HOME
.PP .PP
\fB\-\-host\fP="" \fB\-\-host\fP="localhost:44134"
address of tiller. Overrides $HELM\_HOST address of tiller. Overrides $HELM\_HOST
.PP .PP
@ -75,4 +75,4 @@ in the requirements.yaml file, but (b) at the wrong version.
.SH HISTORY .SH HISTORY
.PP .PP
16\-Apr\-2017 Auto generated by spf13/cobra 19\-May\-2017 Auto generated by spf13/cobra

@ -1,4 +1,4 @@
.TH "HELM" "1" "Apr 2017" "Auto generated by spf13/cobra" "" .TH "HELM" "1" "May 2017" "Auto generated by spf13/cobra" ""
.nh .nh
.ad l .ad l
@ -45,6 +45,10 @@ result in an error, and the chart will not be saved locally.
\fB\-d\fP, \fB\-\-destination\fP="." \fB\-d\fP, \fB\-\-destination\fP="."
location to write the chart. If this and tardir are specified, tardir is appended to this location to write the chart. If this and tardir are specified, tardir is appended to this
.PP
\fB\-\-devel\fP[=false]
use development versions, too. Equivalent to version '>0.0.0\-a'. If \-\-version is set, this is ignored.
.PP .PP
\fB\-\-key\-file\fP="" \fB\-\-key\-file\fP=""
identify HTTPS client using this SSL key file identify HTTPS client using this SSL key file
@ -88,7 +92,7 @@ result in an error, and the chart will not be saved locally.
location of your Helm config. Overrides $HELM\_HOME location of your Helm config. Overrides $HELM\_HOME
.PP .PP
\fB\-\-host\fP="" \fB\-\-host\fP="localhost:44134"
address of tiller. Overrides $HELM\_HOST address of tiller. Overrides $HELM\_HOST
.PP .PP
@ -107,4 +111,4 @@ result in an error, and the chart will not be saved locally.
.SH HISTORY .SH HISTORY
.PP .PP
24\-Apr\-2017 Auto generated by spf13/cobra 19\-May\-2017 Auto generated by spf13/cobra

@ -1,4 +1,4 @@
.TH "HELM" "1" "Apr 2017" "Auto generated by spf13/cobra" "" .TH "HELM" "1" "May 2017" "Auto generated by spf13/cobra" ""
.nh .nh
.ad l .ad l
@ -67,7 +67,7 @@ chart, the supplied values, and the generated manifest file.
location of your Helm config. Overrides $HELM\_HOME location of your Helm config. Overrides $HELM\_HOME
.PP .PP
\fB\-\-host\fP="" \fB\-\-host\fP="localhost:44134"
address of tiller. Overrides $HELM\_HOST address of tiller. Overrides $HELM\_HOST
.PP .PP
@ -86,4 +86,4 @@ chart, the supplied values, and the generated manifest file.
.SH HISTORY .SH HISTORY
.PP .PP
16\-Apr\-2017 Auto generated by spf13/cobra 19\-May\-2017 Auto generated by spf13/cobra

@ -1,4 +1,4 @@
.TH "HELM" "1" "Apr 2017" "Auto generated by spf13/cobra" "" .TH "HELM" "1" "May 2017" "Auto generated by spf13/cobra" ""
.nh .nh
.ad l .ad l
@ -37,7 +37,7 @@ Hooks are formatted in YAML and separated by the YAML '\-\-\-\\n' separator.
location of your Helm config. Overrides $HELM\_HOME location of your Helm config. Overrides $HELM\_HOME
.PP .PP
\fB\-\-host\fP="" \fB\-\-host\fP="localhost:44134"
address of tiller. Overrides $HELM\_HOST address of tiller. Overrides $HELM\_HOST
.PP .PP
@ -56,4 +56,4 @@ Hooks are formatted in YAML and separated by the YAML '\-\-\-\\n' separator.
.SH HISTORY .SH HISTORY
.PP .PP
16\-Apr\-2017 Auto generated by spf13/cobra 19\-May\-2017 Auto generated by spf13/cobra

@ -1,4 +1,4 @@
.TH "HELM" "1" "Apr 2017" "Auto generated by spf13/cobra" "" .TH "HELM" "1" "May 2017" "Auto generated by spf13/cobra" ""
.nh .nh
.ad l .ad l
@ -39,7 +39,7 @@ charts, those resources will also be included in the manifest.
location of your Helm config. Overrides $HELM\_HOME location of your Helm config. Overrides $HELM\_HOME
.PP .PP
\fB\-\-host\fP="" \fB\-\-host\fP="localhost:44134"
address of tiller. Overrides $HELM\_HOST address of tiller. Overrides $HELM\_HOST
.PP .PP
@ -58,4 +58,4 @@ charts, those resources will also be included in the manifest.
.SH HISTORY .SH HISTORY
.PP .PP
16\-Apr\-2017 Auto generated by spf13/cobra 19\-May\-2017 Auto generated by spf13/cobra

@ -1,4 +1,4 @@
.TH "HELM" "1" "Apr 2017" "Auto generated by spf13/cobra" "" .TH "HELM" "1" "May 2017" "Auto generated by spf13/cobra" ""
.nh .nh
.ad l .ad l
@ -38,7 +38,7 @@ This command downloads a values file for a given release.
location of your Helm config. Overrides $HELM\_HOME location of your Helm config. Overrides $HELM\_HOME
.PP .PP
\fB\-\-host\fP="" \fB\-\-host\fP="localhost:44134"
address of tiller. Overrides $HELM\_HOST address of tiller. Overrides $HELM\_HOST
.PP .PP
@ -57,4 +57,4 @@ This command downloads a values file for a given release.
.SH HISTORY .SH HISTORY
.PP .PP
16\-Apr\-2017 Auto generated by spf13/cobra 19\-May\-2017 Auto generated by spf13/cobra

@ -1,4 +1,4 @@
.TH "HELM" "1" "Apr 2017" "Auto generated by spf13/cobra" "" .TH "HELM" "1" "May 2017" "Auto generated by spf13/cobra" ""
.nh .nh
.ad l .ad l
@ -75,7 +75,7 @@ REVISION UPDATED STATUS CHART DESCRIPTIO
location of your Helm config. Overrides $HELM\_HOME location of your Helm config. Overrides $HELM\_HOME
.PP .PP
\fB\-\-host\fP="" \fB\-\-host\fP="localhost:44134"
address of tiller. Overrides $HELM\_HOST address of tiller. Overrides $HELM\_HOST
.PP .PP
@ -94,4 +94,4 @@ REVISION UPDATED STATUS CHART DESCRIPTIO
.SH HISTORY .SH HISTORY
.PP .PP
16\-Apr\-2017 Auto generated by spf13/cobra 19\-May\-2017 Auto generated by spf13/cobra

@ -1,4 +1,4 @@
.TH "HELM" "1" "Apr 2017" "Auto generated by spf13/cobra" "" .TH "HELM" "1" "May 2017" "Auto generated by spf13/cobra" ""
.nh .nh
.ad l .ad l
@ -29,7 +29,7 @@ any helm configuration files live.
location of your Helm config. Overrides $HELM\_HOME location of your Helm config. Overrides $HELM\_HOME
.PP .PP
\fB\-\-host\fP="" \fB\-\-host\fP="localhost:44134"
address of tiller. Overrides $HELM\_HOST address of tiller. Overrides $HELM\_HOST
.PP .PP
@ -48,4 +48,4 @@ any helm configuration files live.
.SH HISTORY .SH HISTORY
.PP .PP
16\-Apr\-2017 Auto generated by spf13/cobra 19\-May\-2017 Auto generated by spf13/cobra

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save