From a8db3be02b823f19179519393ae6f46df9f650e9 Mon Sep 17 00:00:00 2001 From: Igor Zibarev Date: Mon, 18 Jun 2018 15:23:29 +0300 Subject: [PATCH 001/327] ref(helm): expose Get for repository file Get method is a useful shortcut that can be used by other apps that use helm repo package. --- pkg/repo/repo.go | 14 +++++++++---- pkg/repo/repo_test.go | 47 +++++++++++++++++++++++++++++++++++++++---- 2 files changed, 53 insertions(+), 8 deletions(-) diff --git a/pkg/repo/repo.go b/pkg/repo/repo.go index 194eace79..dfe2d9ed2 100644 --- a/pkg/repo/repo.go +++ b/pkg/repo/repo.go @@ -116,12 +116,18 @@ func (r *RepoFile) Update(re ...*Entry) { // Has returns true if the given name is already a repository name. func (r *RepoFile) Has(name string) bool { - for _, rf := range r.Repositories { - if rf.Name == name { - return true + _, ok := r.Get(name) + return ok +} + +// Get returns entry by the given name if it exists. +func (r *RepoFile) Get(name string) (*Entry, bool) { + for _, entry := range r.Repositories { + if entry.Name == name { + return entry, true } } - return false + return nil, false } // Remove removes the entry from the list of repositories. diff --git a/pkg/repo/repo_test.go b/pkg/repo/repo_test.go index 4b5bcdbf5..a7716102e 100644 --- a/pkg/repo/repo_test.go +++ b/pkg/repo/repo_test.go @@ -16,10 +16,12 @@ limitations under the License. package repo -import "testing" -import "io/ioutil" -import "os" -import "strings" +import ( + "io/ioutil" + "os" + "strings" + "testing" +) const testRepositoriesFile = "testdata/repositories.yaml" @@ -120,6 +122,43 @@ func TestNewPreV1RepositoriesFile(t *testing.T) { } } +func TestRepoFile_Get(t *testing.T) { + repo := NewRepoFile() + repo.Add( + &Entry{ + Name: "first", + URL: "https://example.com/first", + Cache: "first-index.yaml", + }, + &Entry{ + Name: "second", + URL: "https://example.com/second", + Cache: "second-index.yaml", + }, + &Entry{ + Name: "third", + URL: "https://example.com/third", + Cache: "third-index.yaml", + }, + &Entry{ + Name: "fourth", + URL: "https://example.com/fourth", + Cache: "fourth-index.yaml", + }, + ) + + name := "second" + + entry, ok := repo.Get(name) + if !ok { + t.Fatalf("Expected repo entry %q to be found", name) + } + + if entry.URL != "https://example.com/second" { + t.Fatalf("Expected repo URL to be %q but got %q", "https://example.com/second", entry.URL) + } +} + func TestRemoveRepository(t *testing.T) { sampleRepository := NewRepoFile() sampleRepository.Add( From bc817a1914fb7fd70ee3dfb2c40c2d8f61d1fd18 Mon Sep 17 00:00:00 2001 From: Matthew Fisher Date: Mon, 14 May 2018 11:44:49 -0700 Subject: [PATCH 002/327] replace with a link to the latest releases page This removes a step required every time we release Helm, making it simpler to cut a new release. Signed-off-by: jgleonard --- README.md | 7 +------ docs/release_checklist.md | 25 ------------------------- 2 files changed, 1 insertion(+), 31 deletions(-) diff --git a/README.md b/README.md index fb2e16bce..fc091056e 100644 --- a/README.md +++ b/README.md @@ -32,12 +32,7 @@ Think of it like apt/yum/homebrew for Kubernetes. ## Install -Binary downloads of the Helm client can be found at the following links: - -- [OSX](https://kubernetes-helm.storage.googleapis.com/helm-v2.8.2-darwin-amd64.tar.gz) -- [Linux](https://kubernetes-helm.storage.googleapis.com/helm-v2.8.2-linux-amd64.tar.gz) -- [Linux 32-bit](https://kubernetes-helm.storage.googleapis.com/helm-v2.8.2-linux-386.tar.gz) -- [Windows](https://kubernetes-helm.storage.googleapis.com/helm-v2.8.2-windows-amd64.tar.gz) +Binary downloads of the Helm client can be found on [the latest Releases page](https://github.com/kubernetes/helm/releases/latest). Unpack the `helm` binary and add it to your PATH and you are good to go! diff --git a/docs/release_checklist.md b/docs/release_checklist.md index 26506985c..d678e7748 100644 --- a/docs/release_checklist.md +++ b/docs/release_checklist.md @@ -94,31 +94,6 @@ index 2109a0a..6f5a1a4 100644 BuildMetadata = "unreleased" ``` -The README stores links to the latest release for helm. We want to change the version to the first release candidate which we are releasing (more on that in step 5). - -```shell -$ git diff README.md -diff --git a/README.md b/README.md -index 022afd79..547839e2 100644 ---- a/README.md -+++ b/README.md -@@ -34,10 +34,10 @@ Think of it like apt/yum/homebrew for Kubernetes. - - Binary downloads of the Helm client can be found at the following links: - --- [OSX](https://kubernetes-helm.storage.googleapis.com/helm-v2.7.0-darwin-amd64.tar.gz) --- [Linux](https://kubernetes-helm.storage.googleapis.com/helm-v2.7.0-linux-amd64.tar.gz) --- [Linux 32-bit](https://kubernetes-helm.storage.googleapis.com/helm-v2.7.0-linux-386.tar.gz) --- [Windows](https://kubernetes-helm.storage.googleapis.com/helm-v2.7.0-windows-amd64.tar.gz) -+- [OSX](https://kubernetes-helm.storage.googleapis.com/helm-v2.8.0-darwin-amd64.tar.gz) -+- [Linux](https://kubernetes-helm.storage.googleapis.com/helm-v2.8.0-linux-amd64.tar.gz) -+- [Linux 32-bit](https://kubernetes-helm.storage.googleapis.com/helm-v2.8.0-linux-386.tar.gz) -+- [Windows](https://kubernetes-helm.storage.googleapis.com/helm-v2.8.0-windows-amd64.tar.gz) - - 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`. -``` - For patch releases, the old version number will be the latest patch release, so just bump the patch number, incrementing Z by one. ```shell From 61156e66565aaf5903efabcc5710846989a20f84 Mon Sep 17 00:00:00 2001 From: Rajat Jindal Date: Sat, 12 May 2018 17:37:09 -0700 Subject: [PATCH 003/327] fix lint warning Signed-off-by: jgleonard --- pkg/downloader/manager.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pkg/downloader/manager.go b/pkg/downloader/manager.go index 89a839b54..9ee1f6f6d 100644 --- a/pkg/downloader/manager.go +++ b/pkg/downloader/manager.go @@ -99,11 +99,7 @@ func (m *Manager) Build() error { } // Now we need to fetch every package here into charts/ - if err := m.downloadAll(lock.Dependencies); err != nil { - return err - } - - return nil + return m.downloadAll(lock.Dependencies) } // Update updates a local charts directory. From 21cce62d53b7a4f2431455bf70312830b994b429 Mon Sep 17 00:00:00 2001 From: AdamDang Date: Thu, 17 May 2018 00:05:06 +0800 Subject: [PATCH 004/327] Update capabilities.go Signed-off-by: jgleonard --- pkg/chartutil/capabilities.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/chartutil/capabilities.go b/pkg/chartutil/capabilities.go index c87c0368e..d26aa1707 100644 --- a/pkg/chartutil/capabilities.go +++ b/pkg/chartutil/capabilities.go @@ -42,7 +42,7 @@ var ( type Capabilities struct { // List of all supported API versions APIVersions VersionSet - // KubeVerison is the Kubernetes version + // KubeVersion is the Kubernetes version KubeVersion *version.Info // TillerVersion is the Tiller version // From ab9349c425ab232992121b1d4a1c547dfdb0294b Mon Sep 17 00:00:00 2001 From: jgleonard Date: Thu, 1 Nov 2018 14:56:46 -0400 Subject: [PATCH 005/327] add child NOTES.txt rendering Signed-off-by: jgleonard --- pkg/tiller/release_install_test.go | 4 ++-- pkg/tiller/release_server.go | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pkg/tiller/release_install_test.go b/pkg/tiller/release_install_test.go index a244e4b72..73976571e 100644 --- a/pkg/tiller/release_install_test.go +++ b/pkg/tiller/release_install_test.go @@ -291,8 +291,8 @@ func TestInstallRelease_WithChartAndDependencyNotes(t *testing.T) { t.Logf("rel: %v", rel) - if rel.Info.Status.Notes != notesText { - t.Fatalf("Expected '%s', got '%s'", notesText, rel.Info.Status.Notes) + if !strings.Contains(rel.Info.Status.Notes, notesText) || !strings.Contains(rel.Info.Status.Notes, notesText+" child") { + t.Fatalf("Expected '%s', got '%s'", notesText+"\n"+notesText+" child", rel.Info.Status.Notes) } if rel.Info.Description != "Install complete" { diff --git a/pkg/tiller/release_server.go b/pkg/tiller/release_server.go index 1a2b3c4da..e223d9f32 100644 --- a/pkg/tiller/release_server.go +++ b/pkg/tiller/release_server.go @@ -20,7 +20,6 @@ import ( "bytes" "errors" "fmt" - "path" "regexp" "strings" @@ -289,17 +288,18 @@ func (s *ReleaseServer) renderResources(ch *chart.Chart, values chartutil.Values // text file. We have to spin through this map because the file contains path information, so we // look for terminating NOTES.txt. We also remove it from the files so that we don't have to skip // it in the sortHooks. - notes := "" + var notesBuffer bytes.Buffer for k, v := range files { if strings.HasSuffix(k, notesFileSuffix) { - // Only apply the notes if it belongs to the parent chart - // Note: Do not use filePath.Join since it creates a path with \ which is not expected - if k == path.Join(ch.Metadata.Name, "templates", notesFileSuffix) { - notes = v + // If buffer contains data, add newline before adding more + if notesBuffer.Len() > 0 { + notesBuffer.WriteString("\n") } + notesBuffer.WriteString(v) delete(files, k) } } + notes := notesBuffer.String() // Sort hooks, manifests, and partials. Only hooks and manifests are returned, // as partials are not used after renderer.Render. Empty manifests are also From 1518f961af426bfb4ce8f4ef515c4d90b1a475fb Mon Sep 17 00:00:00 2001 From: jgleonard Date: Thu, 1 Nov 2018 14:57:01 -0400 Subject: [PATCH 006/327] fix(helm): add --render-subchart-notes flag to 'helm install' and 'helm upgrade' When 'helm --render-subchart-notes ...' is run, this will include the notes from the subchart when rendered via Tiller. Closes #2751 Signed-off-by: jgleonard --- _proto/hapi/services/tiller.proto | 4 + cmd/helm/install.go | 3 + cmd/helm/upgrade.go | 3 + pkg/helm/client.go | 2 + pkg/helm/option.go | 16 +++ pkg/proto/hapi/services/tiller.pb.go | 176 +++++++++++++++------------ pkg/tiller/release_install.go | 2 +- pkg/tiller/release_install_test.go | 35 +++++- pkg/tiller/release_server.go | 15 ++- pkg/tiller/release_server_test.go | 6 + pkg/tiller/release_update.go | 2 +- pkg/urlutil/urlutil_test.go | 4 +- 12 files changed, 179 insertions(+), 89 deletions(-) diff --git a/_proto/hapi/services/tiller.proto b/_proto/hapi/services/tiller.proto index 8daef0cb3..e54f60581 100644 --- a/_proto/hapi/services/tiller.proto +++ b/_proto/hapi/services/tiller.proto @@ -209,6 +209,8 @@ message UpdateReleaseRequest { bool reuse_values = 10; // Force resource update through delete/recreate if needed. bool force = 11; + // Render subchart notes if enabled + bool subNotes = 12; } // UpdateReleaseResponse is the response to an update request. @@ -273,6 +275,8 @@ message InstallReleaseRequest { bool wait = 9; bool disable_crd_hook = 10; + + bool subNotes = 11; } // InstallReleaseResponse is the response from a release installation. diff --git a/cmd/helm/install.go b/cmd/helm/install.go index d1c24c213..bffb96746 100644 --- a/cmd/helm/install.go +++ b/cmd/helm/install.go @@ -129,6 +129,7 @@ type installCmd struct { password string devel bool depUp bool + subNotes bool certFile string keyFile string @@ -209,6 +210,7 @@ func newInstallCmd(c helm.Interface, out io.Writer) *cobra.Command { 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-0'. If --version is set, this is ignored.") f.BoolVar(&inst.depUp, "dep-up", false, "run helm dependency update before installing the chart") + f.BoolVar(&inst.subNotes, "render-subchart-notes", false, "render subchart notes along with the parent") return cmd } @@ -276,6 +278,7 @@ func (i *installCmd) run() error { helm.InstallReuseName(i.replace), helm.InstallDisableHooks(i.disableHooks), helm.InstallDisableCRDHook(i.disableCRDHook), + helm.InstallSubNotes(i.subNotes), helm.InstallTimeout(i.timeout), helm.InstallWait(i.wait)) if err != nil { diff --git a/cmd/helm/upgrade.go b/cmd/helm/upgrade.go index 4dd433a39..41a4d7d5c 100644 --- a/cmd/helm/upgrade.go +++ b/cmd/helm/upgrade.go @@ -78,6 +78,7 @@ type upgradeCmd struct { username string password string devel bool + subNotes bool certFile string keyFile string @@ -139,6 +140,7 @@ func newUpgradeCmd(client helm.Interface, out io.Writer) *cobra.Command { 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.BoolVar(&upgrade.devel, "devel", false, "use development versions, too. Equivalent to version '>0.0.0-0'. If --version is set, this is ignored.") + f.BoolVar(&upgrade.subNotes, "render-subchart-notes", false, "render subchart notes along with parent") f.MarkDeprecated("disable-hooks", "use --no-hooks instead") @@ -224,6 +226,7 @@ func (u *upgradeCmd) run() error { helm.UpgradeTimeout(u.timeout), helm.ResetValues(u.resetValues), helm.ReuseValues(u.reuseValues), + helm.UpgradeSubNotes(u.subNotes), helm.UpgradeWait(u.wait)) if err != nil { return fmt.Errorf("UPGRADE FAILED: %v", prettyError(err)) diff --git a/pkg/helm/client.go b/pkg/helm/client.go index 465ca0af8..3d246086f 100644 --- a/pkg/helm/client.go +++ b/pkg/helm/client.go @@ -95,6 +95,7 @@ func (h *Client) InstallReleaseFromChart(chart *chart.Chart, ns string, opts ... req := &reqOpts.instReq req.Chart = chart req.Namespace = ns + req.SubNotes = reqOpts.subNotes req.DryRun = reqOpts.dryRun req.DisableHooks = reqOpts.disableHooks req.DisableCrdHook = reqOpts.disableCRDHook @@ -171,6 +172,7 @@ func (h *Client) UpdateReleaseFromChart(rlsName string, chart *chart.Chart, opts req.DryRun = reqOpts.dryRun req.Name = rlsName req.DisableHooks = reqOpts.disableHooks + req.SubNotes = reqOpts.subNotes req.Recreate = reqOpts.recreate req.Force = reqOpts.force req.ResetValues = reqOpts.resetValues diff --git a/pkg/helm/option.go b/pkg/helm/option.go index 602e1e3a3..045d45c1d 100644 --- a/pkg/helm/option.go +++ b/pkg/helm/option.go @@ -53,6 +53,8 @@ type options struct { disableHooks bool // if set, skip CRD hook only disableCRDHook bool + // if set, render SubChart Notes + subNotes bool // name of release releaseName string // tls.Config to use for rpc if tls enabled @@ -311,6 +313,20 @@ func InstallReuseName(reuse bool) InstallOption { } } +// InstallSubNotes will (if true) instruct Tiller to render SubChart Notes +func InstallSubNotes(enable bool) InstallOption { + return func(opts *options) { + opts.subNotes = enable + } +} + +// UpgradeSubNotes will (if true) instruct Tiller to render SubChart Notes +func UpgradeSubNotes(enable bool) UpdateOption { + return func(opts *options) { + opts.subNotes = enable + } +} + // RollbackDisableHooks will disable hooks for a rollback operation func RollbackDisableHooks(disable bool) RollbackOption { return func(opts *options) { diff --git a/pkg/proto/hapi/services/tiller.pb.go b/pkg/proto/hapi/services/tiller.pb.go index 4d23bcdad..43c8ddcce 100644 --- a/pkg/proto/hapi/services/tiller.pb.go +++ b/pkg/proto/hapi/services/tiller.pb.go @@ -376,6 +376,8 @@ type UpdateReleaseRequest struct { ReuseValues bool `protobuf:"varint,10,opt,name=reuse_values,json=reuseValues" json:"reuse_values,omitempty"` // Force resource update through delete/recreate if needed. Force bool `protobuf:"varint,11,opt,name=force" json:"force,omitempty"` + // Render subchart notes if enabled + SubNotes bool `protobuf:"varint,12,opt,name=subNotes" json:"subNotes,omitempty"` } func (m *UpdateReleaseRequest) Reset() { *m = UpdateReleaseRequest{} } @@ -460,6 +462,13 @@ func (m *UpdateReleaseRequest) GetForce() bool { return false } +func (m *UpdateReleaseRequest) GetSubNotes() bool { + if m != nil { + return m.SubNotes + } + return false +} + // UpdateReleaseResponse is the response to an update request. type UpdateReleaseResponse struct { Release *hapi_release5.Release `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` @@ -601,6 +610,7 @@ type InstallReleaseRequest struct { // before marking the release as successful. It will wait for as long as timeout Wait bool `protobuf:"varint,9,opt,name=wait" json:"wait,omitempty"` DisableCrdHook bool `protobuf:"varint,10,opt,name=disable_crd_hook,json=disableCrdHook" json:"disable_crd_hook,omitempty"` + SubNotes bool `protobuf:"varint,11,opt,name=subNotes" json:"subNotes,omitempty"` } func (m *InstallReleaseRequest) Reset() { *m = InstallReleaseRequest{} } @@ -678,6 +688,13 @@ func (m *InstallReleaseRequest) GetDisableCrdHook() bool { return false } +func (m *InstallReleaseRequest) GetSubNotes() bool { + if m != nil { + return m.SubNotes + } + return false +} + // InstallReleaseResponse is the response from a release installation. type InstallReleaseResponse struct { Release *hapi_release5.Release `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` @@ -1376,83 +1393,84 @@ var _ReleaseService_serviceDesc = grpc.ServiceDesc{ func init() { proto.RegisterFile("hapi/services/tiller.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 1235 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xdd, 0x6e,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 0x6d, 0xbd, 0x49, 0xa1, 0x1c, 0x05, 0x99, 0xef, 0x83, 0xf5, 0x71, - 0x31, 0xe6, 0xc4, 0x1c, 0x81, 0xce, 0x6a, 0x0f, 0xc9, 0xcb, 0x63, 0x4e, 0xbf, 0xcb, 0xcb, 0x63, - 0x5e, 0x6b, 0xb2, 0xd7, 0x90, 0x0b, 0x70, 0xdd, 0x42, 0xd0, 0xe3, 0xdc, 0x84, 0xe8, 0x9d, 0xc7, - 0xea, 0xdd, 0xcd, 0x98, 0x98, 0x58, 0xc2, 0xff, 0x56, 0x5e, 0x63, 0x94, 0x03, 0x4d, 0xf6, 0x68, - 0x62, 0x3d, 0x2b, 0xc8, 0xbd, 0x12, 0x94, 0xec, 0x4a, 0xb7, 0x04, 0xa5, 0xb7, 0xbc, 0x5b, 0x82, - 0x5a, 0x69, 0x70, 0xf6, 0x1a, 0xf2, 0xa0, 0xed, 0xc4, 0x81, 0x34, 0xcd, 0xda, 0x02, 0xca, 0x91, - 0xbe, 0xd9, 0xd5, 0xac, 0x27, 0x05, 0x38, 0xaf, 0xef, 0xf7, 0x73, 0xf8, 0xbe, 0xa1, 0x58, 0xcf, - 0x6a, 0xfc, 0xdf, 0xef, 0x67, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x5d, 0xc3, 0xd5, 0x55, 0xeb, - 0x0f, 0x00, 0x00, + // 1257 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xdf, 0x6f, 0xe3, 0xc4, + 0x13, 0xaf, 0xf3, 0x3b, 0x93, 0x36, 0xdf, 0x74, 0x9b, 0xb6, 0xae, 0xbf, 0x07, 0x2a, 0x46, 0x70, + 0xb9, 0x83, 0x4b, 0x21, 0xf0, 0x82, 0x84, 0x90, 0x7a, 0xb9, 0xa8, 0x2d, 0x94, 0x9c, 0xe4, 0x5c, + 0x0f, 0x09, 0x01, 0x91, 0x9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0xec, 0x8e, 0x40, 0x27, 0x5d, 0x43, 0xf2, 0x78, + 0xcc, 0xa9, 0x77, 0x79, 0x3c, 0xe6, 0x95, 0x26, 0x73, 0x0d, 0xd9, 0x00, 0x37, 0x25, 0x04, 0x3d, + 0xce, 0x25, 0x44, 0xad, 0x3c, 0x46, 0xef, 0x7e, 0xc5, 0xd8, 0xc5, 0x0a, 0xfe, 0x97, 0x7a, 0xa9, + 0x51, 0x0e, 0x34, 0xd9, 0x6d, 0x8b, 0xf1, 0xac, 0xa0, 0x76, 0xea, 0x50, 0xa2, 0x2a, 0xdd, 0x71, + 0x28, 0xb5, 0xe4, 0xdd, 0x71, 0xa8, 0x54, 0x81, 0x33, 0xd7, 0x90, 0x03, 0x6d, 0x2b, 0xf4, 0x84, + 0xeb, 0xa8, 0x2c, 0xa0, 0x9c, 0xdd, 0xb7, 0xab, 0x9a, 0xf1, 0xa4, 0x80, 0xe6, 0xcd, 0xfd, 0x7e, + 0x0e, 0xdf, 0x37, 0xa4, 0xea, 0x79, 0x8d, 0xfd, 0x6b, 0xfe, 0xec, 0xdf, 0x00, 0x00, 0x00, 0xff, + 0xff, 0xbd, 0x2a, 0xa3, 0x1f, 0x23, 0x10, 0x00, 0x00, } diff --git a/pkg/tiller/release_install.go b/pkg/tiller/release_install.go index 0b8f4da5b..d7781c0d9 100644 --- a/pkg/tiller/release_install.go +++ b/pkg/tiller/release_install.go @@ -84,7 +84,7 @@ func (s *ReleaseServer) prepareRelease(req *services.InstallReleaseRequest) (*re return nil, err } - hooks, manifestDoc, notesTxt, err := s.renderResources(req.Chart, valuesToRender, caps.APIVersions) + hooks, manifestDoc, notesTxt, err := s.renderResources(req.Chart, valuesToRender, req.SubNotes, caps.APIVersions) if err != nil { // Return a release with partial data so that client can show debugging // information. diff --git a/pkg/tiller/release_install_test.go b/pkg/tiller/release_install_test.go index 73976571e..1d1b08e90 100644 --- a/pkg/tiller/release_install_test.go +++ b/pkg/tiller/release_install_test.go @@ -268,7 +268,7 @@ func TestInstallRelease_WrongTillerVersion(t *testing.T) { } } -func TestInstallRelease_WithChartAndDependencyNotes(t *testing.T) { +func TestInstallRelease_WithChartAndDependencyParentNotes(t *testing.T) { c := helm.NewContext() rs := rsFixture() @@ -291,6 +291,39 @@ func TestInstallRelease_WithChartAndDependencyNotes(t *testing.T) { t.Logf("rel: %v", rel) + if rel.Info.Status.Notes != notesText { + t.Fatalf("Expected '%s', got '%s'", notesText, rel.Info.Status.Notes) + } + + if rel.Info.Description != "Install complete" { + t.Errorf("unexpected description: %s", rel.Info.Description) + } +} + +func TestInstallRelease_WithChartAndDependencyAllNotes(t *testing.T) { + c := helm.NewContext() + rs := rsFixture() + + req := installRequest(withSubNotes(), + withChart( + withNotes(notesText), + withDependency(withNotes(notesText+" child")), + )) + res, err := rs.InstallRelease(c, req) + if err != nil { + t.Fatalf("Failed install: %s", err) + } + if res.Release.Name == "" { + t.Errorf("Expected release name.") + } + + rel, err := rs.env.Releases.Get(res.Release.Name, res.Release.Version) + if err != nil { + t.Errorf("Expected release for %s (%v).", res.Release.Name, rs.env.Releases) + } + + t.Logf("rel: %v", rel) + if !strings.Contains(rel.Info.Status.Notes, notesText) || !strings.Contains(rel.Info.Status.Notes, notesText+" child") { t.Fatalf("Expected '%s', got '%s'", notesText+"\n"+notesText+" child", rel.Info.Status.Notes) } diff --git a/pkg/tiller/release_server.go b/pkg/tiller/release_server.go index e223d9f32..29379d374 100644 --- a/pkg/tiller/release_server.go +++ b/pkg/tiller/release_server.go @@ -20,6 +20,7 @@ import ( "bytes" "errors" "fmt" + "path" "regexp" "strings" @@ -259,7 +260,7 @@ func GetVersionSet(client discovery.ServerGroupsInterface) (chartutil.VersionSet return chartutil.NewVersionSet(versions...), nil } -func (s *ReleaseServer) renderResources(ch *chart.Chart, values chartutil.Values, vs chartutil.VersionSet) ([]*release.Hook, *bytes.Buffer, string, error) { +func (s *ReleaseServer) renderResources(ch *chart.Chart, values chartutil.Values, subNotes bool, vs chartutil.VersionSet) ([]*release.Hook, *bytes.Buffer, string, error) { // Guard to make sure Tiller is at the right version to handle this chart. sver := version.GetVersion() if ch.Metadata.TillerVersion != "" && @@ -291,14 +292,18 @@ func (s *ReleaseServer) renderResources(ch *chart.Chart, values chartutil.Values var notesBuffer bytes.Buffer for k, v := range files { if strings.HasSuffix(k, notesFileSuffix) { - // If buffer contains data, add newline before adding more - if notesBuffer.Len() > 0 { - notesBuffer.WriteString("\n") + if subNotes || (k == path.Join(ch.Metadata.Name, "templates", notesFileSuffix)) { + + // If buffer contains data, add newline before adding more + if notesBuffer.Len() > 0 { + notesBuffer.WriteString("\n") + } + notesBuffer.WriteString(v) } - notesBuffer.WriteString(v) delete(files, k) } } + notes := notesBuffer.String() // Sort hooks, manifests, and partials. Only hooks and manifests are returned, diff --git a/pkg/tiller/release_server_test.go b/pkg/tiller/release_server_test.go index 96cb84a75..78c16e679 100644 --- a/pkg/tiller/release_server_test.go +++ b/pkg/tiller/release_server_test.go @@ -228,6 +228,12 @@ func withChart(chartOpts ...chartOption) installOption { } } +func withSubNotes() installOption { + return func(opts *installOptions) { + opts.SubNotes = true + } +} + func installRequest(opts ...installOption) *services.InstallReleaseRequest { reqOpts := &installOptions{ &services.InstallReleaseRequest{ diff --git a/pkg/tiller/release_update.go b/pkg/tiller/release_update.go index 6f5d37331..c4e4820e7 100644 --- a/pkg/tiller/release_update.go +++ b/pkg/tiller/release_update.go @@ -113,7 +113,7 @@ func (s *ReleaseServer) prepareUpdate(req *services.UpdateReleaseRequest) (*rele return nil, nil, err } - hooks, manifestDoc, notesTxt, err := s.renderResources(req.Chart, valuesToRender, caps.APIVersions) + hooks, manifestDoc, notesTxt, err := s.renderResources(req.Chart, valuesToRender, req.SubNotes, caps.APIVersions) if err != nil { return nil, nil, err } diff --git a/pkg/urlutil/urlutil_test.go b/pkg/urlutil/urlutil_test.go index f0c82c0a9..b3a142392 100644 --- a/pkg/urlutil/urlutil_test.go +++ b/pkg/urlutil/urlutil_test.go @@ -65,8 +65,8 @@ func TestEqual(t *testing.T) { func TestExtractHostname(t *testing.T) { tests := map[string]string{ - "http://example.com": "example.com", - "https://example.com/foo": "example.com", + "http://example.com": "example.com", + "https://example.com/foo": "example.com", "https://example.com:31337/not/with/a/bang/but/a/whimper": "example.com", } for start, expect := range tests { From 66e79227b2ff666ba66f48db992fc1f9c1ff464c Mon Sep 17 00:00:00 2001 From: jgleonard Date: Thu, 1 Nov 2018 15:11:38 -0400 Subject: [PATCH 007/327] make docs Signed-off-by: jgleonard --- docs/helm/helm_install.md | 3 ++- docs/helm/helm_upgrade.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/helm/helm_install.md b/docs/helm/helm_install.md index 05cdf1e4a..5406126fa 100644 --- a/docs/helm/helm_install.md +++ b/docs/helm/helm_install.md @@ -93,6 +93,7 @@ helm install [CHART] [flags] --no-crd-hook prevent CRD hooks from running, but run other hooks --no-hooks prevent hooks from running during install --password string chart repository password where to locate the requested chart + --render-subchart-notes render subchart notes along with the parent --replace re-use the given name, even if that name is already used. This is unsafe in production --repo string chart repository url where to locate the requested chart --set stringArray set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2) @@ -128,4 +129,4 @@ helm install [CHART] [flags] * [helm](helm.md) - The Helm package manager for Kubernetes. -###### Auto generated by spf13/cobra on 10-Aug-2018 +###### Auto generated by spf13/cobra on 1-Nov-2018 diff --git a/docs/helm/helm_upgrade.md b/docs/helm/helm_upgrade.md index f18bcf6a7..df5bfe6ca 100644 --- a/docs/helm/helm_upgrade.md +++ b/docs/helm/helm_upgrade.md @@ -79,6 +79,7 @@ helm upgrade [RELEASE] [CHART] [flags] --no-hooks disable pre/post upgrade hooks --password string chart repository password where to locate the requested chart --recreate-pods performs pods restart for the resource if applicable + --render-subchart-notes render subchart notes along with parent --repo string chart repository url where to locate the requested chart --reset-values when upgrading, reset the values to the ones built into the chart --reuse-values when upgrading, reuse the last release's values and merge in any overrides from the command line via --set and -f. If '--reset-values' is specified, this is ignored. @@ -115,4 +116,4 @@ helm upgrade [RELEASE] [CHART] [flags] * [helm](helm.md) - The Helm package manager for Kubernetes. -###### Auto generated by spf13/cobra on 24-Aug-2018 +###### Auto generated by spf13/cobra on 1-Nov-2018 From 7b66bc7775086cac8fc7ee66ef5af8927e91facf Mon Sep 17 00:00:00 2001 From: jgleonard Date: Thu, 1 Nov 2018 15:12:14 -0400 Subject: [PATCH 008/327] gofmt -s Signed-off-by: jgleonard --- pkg/proto/hapi/services/tiller.pb.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/proto/hapi/services/tiller.pb.go b/pkg/proto/hapi/services/tiller.pb.go index 813f15c33..e8eda8769 100644 --- a/pkg/proto/hapi/services/tiller.pb.go +++ b/pkg/proto/hapi/services/tiller.pb.go @@ -633,7 +633,7 @@ type InstallReleaseRequest struct { DisableCrdHook bool `protobuf:"varint,10,opt,name=disable_crd_hook,json=disableCrdHook" json:"disable_crd_hook,omitempty"` // Description, if set, will set the description for the installed release Description string `protobuf:"bytes,11,opt,name=description" json:"description,omitempty"` - SubNotes bool `protobuf:"varint,12,opt,name=subNotes" json:"subNotes,omitempty"` + SubNotes bool `protobuf:"varint,12,opt,name=subNotes" json:"subNotes,omitempty"` } func (m *InstallReleaseRequest) Reset() { *m = InstallReleaseRequest{} } @@ -711,7 +711,6 @@ func (m *InstallReleaseRequest) GetDisableCrdHook() bool { return false } - func (m *InstallReleaseRequest) GetSubNotes() bool { if m != nil { return m.SubNotes From b846560f4829ef725a425c43955e2c321755063a Mon Sep 17 00:00:00 2001 From: jgleonard Date: Wed, 7 Nov 2018 13:34:12 -0500 Subject: [PATCH 009/327] formatting Signed-off-by: jgleonard --- _proto/hapi/services/tiller.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_proto/hapi/services/tiller.proto b/_proto/hapi/services/tiller.proto index add468c73..1edd86025 100644 --- a/_proto/hapi/services/tiller.proto +++ b/_proto/hapi/services/tiller.proto @@ -212,7 +212,7 @@ message UpdateReleaseRequest { bool force = 11; // Description, if set, will set the description for the updated release string description = 12; - // Render subchart notes if enabled + // Render subchart notes if enabled bool subNotes = 13; } @@ -284,7 +284,7 @@ message InstallReleaseRequest { // Description, if set, will set the description for the installed release string description = 11; - bool subNotes = 12; + bool subNotes = 12; } From 9030e7ba7513b44fcdffe060c6a89c11c0f54160 Mon Sep 17 00:00:00 2001 From: jgleonard Date: Wed, 7 Nov 2018 13:35:12 -0500 Subject: [PATCH 010/327] fold subNotes into updateReq and instReq Signed-off-by: jgleonard --- pkg/helm/client.go | 2 -- pkg/helm/option.go | 6 ++---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/pkg/helm/client.go b/pkg/helm/client.go index fcd30c106..771c7f3d1 100644 --- a/pkg/helm/client.go +++ b/pkg/helm/client.go @@ -95,7 +95,6 @@ func (h *Client) InstallReleaseFromChart(chart *chart.Chart, ns string, opts ... req := &reqOpts.instReq req.Chart = chart req.Namespace = ns - req.SubNotes = reqOpts.subNotes req.DryRun = reqOpts.dryRun req.DisableHooks = reqOpts.disableHooks req.DisableCrdHook = reqOpts.disableCRDHook @@ -172,7 +171,6 @@ func (h *Client) UpdateReleaseFromChart(rlsName string, chart *chart.Chart, opts req.DryRun = reqOpts.dryRun req.Name = rlsName req.DisableHooks = reqOpts.disableHooks - req.SubNotes = reqOpts.subNotes req.Recreate = reqOpts.recreate req.Force = reqOpts.force req.ResetValues = reqOpts.resetValues diff --git a/pkg/helm/option.go b/pkg/helm/option.go index 04d394254..a34c4b8ae 100644 --- a/pkg/helm/option.go +++ b/pkg/helm/option.go @@ -54,8 +54,6 @@ type options struct { // if set, skip CRD hook only disableCRDHook bool // if set, render SubChart Notes - subNotes bool - // name of release releaseName string // tls.Config to use for rpc if tls enabled tlsConfig *tls.Config @@ -344,14 +342,14 @@ func InstallReuseName(reuse bool) InstallOption { // InstallSubNotes will (if true) instruct Tiller to render SubChart Notes func InstallSubNotes(enable bool) InstallOption { return func(opts *options) { - opts.subNotes = enable + opts.instReq.SubNotes = enable } } // UpgradeSubNotes will (if true) instruct Tiller to render SubChart Notes func UpgradeSubNotes(enable bool) UpdateOption { return func(opts *options) { - opts.subNotes = enable + opts.updateReq.SubNotes = enable } } From 89467a8bf154aa19ad41c6775dc4a4f7ce6dfc04 Mon Sep 17 00:00:00 2001 From: Alex Humphreys Date: Tue, 18 Dec 2018 15:24:33 +0100 Subject: [PATCH 011/327] Fix(helm): Use spaces in ingress template The rest of the ingress template was using spaces, just these two lines were tabs. Signed-off-by: Alex Humphreys --- pkg/chartutil/create.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/chartutil/create.go b/pkg/chartutil/create.go index 36b07adb5..8f713fcd1 100644 --- a/pkg/chartutil/create.go +++ b/pkg/chartutil/create.go @@ -158,12 +158,12 @@ spec: - host: {{ . | quote }} http: paths: - {{- range $ingressPaths }} + {{- range $ingressPaths }} - path: {{ . }} backend: serviceName: {{ $fullName }} servicePort: http - {{- end }} + {{- end }} {{- end }} {{- end }} ` From 29ab7a0a775ec7182be88a1b6daa9e65a472b46b Mon Sep 17 00:00:00 2001 From: Matthew Fisher Date: Wed, 19 Dec 2018 12:24:00 -0800 Subject: [PATCH 012/327] Revert "Fix for existing CRDs are deleted when crd-install hook is introduced (#4709)" (#5067) This reverts commit e2a0e7fa545585a29c1e9602e6320479788eb9a6. Signed-off-by: Matthew Fisher --- pkg/tiller/hooks.go | 7 ------- pkg/tiller/hooks_test.go | 33 +++++++++------------------------ 2 files changed, 9 insertions(+), 31 deletions(-) diff --git a/pkg/tiller/hooks.go b/pkg/tiller/hooks.go index 472301022..0fb7c92f8 100644 --- a/pkg/tiller/hooks.go +++ b/pkg/tiller/hooks.go @@ -174,13 +174,6 @@ func (file *manifestFile) sort(result *result) error { isUnknownHook = true break } - if e == release.Hook_CRD_INSTALL { - result.generic = append(result.generic, Manifest{ - Name: file.path, - Content: m, - Head: &entry, - }) - } h.Events = append(h.Events, e) } diff --git a/pkg/tiller/hooks_test.go b/pkg/tiller/hooks_test.go index 86c89b8f3..8bd928500 100644 --- a/pkg/tiller/hooks_test.go +++ b/pkg/tiller/hooks_test.go @@ -131,21 +131,6 @@ metadata: name: example-test annotations: "helm.sh/hook": test-success -`, - }, - { - name: []string{"ninth"}, - path: "nine", - kind: []string{"CustomResourceDefinition"}, - hooks: map[string][]release.Hook_Event{"ninth": {release.Hook_CRD_INSTALL}}, - manifest: `apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: ninth - labels: - doesnot: matter - annotations: - "helm.sh/hook": crd-install `, }, } @@ -161,22 +146,22 @@ metadata: } // This test will fail if 'six' or 'seven' was added. - // changed to account for CustomResourceDefinition with crd-install hook being added to generic list of manifests - if len(generic) != 3 { - t.Errorf("Expected 3 generic manifests, got %d", len(generic)) + if len(generic) != 2 { + t.Errorf("Expected 2 generic manifests, got %d", len(generic)) } - // changed to account for 5 hooks now that there is a crd-install hook added as member 9 of the data list. It was 4 before. - if len(hs) != 5 { - t.Errorf("Expected 5 hooks, got %d", len(hs)) + if len(hs) != 4 { + t.Errorf("Expected 4 hooks, got %d", len(hs)) } for _, out := range hs { - t.Logf("Checking name %s path %s and kind %s", out.Name, out.Path, out.Kind) found := false for _, expect := range data { if out.Path == expect.path { found = true + if out.Path != expect.path { + t.Errorf("Expected path %s, got %s", expect.path, out.Path) + } nameFound := false for _, expectedName := range expect.name { if out.Name == expectedName { @@ -224,8 +209,8 @@ metadata: name := sh.Metadata.Name - //only keep track of non-hook manifests, that are not CustomResourceDefinitions with crd-install - if err == nil && (s.hooks[name] == nil || s.hooks[name][0] == release.Hook_CRD_INSTALL) { + //only keep track of non-hook manifests + if err == nil && s.hooks[name] == nil { another := Manifest{ Content: m, Name: name, From d80a96cf77ce40283006d3b7bad0ec5400d83acd Mon Sep 17 00:00:00 2001 From: Christian Koeberl Date: Tue, 16 Oct 2018 13:41:36 +0200 Subject: [PATCH 013/327] fix(pkg/chartutil): conditions for alias and umrella charts (#3734) Enable to use charts with dependencies that have conditions (e.g. in umbrella charts). Allow aliases for dependencies that have dependencies with conditions. Closes #3734 Signed-off-by: Christian Koeberl --- docs/charts.md | 26 +++++++++++++++---- pkg/chartutil/requirements.go | 13 +++++++--- pkg/chartutil/requirements_test.go | 11 +++++++- .../subpop/charts/subchart1/requirements.yaml | 2 +- .../subpop/charts/subchart2/requirements.yaml | 2 +- .../testdata/subpop/requirements.yaml | 6 +++++ pkg/chartutil/testdata/subpop/values.yaml | 2 ++ 7 files changed, 50 insertions(+), 12 deletions(-) diff --git a/docs/charts.md b/docs/charts.md index 7bc4f0020..5870c6d64 100644 --- a/docs/charts.md +++ b/docs/charts.md @@ -258,9 +258,11 @@ All charts are loaded by default. If `tags` or `condition` fields are present, they will be evaluated and used to control loading for the chart(s) they are applied to. Condition - The condition field holds one or more YAML paths (delimited by commas). -If this path exists in the top parent's values and resolves to a boolean value, -the chart will be enabled or disabled based on that boolean value. Only the first -valid path found in the list is evaluated and if no paths exist then the condition has no effect. +If this path exists in the parent's values and resolves to a boolean value, +the chart will be enabled or disabled based on that boolean value. Only the first +valid path found in the list is evaluated and if no paths exist then the condition +has no effect. For multiple level dependencies the condition is prependend by the +path to the parent chart. Tags - The tags field is a YAML list of labels to associate with this chart. In the top parent's values, all charts with tags can be enabled or disabled by @@ -272,7 +274,7 @@ dependencies: - name: subchart1 repository: http://localhost:10191 version: 0.1.0 - condition: subchart1.enabled,global.subchart1.enabled + condition: subchart1.enabled tags: - front-end - subchart1 @@ -280,11 +282,19 @@ dependencies: - name: subchart2 repository: http://localhost:10191 version: 0.1.0 - condition: subchart2.enabled,global.subchart2.enabled + condition: subchart2.enabled tags: - back-end - subchart2 +``` +```yaml +# subchart2/requirements.yaml +dependencies: + - name: subsubchart + repository: http://localhost:10191 + version: 0.1.0 + condition: subsubchart.enabled ``` ```yaml @@ -292,6 +302,9 @@ dependencies: subchart1: enabled: true +subchart2: + subsubchart: + enabled: false tags: front-end: false back-end: true @@ -305,6 +318,9 @@ Since `subchart2` is tagged with `back-end` and that tag evaluates to `true`, `s enabled. Also notes that although `subchart2` has a condition specified in `requirements.yaml`, there is no corresponding path and value in the parent's values so that condition has no effect. +`subsubchart` is disabled by default but can be enabled by setting `subchart2.subsubchart.enabled=true`. +Hint: disabling `subchart2` via tag will also disable all sub-charts (even if overriding the value `subchart2.subsubchart.enabled=true`). + ##### Using the CLI with Tags and Conditions The `--set` parameter can be used as usual to alter tag and condition values. diff --git a/pkg/chartutil/requirements.go b/pkg/chartutil/requirements.go index 0f1128305..ff966111f 100644 --- a/pkg/chartutil/requirements.go +++ b/pkg/chartutil/requirements.go @@ -124,7 +124,7 @@ func LoadRequirementsLock(c *chart.Chart) (*RequirementsLock, error) { } // ProcessRequirementsConditions disables charts based on condition path value in values -func ProcessRequirementsConditions(reqs *Requirements, cvals Values) { +func ProcessRequirementsConditions(reqs *Requirements, cvals Values, cpath string) { var cond string var conds []string if reqs == nil || len(reqs.Dependencies) == 0 { @@ -143,7 +143,7 @@ func ProcessRequirementsConditions(reqs *Requirements, cvals Values) { for _, c := range conds { if len(c) > 0 { // retrieve value - vv, err := cvals.PathValue(c) + vv, err := cvals.PathValue(cpath + c) if err == nil { // if not bool, warn if bv, ok := vv.(bool); ok { @@ -247,6 +247,10 @@ func getAliasDependency(charts []*chart.Chart, aliasChart *Dependency) *chart.Ch // ProcessRequirementsEnabled removes disabled charts from dependencies func ProcessRequirementsEnabled(c *chart.Chart, v *chart.Config) error { + return doProcessRequirementsEnabled(c, v, "") +} + +func doProcessRequirementsEnabled(c *chart.Chart, v *chart.Config, path string) error { reqs, err := LoadRequirements(c) if err != nil { // if not just missing requirements file, return error @@ -303,7 +307,7 @@ func ProcessRequirementsEnabled(c *chart.Chart, v *chart.Config) error { cc := chart.Config{Raw: yvals} // flag dependencies as enabled/disabled ProcessRequirementsTags(reqs, cvals) - ProcessRequirementsConditions(reqs, cvals) + ProcessRequirementsConditions(reqs, cvals, path) // make a map of charts to remove rm := map[string]bool{} for _, r := range reqs.Dependencies { @@ -323,7 +327,8 @@ func ProcessRequirementsEnabled(c *chart.Chart, v *chart.Config) error { } // recursively call self to process sub dependencies for _, t := range cd { - err := ProcessRequirementsEnabled(t, &cc) + subpath := path + t.Metadata.Name + "." + err := doProcessRequirementsEnabled(t, &cc, subpath) // if its not just missing requirements file, return error if nerr, ok := err.(ErrNoRequirementsFile); !ok && err != nil { return nerr diff --git a/pkg/chartutil/requirements_test.go b/pkg/chartutil/requirements_test.go index e433f92ea..f1b0ebdb3 100644 --- a/pkg/chartutil/requirements_test.go +++ b/pkg/chartutil/requirements_test.go @@ -157,7 +157,7 @@ func TestRequirementsCombinedDisabledL2(t *testing.T) { t.Fatalf("Failed to load testdata: %s", err) } // tags enabling a parent/child group with condition disabling one child - v := &chart.Config{Raw: "subchartc:\n enabled: false\ntags:\n back-end: true\n"} + v := &chart.Config{Raw: "subchart2:\n subchartc:\n enabled: false\ntags:\n back-end: true\n"} // expected charts including duplicates in alphanumeric order e := []string{"parentchart", "subchart1", "subchart2", "subcharta", "subchartb", "subchartb"} @@ -175,6 +175,15 @@ func TestRequirementsCombinedDisabledL1(t *testing.T) { verifyRequirementsEnabled(t, c, v, e) } +func TestRequirementsAliasCondition(t *testing.T) { + c, err := Load("testdata/subpop") + if err != nil { + t.Fatalf("Failed to load testdata: %s", err) + } + v := &chart.Config{Raw: "subchart1:\n enabled: false\nsubchart2alias:\n enabled: true\n subchartb:\n enabled: true\n"} + e := []string{"parentchart", "subchart2alias", "subchartb"} + verifyRequirementsEnabled(t, c, v, e) +} func verifyRequirementsEnabled(t *testing.T, c *chart.Chart, v *chart.Config, e []string) { out := []*chart.Chart{} diff --git a/pkg/chartutil/testdata/subpop/charts/subchart1/requirements.yaml b/pkg/chartutil/testdata/subpop/charts/subchart1/requirements.yaml index abfe85e76..d9383dc4f 100644 --- a/pkg/chartutil/testdata/subpop/charts/subchart1/requirements.yaml +++ b/pkg/chartutil/testdata/subpop/charts/subchart1/requirements.yaml @@ -2,7 +2,7 @@ dependencies: - name: subcharta repository: http://localhost:10191 version: 0.1.0 - condition: subcharta.enabled,subchart1.subcharta.enabled + condition: subcharta.enabled tags: - front-end - subcharta diff --git a/pkg/chartutil/testdata/subpop/charts/subchart2/requirements.yaml b/pkg/chartutil/testdata/subpop/charts/subchart2/requirements.yaml index 1f0023a08..d65d73dcd 100644 --- a/pkg/chartutil/testdata/subpop/charts/subchart2/requirements.yaml +++ b/pkg/chartutil/testdata/subpop/charts/subchart2/requirements.yaml @@ -2,7 +2,7 @@ dependencies: - name: subchartb repository: http://localhost:10191 version: 0.1.0 - condition: subchartb.enabled,subchart2.subchartb.enabled + condition: subchartb.enabled tags: - back-end - subchartb diff --git a/pkg/chartutil/testdata/subpop/requirements.yaml b/pkg/chartutil/testdata/subpop/requirements.yaml index a8eb0aace..a6ee20f07 100644 --- a/pkg/chartutil/testdata/subpop/requirements.yaml +++ b/pkg/chartutil/testdata/subpop/requirements.yaml @@ -29,3 +29,9 @@ dependencies: tags: - back-end - subchart2 + + - name: subchart2 + alias: subchart2alias + repository: http://localhost:10191 + version: 0.1.0 + condition: subchart2alias.enabled diff --git a/pkg/chartutil/testdata/subpop/values.yaml b/pkg/chartutil/testdata/subpop/values.yaml index 55e872d41..68eb1323c 100644 --- a/pkg/chartutil/testdata/subpop/values.yaml +++ b/pkg/chartutil/testdata/subpop/values.yaml @@ -39,3 +39,5 @@ tags: front-end: true back-end: false +subchart2alias: + enabled: false \ No newline at end of file From 266b3415f0a0dd9e70b1658d1fc2c17668b85960 Mon Sep 17 00:00:00 2001 From: ejether Date: Fri, 21 Dec 2018 15:16:21 -0800 Subject: [PATCH 014/327] Ejether/rename autohelm in docs (#5095) * autohelm we renamed to reckoner for copyright concerns. This commit renames autohelm in the documentation Signed-off-by: EJ Etherington * moving to be in alphabetical order Signed-off-by: EJ Etherington --- docs/related.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/related.md b/docs/related.md index c6735e0ea..6122101dc 100644 --- a/docs/related.md +++ b/docs/related.md @@ -65,7 +65,6 @@ Tools layered on top of Helm or Tiller. - [AppsCode Swift](https://github.com/appscode/swift) - Ajax friendly Helm Tiller Proxy using [grpc-gateway](https://github.com/grpc-ecosystem/grpc-gateway) - [Armada](https://github.com/att-comdev/armada) - Manage prefixed releases throughout various Kubernetes namespaces, and removes completed jobs for complex deployments. Used by the [Openstack-Helm](https://github.com/openstack/openstack-helm) team. -- [Autohelm](https://github.com/reactiveops/autohelm) - Autohelm is _another_ simple declarative spec for deploying helm charts. Written in python and supports git urls as a source for helm charts. - [ChartMuseum](https://github.com/chartmuseum/chartmuseum) - Helm Chart Repository with support for Amazon S3 and Google Cloud Storage - [Chartify](https://github.com/appscode/chartify) - Generate Helm charts from existing Kubernetes resources. - [Codefresh](https://codefresh.io) - Kubernetes native CI/CD and management platform with UI dashboards for managing Helm charts and releases @@ -79,6 +78,7 @@ Tools layered on top of Helm or Tiller. - [Monocular](https://github.com/helm/monocular) - Web UI for Helm Chart repositories - [Orca](https://github.com/maorfr/orca) - Advanced CI\CD tool for Kubernetes and Helm made simple. - [Quay App Registry](https://coreos.com/blog/quay-application-registry-for-kubernetes.html) - Open Kubernetes application registry, including a Helm access client +- [Reckoner](https://github.com/reactiveops/reckoner) - Reckoner (formerly Autohelm) is a tool for declarative management of helm releases. Written in python and supports git urls as a source for helm charts. - [Rudder](https://github.com/AcalephStorage/rudder) - RESTful (JSON) proxy for Tiller's API - [Schelm](https://github.com/databus23/schelm) - Render a Helm manifest to a directory - [Shipper](https://github.com/bookingcom/shipper) - Multi-cluster canary or blue-green rollouts using Helm From c82c0b6046b852f449dcaae768ba57331116dc87 Mon Sep 17 00:00:00 2001 From: Maor Friedman Date: Sun, 23 Dec 2018 15:45:43 +0200 Subject: [PATCH 015/327] [docs/related] update orca link to official repo (#5097) Signed-off-by: Maor --- docs/related.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/related.md b/docs/related.md index 6122101dc..5c027cc36 100644 --- a/docs/related.md +++ b/docs/related.md @@ -76,7 +76,7 @@ Tools layered on top of Helm or Tiller. - [Helmsman](https://github.com/Praqma/helmsman) - Helmsman is a helm-charts-as-code tool which enables installing/upgrading/protecting/moving/deleting releases from version controlled desired state files (described in a simple TOML format). - [Landscaper](https://github.com/Eneco/landscaper/) - "Landscaper takes a set of Helm Chart references with values (a desired state), and realizes this in a Kubernetes cluster." - [Monocular](https://github.com/helm/monocular) - Web UI for Helm Chart repositories -- [Orca](https://github.com/maorfr/orca) - Advanced CI\CD tool for Kubernetes and Helm made simple. +- [Orca](https://github.com/nuvo/orca) - Advanced CI\CD tool for Kubernetes and Helm made simple. - [Quay App Registry](https://coreos.com/blog/quay-application-registry-for-kubernetes.html) - Open Kubernetes application registry, including a Helm access client - [Reckoner](https://github.com/reactiveops/reckoner) - Reckoner (formerly Autohelm) is a tool for declarative management of helm releases. Written in python and supports git urls as a source for helm charts. - [Rudder](https://github.com/AcalephStorage/rudder) - RESTful (JSON) proxy for Tiller's API From e3c6385959bca1d632ee59d1fccbcb1c612a53c5 Mon Sep 17 00:00:00 2001 From: Taylor Thomas Date: Thu, 3 Jan 2019 10:16:53 -0800 Subject: [PATCH 016/327] doc(release_checklist): Adds steps for categorizing changelogs Closes #5119 Also includes some formatting fixes to wrap lines at 80 chars Signed-off-by: Taylor Thomas --- docs/release_checklist.md | 156 ++++++++++++++++++++++++++++---------- 1 file changed, 117 insertions(+), 39 deletions(-) diff --git a/docs/release_checklist.md b/docs/release_checklist.md index c69db9d21..4011b6675 100644 --- a/docs/release_checklist.md +++ b/docs/release_checklist.md @@ -3,8 +3,8 @@ **IMPORTANT**: If your experience deviates from this document, please document the changes to keep it up-to-date. ## Release Meetings -As part of the release process, two of the weekly developer calls will be co-opted -as "release meetings." +As part of the release process, two of the weekly developer calls will be +co-opted as "release meetings." ### Start of the Release Cycle The first developer call after a release will be used as the release meeting to @@ -17,17 +17,19 @@ identified: - Any other important details for the community All of this information should be added to the GitHub milestone for the given -release. This should give the community and maintainers a clear set of guidelines -to follow when choosing whether or not to add issues and PRs to a given release. +release. This should give the community and maintainers a clear set of +guidelines to follow when choosing whether or not to add issues and PRs to a +given release. ### End (almost) of the Release Cycle The developer call closest to two weeks before the scheduled release date will be used to review any remaining PRs that should be pulled into the release. This -is the place to debate whether or not we should wait before cutting a release and -any other concerns. At the end of this meeting, if the release date has not been -pushed out, the first RC should be cut. Subsequent developer calls in between this -meeting and the release date should have some time set aside to see if any bugs -were found. Once the release date is reached, the final release can be cut +is the place to debate whether or not we should wait before cutting a release +and any other concerns. At the end of this meeting, if the release date has not +been pushed out, the first RC should be cut. Subsequent developer calls in +between this meeting and the release date should have some time set aside to see +if any bugs were found. Once the release date is reached, the final release can +be cut ## A Maintainer's Guide to Releasing Helm @@ -37,17 +39,28 @@ So you're in charge of a new release for Helm? Cool. Here's what to do... Just kidding! :trollface: -All releases will be of the form vX.Y.Z where X is the major version number, Y is the minor version number and Z is the patch release number. This project strictly follows [semantic versioning](http://semver.org/) so following this step is critical. +All releases will be of the form vX.Y.Z where X is the major version number, Y +is the minor version number and Z is the patch release number. This project +strictly follows [semantic versioning](http://semver.org/) so following this +step is critical. -It is important to note that this document assumes that the git remote in your repository that corresponds to "https://github.com/helm/helm" is named "upstream". If yours is not (for example, if you've chosen to name it "origin" or something similar instead), be sure to adjust the listed snippets for your local environment accordingly. If you are not sure what your upstream remote is named, use a command like `git remote -v` to find out. +It is important to note that this document assumes that the git remote in your +repository that corresponds to "https://github.com/helm/helm" is named +"upstream". If yours is not (for example, if you've chosen to name it "origin" +or something similar instead), be sure to adjust the listed snippets for your +local environment accordingly. If you are not sure what your upstream remote is +named, use a command like `git remote -v` to find out. -If you don't have an upstream remote, you can add one easily using something like: +If you don't have an upstream remote, you can add one easily using something +like: ```shell git remote add upstream git@github.com:helm/helm.git ``` -In this doc, we are going to reference a few environment variables as well, which you may want to set for convenience. For major/minor releases, use the following: +In this doc, we are going to reference a few environment variables as well, +which you may want to set for convenience. For major/minor releases, use the +following: ```shell export RELEASE_NAME=vX.Y.0 @@ -68,7 +81,10 @@ export RELEASE_CANDIDATE_NAME="$RELEASE_NAME-rc.1" ### Major/Minor Releases -Major releases are for new feature additions and behavioral changes *that break backwards compatibility*. Minor releases are for new feature additions that do not break backwards compatibility. To create a major or minor release, start by creating a `release-vX.Y.0` branch from master. +Major releases are for new feature additions and behavioral changes *that break +backwards compatibility*. Minor releases are for new feature additions that do +not break backwards compatibility. To create a major or minor release, start by +creating a `release-vX.Y.0` branch from master. ```shell git fetch upstream @@ -76,11 +92,13 @@ git checkout upstream/master git checkout -b $RELEASE_BRANCH_NAME ``` -This new branch is going to be the base for the release, which we are going to iterate upon later. +This new branch is going to be the base for the release, which we are going to +iterate upon later. ### Patch releases -Patch releases are a few critical cherry-picked fixes to existing releases. Start by creating a `release-vX.Y.Z` branch from the latest patch release. +Patch releases are a few critical cherry-picked fixes to existing releases. +Start by creating a `release-vX.Y.Z` branch from the latest patch release. ```shell git fetch upstream --tags @@ -88,7 +106,8 @@ git checkout $PREVIOUS_PATCH_RELEASE git checkout -b $RELEASE_BRANCH_NAME ``` -From here, we can cherry-pick the commits we want to bring into the patch release: +From here, we can cherry-pick the commits we want to bring into the patch +release: ```shell # get the commits ids we want to cherry-pick @@ -98,11 +117,13 @@ git cherry-pick -x git cherry-pick -x ``` -This new branch is going to be the base for the release, which we are going to iterate upon later. +This new branch is going to be the base for the release, which we are going to +iterate upon later. ## 2. Change the Version Number in Git -When doing a minor release, make sure to update pkg/version/version.go with the new release version. +When doing a minor release, make sure to update pkg/version/version.go with the +new release version. ```shell $ git diff pkg/version/version.go @@ -128,28 +149,36 @@ git commit -m "bump version to $RELEASE_CANDIDATE_NAME" ## 3. Commit and Push the Release Branch -In order for others to start testing, we can now push the release branch upstream and start the test process. +In order for others to start testing, we can now push the release branch +upstream and start the test process. ```shell git push upstream $RELEASE_BRANCH_NAME ``` -Make sure to check [helm on CircleCI](https://circleci.com/gh/helm/helm) and make sure the release passed CI before proceeding. +Make sure to check [helm on CircleCI](https://circleci.com/gh/helm/helm) and +make sure the release passed CI before proceeding. -If anyone is available, let others peer-review the branch before continuing to ensure that all the proper changes have been made and all of the commits for the release are there. +If anyone is available, let others peer-review the branch before continuing to +ensure that all the proper changes have been made and all of the commits for the +release are there. ## 4. Create a Release Candidate -Now that the release branch is out and ready, it is time to start creating and iterating on release candidates. +Now that the release branch is out and ready, it is time to start creating and +iterating on release candidates. ```shell git tag --sign --annotate "${RELEASE_CANDIDATE_NAME}" --message "Helm release ${RELEASE_CANDIDATE_NAME}" git push upstream $RELEASE_CANDIDATE_NAME ``` -CircleCI will automatically create a tagged release image and client binary to test with. +CircleCI will automatically create a tagged release image and client binary to +test with. -For testers, the process to start testing after CircleCI finishes building the artifacts involves the following steps to grab the client from Google Cloud Storage: +For testers, the process to start testing after CircleCI finishes building the +artifacts involves the following steps to grab the client from Google Cloud +Storage: linux/amd64, using /bin/bash: @@ -169,21 +198,35 @@ windows/amd64, using PowerShell: PS C:\> Invoke-WebRequest -Uri "https://kubernetes-helm.storage.googleapis.com/helm-$RELEASE_CANDIDATE_NAME-windows-amd64.zip" -OutFile "helm-$ReleaseCandidateName-windows-amd64.zip" ``` -Then, unpack and move the binary to somewhere on your $PATH, or move it somewhere and add it to your $PATH (e.g. /usr/local/bin/helm for linux/macOS, C:\Program Files\helm\helm.exe for Windows). +Then, unpack and move the binary to somewhere on your $PATH, or move it +somewhere and add it to your $PATH (e.g. /usr/local/bin/helm for linux/macOS, +C:\Program Files\helm\helm.exe for Windows). ## 5. Iterate on Successive Release Candidates -Spend several days explicitly investing time and resources to try and break helm in every possible way, documenting any findings pertinent to the release. This time should be spent testing and finding ways in which the release might have caused various features or upgrade environments to have issues, not coding. During this time, the release is in code freeze, and any additional code changes will be pushed out to the next release. +Spend several days explicitly investing time and resources to try and break helm +in every possible way, documenting any findings pertinent to the release. This +time should be spent testing and finding ways in which the release might have +caused various features or upgrade environments to have issues, not coding. +During this time, the release is in code freeze, and any additional code changes +will be pushed out to the next release. -During this phase, the $RELEASE_BRANCH_NAME branch will keep evolving as you will produce new release candidates. The frequency of new candidates is up to the release manager: use your best judgement taking into account the severity of reported issues, testers' availability, and the release deadline date. Generally speaking, it is better to let a release roll over the deadline than to ship a broken release. +During this phase, the $RELEASE_BRANCH_NAME branch will keep evolving as you +will produce new release candidates. The frequency of new candidates is up to +the release manager: use your best judgement taking into account the severity of +reported issues, testers' availability, and the release deadline date. Generally +speaking, it is better to let a release roll over the deadline than to ship a +broken release. -Each time you'll want to produce a new release candidate, you will start by adding commits to the branch by cherry-picking from master: +Each time you'll want to produce a new release candidate, you will start by +adding commits to the branch by cherry-picking from master: ```shell git cherry-pick -x ``` -You will also want to update the release version number and the CHANGELOG as we did in steps 2 and 3 as separate commits. +You will also want to update the release version number and the CHANGELOG as we +did in steps 2 and 3 as separate commits. After that, tag it and notify users of the new release candidate: @@ -197,7 +240,9 @@ From here on just repeat this process, continuously testing until you're happy w ## 6. Finalize the Release -When you're finally happy with the quality of a release candidate, you can move on and create the real thing. Double-check one last time to make sure everything is in order, then finally push the release tag. +When you're finally happy with the quality of a release candidate, you can move +on and create the real thing. Double-check one last time to make sure everything +is in order, then finally push the release tag. ```shell git checkout $RELEASE_BRANCH_NAME @@ -207,9 +252,13 @@ git push upstream $RELEASE_NAME ## 7. Write the Release Notes -We will auto-generate a changelog based on the commits that occurred during a release cycle, but it is usually more beneficial to the end-user if the release notes are hand-written by a human being/marketing team/dog. +We will auto-generate a changelog based on the commits that occurred during a +release cycle, but it is usually more beneficial to the end-user if the release +notes are hand-written by a human being/marketing team/dog. -If you're releasing a major/minor release, listing notable user-facing features is usually sufficient. For patch releases, do the same, but make note of the symptoms and who is affected. +If you're releasing a major/minor release, listing notable user-facing features +is usually sufficient. For patch releases, do the same, but make note of the +symptoms and who is affected. An example release note for a minor release would look like this: @@ -226,6 +275,13 @@ The community keeps growing, and we'd love to see you there! - Hang out at the Public Developer Call: Thursday, 9:30 Pacific via [Zoom](https://zoom.us/j/696660622) - Test, debug, and contribute charts: [GitHub/helm/charts](https://github.com/helm/charts) +## Features and Changes + +- Major +- features +- list +- here + ## Installation and Upgrading Download Helm X.Y. The common platform binaries are here: @@ -250,23 +306,45 @@ The [Quickstart Guide](https://docs.helm.sh/using_helm/#quickstart-guide) will g ## Changelog -- chore(*): bump version to v2.7.0 08c1144f5eb3e3b636d9775617287cc26e53dba4 (Adam Reese) +### Features +- ref(*): kubernetes v1.11 support efadbd88035654b2951f3958167afed014c46bc6 (Adam Reese) +- feat(helm): add $HELM_KEY_PASSPHRASE environment variable for signing helm charts (#4778) 1e26b5300b5166fabb90002535aacd2f9cc7d787 + +### Bug fixes - fix circle not building tags f4f932fabd197f7e6d608c8672b33a483b4b76fa (Matthew Fisher) + +### Code cleanup +- ref(kube): Gets rid of superfluous Sprintf call 3071a16f5eb3a2b646d9795617287cc26e53dba4 (Taylor Thomas) +- chore(*): bump version to v2.7.0 08c1144f5eb3e3b636d9775617287cc26e53dba4 (Adam Reese) + +### Documentation Changes +- docs(release_checklist): fix changelog generation command (#4694) 8442851a5c566a01d9b4c69b368d64daa04f6a7f (Matthew Fisher) ``` -The changelog at the bottom of the release notes can be generated with this command: +The changelog at the bottom of the release notes can be generated with this +command: ```shell PREVIOUS_RELEASE=vX.Y.Z git log --no-merges --pretty=format:'- %s %H (%aN)' $PREVIOUS_RELEASE..$RELEASE_NAME ``` -Once finished, go into GitHub and edit the release notes for the tagged release with the notes written here. +After generating the changelog, you will need to categorize the changes as shown +in the example above. + +Once finished, go into GitHub and edit the release notes for the tagged release +with the notes written here. ## 8. Evangelize -Congratulations! You're done. Go grab yourself a $DRINK_OF_CHOICE. You've earned it. +Congratulations! You're done. Go grab yourself a $DRINK_OF_CHOICE. You've earned +it. -After enjoying a nice $DRINK_OF_CHOICE, go forth and announce the glad tidings of the new release in Slack and on Twitter. You should also notify any key partners in the helm community such as the homebrew formula maintainers, the owners of incubator projects (e.g. ChartMuseum) and any other interested parties. +After enjoying a nice $DRINK_OF_CHOICE, go forth and announce the glad tidings +of the new release in Slack and on Twitter. You should also notify any key +partners in the helm community such as the homebrew formula maintainers, the +owners of incubator projects (e.g. ChartMuseum) and any other interested +parties. -Optionally, write a blog post about the new release and showcase some of the new features on there! +Optionally, write a blog post about the new release and showcase some of the new +features on there! From 4634f5f2faa0caa7de390c95c7d27be22d56a156 Mon Sep 17 00:00:00 2001 From: Eric Thiebaut-George Date: Tue, 8 Jan 2019 16:14:43 +0000 Subject: [PATCH 017/327] Recommend using crd-install instead of pre-install (#5139) * 5138 Recommended using crd-install instead of pre-install Signed-off-by: Eric Thiebaut-George * 5138 Updated section title Signed-off-by: Eric Thiebaut-George --- docs/chart_best_practices/custom_resource_definitions.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/chart_best_practices/custom_resource_definitions.md b/docs/chart_best_practices/custom_resource_definitions.md index 96690dc9b..ee6fcf470 100644 --- a/docs/chart_best_practices/custom_resource_definitions.md +++ b/docs/chart_best_practices/custom_resource_definitions.md @@ -28,10 +28,10 @@ resources that use that CRD in _another_ chart. In this method, each chart must be installed separately. -### Method 2: Pre-install Hooks +### Method 2: Crd-install Hooks -To package the two together, add a `pre-install` hook to the CRD definition so +To package the two together, add a `crd-install` hook to the CRD definition so that it is fully installed before the rest of the chart is executed. -Note that if you create the CRD with a `pre-install` hook, that CRD definition +Note that if you create the CRD with a `crd-install` hook, that CRD definition will not be deleted when `helm delete` is run. From 7c55fdcf024e83d78b47102dd27315728400c860 Mon Sep 17 00:00:00 2001 From: Elad Iwanir Date: Tue, 8 Jan 2019 20:00:49 +0200 Subject: [PATCH 018/327] Sort resources output by 'helm status' Signed-off-by: Elad Iwanir --- pkg/kube/client.go | 81 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 62 insertions(+), 19 deletions(-) diff --git a/pkg/kube/client.go b/pkg/kube/client.go index 4a387d524..513f7400d 100644 --- a/pkg/kube/client.go +++ b/pkg/kube/client.go @@ -24,6 +24,7 @@ import ( "fmt" "io" "log" + "sort" "strings" "time" @@ -151,13 +152,41 @@ func (c *Client) Build(namespace string, reader io.Reader) (Result, error) { return result, scrubValidationError(err) } +// Return the resource info as internal +func resourceInfoToObject(info *resource.Info) runtime.Object { + internalObj, err := asInternal(info) + if err != nil { + // If the problem is just that the resource is not registered, don't print any + // error. This is normal for custom resources. + if !runtime.IsNotRegisteredError(err) { + c.Log("Warning: conversion to internal type failed: %v", err) + } + // Add the unstructured object in this situation. It will still get listed, just + // with less information. + return info.Object + } + + return internalObj +} + +func sortByKey(objs map[string](map[string]runtime.Object)) []string { + var keys []string + // Create a simple slice, so we can sort it + for key := range objs { + keys = append(keys, key) + } + // Sort alphabetically by version/kind keys + sort.Strings(keys) + return keys +} + // Get gets Kubernetes resources as pretty-printed string. // // Namespace will set the namespace. func (c *Client) Get(namespace string, reader io.Reader) (string, error) { - // Since we don't know what order the objects come in, let's group them by the types, so + // Since we don't know what order the objects come in, let's group them by the types and then sort them, so // that when we print them, they come out looking good (headers apply to subgroups, etc.). - objs := make(map[string][]runtime.Object) + objs := make(map[string](map[string]runtime.Object)) infos, err := c.BuildUnstructured(namespace, reader) if err != nil { return "", err @@ -178,19 +207,15 @@ func (c *Client) Get(namespace string, reader io.Reader) (string, error) { // versions per cluster, but this certainly won't hurt anything, so let's be safe. gvk := info.ResourceMapping().GroupVersionKind vk := gvk.Version + "/" + gvk.Kind - internalObj, err := asInternal(info) - if err != nil { - // If the problem is just that the resource is not registered, don't print any - // error. This is normal for custom resources. - if !runtime.IsNotRegisteredError(err) { - c.Log("Warning: conversion to internal type failed: %v", err) - } - // Add the unstructured object in this situation. It will still get listed, just - // with less information. - objs[vk] = append(objs[vk], info.Object) - } else { - objs[vk] = append(objs[vk], internalObj) + + // Initialize map. The main map groups resources based on version/kind + // The second level is a simple 'Name' to 'Object', that will help sort + // the individual resource later + if objs[vk] == nil { + objs[vk] = make(map[string]runtime.Object) } + // Map between the resource name to the underlying info object + objs[vk][info.Name] = resourceInfoToObject(info) //Get the relation pods objPods, err = c.getSelectRelationPod(info, objPods) @@ -208,8 +233,12 @@ func (c *Client) Get(namespace string, reader io.Reader) (string, error) { for key, podItems := range objPods { for i := range podItems { pod := &core.Pod{} + legacyscheme.Scheme.Convert(&podItems[i], pod, nil) - objs[key+"(related)"] = append(objs[key+"(related)"], pod) + if objs[key+"(related)"] == nil { + objs[key+"(related)"] = make(map[string]runtime.Object) + } + objs[key+"(related)"][pod.ObjectMeta.Name] = runtime.Object(pod) } } @@ -219,14 +248,28 @@ func (c *Client) Get(namespace string, reader io.Reader) (string, error) { // track of tab widths. buf := new(bytes.Buffer) printFlags := get.NewHumanPrintFlags() - for t, ot := range objs { + + // Sort alphabetically by version/kind keys + vkKeys := sortByKey(objs) + // Iterate on sorted version/kind types + for _, t := range vkKeys { if _, err = fmt.Fprintf(buf, "==> %s\n", t); err != nil { return "", err } typePrinter, _ := printFlags.ToPrinter("") - for _, o := range ot { - if err := typePrinter.PrintObj(o, buf); err != nil { - c.Log("failed to print object type %s, object: %q :\n %v", t, o, err) + + var sortedResources []string + for resource := range objs[t] { + sortedResources = append(sortedResources, resource) + } + sort.Strings(sortedResources) + + // Now that each individual resource within the specific version/kind + // is sorted, we print each resource using the k8s printer + for _, resourceName := range sortedResources { + vk := objs[t] + if err := typePrinter.PrintObj(vk[resourceName], buf); err != nil { + c.Log("failed to print object type %s, object: %q :\n %v", t, resourceName, err) return "", err } } From cbf9ad11be1153d72cade3212d708112af97eefe Mon Sep 17 00:00:00 2001 From: Elad Iwanir Date: Tue, 8 Jan 2019 20:14:39 +0200 Subject: [PATCH 019/327] fix minor build issue Signed-off-by: Elad Iwanir --- pkg/kube/client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/kube/client.go b/pkg/kube/client.go index 513f7400d..9aa821b5a 100644 --- a/pkg/kube/client.go +++ b/pkg/kube/client.go @@ -153,7 +153,7 @@ func (c *Client) Build(namespace string, reader io.Reader) (Result, error) { } // Return the resource info as internal -func resourceInfoToObject(info *resource.Info) runtime.Object { +func resourceInfoToObject(info *resource.Info, c *Client) runtime.Object { internalObj, err := asInternal(info) if err != nil { // If the problem is just that the resource is not registered, don't print any @@ -215,7 +215,7 @@ func (c *Client) Get(namespace string, reader io.Reader) (string, error) { objs[vk] = make(map[string]runtime.Object) } // Map between the resource name to the underlying info object - objs[vk][info.Name] = resourceInfoToObject(info) + objs[vk][info.Name] = resourceInfoToObject(info, c) //Get the relation pods objPods, err = c.getSelectRelationPod(info, objPods) From e70bea6adb6825e4f0cce1917121e6e000bf9049 Mon Sep 17 00:00:00 2001 From: JoeWrightss <42261994+JoeWrightss@users.noreply.github.com> Date: Thu, 10 Jan 2019 05:09:50 +0800 Subject: [PATCH 020/327] Fix some spelling errors (#5114) Signed-off-by: JoeWrightss --- _proto/hapi/services/tiller.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_proto/hapi/services/tiller.proto b/_proto/hapi/services/tiller.proto index 8eba963e4..e00c50caf 100644 --- a/_proto/hapi/services/tiller.proto +++ b/_proto/hapi/services/tiller.proto @@ -76,7 +76,7 @@ service ReleaseService { rpc RollbackRelease(RollbackReleaseRequest) returns (RollbackReleaseResponse) { } - // ReleaseHistory retrieves a releasse's history. + // ReleaseHistory retrieves a release's history. rpc GetHistory(GetHistoryRequest) returns (GetHistoryResponse) { } @@ -298,7 +298,7 @@ message UninstallReleaseRequest { bool purge = 3; // timeout specifies the max amount of time any kubernetes client command can run. int64 timeout = 4; - // Description, if set, will set the description for the uninnstalled release + // Description, if set, will set the description for the uninstalled release string description = 5; } From 8015fc35707050ae4578000cfe89fcba66112f07 Mon Sep 17 00:00:00 2001 From: Matthew Fisher Date: Thu, 10 Jan 2019 08:09:55 -0800 Subject: [PATCH 021/327] bump version to v2.12 (#4991) (cherry picked from commit 657557947c62efca6c9b8f81a62540e27901717b) Signed-off-by: Matthew Fisher --- pkg/version/version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/version/version.go b/pkg/version/version.go index dae739500..692167b83 100644 --- a/pkg/version/version.go +++ b/pkg/version/version.go @@ -26,7 +26,7 @@ var ( // Increment major number for new feature additions and behavioral changes. // Increment minor number for bug fixes and performance enhancements. // Increment patch number for critical fixes to existing releases. - Version = "v2.11" + Version = "v2.12" // BuildMetadata is extra build time data BuildMetadata = "unreleased" From 893c3b61f6594232a57f232034afc418d2466878 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20K=C3=B6hler?= <9337156+axdotl@users.noreply.github.com> Date: Thu, 10 Jan 2019 18:05:44 +0100 Subject: [PATCH 022/327] Add chart name check to lint (#3773) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Axel Köhler --- .gitignore | 1 + pkg/lint/rules/chartfile.go | 12 ++++++++++-- pkg/lint/rules/chartfile_test.go | 16 +++++++++++++--- pkg/lint/rules/testdata/badnamechart/Chart.yaml | 4 ++++ pkg/lint/rules/testdata/badnamechart/values.yaml | 1 + 5 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 pkg/lint/rules/testdata/badnamechart/Chart.yaml create mode 100644 pkg/lint/rules/testdata/badnamechart/values.yaml diff --git a/.gitignore b/.gitignore index 7fdfdcf2a..2414f7f2b 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ rootfs/rudder vendor/ *.exe .idea/ +*.iml \ No newline at end of file diff --git a/pkg/lint/rules/chartfile.go b/pkg/lint/rules/chartfile.go index 12f028af1..95ee38f0b 100644 --- a/pkg/lint/rules/chartfile.go +++ b/pkg/lint/rules/chartfile.go @@ -46,7 +46,8 @@ func Chartfile(linter *support.Linter) { return } - linter.RunLinterRule(support.ErrorSev, chartFileName, validateChartName(chartFile)) + linter.RunLinterRule(support.ErrorSev, chartFileName, validateChartNamePresence(chartFile)) + linter.RunLinterRule(support.WarningSev, chartFileName, validateChartNameFormat(chartFile)) linter.RunLinterRule(support.ErrorSev, chartFileName, validateChartNameDirMatch(linter.ChartDir, chartFile)) // Chart metadata @@ -74,13 +75,20 @@ func validateChartYamlFormat(chartFileError error) error { return nil } -func validateChartName(cf *chart.Metadata) error { +func validateChartNamePresence(cf *chart.Metadata) error { if cf.Name == "" { return errors.New("name is required") } return nil } +func validateChartNameFormat(cf *chart.Metadata) error { + if strings.Contains(cf.Name, ".") { + return errors.New("name should be lower case letters and numbers. Words may be separated with dashes") + } + return nil +} + func validateChartNameDirMatch(chartDir string, cf *chart.Metadata) error { if cf.Name != filepath.Base(chartDir) { return fmt.Errorf("directory name (%s) and chart name (%s) must be the same", filepath.Base(chartDir), cf.Name) diff --git a/pkg/lint/rules/chartfile_test.go b/pkg/lint/rules/chartfile_test.go index 235e5fc4c..2422a2d10 100644 --- a/pkg/lint/rules/chartfile_test.go +++ b/pkg/lint/rules/chartfile_test.go @@ -29,17 +29,20 @@ import ( ) const ( - badChartDir = "testdata/badchartfile" - goodChartDir = "testdata/goodone" + badChartDir = "testdata/badchartfile" + badNameChartDir = "testdata/badnamechart" + goodChartDir = "testdata/goodone" ) var ( badChartFilePath = filepath.Join(badChartDir, "Chart.yaml") + badNameChartFilePath = filepath.Join(badNameChartDir, "Chart.yaml") goodChartFilePath = filepath.Join(goodChartDir, "Chart.yaml") nonExistingChartFilePath = filepath.Join(os.TempDir(), "Chart.yaml") ) var badChart, chatLoadRrr = chartutil.LoadChartfile(badChartFilePath) +var badNameChart, _ = chartutil.LoadChartfile(badNameChartFilePath) var goodChart, _ = chartutil.LoadChartfile(goodChartFilePath) // Validation functions Test @@ -66,12 +69,19 @@ func TestValidateChartYamlFormat(t *testing.T) { } func TestValidateChartName(t *testing.T) { - err := validateChartName(badChart) + err := validateChartNamePresence(badChart) if err == nil { t.Errorf("validateChartName to return a linter error, got no error") } } +func TestValidateChartNameFormat(t *testing.T) { + err := validateChartNameFormat(badNameChart) + if err == nil { + t.Errorf("validateChartNameFormat to return a linter error, got no error") + } +} + func TestValidateChartNameDirMatch(t *testing.T) { err := validateChartNameDirMatch(goodChartDir, goodChart) if err != nil { diff --git a/pkg/lint/rules/testdata/badnamechart/Chart.yaml b/pkg/lint/rules/testdata/badnamechart/Chart.yaml new file mode 100644 index 000000000..6ac6cfa42 --- /dev/null +++ b/pkg/lint/rules/testdata/badnamechart/Chart.yaml @@ -0,0 +1,4 @@ +name: bad.chart.name +description: A Helm chart for Kubernetes +version: 0.1.0 +icon: http://riverrun.io diff --git a/pkg/lint/rules/testdata/badnamechart/values.yaml b/pkg/lint/rules/testdata/badnamechart/values.yaml new file mode 100644 index 000000000..54deecf74 --- /dev/null +++ b/pkg/lint/rules/testdata/badnamechart/values.yaml @@ -0,0 +1 @@ +# Default values for badchartname. From 5603fe8d3e6ca9347ea0c2a94b2b33a55f5134cd Mon Sep 17 00:00:00 2001 From: Matt Butcher Date: Mon, 14 Jan 2019 10:03:35 -0700 Subject: [PATCH 023/327] fix: perform extra validation on paths in tar archives (#5165) * fix: perform extra validation on paths in tar archives Signed-off-by: Matt Butcher * fix: Cover a few Windows cases and also remove a duplicate tar reader Signed-off-by: Matt Butcher * fix: removed debug output Signed-off-by: Matt Butcher * fix: Expand again preserves the files verbatim Also added tests for Expand Signed-off-by: Matt Butcher * fix: add license block and remove println Signed-off-by: Matt Butcher --- pkg/chartutil/expand.go | 64 +++++++++--------- pkg/chartutil/expand_test.go | 121 +++++++++++++++++++++++++++++++++++ pkg/chartutil/load.go | 43 +++++++++++-- pkg/chartutil/load_test.go | 97 ++++++++++++++++++++++++++++ 4 files changed, 289 insertions(+), 36 deletions(-) create mode 100644 pkg/chartutil/expand_test.go diff --git a/pkg/chartutil/expand.go b/pkg/chartutil/expand.go index 1d49b159f..9ed021d9c 100644 --- a/pkg/chartutil/expand.go +++ b/pkg/chartutil/expand.go @@ -17,58 +17,60 @@ limitations under the License. package chartutil import ( - "archive/tar" - "compress/gzip" + "errors" "io" + "io/ioutil" "os" "path/filepath" + + securejoin "github.com/cyphar/filepath-securejoin" ) // Expand uncompresses and extracts a chart into the specified directory. func Expand(dir string, r io.Reader) error { - gr, err := gzip.NewReader(r) + files, err := loadArchiveFiles(r) if err != nil { return err } - defer gr.Close() - tr := tar.NewReader(gr) - for { - header, err := tr.Next() - if err == io.EOF { - break - } else if err != nil { - return err - } - //split header name and create missing directories - d, _ := filepath.Split(header.Name) - fullDir := filepath.Join(dir, d) - _, err = os.Stat(fullDir) - if err != nil && d != "" { - if err := os.MkdirAll(fullDir, 0700); err != nil { + // Get the name of the chart + var chartName string + for _, file := range files { + if file.Name == "Chart.yaml" { + ch, err := UnmarshalChartfile(file.Data) + if err != nil { return err } + chartName = ch.GetName() } + } + if chartName == "" { + return errors.New("chart name not specified") + } - path := filepath.Clean(filepath.Join(dir, header.Name)) - info := header.FileInfo() - if info.IsDir() { - if err = os.MkdirAll(path, info.Mode()); err != nil { - return err - } - continue - } + // Find the base directory + chartdir, err := securejoin.SecureJoin(dir, chartName) + if err != nil { + return err + } - file, err := os.OpenFile(path, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, info.Mode()) + // Copy all files verbatim. We don't parse these files because parsing can remove + // comments. + for _, file := range files { + outpath, err := securejoin.SecureJoin(chartdir, file.Name) if err != nil { return err } - _, err = io.Copy(file, tr) - if err != nil { - file.Close() + + // Make sure the necessary subdirs get created. + basedir := filepath.Dir(outpath) + if err := os.MkdirAll(basedir, 0755); err != nil { + return err + } + + if err := ioutil.WriteFile(outpath, file.Data, 0644); err != nil { return err } - file.Close() } return nil } diff --git a/pkg/chartutil/expand_test.go b/pkg/chartutil/expand_test.go new file mode 100644 index 000000000..80fd4416b --- /dev/null +++ b/pkg/chartutil/expand_test.go @@ -0,0 +1,121 @@ +/* +Copyright The Helm Authors. + +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 chartutil + +import ( + "io/ioutil" + "os" + "path/filepath" + "testing" +) + +func TestExpand(t *testing.T) { + dest, err := ioutil.TempDir("", "helm-testing-") + if err != nil { + t.Fatal(err) + } + defer os.RemoveAll(dest) + + reader, err := os.Open("testdata/frobnitz-1.2.3.tgz") + if err != nil { + t.Fatal(err) + } + + if err := Expand(dest, reader); err != nil { + t.Fatal(err) + } + + expectedChartPath := filepath.Join(dest, "frobnitz") + fi, err := os.Stat(expectedChartPath) + if err != nil { + t.Fatal(err) + } + if !fi.IsDir() { + t.Fatalf("expected a chart directory at %s", expectedChartPath) + } + + dir, err := os.Open(expectedChartPath) + if err != nil { + t.Fatal(err) + } + + fis, err := dir.Readdir(0) + if err != nil { + t.Fatal(err) + } + + expectLen := 12 + if len(fis) != expectLen { + t.Errorf("Expected %d files, but got %d", expectLen, len(fis)) + } + + for _, fi := range fis { + expect, err := os.Stat(filepath.Join("testdata", "frobnitz", fi.Name())) + if err != nil { + t.Fatal(err) + } + if fi.Size() != expect.Size() { + t.Errorf("Expected %s to have size %d, got %d", fi.Name(), expect.Size(), fi.Size()) + } + } +} + +func TestExpandFile(t *testing.T) { + dest, err := ioutil.TempDir("", "helm-testing-") + if err != nil { + t.Fatal(err) + } + defer os.RemoveAll(dest) + + if err := ExpandFile(dest, "testdata/frobnitz-1.2.3.tgz"); err != nil { + t.Fatal(err) + } + + expectedChartPath := filepath.Join(dest, "frobnitz") + fi, err := os.Stat(expectedChartPath) + if err != nil { + t.Fatal(err) + } + if !fi.IsDir() { + t.Fatalf("expected a chart directory at %s", expectedChartPath) + } + + dir, err := os.Open(expectedChartPath) + if err != nil { + t.Fatal(err) + } + + fis, err := dir.Readdir(0) + if err != nil { + t.Fatal(err) + } + + expectLen := 12 + if len(fis) != expectLen { + t.Errorf("Expected %d files, but got %d", expectLen, len(fis)) + } + + for _, fi := range fis { + expect, err := os.Stat(filepath.Join("testdata", "frobnitz", fi.Name())) + if err != nil { + t.Fatal(err) + } + if fi.Size() != expect.Size() { + t.Errorf("Expected %s to have size %d, got %d", fi.Name(), expect.Size(), fi.Size()) + } + } +} diff --git a/pkg/chartutil/load.go b/pkg/chartutil/load.go index 9f1c80c85..f4741516e 100644 --- a/pkg/chartutil/load.go +++ b/pkg/chartutil/load.go @@ -25,7 +25,9 @@ import ( "io" "io/ioutil" "os" + "path" "path/filepath" + "regexp" "strings" "github.com/golang/protobuf/ptypes/any" @@ -63,11 +65,13 @@ type BufferedFile struct { Data []byte } -// LoadArchive loads from a reader containing a compressed tar archive. -func LoadArchive(in io.Reader) (*chart.Chart, error) { +var drivePathPattern = regexp.MustCompile(`^[a-zA-Z]:/`) + +// loadArchiveFiles loads files out of an archive +func loadArchiveFiles(in io.Reader) ([]*BufferedFile, error) { unzipped, err := gzip.NewReader(in) if err != nil { - return &chart.Chart{}, err + return nil, err } defer unzipped.Close() @@ -80,7 +84,7 @@ func LoadArchive(in io.Reader) (*chart.Chart, error) { break } if err != nil { - return &chart.Chart{}, err + return nil, err } if hd.FileInfo().IsDir() { @@ -101,12 +105,33 @@ func LoadArchive(in io.Reader) (*chart.Chart, error) { // Normalize the path to the / delimiter n = strings.Replace(n, delimiter, "/", -1) + if path.IsAbs(n) { + return nil, errors.New("chart illegally contains absolute paths") + } + + n = path.Clean(n) + if n == "." { + // In this case, the original path was relative when it should have been absolute. + return nil, errors.New("chart illegally contains empty path") + } + if strings.HasPrefix(n, "..") { + return nil, errors.New("chart illegally references parent directory") + } + + // In some particularly arcane acts of path creativity, it is possible to intermix + // UNIX and Windows style paths in such a way that you produce a result of the form + // c:/foo even after all the built-in absolute path checks. So we explicitly check + // for this condition. + if drivePathPattern.MatchString(n) { + return nil, errors.New("chart contains illegally named files") + } + if parts[0] == "Chart.yaml" { return nil, errors.New("chart yaml not in base directory") } if _, err := io.Copy(b, tr); err != nil { - return &chart.Chart{}, err + return files, err } files = append(files, &BufferedFile{Name: n, Data: b.Bytes()}) @@ -116,7 +141,15 @@ func LoadArchive(in io.Reader) (*chart.Chart, error) { if len(files) == 0 { return nil, errors.New("no files in chart archive") } + return files, nil +} +// LoadArchive loads from a reader containing a compressed tar archive. +func LoadArchive(in io.Reader) (*chart.Chart, error) { + files, err := loadArchiveFiles(in) + if err != nil { + return nil, err + } return LoadFiles(files) } diff --git a/pkg/chartutil/load_test.go b/pkg/chartutil/load_test.go index 5cb15fbdc..c031a6a96 100644 --- a/pkg/chartutil/load_test.go +++ b/pkg/chartutil/load_test.go @@ -17,8 +17,14 @@ limitations under the License. package chartutil import ( + "archive/tar" + "compress/gzip" + "io/ioutil" + "os" "path" + "path/filepath" "testing" + "time" "k8s.io/helm/pkg/proto/hapi/chart" ) @@ -43,6 +49,97 @@ func TestLoadFile(t *testing.T) { verifyRequirements(t, c) } +func TestLoadArchive_InvalidArchive(t *testing.T) { + tmpdir, err := ioutil.TempDir("", "helm-test-") + if err != nil { + t.Fatal(err) + } + defer os.Remove(tmpdir) + + writeTar := func(filename, internalPath string, body []byte) { + dest, err := os.Create(filename) + if err != nil { + t.Fatal(err) + } + zipper := gzip.NewWriter(dest) + tw := tar.NewWriter(zipper) + + h := &tar.Header{ + Name: internalPath, + Mode: 0755, + Size: int64(len(body)), + ModTime: time.Now(), + } + if err := tw.WriteHeader(h); err != nil { + t.Fatal(err) + } + if _, err := tw.Write(body); err != nil { + t.Fatal(err) + } + tw.Close() + zipper.Close() + dest.Close() + } + + for _, tt := range []struct { + chartname string + internal string + expectError string + }{ + {"illegal-dots.tgz", "../../malformed-helm-test", "chart illegally references parent directory"}, + {"illegal-dots2.tgz", "/foo/../../malformed-helm-test", "chart illegally references parent directory"}, + {"illegal-dots3.tgz", "/../../malformed-helm-test", "chart illegally references parent directory"}, + {"illegal-dots4.tgz", "./../../malformed-helm-test", "chart illegally references parent directory"}, + {"illegal-name.tgz", "./.", "chart illegally contains empty path"}, + {"illegal-name2.tgz", "/./.", "chart illegally contains empty path"}, + {"illegal-name3.tgz", "missing-leading-slash", "chart illegally contains empty path"}, + {"illegal-name4.tgz", "/missing-leading-slash", "chart metadata (Chart.yaml) missing"}, + {"illegal-abspath.tgz", "//foo", "chart illegally contains absolute paths"}, + {"illegal-abspath2.tgz", "///foo", "chart illegally contains absolute paths"}, + {"illegal-abspath3.tgz", "\\\\foo", "chart illegally contains absolute paths"}, + {"illegal-abspath3.tgz", "\\..\\..\\foo", "chart illegally references parent directory"}, + + // Under special circumstances, this can get normalized to things that look like absolute Windows paths + {"illegal-abspath4.tgz", "\\.\\c:\\\\foo", "chart contains illegally named files"}, + {"illegal-abspath5.tgz", "/./c://foo", "chart contains illegally named files"}, + {"illegal-abspath6.tgz", "\\\\?\\Some\\windows\\magic", "chart illegally contains absolute paths"}, + } { + illegalChart := filepath.Join(tmpdir, tt.chartname) + writeTar(illegalChart, tt.internal, []byte("hello: world")) + _, err = Load(illegalChart) + if err == nil { + t.Fatal("expected error when unpacking illegal files") + } + if err.Error() != tt.expectError { + t.Errorf("Expected %q, got %q for %s", tt.expectError, err.Error(), tt.chartname) + } + } + + // Make sure that absolute path gets interpreted as relative + illegalChart := filepath.Join(tmpdir, "abs-path.tgz") + writeTar(illegalChart, "/Chart.yaml", []byte("hello: world")) + _, err = Load(illegalChart) + if err.Error() != "invalid chart (Chart.yaml): name must not be empty" { + t.Error(err) + } + + // And just to validate that the above was not spurious + illegalChart = filepath.Join(tmpdir, "abs-path2.tgz") + writeTar(illegalChart, "files/whatever.yaml", []byte("hello: world")) + _, err = Load(illegalChart) + if err.Error() != "chart metadata (Chart.yaml) missing" { + t.Error(err) + } + + // Finally, test that drive letter gets stripped off on Windows + illegalChart = filepath.Join(tmpdir, "abs-winpath.tgz") + writeTar(illegalChart, "c:\\Chart.yaml", []byte("hello: world")) + _, err = Load(illegalChart) + if err.Error() != "invalid chart (Chart.yaml): name must not be empty" { + t.Error(err) + } +} + func TestLoadFiles(t *testing.T) { goodFiles := []*BufferedFile{ { From 315ed81116235882967f4021b739eafa44ebec5e Mon Sep 17 00:00:00 2001 From: Jon Leonard Date: Wed, 16 Jan 2019 11:32:54 -0500 Subject: [PATCH 024/327] Restore comment text Signed-off-by: Jon Leonard --- pkg/helm/option.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/helm/option.go b/pkg/helm/option.go index a34c4b8ae..391913094 100644 --- a/pkg/helm/option.go +++ b/pkg/helm/option.go @@ -53,7 +53,7 @@ type options struct { disableHooks bool // if set, skip CRD hook only disableCRDHook bool - // if set, render SubChart Notes + // name of release releaseName string // tls.Config to use for rpc if tls enabled tlsConfig *tls.Config From a4bc9fd7330fc3886caba52d1a33f0c8a907e4d4 Mon Sep 17 00:00:00 2001 From: Deepak Sattiraju Date: Thu, 17 Jan 2019 22:04:32 +0530 Subject: [PATCH 025/327] Fixing helm search display format #5148 (#5162) Signed-off-by: ds-ms --- cmd/helm/search.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/helm/search.go b/cmd/helm/search.go index 84f328d41..2e7611609 100644 --- a/cmd/helm/search.go +++ b/cmd/helm/search.go @@ -154,7 +154,7 @@ func (s *searchCmd) buildIndex() (*search.Index, error) { f := s.helmhome.CacheIndex(n) ind, err := repo.LoadIndexFile(f) if err != nil { - fmt.Fprintf(s.out, "WARNING: Repo %q is corrupt or missing. Try 'helm repo update'.", n) + fmt.Fprintf(s.out, "WARNING: Repo %q is corrupt or missing. Try 'helm repo update'.\n", n) continue } From 6453dbe575eeea92c5d40a9898a24a22b517b780 Mon Sep 17 00:00:00 2001 From: Martin Hickey Date: Mon, 21 Jan 2019 11:49:43 +0000 Subject: [PATCH 026/327] Add content on how community members can help review PRs Updated text to better elaborate on he process and also some small other nits/updates. Signed-off-by: Martin Hickey --- CONTRIBUTING.md | 47 +++++++++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index aba3388a6..7736cbd6b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -84,12 +84,12 @@ your PR will be rejected by the automated DCO check. Whether you are a user or contributor, official support channels include: -- GitHub [issues](https://github.com/helm/helm/issues/new) -- Slack [Kubernetes Slack](http://slack.kubernetes.io/): - - User: #helm-users - - Contributor: #helm-dev +- [Issues](https://github.com/helm/helm/issues) +- Slack: + - User: [#helm-users](https://kubernetes.slack.com/messages/C0NH30761/details/) + - Contributor: [#helm-dev](https://kubernetes.slack.com/messages/C51E88VDG/) -Before opening a new issue or submitting a new pull request, it's helpful to search the project - it's likely that another user has already reported the issue you're facing, or it's a known issue that we're already aware of. +Before opening a new issue or submitting a new pull request, it's helpful to search the project - it's likely that another user has already reported the issue you're facing, or it's a known issue that we're already aware of. It is also worth asking on the Slack channels. ## Milestones @@ -180,33 +180,33 @@ contributing to Helm. All issue types follow the same general lifecycle. Differe Coding conventions and standards are explained in the official developer docs: [Developers Guide](docs/developers.md) -The next section contains more information on the workflow followed for PRs +The next section contains more information on the workflow followed for Pull Requests. ## Pull Requests -Like any good open source project, we use Pull Requests to track code changes +Like any good open source project, we use Pull Requests (PRs) to track code changes. ### PR Lifecycle 1. PR creation + - PRs are usually created to fix or else be a subset of other PRs that fix a particular issue. - We more than welcome PRs that are currently in progress. They are a great way to keep track of important work that is in-flight, but useful for others to see. If a PR is a work in progress, it **must** be prefaced with "WIP: [title]". Once the PR is ready for review, remove "WIP" from the title. - - It is preferred, but not required, to have a PR tied to a specific issue. + - It is preferred, but not required, to have a PR tied to a specific issue. There can be + circumstances where if it is a quick fix then an issue might be overkill. The details provided + in the PR description would suffice in this case. 2. Triage - The maintainer in charge of triaging will apply the proper labels for the issue. This should include at least a size label, `bug` or `feature`, and `awaiting review` once all labels are applied. - See the [Labels section](#labels) for full details on the definitions of labels + See the [Labels section](#labels) for full details on the definitions of labels. - Add the PR to the correct milestone. This should be the same as the issue the PR closes. 3. Assigning reviews - Once a review has the `awaiting review` label, maintainers will review them as schedule permits. The maintainer who takes the issue should self-request a review. - - Reviews from others in the community, especially those who have encountered a bug or have - requested a feature, are highly encouraged, but not required. Maintainer reviews **are** required - before any merge - Any PR with the `size/large` label requires 2 review approvals from maintainers before it can be - merged. Those with `size/medium` are per the judgement of the maintainers + merged. Those with `size/medium` or `size/small` are per the judgement of the maintainers. 4. Reviewing/Discussion - Once a maintainer begins reviewing a PR, they will remove the `awaiting review` label and add the `in progress` label so the person submitting knows that it is being worked on. This is @@ -214,17 +214,24 @@ Like any good open source project, we use Pull Requests to track code changes - All reviews will be completed using Github review tool. - A "Comment" review should be used when there are questions about the code that should be answered, but that don't involve code changes. This type of review does not count as approval. - - A "Changes Requested" review indicates that changes to the code need to be made before they will be merged. - - Reviewers should update labels as needed (such as `needs rebase`) -5. Address comments by answering questions or changing code + - A "Changes Requested" review indicates that changes to the code need to be made before they will be + merged. + - Reviewers (maintainers) should update labels as needed (such as `needs rebase`). + - Reviews are also welcome from others in the community, especially those who have encountered a bug or + have requested a feature. In the code review, a message can be added, as well as `LGTM` if the PR is + good to merge. It’s also possible to add comments to specific lines in a file, for giving context + to the comment. +5. PR owner should try to be responsive to comments by answering questions or changing code. If the + owner is unsure of any comment, reach out to the person who added the comment in + [#helm-dev](https://kubernetes.slack.com/messages/C51E88VDG/). Once all comments have been addressed, + the PR is ready to be merged. 6. Merge or close - PRs should stay open until merged or if they have not been active for more than 30 days. This will help keep the PR queue to a manageable size and reduce noise. Should the PR need to stay open (like in the case of a WIP), the `keep open` label can be added. - - If the owner of the PR is listed in `OWNERS`, that user **must** merge their own PRs - or explicitly request another OWNER do that for them. - - If the owner of a PR is _not_ listed in `OWNERS`, any core committer may - merge the PR once it is approved. + - If the owner of the PR is listed in `OWNERS`, that user **must** merge their own PRs or explicitly + request another OWNER do that for them. + - If the owner of a PR is _not_ listed in `OWNERS`, any maintainer may merge the PR once it is approved. #### Documentation PRs From 812b74aca5f14ea67b531a41687abfee8a6399a6 Mon Sep 17 00:00:00 2001 From: Koichi Shiraishi Date: Tue, 22 Jan 2019 08:58:07 +0900 Subject: [PATCH 027/327] Fix delete.go file permission (#5194) The 'cmd/helm/delete.go' file permission is 755, change to same as another file. Signed-off-by: Koichi Shiraishi --- cmd/helm/delete.go | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 cmd/helm/delete.go diff --git a/cmd/helm/delete.go b/cmd/helm/delete.go old mode 100755 new mode 100644 From 581e6cdbb8e42753556ae48ccba8cef84c40f736 Mon Sep 17 00:00:00 2001 From: Matthew Fisher Date: Mon, 21 Jan 2019 15:58:57 -0800 Subject: [PATCH 028/327] fix: use RFC 1123 subdomains for name verification (#5132) As noted in Slack by a community member, release names with periods are considered usable. Switching to RFC 1123 subdomain verification continues to block bad release names like BAD_NAME, but allows names like good.name to continue working. Signed-off-by: Matthew Fisher --- cmd/helm/install.go | 4 ++-- cmd/helm/install_test.go | 1 - cmd/helm/template.go | 4 ++-- cmd/helm/template_test.go | 8 ++++---- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/cmd/helm/install.go b/cmd/helm/install.go index f33747ac4..5ddb31054 100644 --- a/cmd/helm/install.go +++ b/cmd/helm/install.go @@ -251,8 +251,8 @@ func (i *installCmd) run() error { fmt.Printf("FINAL NAME: %s\n", i.name) } - if msgs := validation.IsDNS1123Label(i.name); i.name != "" && len(msgs) > 0 { - return fmt.Errorf("release name %s is not a valid DNS label: %s", i.name, strings.Join(msgs, ";")) + if msgs := validation.IsDNS1123Subdomain(i.name); i.name != "" && len(msgs) > 0 { + return fmt.Errorf("release name %s is invalid: %s", i.name, strings.Join(msgs, ";")) } // Check chart requirements to make sure all dependencies are present in /charts diff --git a/cmd/helm/install_test.go b/cmd/helm/install_test.go index 4a2055640..5f7ffdb50 100644 --- a/cmd/helm/install_test.go +++ b/cmd/helm/install_test.go @@ -169,7 +169,6 @@ func TestInstall(t *testing.T) { name: "install chart with release name using periods", args: []string{"testdata/testcharts/alpine"}, flags: []string{"--name", "foo.bar"}, - err: true, }, { name: "install chart with release name using underscores", diff --git a/cmd/helm/template.go b/cmd/helm/template.go index d776f2989..1838bb758 100644 --- a/cmd/helm/template.go +++ b/cmd/helm/template.go @@ -147,8 +147,8 @@ func (t *templateCmd) run(cmd *cobra.Command, args []string) error { } } - if msgs := validation.IsDNS1123Label(t.releaseName); t.releaseName != "" && len(msgs) > 0 { - return fmt.Errorf("release name %s is not a valid DNS label: %s", t.releaseName, strings.Join(msgs, ";")) + if msgs := validation.IsDNS1123Subdomain(t.releaseName); t.releaseName != "" && len(msgs) > 0 { + return fmt.Errorf("release name %s is invalid: %s", t.releaseName, strings.Join(msgs, ";")) } // Check chart requirements to make sure all dependencies are present in /charts diff --git a/cmd/helm/template_test.go b/cmd/helm/template_test.go index 98044eff0..3c5026b08 100644 --- a/cmd/helm/template_test.go +++ b/cmd/helm/template_test.go @@ -112,21 +112,21 @@ func TestTemplateCmd(t *testing.T) { desc: "verify the release name using capitals is invalid", args: []string{subchart1ChartPath, "--name", "FOO"}, expectKey: "subchart1/templates/service.yaml", - expectError: "is not a valid DNS label", + expectError: "is invalid", }, { name: "check_invalid_name_uppercase", desc: "verify the release name using periods is invalid", args: []string{subchart1ChartPath, "--name", "foo.bar"}, expectKey: "subchart1/templates/service.yaml", - expectError: "is not a valid DNS label", + expectValue: "release-name: \"foo.bar\"", }, { name: "check_invalid_name_uppercase", desc: "verify the release name using underscores is invalid", args: []string{subchart1ChartPath, "--name", "foo_bar"}, expectKey: "subchart1/templates/service.yaml", - expectError: "is not a valid DNS label", + expectError: "is invalid", }, { name: "check_release_is_install", @@ -160,7 +160,7 @@ func TestTemplateCmd(t *testing.T) { name: "check_invalid_name_template", desc: "verify the relase name generate by template is invalid", args: []string{subchart1ChartPath, "--name-template", "foobar-{{ b64enc \"abc\" }}-baz"}, - expectError: "is not a valid DNS label", + expectError: "is invalid", }, { name: "check_name_template", From af4c14b593f03190b08863da65e04ff5aa593020 Mon Sep 17 00:00:00 2001 From: Patrick Lang Date: Mon, 21 Jan 2019 21:33:57 -0800 Subject: [PATCH 029/327] Update docs/examples to use multi-arch tagged images (#5099) * update nginx example to work multi-arch Signed-off-by: Patrick Lang * Fix alpine to use a multiarch tag Signed-off-by: Patrick Lang --- docs/examples/alpine/values.yaml | 2 +- docs/examples/nginx/templates/post-install-job.yaml | 2 +- docs/examples/nginx/values.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/examples/alpine/values.yaml b/docs/examples/alpine/values.yaml index afe8cc6c0..225e0472a 100644 --- a/docs/examples/alpine/values.yaml +++ b/docs/examples/alpine/values.yaml @@ -1,6 +1,6 @@ image: repository: alpine - tag: 3.3 + tag: latest pullPolicy: IfNotPresent restartPolicy: Never diff --git a/docs/examples/nginx/templates/post-install-job.yaml b/docs/examples/nginx/templates/post-install-job.yaml index 6e32086ab..3562e6cf5 100644 --- a/docs/examples/nginx/templates/post-install-job.yaml +++ b/docs/examples/nginx/templates/post-install-job.yaml @@ -32,6 +32,6 @@ spec: restartPolicy: {{ .Values.restartPolicy }} containers: - name: post-install-job - image: "alpine:3.3" + image: "alpine:latest" # All we're going to do is sleep for a while, then exit. command: ["/bin/sleep", "{{ .Values.sleepyTime }}"] diff --git a/docs/examples/nginx/values.yaml b/docs/examples/nginx/values.yaml index b40208cce..36f2505af 100644 --- a/docs/examples/nginx/values.yaml +++ b/docs/examples/nginx/values.yaml @@ -14,7 +14,7 @@ index: >- image: repository: nginx - tag: 1.11.0 + tag: alpine pullPolicy: IfNotPresent service: From 05a365358f43a452e523d3f76b1107b6f4ff2aa7 Mon Sep 17 00:00:00 2001 From: Geoff Baskwill Date: Tue, 22 Jan 2019 10:03:01 -0500 Subject: [PATCH 030/327] fix: ignore pax header "file"s in chart validation Signed-off-by: Geoff Baskwill --- pkg/chartutil/load.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/chartutil/load.go b/pkg/chartutil/load.go index f4741516e..b0927a5cf 100644 --- a/pkg/chartutil/load.go +++ b/pkg/chartutil/load.go @@ -93,6 +93,12 @@ func loadArchiveFiles(in io.Reader) ([]*BufferedFile, error) { continue } + switch hd.Typeflag { + // We don't want to process these extension header files. + case tar.TypeXGlobalHeader, tar.TypeXHeader: + continue + } + // Archive could contain \ if generated on Windows delimiter := "/" if strings.ContainsRune(hd.Name, '\\') { From 197e68ec1f5cde7a78fc5053a798f939378f4158 Mon Sep 17 00:00:00 2001 From: JoeWrightss <42261994+JoeWrightss@users.noreply.github.com> Date: Sat, 26 Jan 2019 02:46:24 +0800 Subject: [PATCH 031/327] Fix some typos in comment (#5215) Signed-off-by: zhoulin xie --- pkg/helm/client.go | 2 +- pkg/helm/fake.go | 2 +- pkg/helm/option.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/helm/client.go b/pkg/helm/client.go index 771c7f3d1..0d4d16039 100644 --- a/pkg/helm/client.go +++ b/pkg/helm/client.go @@ -302,7 +302,7 @@ func (h *Client) RunReleaseTest(rlsName string, opts ...ReleaseTestOption) (<-ch return h.test(ctx, req) } -// PingTiller pings the Tiller pod and ensure's that it is up and running +// PingTiller pings the Tiller pod and ensures that it is up and running func (h *Client) PingTiller() error { ctx := NewContext() return h.ping(ctx) diff --git a/pkg/helm/fake.go b/pkg/helm/fake.go index 46be7d398..c8ce91f44 100644 --- a/pkg/helm/fake.go +++ b/pkg/helm/fake.go @@ -257,7 +257,7 @@ func (c *FakeClient) RunReleaseTest(rlsName string, opts ...ReleaseTestOption) ( return results, errc } -// PingTiller pings the Tiller pod and ensure's that it is up and running +// PingTiller pings the Tiller pod and ensures that it is up and running func (c *FakeClient) PingTiller() error { return nil } diff --git a/pkg/helm/option.go b/pkg/helm/option.go index 121f71c83..1f5cf6904 100644 --- a/pkg/helm/option.go +++ b/pkg/helm/option.go @@ -474,7 +474,7 @@ type VersionOption func(*options) // the defaults used when running the `helm upgrade` command. type UpdateOption func(*options) -// RollbackOption allows specififying various settings configurable +// RollbackOption allows specifying various settings configurable // by the helm client user for overriding the defaults used when // running the `helm rollback` command. type RollbackOption func(*options) From 0dfe2b865a9b4900ef41fc141fc88c11bd728c57 Mon Sep 17 00:00:00 2001 From: shibataka000 Date: Sun, 27 Jan 2019 02:54:12 +0900 Subject: [PATCH 032/327] Itemize text in docs/securing_installation.md (#5217) Signed-off-by: Takao Shibata --- docs/securing_installation.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/securing_installation.md b/docs/securing_installation.md index d47a98bcc..56ebad62c 100644 --- a/docs/securing_installation.md +++ b/docs/securing_installation.md @@ -69,9 +69,10 @@ When Helm clients are connecting from outside of the cluster, the security betwe Contrary to the previous [Enabling TLS](#enabling-tls) section, this section does not involve running a tiller server pod in your cluster (for what it's worth, that lines up with the current [helm v3 proposal](https://github.com/helm/community/blob/master/helm-v3/000-helm-v3.md)), thus there is no gRPC endpoint (and thus there's no need to create & manage TLS certificates to secure each gRPC endpoint). Steps: - * Fetch the latest helm release tarball from the [GitHub release page](https://github.com/helm/helm/releases), and extract and move `helm` and `tiller` somewhere on your `$PATH`. - * "Server": Run `tiller --storage=secret`. (Note that `tiller` has a default value of ":44134" for the `--listen` argument.) - * Client: In another terminal (and on the same host that the aforementioned `tiller` command was run for the previous bullet): Run `export HELM_HOST=:44134`, and then run `helm` commands as usual. + +- Fetch the latest helm release tarball from the [GitHub release page](https://github.com/helm/helm/releases), and extract and move `helm` and `tiller` somewhere on your `$PATH`. +- "Server": Run `tiller --storage=secret`. (Note that `tiller` has a default value of ":44134" for the `--listen` argument.) +- Client: In another terminal (and on the same host that the aforementioned `tiller` command was run for the previous bullet): Run `export HELM_HOST=:44134`, and then run `helm` commands as usual. ### Tiller's Release Information From 8a5c7f157106d9ba0fe1e0ab01498d454c47bb0e Mon Sep 17 00:00:00 2001 From: Alexander Nesterenko Date: Wed, 9 Jan 2019 12:33:37 +0200 Subject: [PATCH 033/327] Implement "atomic" upgrade/install Add possibility to put "--safe" argument to install and upgrade command that restores the state of cluster in case of failed install/upgrade attempt Signed-off-by: Alexander Nesterenko --- cmd/helm/install.go | 18 ++++++++++++++++++ cmd/helm/upgrade.go | 26 ++++++++++++++++++++++++-- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/cmd/helm/install.go b/cmd/helm/install.go index 5ddb31054..9e0b19487 100644 --- a/cmd/helm/install.go +++ b/cmd/helm/install.go @@ -131,6 +131,7 @@ type installCmd struct { version string timeout int64 wait bool + safe bool repoURL string username string password string @@ -190,6 +191,8 @@ func newInstallCmd(c helm.Interface, out io.Writer) *cobra.Command { } inst.chartPath = cp inst.client = ensureHelmClient(inst.client) + inst.wait = inst.wait || inst.safe + return inst.run() }, } @@ -212,6 +215,7 @@ func newInstallCmd(c helm.Interface, out io.Writer) *cobra.Command { f.StringVar(&inst.version, "version", "", "specify the exact chart version to install. If this is not specified, the latest version is installed") f.Int64Var(&inst.timeout, "timeout", 300, "time in seconds to wait for any individual Kubernetes operation (like Jobs for hooks)") f.BoolVar(&inst.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(&inst.safe, "safe", false, "if set, upgrade process rolls back changes made in case of failed upgrade") f.StringVar(&inst.repoURL, "repo", "", "chart repository url where to locate the requested chart") f.StringVar(&inst.username, "username", "", "chart repository username where to locate the requested chart") f.StringVar(&inst.password, "password", "", "chart repository password where to locate the requested chart") @@ -307,6 +311,20 @@ func (i *installCmd) run() error { helm.InstallWait(i.wait), helm.InstallDescription(i.description)) if err != nil { + if i.safe { + fmt.Fprintf(os.Stdout, "INSTALL FAILED\nPURGING CHART\nError: %v", prettyError(err)) + deleteSideEffects := &deleteCmd{ + name: i.name, + disableHooks: i.disableHooks, + purge: true, + timeout: i.timeout, + description: "", + dryRun: i.dryRun, + out: i.out, + client: i.client, + } + if err := deleteSideEffects.run(); err != nil { return err } + } return prettyError(err) } diff --git a/cmd/helm/upgrade.go b/cmd/helm/upgrade.go index d6c915c3a..a20a1003a 100644 --- a/cmd/helm/upgrade.go +++ b/cmd/helm/upgrade.go @@ -105,6 +105,7 @@ type upgradeCmd struct { resetValues bool reuseValues bool wait bool + safe bool repoURL string username string password string @@ -142,6 +143,7 @@ func newUpgradeCmd(client helm.Interface, out io.Writer) *cobra.Command { upgrade.release = args[0] upgrade.chart = args[1] upgrade.client = ensureHelmClient(upgrade.client) + upgrade.wait = upgrade.wait || upgrade.safe return upgrade.run() }, @@ -167,6 +169,7 @@ func newUpgradeCmd(client helm.Interface, out io.Writer) *cobra.Command { f.BoolVar(&upgrade.resetValues, "reset-values", false, "when upgrading, reset the values to the ones built into the chart") f.BoolVar(&upgrade.reuseValues, "reuse-values", false, "when upgrading, reuse the last release's values and merge in any overrides from the command line via --set and -f. If '--reset-values' is specified, this is ignored.") f.BoolVar(&upgrade.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(&upgrade.safe, "safe", false, "if set, upgrade process rolls back changes made in case of failed upgrade") f.StringVar(&upgrade.repoURL, "repo", "", "chart repository url where to locate the requested chart") f.StringVar(&upgrade.username, "username", "", "chart repository username where to locate the requested chart") f.StringVar(&upgrade.password, "password", "", "chart repository password where to locate the requested chart") @@ -191,6 +194,8 @@ func (u *upgradeCmd) run() error { return err } + releaseHistory, err := u.client.ReleaseHistory(u.release, helm.WithMaxHistory(1)) + if u.install { // If a release does not exist, install it. If another error occurs during // the check, ignore the error and continue with the upgrade. @@ -198,7 +203,6 @@ func (u *upgradeCmd) run() error { // The returned error is a grpc.rpcError that wraps the message from the original error. // So we're stuck doing string matching against the wrapped error, which is nested somewhere // inside of the grpc.rpcError message. - releaseHistory, err := u.client.ReleaseHistory(u.release, helm.WithMaxHistory(1)) if err == nil { if u.namespace == "" { @@ -232,6 +236,7 @@ func (u *upgradeCmd) run() error { timeout: u.timeout, wait: u.wait, description: u.description, + safe: u.safe, } return ic.run() } @@ -270,7 +275,24 @@ func (u *upgradeCmd) run() error { helm.UpgradeWait(u.wait), helm.UpgradeDescription(u.description)) if err != nil { - return fmt.Errorf("UPGRADE FAILED: %v", prettyError(err)) + fmt.Fprintf(u.out, "UPGRADE FAILED\nROLLING BACK\nError: %v", prettyError(err)) + if u.safe { + rollback := &rollbackCmd { + out: u.out, + client: u.client, + name: u.release, + dryRun: u.dryRun, + recreate: u.recreate, + force: u.force, + timeout: u.timeout, + wait: u.wait, + description: "", + revision: releaseHistory.Releases[0].Version, + disableHooks: u.disableHooks, + } + if err := rollback.run(); err != nil { return err } + } + return fmt.Errorf("UPGRADE FAILED: %v\n", prettyError(err)) } if settings.Debug { From 869efd59be7a960466055bc30966ebd572a4ee09 Mon Sep 17 00:00:00 2001 From: Alexander Nesterenko Date: Wed, 9 Jan 2019 13:39:09 +0200 Subject: [PATCH 034/327] Fix codestyle and update docs Signed-off-by: Alexander Nesterenko --- cmd/helm/install.go | 4 +++- cmd/helm/upgrade.go | 10 ++++++---- docs/helm/helm_install.md | 3 ++- docs/helm/helm_upgrade.md | 5 +++-- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/cmd/helm/install.go b/cmd/helm/install.go index 9e0b19487..0316b14bf 100644 --- a/cmd/helm/install.go +++ b/cmd/helm/install.go @@ -323,7 +323,9 @@ func (i *installCmd) run() error { out: i.out, client: i.client, } - if err := deleteSideEffects.run(); err != nil { return err } + if err := deleteSideEffects.run(); err != nil { + return err + } } return prettyError(err) } diff --git a/cmd/helm/upgrade.go b/cmd/helm/upgrade.go index a20a1003a..527867e47 100644 --- a/cmd/helm/upgrade.go +++ b/cmd/helm/upgrade.go @@ -275,9 +275,9 @@ func (u *upgradeCmd) run() error { helm.UpgradeWait(u.wait), helm.UpgradeDescription(u.description)) if err != nil { - fmt.Fprintf(u.out, "UPGRADE FAILED\nROLLING BACK\nError: %v", prettyError(err)) + fmt.Fprintf(u.out, "UPGRADE FAILED\nROLLING BACK\nError: %v\n", prettyError(err)) if u.safe { - rollback := &rollbackCmd { + rollback := &rollbackCmd{ out: u.out, client: u.client, name: u.release, @@ -290,9 +290,11 @@ func (u *upgradeCmd) run() error { revision: releaseHistory.Releases[0].Version, disableHooks: u.disableHooks, } - if err := rollback.run(); err != nil { return err } + if err := rollback.run(); err != nil { + return err + } } - return fmt.Errorf("UPGRADE FAILED: %v\n", prettyError(err)) + return fmt.Errorf("UPGRADE FAILED: %v", prettyError(err)) } if settings.Debug { diff --git a/docs/helm/helm_install.md b/docs/helm/helm_install.md index 5406126fa..499e3222d 100644 --- a/docs/helm/helm_install.md +++ b/docs/helm/helm_install.md @@ -96,6 +96,7 @@ helm install [CHART] [flags] --render-subchart-notes render subchart notes along with the parent --replace re-use the given name, even if that name is already used. This is unsafe in production --repo string chart repository url where to locate the requested chart + --safe if set, upgrade process rolls back changes made in case of failed upgrade --set stringArray set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2) --set-file stringArray set values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2) --set-string stringArray set STRING values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2) @@ -129,4 +130,4 @@ helm install [CHART] [flags] * [helm](helm.md) - The Helm package manager for Kubernetes. -###### Auto generated by spf13/cobra on 1-Nov-2018 +###### Auto generated by spf13/cobra on 9-Jan-2019 diff --git a/docs/helm/helm_upgrade.md b/docs/helm/helm_upgrade.md index df5bfe6ca..081123278 100644 --- a/docs/helm/helm_upgrade.md +++ b/docs/helm/helm_upgrade.md @@ -19,7 +19,7 @@ To customize the chart values, use any of - '--set-string' to provide key=val forcing val to be stored as a string, - '--set-file' to provide key=path to read a single large value from a file at path. -To edit or append to the existing customized values, add the +To edit or append to the existing customized values, add the '--reuse-values' flag, otherwise any existing customized values are ignored. If no chart value arguments are provided on the command line, any existing customized values are carried @@ -83,6 +83,7 @@ helm upgrade [RELEASE] [CHART] [flags] --repo string chart repository url where to locate the requested chart --reset-values when upgrading, reset the values to the ones built into the chart --reuse-values when upgrading, reuse the last release's values and merge in any overrides from the command line via --set and -f. If '--reset-values' is specified, this is ignored. + --safe if set, upgrade process rolls back changes made in case of failed upgrade --set stringArray set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2) --set-file stringArray set values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2) --set-string stringArray set STRING values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2) @@ -116,4 +117,4 @@ helm upgrade [RELEASE] [CHART] [flags] * [helm](helm.md) - The Helm package manager for Kubernetes. -###### Auto generated by spf13/cobra on 1-Nov-2018 +###### Auto generated by spf13/cobra on 9-Jan-2019 From e137c55a3ae58a4ef6770259d7cc2249fbf0c0a4 Mon Sep 17 00:00:00 2001 From: Alexander Nesterenko Date: Wed, 23 Jan 2019 17:24:51 +0200 Subject: [PATCH 035/327] [#3338] Rename "safe" to "atomic" which gives more clear understanding, what it does Signed-off-by: Alexander Nesterenko --- cmd/helm/install.go | 11 ++++++----- cmd/helm/upgrade.go | 12 ++++++------ docs/helm/helm_install.md | 4 ++-- docs/helm/helm_upgrade.md | 4 ++-- 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/cmd/helm/install.go b/cmd/helm/install.go index 0316b14bf..a6d6b0812 100644 --- a/cmd/helm/install.go +++ b/cmd/helm/install.go @@ -131,7 +131,7 @@ type installCmd struct { version string timeout int64 wait bool - safe bool + atomic bool repoURL string username string password string @@ -191,7 +191,7 @@ func newInstallCmd(c helm.Interface, out io.Writer) *cobra.Command { } inst.chartPath = cp inst.client = ensureHelmClient(inst.client) - inst.wait = inst.wait || inst.safe + inst.wait = inst.wait || inst.atomic return inst.run() }, @@ -215,7 +215,7 @@ func newInstallCmd(c helm.Interface, out io.Writer) *cobra.Command { f.StringVar(&inst.version, "version", "", "specify the exact chart version to install. If this is not specified, the latest version is installed") f.Int64Var(&inst.timeout, "timeout", 300, "time in seconds to wait for any individual Kubernetes operation (like Jobs for hooks)") f.BoolVar(&inst.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(&inst.safe, "safe", false, "if set, upgrade process rolls back changes made in case of failed upgrade") + f.BoolVar(&inst.atomic, "atomic", false, "if set, installation process purges chart on fail") f.StringVar(&inst.repoURL, "repo", "", "chart repository url where to locate the requested chart") f.StringVar(&inst.username, "username", "", "chart repository username where to locate the requested chart") f.StringVar(&inst.password, "password", "", "chart repository password where to locate the requested chart") @@ -311,8 +311,8 @@ func (i *installCmd) run() error { helm.InstallWait(i.wait), helm.InstallDescription(i.description)) if err != nil { - if i.safe { - fmt.Fprintf(os.Stdout, "INSTALL FAILED\nPURGING CHART\nError: %v", prettyError(err)) + if i.atomic { + fmt.Fprintf(os.Stdout, "INSTALL FAILED\nPURGING CHART\nError: %v\n", prettyError(err)) deleteSideEffects := &deleteCmd{ name: i.name, disableHooks: i.disableHooks, @@ -326,6 +326,7 @@ func (i *installCmd) run() error { if err := deleteSideEffects.run(); err != nil { return err } + fmt.Fprintf(os.Stdout, "Successfully purged a chart!\n") } return prettyError(err) } diff --git a/cmd/helm/upgrade.go b/cmd/helm/upgrade.go index 527867e47..5184a97ff 100644 --- a/cmd/helm/upgrade.go +++ b/cmd/helm/upgrade.go @@ -44,7 +44,7 @@ To customize the chart values, use any of - '--set-string' to provide key=val forcing val to be stored as a string, - '--set-file' to provide key=path to read a single large value from a file at path. -To edit or append to the existing customized values, add the +To edit or append to the existing customized values, add the '--reuse-values' flag, otherwise any existing customized values are ignored. If no chart value arguments are provided on the command line, any existing customized values are carried @@ -105,7 +105,7 @@ type upgradeCmd struct { resetValues bool reuseValues bool wait bool - safe bool + atomic bool repoURL string username string password string @@ -143,7 +143,7 @@ func newUpgradeCmd(client helm.Interface, out io.Writer) *cobra.Command { upgrade.release = args[0] upgrade.chart = args[1] upgrade.client = ensureHelmClient(upgrade.client) - upgrade.wait = upgrade.wait || upgrade.safe + upgrade.wait = upgrade.wait || upgrade.atomic return upgrade.run() }, @@ -169,7 +169,7 @@ func newUpgradeCmd(client helm.Interface, out io.Writer) *cobra.Command { f.BoolVar(&upgrade.resetValues, "reset-values", false, "when upgrading, reset the values to the ones built into the chart") f.BoolVar(&upgrade.reuseValues, "reuse-values", false, "when upgrading, reuse the last release's values and merge in any overrides from the command line via --set and -f. If '--reset-values' is specified, this is ignored.") f.BoolVar(&upgrade.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(&upgrade.safe, "safe", false, "if set, upgrade process rolls back changes made in case of failed upgrade") + f.BoolVar(&upgrade.atomic, "atomic", false, "if set, upgrade process rolls back changes made in case of failed upgrade") f.StringVar(&upgrade.repoURL, "repo", "", "chart repository url where to locate the requested chart") f.StringVar(&upgrade.username, "username", "", "chart repository username where to locate the requested chart") f.StringVar(&upgrade.password, "password", "", "chart repository password where to locate the requested chart") @@ -236,7 +236,7 @@ func (u *upgradeCmd) run() error { timeout: u.timeout, wait: u.wait, description: u.description, - safe: u.safe, + atomic: u.atomic, } return ic.run() } @@ -276,7 +276,7 @@ func (u *upgradeCmd) run() error { helm.UpgradeDescription(u.description)) if err != nil { fmt.Fprintf(u.out, "UPGRADE FAILED\nROLLING BACK\nError: %v\n", prettyError(err)) - if u.safe { + if u.atomic { rollback := &rollbackCmd{ out: u.out, client: u.client, diff --git a/docs/helm/helm_install.md b/docs/helm/helm_install.md index 499e3222d..5d0130286 100644 --- a/docs/helm/helm_install.md +++ b/docs/helm/helm_install.md @@ -78,6 +78,7 @@ helm install [CHART] [flags] ### Options ``` + --atomic if set, upgrade process rolls back changes made in case of failed upgrade --ca-file string verify certificates of HTTPS-enabled servers using this CA bundle --cert-file string identify HTTPS client using this SSL certificate file --dep-up run helm dependency update before installing the chart @@ -96,7 +97,6 @@ helm install [CHART] [flags] --render-subchart-notes render subchart notes along with the parent --replace re-use the given name, even if that name is already used. This is unsafe in production --repo string chart repository url where to locate the requested chart - --safe if set, upgrade process rolls back changes made in case of failed upgrade --set stringArray set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2) --set-file stringArray set values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2) --set-string stringArray set STRING values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2) @@ -130,4 +130,4 @@ helm install [CHART] [flags] * [helm](helm.md) - The Helm package manager for Kubernetes. -###### Auto generated by spf13/cobra on 9-Jan-2019 +###### Auto generated by spf13/cobra on 23-Jan-2019 diff --git a/docs/helm/helm_upgrade.md b/docs/helm/helm_upgrade.md index 081123278..ac2ab316a 100644 --- a/docs/helm/helm_upgrade.md +++ b/docs/helm/helm_upgrade.md @@ -65,6 +65,7 @@ helm upgrade [RELEASE] [CHART] [flags] ### Options ``` + --atomic if set, upgrade process rolls back changes made in case of failed upgrade --ca-file string verify certificates of HTTPS-enabled servers using this CA bundle --cert-file string identify HTTPS client using this SSL certificate file --description string specify the description to use for the upgrade, rather than the default @@ -83,7 +84,6 @@ helm upgrade [RELEASE] [CHART] [flags] --repo string chart repository url where to locate the requested chart --reset-values when upgrading, reset the values to the ones built into the chart --reuse-values when upgrading, reuse the last release's values and merge in any overrides from the command line via --set and -f. If '--reset-values' is specified, this is ignored. - --safe if set, upgrade process rolls back changes made in case of failed upgrade --set stringArray set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2) --set-file stringArray set values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2) --set-string stringArray set STRING values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2) @@ -117,4 +117,4 @@ helm upgrade [RELEASE] [CHART] [flags] * [helm](helm.md) - The Helm package manager for Kubernetes. -###### Auto generated by spf13/cobra on 9-Jan-2019 +###### Auto generated by spf13/cobra on 23-Jan-2019 From 599bce8b13e5b11e931f8a0f106d4b9232be203c Mon Sep 17 00:00:00 2001 From: Alexander Nesterenko Date: Sun, 27 Jan 2019 11:22:36 +0200 Subject: [PATCH 036/327] Upgrade installation docs Signed-off-by: Alexander Nesterenko --- docs/helm/helm_install.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/helm/helm_install.md b/docs/helm/helm_install.md index 5d0130286..75a3c0502 100644 --- a/docs/helm/helm_install.md +++ b/docs/helm/helm_install.md @@ -78,7 +78,7 @@ helm install [CHART] [flags] ### Options ``` - --atomic if set, upgrade process rolls back changes made in case of failed upgrade + --atomic if set, installation process purges chart on fail --ca-file string verify certificates of HTTPS-enabled servers using this CA bundle --cert-file string identify HTTPS client using this SSL certificate file --dep-up run helm dependency update before installing the chart @@ -130,4 +130,4 @@ helm install [CHART] [flags] * [helm](helm.md) - The Helm package manager for Kubernetes. -###### Auto generated by spf13/cobra on 23-Jan-2019 +###### Auto generated by spf13/cobra on 27-Jan-2019 From 5744af51e8abc402927c2196ea2a16833353037b Mon Sep 17 00:00:00 2001 From: Alexander Nesterenko Date: Sun, 27 Jan 2019 12:49:01 +0200 Subject: [PATCH 037/327] Add smoke tests Signed-off-by: Alexander Nesterenko --- cmd/helm/install_test.go | 8 ++++++++ cmd/helm/upgrade_test.go | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/cmd/helm/install_test.go b/cmd/helm/install_test.go index 5f7ffdb50..24a5abe68 100644 --- a/cmd/helm/install_test.go +++ b/cmd/helm/install_test.go @@ -113,6 +113,14 @@ func TestInstall(t *testing.T) { expected: "apollo", resp: helm.ReleaseMock(&helm.MockReleaseOptions{Name: "apollo"}), }, + // Install, with atomic + { + name: "install with a atomic", + args: []string{"testdata/testcharts/alpine"}, + flags: strings.Split("--name apollo", " "), + expected: "apollo", + resp: helm.ReleaseMock(&helm.MockReleaseOptions{Name: "apollo"}), + }, // Install, using the name-template { name: "install with name-template", diff --git a/cmd/helm/upgrade_test.go b/cmd/helm/upgrade_test.go index 60b529f63..c2b1b4ea6 100644 --- a/cmd/helm/upgrade_test.go +++ b/cmd/helm/upgrade_test.go @@ -123,6 +123,14 @@ func TestUpgradeCmd(t *testing.T) { expected: "Release \"funny-bunny\" has been upgraded. Happy Helming!\n", rels: []*release.Release{helm.ReleaseMock(&helm.MockReleaseOptions{Name: "funny-bunny", Version: 5, Chart: ch2})}, }, + { + name: "install a release with 'upgrade --atomic'", + args: []string{"funny-bunny", chartPath}, + flags: []string{"--atomic"}, + resp: helm.ReleaseMock(&helm.MockReleaseOptions{Name: "funny-bunny", Version: 6, Chart: ch}), + expected: "Release \"funny-bunny\" has been upgraded. Happy Helming!\n", + rels: []*release.Release{helm.ReleaseMock(&helm.MockReleaseOptions{Name: "funny-bunny", Version: 6, Chart: ch})}, + }, { name: "install a release with 'upgrade --install'", args: []string{"zany-bunny", chartPath}, From 2332b480c9cb70a0d8a85247992d6155fbe82416 Mon Sep 17 00:00:00 2001 From: Alexander Nesterenko Date: Mon, 28 Jan 2019 20:06:31 +0200 Subject: [PATCH 038/327] Update docs to include information about setting `--wait flag` Signed-off-by: Alexander Nesterenko --- cmd/helm/install.go | 2 +- cmd/helm/upgrade.go | 2 +- docs/helm/helm_install.md | 4 ++-- docs/helm/helm_upgrade.md | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/helm/install.go b/cmd/helm/install.go index a6d6b0812..4602ea9fd 100644 --- a/cmd/helm/install.go +++ b/cmd/helm/install.go @@ -215,7 +215,7 @@ func newInstallCmd(c helm.Interface, out io.Writer) *cobra.Command { f.StringVar(&inst.version, "version", "", "specify the exact chart version to install. If this is not specified, the latest version is installed") f.Int64Var(&inst.timeout, "timeout", 300, "time in seconds to wait for any individual Kubernetes operation (like Jobs for hooks)") f.BoolVar(&inst.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(&inst.atomic, "atomic", false, "if set, installation process purges chart on fail") + f.BoolVar(&inst.atomic, "atomic", false, "if set, installation process purges chart on fail, also sets --wait flag") f.StringVar(&inst.repoURL, "repo", "", "chart repository url where to locate the requested chart") f.StringVar(&inst.username, "username", "", "chart repository username where to locate the requested chart") f.StringVar(&inst.password, "password", "", "chart repository password where to locate the requested chart") diff --git a/cmd/helm/upgrade.go b/cmd/helm/upgrade.go index 5184a97ff..044ec045d 100644 --- a/cmd/helm/upgrade.go +++ b/cmd/helm/upgrade.go @@ -169,7 +169,7 @@ func newUpgradeCmd(client helm.Interface, out io.Writer) *cobra.Command { f.BoolVar(&upgrade.resetValues, "reset-values", false, "when upgrading, reset the values to the ones built into the chart") f.BoolVar(&upgrade.reuseValues, "reuse-values", false, "when upgrading, reuse the last release's values and merge in any overrides from the command line via --set and -f. If '--reset-values' is specified, this is ignored.") f.BoolVar(&upgrade.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(&upgrade.atomic, "atomic", false, "if set, upgrade process rolls back changes made in case of failed upgrade") + f.BoolVar(&upgrade.atomic, "atomic", false, "if set, upgrade process rolls back changes made in case of failed upgrade, also sets --wait flag") f.StringVar(&upgrade.repoURL, "repo", "", "chart repository url where to locate the requested chart") f.StringVar(&upgrade.username, "username", "", "chart repository username where to locate the requested chart") f.StringVar(&upgrade.password, "password", "", "chart repository password where to locate the requested chart") diff --git a/docs/helm/helm_install.md b/docs/helm/helm_install.md index 75a3c0502..12ae81b78 100644 --- a/docs/helm/helm_install.md +++ b/docs/helm/helm_install.md @@ -78,7 +78,7 @@ helm install [CHART] [flags] ### Options ``` - --atomic if set, installation process purges chart on fail + --atomic if set, installation process purges chart on fail, also sets --wait flag --ca-file string verify certificates of HTTPS-enabled servers using this CA bundle --cert-file string identify HTTPS client using this SSL certificate file --dep-up run helm dependency update before installing the chart @@ -130,4 +130,4 @@ helm install [CHART] [flags] * [helm](helm.md) - The Helm package manager for Kubernetes. -###### Auto generated by spf13/cobra on 27-Jan-2019 +###### Auto generated by spf13/cobra on 28-Jan-2019 diff --git a/docs/helm/helm_upgrade.md b/docs/helm/helm_upgrade.md index ac2ab316a..676c26595 100644 --- a/docs/helm/helm_upgrade.md +++ b/docs/helm/helm_upgrade.md @@ -65,7 +65,7 @@ helm upgrade [RELEASE] [CHART] [flags] ### Options ``` - --atomic if set, upgrade process rolls back changes made in case of failed upgrade + --atomic if set, upgrade process rolls back changes made in case of failed upgrade, also sets --wait flag --ca-file string verify certificates of HTTPS-enabled servers using this CA bundle --cert-file string identify HTTPS client using this SSL certificate file --description string specify the description to use for the upgrade, rather than the default @@ -117,4 +117,4 @@ helm upgrade [RELEASE] [CHART] [flags] * [helm](helm.md) - The Helm package manager for Kubernetes. -###### Auto generated by spf13/cobra on 23-Jan-2019 +###### Auto generated by spf13/cobra on 28-Jan-2019 From 074dbcde4f51473eab19dea5a0d843981bb2f72a Mon Sep 17 00:00:00 2001 From: Bort Verwilst Date: Tue, 29 Jan 2019 19:41:34 +0100 Subject: [PATCH 039/327] Switch to numeric user id (#5203) Signed-off-by: Bart Verwilst --- rootfs/Dockerfile | 2 +- rootfs/Dockerfile.experimental | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rootfs/Dockerfile b/rootfs/Dockerfile index 82dfa0d4c..f918c4d51 100644 --- a/rootfs/Dockerfile +++ b/rootfs/Dockerfile @@ -22,6 +22,6 @@ COPY helm /helm COPY tiller /tiller EXPOSE 44134 -USER nobody +USER 65534 ENTRYPOINT ["/tiller"] diff --git a/rootfs/Dockerfile.experimental b/rootfs/Dockerfile.experimental index ca0c87f30..61e49ab67 100644 --- a/rootfs/Dockerfile.experimental +++ b/rootfs/Dockerfile.experimental @@ -21,6 +21,6 @@ ENV HOME /tmp COPY tiller /tiller EXPOSE 44134 -USER nobody +USER 65534 ENTRYPOINT ["/tiller", "--experimental-release"] From 7871ea9f736d4ec02db6512b779089219c9f0e3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20K=C5=82opotek?= Date: Tue, 29 Jan 2019 19:43:38 +0100 Subject: [PATCH 040/327] Update documentation with option to install helm on Windows via scoop (#5207) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcin Kłopotek --- docs/install.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/install.md b/docs/install.md index b47aea6f1..b9626a43a 100755 --- a/docs/install.md +++ b/docs/install.md @@ -45,7 +45,7 @@ brew install kubernetes-helm (Note: There is also a formula for emacs-helm, which is a different project.) -### From Chocolatey (Windows) +### From Chocolatey or scoop (Windows) Members of the Kubernetes community have contributed a [Helm package](https://chocolatey.org/packages/kubernetes-helm) build to [Chocolatey](https://chocolatey.org/). This package is generally up to date. @@ -54,6 +54,12 @@ Members of the Kubernetes community have contributed a [Helm package](https://ch choco install kubernetes-helm ``` +The binary can also be installed via [`scoop`](https://scoop.sh) command-line installer. + +``` +scoop install helm +``` + ## From Script Helm now has an installer script that will automatically grab the latest version From a47a35814973bbaa7d37eec9fa5e30ac8c863daf Mon Sep 17 00:00:00 2001 From: Maor Friedman Date: Tue, 29 Jan 2019 10:44:25 -0800 Subject: [PATCH 041/327] [docs/related] add helm tiller-info plugin, related to #5111 (#5154) Signed-off-by: Maor --- docs/related.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/related.md b/docs/related.md index 5c027cc36..4fc4d9737 100644 --- a/docs/related.md +++ b/docs/related.md @@ -53,6 +53,7 @@ or [pull request](https://github.com/helm/helm/pulls). - [helm-stop](https://github.com/IBM/helm-stop) - Plugin for stopping a release pods - [helm-template](https://github.com/technosophos/helm-template) - Debug/render templates client-side - [helm-tiller](https://github.com/adamreese/helm-tiller) - Additional commands to work with Tiller +- [helm-tiller-info](https://github.com/maorfr/helm-tiller-info) - Plugin which prints information about Tiller - [helm-unittest](https://github.com/lrills/helm-unittest) - Plugin for unit testing chart locally with YAML - [Tillerless Helm v2](https://github.com/rimusz/helm-tiller) - Helm plugin for using Tiller locally and in CI/CD pipelines From f8ae371388df01aa770a4f6e9511fe92d0f1d770 Mon Sep 17 00:00:00 2001 From: Christian Hildebrando Hercules Date: Tue, 29 Jan 2019 10:54:02 -0800 Subject: [PATCH 042/327] Updating SAP example of gathering charts in one place (#5125) Signed-off-by: Christian H Hercules --- docs/charts_tips_and_tricks.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/charts_tips_and_tricks.md b/docs/charts_tips_and_tricks.md index e948d3bcf..9f9cc84a6 100644 --- a/docs/charts_tips_and_tricks.md +++ b/docs/charts_tips_and_tricks.md @@ -255,9 +255,9 @@ embed each of the components. Two strong design patterns are illustrated by these projects: -**SAP's [OpenStack chart](https://github.com/sapcc/openstack-helm):** This chart -installs a full OpenStack IaaS on Kubernetes. All of the charts are collected -together in one GitHub repository. +**SAP's [Converged charts](https://github.com/sapcc/helm-charts):** These charts +install SAP Converged Cloud a full OpenStack IaaS on Kubernetes. All of the charts are collected +together in one GitHub repository, except for a few submodules. **Deis's [Workflow](https://github.com/deis/workflow/tree/master/charts/workflow):** This chart exposes the entire Deis PaaS system with one chart. But it's different From 4c1edcf0492f7e6a315dbeced3c008e96a40bc47 Mon Sep 17 00:00:00 2001 From: Peter Stalman Date: Tue, 29 Jan 2019 10:54:51 -0800 Subject: [PATCH 043/327] Fixes #5046, zsh completion (#5072) Signed-off-by: Peter Stalman --- cmd/helm/completion.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/helm/completion.go b/cmd/helm/completion.go index 2181e723c..d0249b2ea 100644 --- a/cmd/helm/completion.go +++ b/cmd/helm/completion.go @@ -212,6 +212,7 @@ __helm_convert_bash_to_zsh() { -e "s/${LWORD}compopt${RWORD}/__helm_compopt/g" \ -e "s/${LWORD}declare${RWORD}/__helm_declare/g" \ -e "s/\\\$(type${RWORD}/\$(__helm_type/g" \ + -e 's/aliashash\["\(\w\+\)"\]/aliashash[\1]/g' \ <<'BASH_COMPLETION_EOF' ` out.Write([]byte(zshInitialization)) From 6ceaef446f70ac125b9a6d02b1a7a46956b104af Mon Sep 17 00:00:00 2001 From: Laski Date: Tue, 29 Jan 2019 16:15:38 -0300 Subject: [PATCH 044/327] Clarify section title (#5226) As stated by @schollii in https://github.com/helm/helm/issues/4505#issuecomment-415886732 "Overriding Values from a Parent Chart" is unclear. This changes that text to "Overriding Values of a Child Chart". See @scholli's comment for justification. Signed-off-by: Nahuel Lascano --- docs/chart_template_guide/subcharts_and_globals.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/chart_template_guide/subcharts_and_globals.md b/docs/chart_template_guide/subcharts_and_globals.md index 1954df39a..b37a82bca 100644 --- a/docs/chart_template_guide/subcharts_and_globals.md +++ b/docs/chart_template_guide/subcharts_and_globals.md @@ -63,7 +63,7 @@ data: dessert: cake ``` -## Overriding Values from a Parent Chart +## Overriding Values of a Child Chart Our original chart, `mychart` is now the _parent_ chart of `mysubchart`. This relationship is based entirely on the fact that `mysubchart` is within `mychart/charts`. From 5cf932c140fd5b3557d1c345aaa5168e58fd82b1 Mon Sep 17 00:00:00 2001 From: Amim Knabben Date: Tue, 29 Jan 2019 18:00:51 -0200 Subject: [PATCH 045/327] Changing deprecated library reference and setting delete propagation background policy (#5161) Signed-off-by: Amim Knabben --- cmd/helm/installer/uninstall.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cmd/helm/installer/uninstall.go b/cmd/helm/installer/uninstall.go index db824ca0b..87fbd4050 100644 --- a/cmd/helm/installer/uninstall.go +++ b/cmd/helm/installer/uninstall.go @@ -47,10 +47,11 @@ func deleteService(client corev1.ServicesGetter, namespace string) error { } // deleteDeployment deletes the Tiller Deployment resource -// We need to use the reaper instead of the kube API because GC for deployment dependents -// is not yet supported at the k8s server level (<= 1.5) func deleteDeployment(client kubernetes.Interface, namespace string) error { - err := client.Extensions().Deployments(namespace).Delete(deploymentName, &metav1.DeleteOptions{}) + policy := metav1.DeletePropagationBackground + err := client.AppsV1().Deployments(namespace).Delete(deploymentName, &metav1.DeleteOptions{ + PropagationPolicy: &policy, + }) return ingoreNotFound(err) } From ab0ba3aa630f64e0fd46cdd6726645a7e3520db9 Mon Sep 17 00:00:00 2001 From: James Ravn Date: Tue, 29 Jan 2019 20:04:17 +0000 Subject: [PATCH 046/327] fix(tiller): respect resource policy on upgrade (#5225) Don't delete a resource on upgrade if it is annotated with helm.io/resource-policy=keep. This can cause data loss for users if the annotation is ignored (e.g. for a PVC). Closes #3673 Signed-off-by: James Ravn --- pkg/kube/client.go | 18 +++++++++++++++++- pkg/kube/client_test.go | 15 +++++++++++++++ pkg/kube/resource_policy.go | 26 ++++++++++++++++++++++++++ pkg/tiller/resource_policy.go | 13 ++----------- 4 files changed, 60 insertions(+), 12 deletions(-) create mode 100644 pkg/kube/resource_policy.go diff --git a/pkg/kube/client.go b/pkg/kube/client.go index 4a387d524..e897aced6 100644 --- a/pkg/kube/client.go +++ b/pkg/kube/client.go @@ -23,11 +23,12 @@ import ( goerrors "errors" "fmt" "io" + "k8s.io/apimachinery/pkg/api/meta" "log" "strings" "time" - jsonpatch "github.com/evanphx/json-patch" + "github.com/evanphx/json-patch" appsv1 "k8s.io/api/apps/v1" appsv1beta1 "k8s.io/api/apps/v1beta1" appsv1beta2 "k8s.io/api/apps/v1beta2" @@ -60,6 +61,8 @@ const MissingGetHeader = "==> MISSING\nKIND\t\tNAME\n" // ErrNoObjectsVisited indicates that during a visit operation, no matching objects were found. var ErrNoObjectsVisited = goerrors.New("no objects visited") +var metadataAccessor = meta.NewAccessor() + // Client represents a client capable of communicating with the Kubernetes API. type Client struct { cmdutil.Factory @@ -308,6 +311,19 @@ func (c *Client) Update(namespace string, originalReader, targetReader io.Reader for _, info := range original.Difference(target) { c.Log("Deleting %q in %s...", info.Name, info.Namespace) + + if err := info.Get(); err != nil { + c.Log("Unable to get obj %q, err: %s", info.Name, err) + } + annotations, err := metadataAccessor.Annotations(info.Object) + if err != nil { + c.Log("Unable to get annotations on %q, err: %s", info.Name, err) + } + if annotations != nil && annotations[ResourcePolicyAnno] == KeepPolicy { + c.Log("Skipping delete of %q due to annotation [%s=%s]", info.Name, ResourcePolicyAnno, KeepPolicy) + continue + } + if err := deleteResource(info); err != nil { c.Log("Failed to delete %q, err: %s", info.Name, err) } diff --git a/pkg/kube/client_test.go b/pkg/kube/client_test.go index de33881c8..aa21b937c 100644 --- a/pkg/kube/client_test.go +++ b/pkg/kube/client_test.go @@ -151,6 +151,8 @@ func TestUpdate(t *testing.T) { return newResponse(200, &listB.Items[1]) case p == "/namespaces/default/pods/squid" && m == "DELETE": return newResponse(200, &listB.Items[1]) + case p == "/namespaces/default/pods/squid" && m == "GET": + return newResponse(200, &listA.Items[2]) default: t.Fatalf("unexpected request: %s %s", req.Method, req.URL.Path) return nil, nil @@ -183,6 +185,7 @@ func TestUpdate(t *testing.T) { "/namespaces/default/pods/otter:GET", "/namespaces/default/pods/dolphin:GET", "/namespaces/default/pods:POST", + "/namespaces/default/pods/squid:GET", "/namespaces/default/pods/squid:DELETE", } if len(expectedActions) != len(actions) { @@ -194,6 +197,18 @@ func TestUpdate(t *testing.T) { t.Errorf("expected %s request got %s", v, actions[k]) } } + + // Test resource policy is respected + actions = nil + listA.Items[2].ObjectMeta.Annotations = map[string]string{ResourcePolicyAnno: KeepPolicy} + if err := c.Update(v1.NamespaceDefault, objBody(&listA), objBody(&listB), false, false, 0, false); err != nil { + t.Fatal(err) + } + for _, v := range actions { + if v == "/namespaces/default/pods/squid:DELETE" { + t.Errorf("should not have deleted squid - it has helm.sh/resource-policy=keep") + } + } } func TestBuild(t *testing.T) { diff --git a/pkg/kube/resource_policy.go b/pkg/kube/resource_policy.go new file mode 100644 index 000000000..45cebcba8 --- /dev/null +++ b/pkg/kube/resource_policy.go @@ -0,0 +1,26 @@ +/* +Copyright The Helm Authors. + +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 kube + +// ResourcePolicyAnno is the annotation name for a resource policy +const ResourcePolicyAnno = "helm.sh/resource-policy" + +// KeepPolicy is the resource policy type for keep +// +// This resource policy type allows resources to skip being deleted +// during an uninstallRelease action. +const KeepPolicy = "keep" diff --git a/pkg/tiller/resource_policy.go b/pkg/tiller/resource_policy.go index cca2391d8..aa9c5d2bd 100644 --- a/pkg/tiller/resource_policy.go +++ b/pkg/tiller/resource_policy.go @@ -24,15 +24,6 @@ import ( "k8s.io/helm/pkg/tiller/environment" ) -// resourcePolicyAnno is the annotation name for a resource policy -const resourcePolicyAnno = "helm.sh/resource-policy" - -// keepPolicy is the resource policy type for keep -// -// This resource policy type allows resources to skip being deleted -// during an uninstallRelease action. -const keepPolicy = "keep" - func filterManifestsToKeep(manifests []Manifest) ([]Manifest, []Manifest) { remaining := []Manifest{} keep := []Manifest{} @@ -43,14 +34,14 @@ func filterManifestsToKeep(manifests []Manifest) ([]Manifest, []Manifest) { continue } - resourcePolicyType, ok := m.Head.Metadata.Annotations[resourcePolicyAnno] + resourcePolicyType, ok := m.Head.Metadata.Annotations[kube.ResourcePolicyAnno] if !ok { remaining = append(remaining, m) continue } resourcePolicyType = strings.ToLower(strings.TrimSpace(resourcePolicyType)) - if resourcePolicyType == keepPolicy { + if resourcePolicyType == kube.KeepPolicy { keep = append(keep, m) } From 51a7a4487b28a359738ac6b3135f6fbe7a0d95d6 Mon Sep 17 00:00:00 2001 From: Matthew Fisher Date: Tue, 29 Jan 2019 12:34:33 -0800 Subject: [PATCH 047/327] docs: add note on rolling back to the previous release (#5228) While deving at a Microsoft Open Hack my group discovered this useful piece of information in this issue comment: https://github.com/helm/helm/issues/1796#issuecomment-311385728 We found it very useful for our Blue Green CD pipeline and thought others might find it useful as well. Signed-off-by: Ethan Arrowood Signed-off-by: Matthew Fisher --- cmd/helm/rollback.go | 3 ++- docs/helm/helm_rollback.md | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cmd/helm/rollback.go b/cmd/helm/rollback.go index 0c46fa818..78d79659d 100644 --- a/cmd/helm/rollback.go +++ b/cmd/helm/rollback.go @@ -31,7 +31,8 @@ This command rolls back a release to a previous revision. The first argument of the rollback command is the name of a release, and the second is a revision (version) number. To see revision numbers, run -'helm history RELEASE'. +'helm history RELEASE'. If you'd like to rollback to the previous release use +'helm rollback [RELEASE] 0'. ` type rollbackCmd struct { diff --git a/docs/helm/helm_rollback.md b/docs/helm/helm_rollback.md index 5862b180a..80fc83a83 100644 --- a/docs/helm/helm_rollback.md +++ b/docs/helm/helm_rollback.md @@ -9,7 +9,8 @@ This command rolls back a release to a previous revision. The first argument of the rollback command is the name of a release, and the second is a revision (version) number. To see revision numbers, run -'helm history RELEASE'. +'helm history RELEASE'. If you'd like to rollback to the previous release use +'helm rollback [RELEASE] 0'. ``` @@ -51,4 +52,4 @@ helm rollback [flags] [RELEASE] [REVISION] * [helm](helm.md) - The Helm package manager for Kubernetes. -###### Auto generated by spf13/cobra on 10-Aug-2018 +###### Auto generated by spf13/cobra on 29-Jan-2019 From 9596dc768ad4b44aa3f6772a64912f8d04c4ea44 Mon Sep 17 00:00:00 2001 From: Matthew Fisher Date: Tue, 29 Jan 2019 12:35:44 -0800 Subject: [PATCH 048/327] add missing "and" (#5227) Signed-off-by: Matthew Fisher --- docs/chart_template_guide/variables.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/docs/chart_template_guide/variables.md b/docs/chart_template_guide/variables.md index d924fe2cf..dda92559b 100644 --- a/docs/chart_template_guide/variables.md +++ b/docs/chart_template_guide/variables.md @@ -98,10 +98,7 @@ data: Variables are normally not "global". They are scoped to the block in which they are declared. Earlier, we assigned `$relname` in the top level of the template. That variable will be in scope for the entire template. But in our last example, `$key` and `$val` will only be in scope inside of the `{{range...}}{{end}}` block. -However, there is one variable that is always global - `$` - this -variable will always point to the root context. This can be very -useful when you are looping in a range need to know the chart's release -name. +However, there is one variable that is always global - `$` - this variable will always point to the root context. This can be very useful when you are looping in a range and need to know the chart's release name. An example illustrating this: ```yaml @@ -111,8 +108,8 @@ kind: Secret metadata: name: {{ .name }} labels: - # Many helm templates would use `.` below, but that will not work, - # however `$` will work here + # Many helm templates would use `.` below, but that will not work, + # however `$` will work here app.kubernetes.io/name: {{ template "fullname" $ }} # I cannot reference .Chart.Name, but I can do $.Chart.Name helm.sh/chart: "{{ $.Chart.Name }}-{{ $.Chart.Version }}" From 36d2c716b3194cceb4b22f32259990a04014b5f5 Mon Sep 17 00:00:00 2001 From: Patrick Stegmann Date: Wed, 30 Jan 2019 00:21:47 +0100 Subject: [PATCH 049/327] Adds the tip that you can pass custom objects (#3916) --- docs/charts_tips_and_tricks.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/charts_tips_and_tricks.md b/docs/charts_tips_and_tricks.md index 9f9cc84a6..e2c73b14f 100644 --- a/docs/charts_tips_and_tricks.md +++ b/docs/charts_tips_and_tricks.md @@ -36,6 +36,12 @@ is required, and will print an error message when that entry is missing: value: {{ required "A valid .Values.who entry required!" .Values.who }} ``` +When using the `include` function, you can pass it a custom object tree built from the current context by using the `dict` function: + +```yaml +{{- include "mytpl" (dict "key1" .Values.originalKey1 "key2" .Values.originalKey2) }} +``` + ## Quote Strings, Don't Quote Integers When you are working with string data, you are always safer quoting the From abd3659b649d6a463c5cd6c6aefd265590a138e2 Mon Sep 17 00:00:00 2001 From: "Pablo M. Canseco" Date: Tue, 29 Jan 2019 22:03:30 -0700 Subject: [PATCH 050/327] Update using_helm.md (#4690) * Update using_helm.md In docs/using_helm.md, it says on line 214 that you can pass in a YAML formatted file, but the example commands following that sentence create JSON code but names the file with a .yml extension. For clarity, I propose saying that it will accept JSON or YAML but clarify in the code that for the example we're making a JSON file. Signed-off-by: Pablo Canseco * update using_helm.md to accurately say that helm install -f only takes a yaml-formatted file. Signed-off-by: Pablo Canseco * updated wording to reflect the fact that -f / --values only accepts YAML Signed-off-by: Pablo Canseco --- docs/using_helm.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/using_helm.md b/docs/using_helm.md index 5716a1302..db723d993 100755 --- a/docs/using_helm.md +++ b/docs/using_helm.md @@ -1,4 +1,4 @@ -# Using Helm +# Using Helm This guide explains the basics of using Helm (and Tiller) to manage packages on your Kubernetes cluster. It assumes that you have already @@ -215,7 +215,10 @@ You can then override any of these settings in a YAML formatted file, and then pass that file during installation. ```console -$ echo '{mariadbUser: user0, mariadbDatabase: user0db}' > config.yaml +$ cat << EOF > config.yaml +mariadbUser: user0 +mariadbDatabase: user0db +EOF $ helm install -f config.yaml stable/mariadb ``` From 048b220205c581378b393155896ca5e862ee0480 Mon Sep 17 00:00:00 2001 From: Jacob Silva Date: Wed, 30 Jan 2019 01:11:07 -0500 Subject: [PATCH 051/327] Removed link for Cabin mobile app (#5231) Signed-off-by: Jacob Silva --- docs/related.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/related.md b/docs/related.md index 4fc4d9737..ba1b0dfbf 100644 --- a/docs/related.md +++ b/docs/related.md @@ -89,7 +89,6 @@ Tools layered on top of Helm or Tiller. Platforms, distributions, and services that include Helm support. -- [Cabin](http://www.skippbox.com/cabin/) - Mobile App for Managing Kubernetes - [Fabric8](https://fabric8.io) - Integrated development platform for Kubernetes - [Jenkins X](http://jenkins-x.io/) - open source automated CI/CD for Kubernetes which uses Helm for [promoting](http://jenkins-x.io/about/features/#promotion) applications through [environments via GitOps](http://jenkins-x.io/about/features/#environments) - [Kubernetic](https://kubernetic.com/) - Kubernetes Desktop Client From a2b1afc66bfc2b3d0a876ef7a2a25f38f12c1415 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20K=C5=82opotek?= Date: Wed, 30 Jan 2019 16:06:24 +0100 Subject: [PATCH 052/327] Update README with scoop install option (#5234) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcin Kłopotek --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 7e68df5c3..1889e818e 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,7 @@ If you want to use a package manager: - [Homebrew](https://brew.sh/) users can use `brew install kubernetes-helm`. - [Chocolatey](https://chocolatey.org/) users can use `choco install kubernetes-helm`. +- [Scoop](https://scoop.sh/) users can use `scoop install helm`. - [GoFish](https://gofi.sh/) users can use `gofish install helm`. To rapidly get Helm up and running, start with the [Quick Start Guide](https://docs.helm.sh/using_helm/#quickstart-guide). From 7161095f79e2c9a35350d301ad820e57e56182ec Mon Sep 17 00:00:00 2001 From: lIuDuI <1693291525@qq.com> Date: Thu, 31 Jan 2019 12:10:26 +0800 Subject: [PATCH 053/327] Update func name (#5241) Signed-off-by: xichengliudui <1693291525@qq.com> --- cmd/helm/installer/install.go | 2 +- cmd/helm/installer/options.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/helm/installer/install.go b/cmd/helm/installer/install.go index 6027fdba8..d6d24eec4 100644 --- a/cmd/helm/installer/install.go +++ b/cmd/helm/installer/install.go @@ -183,7 +183,7 @@ func generateLabels(labels map[string]string) map[string]string { return labels } -// parseNodeSelectors parses a comma delimited list of key=values pairs into a map. +// parseNodeSelectorsInto parses a comma delimited list of key=values pairs into a map. func parseNodeSelectorsInto(labels string, m map[string]string) error { kv := strings.Split(labels, ",") for _, v := range kv { diff --git a/cmd/helm/installer/options.go b/cmd/helm/installer/options.go index 196ad8de4..dbcb376c5 100644 --- a/cmd/helm/installer/options.go +++ b/cmd/helm/installer/options.go @@ -50,7 +50,7 @@ type Options struct { // AutoMountServiceAccountToken determines whether or not the service account should be added to Tiller. AutoMountServiceAccountToken bool - // Force allows to force upgrading tiller if deployed version is greater than current version + // ForceUpgrade allows to force upgrading tiller if deployed version is greater than current version ForceUpgrade bool // ImageSpec identifies the image Tiller will use when deployed. From 251a6a2b580158b5dfb34e8b08b10071e6353c1a Mon Sep 17 00:00:00 2001 From: Dean Coakley Date: Fri, 1 Feb 2019 05:32:40 +0000 Subject: [PATCH 054/327] Fix code syntax highlighting in docs (#5245) * Added yaml to undelcared code blocks * Changed YAML->yaml for consistency * Added console syntax highlighting Signed-off-by: Dean Coakley --- docs/chart_template_guide/control_structures.md | 6 +++--- docs/chart_template_guide/debugging.md | 4 ++-- docs/chart_template_guide/functions_and_pipelines.md | 4 ++-- docs/chart_template_guide/values_files.md | 4 ++-- docs/chart_template_guide/yaml_techniques.md | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/chart_template_guide/control_structures.md b/docs/chart_template_guide/control_structures.md index 61d9ef9e2..68820dfa7 100644 --- a/docs/chart_template_guide/control_structures.md +++ b/docs/chart_template_guide/control_structures.md @@ -20,7 +20,7 @@ The first control structure we'll look at is for conditionally including blocks The basic structure for a conditional looks like this: -``` +```yaml {{ if PIPELINE }} # Do something {{ else if OTHER PIPELINE }} @@ -115,7 +115,7 @@ data: `mug` is incorrectly indented. Let's simply out-dent that one line, and re-run: -``` +```yaml apiVersion: v1 kind: ConfigMap metadata: @@ -224,7 +224,7 @@ The next control structure to look at is the `with` action. This controls variab The syntax for `with` is similar to a simple `if` statement: -``` +```yaml {{ with PIPELINE }} # restricted scope {{ end }} diff --git a/docs/chart_template_guide/debugging.md b/docs/chart_template_guide/debugging.md index fac788cc4..23a6ae70b 100644 --- a/docs/chart_template_guide/debugging.md +++ b/docs/chart_template_guide/debugging.md @@ -12,7 +12,7 @@ When your YAML is failing to parse, but you want to see what is generated, one easy way to retrieve the YAML is to comment out the problem section in the template, and then re-run `helm install --dry-run --debug`: -```YAML +```yaml apiVersion: v1 # some: problem section # {{ .Values.foo | quote }} @@ -20,7 +20,7 @@ apiVersion: v1 The above will be rendered and returned with the comments intact: -```YAML +```yaml apiVersion: v1 # some: problem section # "bar" diff --git a/docs/chart_template_guide/functions_and_pipelines.md b/docs/chart_template_guide/functions_and_pipelines.md index 66176fc59..fe9c92d6e 100644 --- a/docs/chart_template_guide/functions_and_pipelines.md +++ b/docs/chart_template_guide/functions_and_pipelines.md @@ -4,7 +4,7 @@ So far, we've seen how to place information into a template. But that informatio Let's start with a best practice: When injecting strings from the `.Values` object into the template, we ought to quote these strings. We can do that by calling the `quote` function in the template directive: -``` +```yaml apiVersion: v1 kind: ConfigMap metadata: @@ -104,7 +104,7 @@ drink: {{ .Values.favorite.drink | default "tea" | quote }} If we run this as normal, we'll get our `coffee`: -``` +```yaml # Source: mychart/templates/configmap.yaml apiVersion: v1 kind: ConfigMap diff --git a/docs/chart_template_guide/values_files.md b/docs/chart_template_guide/values_files.md index a15047667..218da19dc 100644 --- a/docs/chart_template_guide/values_files.md +++ b/docs/chart_template_guide/values_files.md @@ -54,7 +54,7 @@ data: Because `favoriteDrink` is set in the default `values.yaml` file to `coffee`, that's the value displayed in the template. We can easily override that by adding a `--set` flag in our call to `helm install`: -``` +```console helm install --dry-run --debug --set favoriteDrink=slurm ./mychart SERVER: "localhost:44134" CHART PATH: /Users/mattbutcher/Code/Go/src/k8s.io/helm/_scratch/mychart @@ -85,7 +85,7 @@ favorite: Now we would have to modify the template slightly: -``` +```yaml apiVersion: v1 kind: ConfigMap metadata: diff --git a/docs/chart_template_guide/yaml_techniques.md b/docs/chart_template_guide/yaml_techniques.md index 44c41f903..00b33b674 100644 --- a/docs/chart_template_guide/yaml_techniques.md +++ b/docs/chart_template_guide/yaml_techniques.md @@ -177,7 +177,7 @@ Now the value of `coffee` will be `Latte\nCappuccino\nEspresso\n\n\n`. Indentation inside of a text block is preserved, and results in the preservation of line breaks, too: -``` +```yaml coffee: |- Latte 12 oz @@ -336,7 +336,7 @@ reference is expanded and then discarded. So if we were to decode and then re-encode the example above, the resulting YAML would be: -```YAML +```yaml coffee: yes, please favorite: Cappucino coffees: From 9e18364fea6cc8a2cd97a2fa1b40650583b1eeff Mon Sep 17 00:00:00 2001 From: JoeWrightss <42261994+JoeWrightss@users.noreply.github.com> Date: Fri, 1 Feb 2019 13:33:04 +0800 Subject: [PATCH 055/327] Fix some spelling errors in comment (#5246) Signed-off-by: zhoulin xie --- pkg/repo/repotest/server.go | 2 +- pkg/storage/driver/secrets.go | 2 +- pkg/tiller/release_list.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/repo/repotest/server.go b/pkg/repo/repotest/server.go index 36ab10d70..394294bcd 100644 --- a/pkg/repo/repotest/server.go +++ b/pkg/repo/repotest/server.go @@ -148,7 +148,7 @@ func (s *Server) URL() string { return s.srv.URL } -// LinkIndices links the index created with CreateIndex and makes a symboic link to the repositories/cache directory. +// LinkIndices links the index created with CreateIndex and makes a symbolic link to the repositories/cache directory. // // This makes it possible to simulate a local cache of a repository. func (s *Server) LinkIndices() error { diff --git a/pkg/storage/driver/secrets.go b/pkg/storage/driver/secrets.go index b79a84272..606d7960b 100644 --- a/pkg/storage/driver/secrets.go +++ b/pkg/storage/driver/secrets.go @@ -45,7 +45,7 @@ type Secrets struct { Log func(string, ...interface{}) } -// NewSecrets initializes a new Secrets wrapping an implmenetation of +// NewSecrets initializes a new Secrets wrapping an implementation of // the kubernetes SecretsInterface. func NewSecrets(impl corev1.SecretInterface) *Secrets { return &Secrets{ diff --git a/pkg/tiller/release_list.go b/pkg/tiller/release_list.go index 3299d3ef2..6d62c7bc4 100644 --- a/pkg/tiller/release_list.go +++ b/pkg/tiller/release_list.go @@ -140,7 +140,7 @@ func (s *ReleaseServer) partition(rels []*release.Release, cap int) <-chan []*re // Over-cap, push chunk onto channel to send over gRPC stream s.Log("partitioned at %d with %d releases (cap=%d)", fill, len(chunk), cap) chunks <- chunk - // reset paritioning state + // reset partitioning state chunk = nil fill = 0 } From 147dc225e2a0cc7f5e08a46ea9b59a1d78217f1c Mon Sep 17 00:00:00 2001 From: lIuDuI <1693291525@qq.com> Date: Fri, 1 Feb 2019 22:33:59 +0800 Subject: [PATCH 056/327] Update func name (#5250) * Update func name Signed-off-by: xichengliudui <1693291525@qq.com> * update pull request Signed-off-by: xichengliudui <1693291525@qq.com> --- pkg/tiller/environment/environment.go | 2 +- pkg/tiller/release_server.go | 2 +- pkg/urlutil/urlutil.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/tiller/environment/environment.go b/pkg/tiller/environment/environment.go index 86d077b89..290337d7b 100644 --- a/pkg/tiller/environment/environment.go +++ b/pkg/tiller/environment/environment.go @@ -119,7 +119,7 @@ type KubeClient interface { // by "\n---\n"). Delete(namespace string, reader io.Reader) error - // Watch the resource in reader until it is "ready". + // WatchUntilReady watch the resource in reader until it is "ready". // // For Jobs, "ready" means the job ran to completion (excited without error). // For all other kinds, it means the kind was created or modified without diff --git a/pkg/tiller/release_server.go b/pkg/tiller/release_server.go index 680c39dac..b85118cd2 100644 --- a/pkg/tiller/release_server.go +++ b/pkg/tiller/release_server.go @@ -456,7 +456,7 @@ func (s *ReleaseServer) deleteHookByPolicy(h *release.Hook, policy string, name, return nil } -// hookShouldBeDeleted determines whether the defined hook deletion policy matches the hook deletion polices +// hookHasDeletePolicy determines whether the defined hook deletion policy matches the hook deletion polices // supported by helm. If so, mark the hook as one should be deleted. func hookHasDeletePolicy(h *release.Hook, policy string) bool { if dp, ok := deletePolices[policy]; ok { diff --git a/pkg/urlutil/urlutil.go b/pkg/urlutil/urlutil.go index 272907de0..96b691c92 100644 --- a/pkg/urlutil/urlutil.go +++ b/pkg/urlutil/urlutil.go @@ -73,7 +73,7 @@ func ExtractHostname(addr string) (string, error) { return stripPort(u.Host), nil } -// Backported from Go 1.8 because Circle is still on 1.7 +// stripPort from Go 1.8 because Circle is still on 1.7 func stripPort(hostport string) string { colon := strings.IndexByte(hostport, ':') if colon == -1 { From d3373f568c63e48c3af3b181bca81ca61967e289 Mon Sep 17 00:00:00 2001 From: ahmadali shafiee Date: Fri, 1 Feb 2019 19:38:28 +0330 Subject: [PATCH 057/327] making ingress path configurations more customizable (#5175) * making ingress path configurations more customizable Signed-off-by: Ahmadali Shafiee * update notes ingress reference Signed-off-by: Ahmadali Shafiee --- pkg/chartutil/create.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkg/chartutil/create.go b/pkg/chartutil/create.go index 8f713fcd1..9af4b8f45 100644 --- a/pkg/chartutil/create.go +++ b/pkg/chartutil/create.go @@ -75,9 +75,10 @@ ingress: annotations: {} # kubernetes.io/ingress.class: nginx # kubernetes.io/tls-acme: "true" - paths: [] hosts: - - chart-example.local + - host: chart-example.local + paths: [] + tls: [] # - secretName: chart-example-tls # hosts: @@ -128,7 +129,6 @@ const defaultIgnore = `# Patterns to ignore when building packages. const defaultIngress = `{{- if .Values.ingress.enabled -}} {{- $fullName := include ".fullname" . -}} -{{- $ingressPaths := .Values.ingress.paths -}} apiVersion: extensions/v1beta1 kind: Ingress metadata: @@ -155,10 +155,10 @@ spec: {{- end }} rules: {{- range .Values.ingress.hosts }} - - host: {{ . | quote }} + - host: {{ .host | quote }} http: paths: - {{- range $ingressPaths }} + {{- range .paths }} - path: {{ . }} backend: serviceName: {{ $fullName }} @@ -245,8 +245,8 @@ spec: const defaultNotes = `1. Get the application URL by running these commands: {{- if .Values.ingress.enabled }} {{- range $host := .Values.ingress.hosts }} - {{- range $.Values.ingress.paths }} - http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host }}{{ . }} + {{- range .paths }} + http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }} {{- end }} {{- end }} {{- else if contains "NodePort" .Values.service.type }} From 69c7ba320e041894c073f7f62a98075b72c6bfd8 Mon Sep 17 00:00:00 2001 From: Flavian Date: Fri, 1 Feb 2019 17:12:46 +0100 Subject: [PATCH 058/327] Fix: type conversion for zero values (#5151) * added test for zero values Signed-off-by: Flavian * implemented case for zero values Signed-off-by: Flavian --- pkg/strvals/parser.go | 4 ++++ pkg/strvals/parser_test.go | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/pkg/strvals/parser.go b/pkg/strvals/parser.go index 9d52f34c0..d0a647c67 100644 --- a/pkg/strvals/parser.go +++ b/pkg/strvals/parser.go @@ -393,6 +393,10 @@ func typedVal(v []rune, st bool) interface{} { return nil } + if strings.EqualFold(val, "0") { + return int64(0) + } + // If this value does not start with zero, try parsing it to an int if len(val) != 0 && val[0] != '0' { if iv, err := strconv.ParseInt(val, 10, 64); err == nil { diff --git a/pkg/strvals/parser_test.go b/pkg/strvals/parser_test.go index a096f16d2..5d77aed18 100644 --- a/pkg/strvals/parser_test.go +++ b/pkg/strvals/parser_test.go @@ -85,6 +85,11 @@ func TestParseSet(t *testing.T) { expect: map[string]interface{}{"is_null": "null"}, err: false, }, + { + str: "zero=0", + expect: map[string]interface{}{"zero": "0"}, + err: false, + }, } tests := []struct { str string @@ -123,6 +128,10 @@ func TestParseSet(t *testing.T) { str: "leading_zeros=00009", expect: map[string]interface{}{"leading_zeros": "00009"}, }, + { + str: "zero_int=0", + expect: map[string]interface{}{"zero_int": 0}, + }, { str: "long_int=1234567890", expect: map[string]interface{}{"long_int": 1234567890}, From 7a70459ca1913fcffeb374eca4446c5f97427da9 Mon Sep 17 00:00:00 2001 From: Alex Speaks Date: Fri, 1 Feb 2019 08:18:10 -0800 Subject: [PATCH 059/327] Fix incorrect flow example and improve operator documentation (#4919) * Fix incorrect flow example and improve operator documentation Signed-off-by: Alex * Use golang comment format Signed-off-by: Alex --- docs/chart_template_guide/control_structures.md | 2 +- .../functions_and_pipelines.md | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/docs/chart_template_guide/control_structures.md b/docs/chart_template_guide/control_structures.md index 68820dfa7..e2f9ca89d 100644 --- a/docs/chart_template_guide/control_structures.md +++ b/docs/chart_template_guide/control_structures.md @@ -53,7 +53,7 @@ data: myvalue: "Hello World" drink: {{ .Values.favorite.drink | default "tea" | quote }} food: {{ .Values.favorite.food | upper | quote }} - {{ if and (.Values.favorite.drink) (eq .Values.favorite.drink "coffee") }}mug: true{{ end }} + {{ if and .Values.favorite.drink (eq .Values.favorite.drink "coffee") }}mug: true{{ end }} ``` Note that `.Values.favorite.drink` must be defined or else it will throw an error when comparing it to "coffee". Since we commented out `drink: coffee` in our last example, the output should not include a `mug: true` flag. But if we add that line back into our `values.yaml` file, the output should look like this: diff --git a/docs/chart_template_guide/functions_and_pipelines.md b/docs/chart_template_guide/functions_and_pipelines.md index fe9c92d6e..fe5a3c2b2 100644 --- a/docs/chart_template_guide/functions_and_pipelines.md +++ b/docs/chart_template_guide/functions_and_pipelines.md @@ -150,6 +150,19 @@ Template functions and pipelines are a powerful way to transform information and ## Operators are functions -For templates, the operators (`eq`, `ne`, `lt`, `gt`, `and`, `or` and so on) are all implemented as functions. In pipelines, operations can be grouped with parentheses (`(`, and `)`). +Operators are implemented as functions that return a boolean value. To use `eq`, `ne`, `lt`, `gt`, `and`, `or`, `not` etcetera place the operator at the front of the statement followed by its parameters just as you would a function. To chain multiple operations together, separate individual functions by surrounding them with paranthesis. + +```yaml +{{/* include the body of this if statement when the variable .Values.fooString exists and is set to "foo" */}} +{{ if and .Values.fooString (eq .Values.fooString "foo") }} + {{ ... }} +{{ end }} + + +{{/* do not include the body of this if statement because unset variables evaluate to false and .Values.setVariable was negated with the not function. */}} +{{ if or .Values.anUnsetVariable (not .Values.aSetVariable) }} + {{ ... }} +{{ end }} +``` Now we can turn from functions and pipelines to flow control with conditions, loops, and scope modifiers. From c9dfd2507129fa392e9c8b57ade7e2dbb33b063c Mon Sep 17 00:00:00 2001 From: Ryan Hartje Date: Fri, 1 Feb 2019 10:45:54 -0600 Subject: [PATCH 060/327] added warning and set default image for unreleased versions of helm for #3770 (#3781) * added warning and set default image for unreleased versions of helm * changed to BuildMetadata * changed to BuildMetadata * added check for clientOnly flag --- cmd/helm/init.go | 9 +++++++++ cmd/helm/installer/install_test.go | 4 ++++ cmd/helm/installer/options.go | 3 +++ 3 files changed, 16 insertions(+) diff --git a/cmd/helm/init.go b/cmd/helm/init.go index b628dc008..db35ef037 100644 --- a/cmd/helm/init.go +++ b/cmd/helm/init.go @@ -36,6 +36,7 @@ import ( "k8s.io/helm/pkg/helm/helmpath" "k8s.io/helm/pkg/helm/portforwarder" "k8s.io/helm/pkg/repo" + "k8s.io/helm/pkg/version" ) const initDesc = ` @@ -315,6 +316,14 @@ func (i *initCmd) run() error { fmt.Fprintln(i.out, "Not installing Tiller due to 'client-only' flag having been set") } + needsDefaultImage := !i.clientOnly && !i.opts.UseCanary && len(i.opts.ImageSpec) == 0 && version.BuildMetadata == "unreleased" + if needsDefaultImage { + fmt.Fprintf(i.out, "\nWarning: You appear to be using an unreleased version of Helm. Please either use the\n"+ + "--canary-image flag, or specify your desired tiller version with --tiller-image.\n\n"+ + "Ex:\n"+ + "$ helm init --tiller-image gcr.io/kubernetes-helm/tiller:v2.8.2\n\n") + } + fmt.Fprintln(i.out, "Happy Helming!") return nil } diff --git a/cmd/helm/installer/install_test.go b/cmd/helm/installer/install_test.go index 561b3ed6d..50cc8b1d8 100644 --- a/cmd/helm/installer/install_test.go +++ b/cmd/helm/installer/install_test.go @@ -53,6 +53,10 @@ func TestDeployment(t *testing.T) { t.Fatalf("%s: error %q", tt.name, err) } + // Unreleased versions of helm don't have a release image. See issue 3370 + if tt.name == "default" && version.BuildMetadata == "unreleased" { + tt.expect = "gcr.io/kubernetes-helm/tiller:canary" + } if got := dep.Spec.Template.Spec.Containers[0].Image; got != tt.expect { t.Errorf("%s: expected image %q, got %q", tt.name, tt.expect, got) } diff --git a/cmd/helm/installer/options.go b/cmd/helm/installer/options.go index dbcb376c5..186286ec2 100644 --- a/cmd/helm/installer/options.go +++ b/cmd/helm/installer/options.go @@ -105,6 +105,9 @@ func (opts *Options) SelectImage() string { case opts.UseCanary: return defaultImage + ":canary" case opts.ImageSpec == "": + if version.BuildMetadata == "unreleased" { + return defaultImage + ":canary" + } return fmt.Sprintf("%s:%s", defaultImage, version.Version) default: return opts.ImageSpec From f5df47b1c855e02c66f57756af224bc9b1055b09 Mon Sep 17 00:00:00 2001 From: Alexander Matyushentsev Date: Fri, 1 Feb 2019 09:02:06 -0800 Subject: [PATCH 061/327] Fix: kind sorter incorrectly compares unknown and namespace (#5186) Signed-off-by: Alexander Matyushentsev --- pkg/tiller/kind_sorter.go | 17 ++++++++++++----- pkg/tiller/kind_sorter_test.go | 21 +++++++++++++++++++++ 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/pkg/tiller/kind_sorter.go b/pkg/tiller/kind_sorter.go index 8aff4e6c1..ceeb0f928 100644 --- a/pkg/tiller/kind_sorter.go +++ b/pkg/tiller/kind_sorter.go @@ -124,14 +124,16 @@ func (k *kindSorter) Less(i, j int) bool { b := k.manifests[j] first, aok := k.ordering[a.Head.Kind] second, bok := k.ordering[b.Head.Kind] - // if same kind (including unknown) sub sort alphanumeric - if first == second { - // if both are unknown and of different kind sort by kind alphabetically - if !aok && !bok && a.Head.Kind != b.Head.Kind { + + if !aok && !bok { + // if both are unknown then sort alphabetically by kind and name + if a.Head.Kind != b.Head.Kind { return a.Head.Kind < b.Head.Kind + } else { + return a.Name < b.Name } - return a.Name < b.Name } + // unknown kind is last if !aok { return false @@ -139,6 +141,11 @@ func (k *kindSorter) Less(i, j int) bool { if !bok { return true } + + // if same kind sub sort alphanumeric + if first == second { + return a.Name < b.Name + } // sort different kinds return first < second } diff --git a/pkg/tiller/kind_sorter_test.go b/pkg/tiller/kind_sorter_test.go index 1c187e90d..56822f995 100644 --- a/pkg/tiller/kind_sorter_test.go +++ b/pkg/tiller/kind_sorter_test.go @@ -223,3 +223,24 @@ func TestKindSorterSubSort(t *testing.T) { }) } } + +func TestKindSorterNamespaceAgainstUnknown(t *testing.T) { + unknown := Manifest{ + Name: "a", + Head: &util.SimpleHead{Kind: "Unknown"}, + } + namespace := Manifest{ + Name: "b", + Head: &util.SimpleHead{Kind: "Namespace"}, + } + + manifests := []Manifest{unknown, namespace} + sortByKind(manifests, InstallOrder) + + expectedOrder := []Manifest{namespace, unknown} + for i, manifest := range manifests { + if expectedOrder[i].Name != manifest.Name { + t.Errorf("Expected %s, got %s", expectedOrder[i].Name, manifest.Name) + } + } +} From 3953f0e884afd85a68ab4d8b4488cec735e2bc58 Mon Sep 17 00:00:00 2001 From: adshmh <23505281+adshmh@users.noreply.github.com> Date: Fri, 1 Feb 2019 12:12:03 -0500 Subject: [PATCH 062/327] fix(helm): add test for repo update strict flag (#5183) While adding the test, noticed a race in the repo update code, due to multiple go routines potentially incrementing the error counter. Included the required mutex in the repo update code in the same commit, since the new test uncovered the race condition. Signed-off-by: Arash Deshmeh --- cmd/helm/repo_update.go | 7 +++++++ cmd/helm/repo_update_test.go | 27 +++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/cmd/helm/repo_update.go b/cmd/helm/repo_update.go index 526300343..1a239b407 100644 --- a/cmd/helm/repo_update.go +++ b/cmd/helm/repo_update.go @@ -93,21 +93,28 @@ func updateCharts(repos []*repo.ChartRepository, out io.Writer, home helmpath.Ho var ( errorCounter int wg sync.WaitGroup + mu sync.Mutex ) for _, re := range repos { wg.Add(1) go func(re *repo.ChartRepository) { defer wg.Done() if re.Config.Name == localRepository { + mu.Lock() fmt.Fprintf(out, "...Skip %s chart repository\n", re.Config.Name) + mu.Unlock() return } err := re.DownloadIndexFile(home.Cache()) if err != nil { + mu.Lock() errorCounter++ fmt.Fprintf(out, "...Unable to get an update from the %q chart repository (%s):\n\t%s\n", re.Config.Name, re.Config.URL, err) + mu.Unlock() } else { + mu.Lock() fmt.Fprintf(out, "...Successfully got an update from the %q chart repository\n", re.Config.Name) + mu.Unlock() } }(re) } diff --git a/cmd/helm/repo_update_test.go b/cmd/helm/repo_update_test.go index 86af437c5..5b1058008 100644 --- a/cmd/helm/repo_update_test.go +++ b/cmd/helm/repo_update_test.go @@ -105,3 +105,30 @@ func TestUpdateCharts(t *testing.T) { t.Error("Update was not successful") } } + +func TestUpdateCmdStrictFlag(t *testing.T) { + thome, err := tempHelmHome(t) + if err != nil { + t.Fatal(err) + } + + cleanup := resetEnv() + defer func() { + os.RemoveAll(thome.String()) + cleanup() + }() + + settings.Home = thome + + out := bytes.NewBuffer(nil) + cmd := newRepoUpdateCmd(out) + cmd.ParseFlags([]string{"--strict"}) + + if err := cmd.RunE(cmd, []string{}); err == nil { + t.Fatal("expected error due to strict flag") + } + + if got := out.String(); !strings.Contains(got, "Unable to get an update") { + t.Errorf("Expected 'Unable to get an update', got %q", got) + } +} From c2e8720c7258dbfbee7cd2ed73114160a937e8fd Mon Sep 17 00:00:00 2001 From: Jecho Date: Fri, 1 Feb 2019 15:15:16 -0800 Subject: [PATCH 063/327] fixed minor typo in doc (#5249) Signed-off-by: Jecho Ricafrente --- docs/chart_tests.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/chart_tests.md b/docs/chart_tests.md index 300eeaf73..408656c4a 100644 --- a/docs/chart_tests.md +++ b/docs/chart_tests.md @@ -64,7 +64,7 @@ spec: ``` ## Steps to Run a Test Suite on a Release -1. `$ helm install wordpress` +1. `$ helm install stable/wordpress` ``` NAME: quirky-walrus LAST DEPLOYED: Mon Feb 13 13:50:43 2017 From 1f386a34ea170850f1239a850ce381356fd59ddd Mon Sep 17 00:00:00 2001 From: adshmh <23505281+adshmh@users.noreply.github.com> Date: Fri, 1 Feb 2019 18:44:46 -0500 Subject: [PATCH 064/327] add --devel flag to inspect command (#5141) * fix(helm): add --devel flag to allow inspect on pre-release chart versions Signed-off-by: Arash Deshmeh * fix(helm): remove some duplication from inspect command preparation Signed-off-by: Arash Deshmeh --- cmd/helm/inspect.go | 43 +++++++----- cmd/helm/inspect_test.go | 66 ++++++++++++++++++ .../prerelease-0.2.0-pre-release.tgz | Bin 0 -> 1064 bytes .../testdata/testcharts/prerelease/Chart.yaml | 6 ++ .../testdata/testcharts/prerelease/README.md | 13 ++++ .../prerelease/templates/alpine-pod.yaml | 26 +++++++ docs/helm/helm_inspect.md | 3 +- docs/helm/helm_inspect_chart.md | 3 +- docs/helm/helm_inspect_readme.md | 3 +- docs/helm/helm_inspect_values.md | 3 +- 10 files changed, 146 insertions(+), 20 deletions(-) create mode 100644 cmd/helm/testdata/testcharts/prerelease-0.2.0-pre-release.tgz create mode 100644 cmd/helm/testdata/testcharts/prerelease/Chart.yaml create mode 100644 cmd/helm/testdata/testcharts/prerelease/README.md create mode 100644 cmd/helm/testdata/testcharts/prerelease/templates/alpine-pod.yaml diff --git a/cmd/helm/inspect.go b/cmd/helm/inspect.go index 844116bc5..52e681e48 100644 --- a/cmd/helm/inspect.go +++ b/cmd/helm/inspect.go @@ -59,6 +59,7 @@ type inspectCmd struct { repoURL string username string password string + devel bool certFile string keyFile string @@ -88,12 +89,9 @@ func newInspectCmd(out io.Writer) *cobra.Command { if err := checkArgsLength(len(args), "chart name"); err != nil { return err } - cp, err := locateChartPath(insp.repoURL, insp.username, insp.password, args[0], insp.version, insp.verify, insp.keyring, - insp.certFile, insp.keyFile, insp.caFile) - if err != nil { + if err := insp.prepare(args[0]); err != nil { return err } - insp.chartpath = cp return insp.run() }, } @@ -107,12 +105,9 @@ func newInspectCmd(out io.Writer) *cobra.Command { if err := checkArgsLength(len(args), "chart name"); err != nil { return err } - cp, err := locateChartPath(insp.repoURL, insp.username, insp.password, args[0], insp.version, insp.verify, insp.keyring, - insp.certFile, insp.keyFile, insp.caFile) - if err != nil { + if err := insp.prepare(args[0]); err != nil { return err } - insp.chartpath = cp return insp.run() }, } @@ -126,12 +121,9 @@ func newInspectCmd(out io.Writer) *cobra.Command { if err := checkArgsLength(len(args), "chart name"); err != nil { return err } - cp, err := locateChartPath(insp.repoURL, insp.username, insp.password, args[0], insp.version, insp.verify, insp.keyring, - insp.certFile, insp.keyFile, insp.caFile) - if err != nil { + if err := insp.prepare(args[0]); err != nil { return err } - insp.chartpath = cp return insp.run() }, } @@ -145,12 +137,9 @@ func newInspectCmd(out io.Writer) *cobra.Command { if err := checkArgsLength(len(args), "chart name"); err != nil { return err } - cp, err := locateChartPath(insp.repoURL, insp.username, insp.password, args[0], insp.version, insp.verify, insp.keyring, - insp.certFile, insp.keyFile, insp.caFile) - if err != nil { + if err := insp.prepare(args[0]); err != nil { return err } - insp.chartpath = cp return insp.run() }, } @@ -193,6 +182,12 @@ func newInspectCmd(out io.Writer) *cobra.Command { valuesSubCmd.Flags().StringVar(&insp.password, password, "", passworddesc) chartSubCmd.Flags().StringVar(&insp.password, password, "", passworddesc) + develFlag := "devel" + develDesc := "use development versions, too. Equivalent to version '>0.0.0-0'. If --version is set, this is ignored." + for _, subCmd := range cmds { + subCmd.Flags().BoolVar(&insp.devel, develFlag, false, develDesc) + } + certFile := "cert-file" certFiledesc := "verify certificates of HTTPS-enabled servers using this CA bundle" for _, subCmd := range cmds { @@ -218,6 +213,22 @@ func newInspectCmd(out io.Writer) *cobra.Command { return inspectCommand } +func (i *inspectCmd) prepare(chart string) error { + debug("Original chart version: %q", i.version) + if i.version == "" && i.devel { + debug("setting version to >0.0.0-0") + i.version = ">0.0.0-0" + } + + cp, err := locateChartPath(i.repoURL, i.username, i.password, chart, i.version, i.verify, i.keyring, + i.certFile, i.keyFile, i.caFile) + if err != nil { + return err + } + i.chartpath = cp + return nil +} + func (i *inspectCmd) run() error { chrt, err := chartutil.Load(i.chartpath) if err != nil { diff --git a/cmd/helm/inspect_test.go b/cmd/helm/inspect_test.go index b9dbf2ab6..c4ce005b0 100644 --- a/cmd/helm/inspect_test.go +++ b/cmd/helm/inspect_test.go @@ -19,8 +19,11 @@ package main import ( "bytes" "io/ioutil" + "os" "strings" "testing" + + "k8s.io/helm/pkg/repo/repotest" ) func TestInspect(t *testing.T) { @@ -78,3 +81,66 @@ func TestInspect(t *testing.T) { t.Errorf("expected empty values buffer, got %q", b.String()) } } + +func TestInspectPreReleaseChart(t *testing.T) { + hh, err := tempHelmHome(t) + if err != nil { + t.Fatal(err) + } + cleanup := resetEnv() + defer func() { + os.RemoveAll(hh.String()) + cleanup() + }() + + settings.Home = hh + + srv := repotest.NewServer(hh.String()) + defer srv.Stop() + + if _, err := srv.CopyCharts("testdata/testcharts/*.tgz*"); err != nil { + t.Fatal(err) + } + if err := srv.LinkIndices(); err != nil { + t.Fatal(err) + } + + tests := []struct { + name string + args []string + flags []string + fail bool + expectedErr string + }{ + { + name: "inspect pre-release chart", + args: []string{"prerelease"}, + fail: true, + expectedErr: "chart \"prerelease\" not found", + }, + { + name: "inspect pre-release chart with 'devel' flag", + args: []string{"prerelease"}, + flags: []string{"--devel"}, + fail: false, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + tt.flags = append(tt.flags, "--repo", srv.URL()) + cmd := newInspectCmd(ioutil.Discard) + cmd.SetArgs(tt.args) + cmd.ParseFlags(tt.flags) + if err := cmd.RunE(cmd, tt.args); err != nil { + if tt.fail { + if !strings.Contains(err.Error(), tt.expectedErr) { + t.Errorf("%q expected error: %s, got: %s", tt.name, tt.expectedErr, err.Error()) + } + return + } + t.Errorf("%q reported error: %s", tt.name, err) + } + }) + } +} diff --git a/cmd/helm/testdata/testcharts/prerelease-0.2.0-pre-release.tgz b/cmd/helm/testdata/testcharts/prerelease-0.2.0-pre-release.tgz new file mode 100644 index 0000000000000000000000000000000000000000..36c8f02da06c1b6b36342b1757e719074282c712 GIT binary patch literal 1064 zcmV+@1lRi?iwG0|00000|0w_~VMtOiV@ORlOnEsqVl!4SWK%V1T2nbTPgYhoO;>Dc zVQyr3R8em|NM&qo0PI&ykJ~mA-m`wiK)J@UY`yD!>)WCU(4cJ)Y=ZzrQNUwyY!RkN zl|xzUI{xnkNonnMw#cE24T^d$hDpvdADnrHYAjh&giPb_E3_`#VXdy7SMog1Z?3Py zZ=UDpzxlK%t|rC*CfAeMO)kmL1xw{2$vo5AI(gg1EG@ank5H zyrD*!9Uv@`WeK;ck(%HqsoQ&Kj7Ta|(;O=28lI2GoBwkr&A1{}CmQ|Ev6vDztu2Y? z$>`zyTDq!TW~HfvPE_2I)M5@Fj7Vy7DA3_N0f^n5?)TYUtd;CN)^s?G z_WSG;s+PE4ND}~sOH%CB0A9hziXg4XN{4Go<0eRkmPvp!;4GFK=qg!O;EYiq0tb-* zgtgp~hBAz$9`2p%l~=8Tm9c=LmYSif40NcShh!q?Ds<2nHUmO~*2%I}XoHm=O)^;G z#%PvHMIJBO!KTSJ?UJk}M}g#O)VL-wTJGj>l7?T%Ze>aE8UAREBRCvR!|v^;P#V1@ z?Ku`|+z^9wK*+n007-y@t9}8M0i{PQcPyz3>!~2l1 zN4W4A&J2euespI3ly`lPpE;R;H|tPpvf>g{{`TA=k%)}OOimLbdN!|LxweJvSA{%UNMkh z-|n!e0(hWwh@7wp7zB&s^K$`0S}L8fyMbXm9d60)1}D8Q!!U$Sx(YBUP3yPJ%FjWp z$&uv&d>a|ezh)P(l8TPNUywA1IpFDaarO{iz~E$-B)^&#O4JYrsZ!uh6A?p?;SL9c iDS6x<7~a^6?80>yxyVJnk^B_^0RR8mc}r0M6aWC+uN4~r literal 0 HcmV?d00001 diff --git a/cmd/helm/testdata/testcharts/prerelease/Chart.yaml b/cmd/helm/testdata/testcharts/prerelease/Chart.yaml new file mode 100644 index 000000000..d8d901473 --- /dev/null +++ b/cmd/helm/testdata/testcharts/prerelease/Chart.yaml @@ -0,0 +1,6 @@ +description: Deploy a basic Alpine Linux pod +home: https://k8s.io/helm +name: prerelease +sources: +- https://github.com/helm/helm +version: 0.2.0-pre-release diff --git a/cmd/helm/testdata/testcharts/prerelease/README.md b/cmd/helm/testdata/testcharts/prerelease/README.md new file mode 100644 index 000000000..3c32de5db --- /dev/null +++ b/cmd/helm/testdata/testcharts/prerelease/README.md @@ -0,0 +1,13 @@ +#Alpine: A simple Helm chart + +Run a single pod of Alpine Linux. + +This example was generated using the command `helm create alpine`. + +The `templates/` directory contains a very simple pod resource with a +couple of parameters. + +The `values.yaml` file contains the default values for the +`alpine-pod.yaml` template. + +You can install this example using `helm install docs/examples/alpine`. diff --git a/cmd/helm/testdata/testcharts/prerelease/templates/alpine-pod.yaml b/cmd/helm/testdata/testcharts/prerelease/templates/alpine-pod.yaml new file mode 100644 index 000000000..f569d556c --- /dev/null +++ b/cmd/helm/testdata/testcharts/prerelease/templates/alpine-pod.yaml @@ -0,0 +1,26 @@ +apiVersion: v1 +kind: Pod +metadata: + name: "{{.Release.Name}}-{{.Values.Name}}" + labels: + # The "heritage" label is used to track which tool deployed a given chart. + # It is useful for admins who want to see what releases a particular tool + # is responsible for. + app.kubernetes.io/managed-by: {{.Release.Service | quote }} + # The "release" convention makes it easy to tie a release to all of the + # Kubernetes resources that were created as part of that release. + app.kubernetes.io/instance: {{.Release.Name | quote }} + # This makes it easy to audit chart usage. + helm.sh/chart: "{{.Chart.Name}}-{{.Chart.Version}}" + annotations: + "helm.sh/created": {{.Release.Time.Seconds | quote }} +spec: + # This shows how to use a simple value. This will look for a passed-in value + # called restartPolicy. If it is not found, it will use the default value. + # {{default "Never" .restartPolicy}} is a slightly optimized version of the + # more conventional syntax: {{.restartPolicy | default "Never"}} + restartPolicy: {{default "Never" .Values.restartPolicy}} + containers: + - name: waiter + image: "alpine:3.3" + command: ["/bin/sleep","9000"] diff --git a/docs/helm/helm_inspect.md b/docs/helm/helm_inspect.md index 86689eeaa..8bdf1092d 100644 --- a/docs/helm/helm_inspect.md +++ b/docs/helm/helm_inspect.md @@ -20,6 +20,7 @@ helm inspect [CHART] [flags] ``` --ca-file string chart repository url where to locate the requested chart --cert-file string verify certificates of HTTPS-enabled servers using this CA bundle + --devel use development versions, too. Equivalent to version '>0.0.0-0'. If --version is set, this is ignored. -h, --help help for inspect --key-file string identify HTTPS client using this SSL key file --keyring string path to the keyring containing public verification keys (default "~/.gnupg/pubring.gpg") @@ -49,4 +50,4 @@ helm inspect [CHART] [flags] * [helm inspect readme](helm_inspect_readme.md) - shows inspect readme * [helm inspect values](helm_inspect_values.md) - shows inspect values -###### Auto generated by spf13/cobra on 1-Aug-2018 +###### Auto generated by spf13/cobra on 8-Jan-2019 diff --git a/docs/helm/helm_inspect_chart.md b/docs/helm/helm_inspect_chart.md index 2b9adbb7e..1cd13fc72 100644 --- a/docs/helm/helm_inspect_chart.md +++ b/docs/helm/helm_inspect_chart.md @@ -18,6 +18,7 @@ helm inspect chart [CHART] [flags] ``` --ca-file string chart repository url where to locate the requested chart --cert-file string verify certificates of HTTPS-enabled servers using this CA bundle + --devel use development versions, too. Equivalent to version '>0.0.0-0'. If --version is set, this is ignored. -h, --help help for chart --key-file string identify HTTPS client using this SSL key file --keyring string path to the keyring containing public verification keys (default "~/.gnupg/pubring.gpg") @@ -44,4 +45,4 @@ helm inspect chart [CHART] [flags] * [helm inspect](helm_inspect.md) - inspect a chart -###### Auto generated by spf13/cobra on 1-Aug-2018 +###### Auto generated by spf13/cobra on 8-Jan-2019 diff --git a/docs/helm/helm_inspect_readme.md b/docs/helm/helm_inspect_readme.md index d222cd53a..9570d19d6 100644 --- a/docs/helm/helm_inspect_readme.md +++ b/docs/helm/helm_inspect_readme.md @@ -18,6 +18,7 @@ helm inspect readme [CHART] [flags] ``` --ca-file string chart repository url where to locate the requested chart --cert-file string verify certificates of HTTPS-enabled servers using this CA bundle + --devel use development versions, too. Equivalent to version '>0.0.0-0'. If --version is set, this is ignored. -h, --help help for readme --key-file string identify HTTPS client using this SSL key file --keyring string path to the keyring containing public verification keys (default "~/.gnupg/pubring.gpg") @@ -42,4 +43,4 @@ helm inspect readme [CHART] [flags] * [helm inspect](helm_inspect.md) - inspect a chart -###### Auto generated by spf13/cobra on 1-Aug-2018 +###### Auto generated by spf13/cobra on 8-Jan-2019 diff --git a/docs/helm/helm_inspect_values.md b/docs/helm/helm_inspect_values.md index 9cca2fc32..a634134dd 100644 --- a/docs/helm/helm_inspect_values.md +++ b/docs/helm/helm_inspect_values.md @@ -18,6 +18,7 @@ helm inspect values [CHART] [flags] ``` --ca-file string chart repository url where to locate the requested chart --cert-file string verify certificates of HTTPS-enabled servers using this CA bundle + --devel use development versions, too. Equivalent to version '>0.0.0-0'. If --version is set, this is ignored. -h, --help help for values --key-file string identify HTTPS client using this SSL key file --keyring string path to the keyring containing public verification keys (default "~/.gnupg/pubring.gpg") @@ -44,4 +45,4 @@ helm inspect values [CHART] [flags] * [helm inspect](helm_inspect.md) - inspect a chart -###### Auto generated by spf13/cobra on 1-Aug-2018 +###### Auto generated by spf13/cobra on 8-Jan-2019 From 1984f436afa9e9d0bacb1a74bae67a0cf591b15c Mon Sep 17 00:00:00 2001 From: Aaron Roydhouse Date: Mon, 4 Feb 2019 10:22:06 -0500 Subject: [PATCH 065/327] Document the HELM_TLS_HOSTNAME variable in 'helm --help' (#5123) * Document the HELM_TLS_HOSTNAME environment variable in 'helm --help' Resolves #5120 Also adjust order `ENABLE` -> `VERIFY` -> `HOSTNAME` Signed-off-by: Aaron Roydhouse * Update docs folder for addition of HELM_TLS_HOSTNAME documentation Signed-off-by: Aaron Roydhouse --- cmd/helm/helm.go | 3 ++- docs/helm/helm.md | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cmd/helm/helm.go b/cmd/helm/helm.go index f7628e44c..b815568cb 100644 --- a/cmd/helm/helm.go +++ b/cmd/helm/helm.go @@ -69,8 +69,9 @@ Environment: $HELM_TLS_CA_CERT path to TLS CA certificate used to verify the Helm client and Tiller server certificates (default "$HELM_HOME/ca.pem") $HELM_TLS_CERT path to TLS client certificate file for authenticating to Tiller (default "$HELM_HOME/cert.pem") $HELM_TLS_KEY path to TLS client key file for authenticating to Tiller (default "$HELM_HOME/key.pem") - $HELM_TLS_VERIFY enable TLS connection between Helm and Tiller and verify Tiller server certificate (default "false") $HELM_TLS_ENABLE enable TLS connection between Helm and Tiller (default "false") + $HELM_TLS_VERIFY enable TLS connection between Helm and Tiller and verify Tiller server certificate (default "false") + $HELM_TLS_HOSTNAME the hostname or IP address used to verify the Tiller server certificate (default "127.0.0.1") $HELM_KEY_PASSPHRASE set HELM_KEY_PASSPHRASE to the passphrase of your PGP private key. If set, you will not be prompted for the passphrase while signing helm charts diff --git a/docs/helm/helm.md b/docs/helm/helm.md index 177be7e88..b00ae91d6 100644 --- a/docs/helm/helm.md +++ b/docs/helm/helm.md @@ -29,8 +29,9 @@ Environment: $HELM_TLS_CA_CERT path to TLS CA certificate used to verify the Helm client and Tiller server certificates (default "$HELM_HOME/ca.pem") $HELM_TLS_CERT path to TLS client certificate file for authenticating to Tiller (default "$HELM_HOME/cert.pem") $HELM_TLS_KEY path to TLS client key file for authenticating to Tiller (default "$HELM_HOME/key.pem") - $HELM_TLS_VERIFY enable TLS connection between Helm and Tiller and verify Tiller server certificate (default "false") $HELM_TLS_ENABLE enable TLS connection between Helm and Tiller (default "false") + $HELM_TLS_VERIFY enable TLS connection between Helm and Tiller and verify Tiller server certificate (default "false") + $HELM_TLS_HOSTNAME the hostname or IP address used to verify the Tiller server certificate (default "127.0.0.1") $HELM_KEY_PASSPHRASE set HELM_KEY_PASSPHRASE to the passphrase of your PGP private key. If set, you will not be prompted for the passphrase while signing helm charts @@ -78,4 +79,4 @@ Environment: * [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 -###### Auto generated by spf13/cobra on 16-Oct-2018 +###### Auto generated by spf13/cobra on 4-Feb-2019 From 9f4a9d206cd12b8ea57a59172dfa80a3b0c69586 Mon Sep 17 00:00:00 2001 From: Arash Deshmeh Date: Fri, 18 May 2018 05:46:55 -0400 Subject: [PATCH 066/327] fix(helm): fixed output leak from template command unit tests Signed-off-by: Arash Deshmeh --- cmd/helm/template.go | 11 ++++++----- cmd/helm/template_test.go | 15 +-------------- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/cmd/helm/template.go b/cmd/helm/template.go index 1838bb758..9f0687a7c 100644 --- a/cmd/helm/template.go +++ b/cmd/helm/template.go @@ -91,6 +91,7 @@ func newTemplateCmd(out io.Writer) *cobra.Command { RunE: t.run, } + cmd.SetOutput(out) f := cmd.Flags() f.BoolVar(&t.showNotes, "notes", false, "show the computed NOTES.txt file as well") f.StringVarP(&t.releaseName, "name", "n", "release-name", "release name") @@ -241,20 +242,20 @@ func (t *templateCmd) run(cmd *cobra.Command, args []string) error { if whitespaceRegex.MatchString(data) { continue } - err = writeToFile(t.outputDir, m.Name, data) + err = writeToFile(t.outputDir, m.Name, data, t.out) if err != nil { return err } continue } - fmt.Printf("---\n# Source: %s\n", m.Name) - fmt.Println(data) + fmt.Fprintf(t.out, "---\n# Source: %s\n", m.Name) + fmt.Fprintln(t.out, data) } return nil } // write the to / -func writeToFile(outputDir string, name string, data string) error { +func writeToFile(outputDir string, name string, data string, out io.Writer) error { outfileName := strings.Join([]string{outputDir, name}, string(filepath.Separator)) err := ensureDirectoryForFile(outfileName) @@ -275,7 +276,7 @@ func writeToFile(outputDir string, name string, data string) error { return err } - fmt.Printf("wrote %s\n", outfileName) + fmt.Fprintf(out, "wrote %s\n", outfileName) return nil } diff --git a/cmd/helm/template_test.go b/cmd/helm/template_test.go index 3c5026b08..1ecc2cf2f 100644 --- a/cmd/helm/template_test.go +++ b/cmd/helm/template_test.go @@ -20,7 +20,6 @@ import ( "bufio" "bytes" "fmt" - "io" "os" "path/filepath" "strings" @@ -178,14 +177,9 @@ func TestTemplateCmd(t *testing.T) { }, } - var buf bytes.Buffer for _, tt := range tests { tt := tt t.Run(tt.name, func(t *testing.T) { - // capture stdout - old := os.Stdout - r, w, _ := os.Pipe() - os.Stdout = w // execute template command out := bytes.NewBuffer(nil) cmd := newTemplateCmd(out) @@ -206,14 +200,8 @@ func TestTemplateCmd(t *testing.T) { } else if err != nil { t.Errorf("expected no error, got %v", err) } - // restore stdout - w.Close() - os.Stdout = old - var b bytes.Buffer - io.Copy(&b, r) - r.Close() // scan yaml into map[]yaml - scanner := bufio.NewScanner(&b) + scanner := bufio.NewScanner(out) next := false lastKey := "" m := map[string]string{} @@ -239,7 +227,6 @@ func TestTemplateCmd(t *testing.T) { } else { t.Errorf("could not find key %s", tt.expectKey) } - buf.Reset() }) } } From d8bdf484cc77e5e816b311d99609a2511c897eea Mon Sep 17 00:00:00 2001 From: adshmh <23505281+adshmh@users.noreply.github.com> Date: Mon, 4 Feb 2019 17:38:08 -0500 Subject: [PATCH 067/327] fix(helm): add descriptive error if dependency has blank "repository" (#5152) Signed-off-by: Arash Deshmeh --- pkg/downloader/manager.go | 3 +++ pkg/downloader/manager_test.go | 21 +++++++++++++++++---- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/pkg/downloader/manager.go b/pkg/downloader/manager.go index 67f9dc7bf..aea48bd7e 100644 --- a/pkg/downloader/manager.go +++ b/pkg/downloader/manager.go @@ -371,6 +371,9 @@ func (m *Manager) getRepoNames(deps []*chartutil.Dependency) (map[string]string, // by Helm. missing := []string{} for _, dd := range deps { + if dd.Repository == "" { + return nil, fmt.Errorf("no 'repository' field specified for dependency: %q", dd.Name) + } // if dep chart is from local path, verify the path is valid if strings.HasPrefix(dd.Repository, "file://") { if _, err := resolver.GetLocalPath(dd.Repository, m.ChartPath); err != nil { diff --git a/pkg/downloader/manager_test.go b/pkg/downloader/manager_test.go index 8c2377e47..cb588394a 100644 --- a/pkg/downloader/manager_test.go +++ b/pkg/downloader/manager_test.go @@ -18,6 +18,7 @@ package downloader import ( "bytes" "reflect" + "strings" "testing" "k8s.io/helm/pkg/chartutil" @@ -99,10 +100,11 @@ func TestGetRepoNames(t *testing.T) { HelmHome: helmpath.Home("testdata/helmhome"), } tests := []struct { - name string - req []*chartutil.Dependency - expect map[string]string - err bool + name string + req []*chartutil.Dependency + expect map[string]string + err bool + expectedErr string }{ { name: "no repo definition failure", @@ -118,6 +120,14 @@ func TestGetRepoNames(t *testing.T) { }, err: true, }, + { + name: "dependency entry missing 'repository' field -- e.g. spelled 'repo'", + req: []*chartutil.Dependency{ + {Name: "dependency-missing-repository-field"}, + }, + err: true, + expectedErr: "no 'repository' field specified for dependency: \"dependency-missing-repository-field\"", + }, { name: "no repo definition failure", req: []*chartutil.Dependency{ @@ -152,6 +162,9 @@ func TestGetRepoNames(t *testing.T) { l, err := m.getRepoNames(tt.req) if err != nil { if tt.err { + if !strings.Contains(err.Error(), tt.expectedErr) { + t.Fatalf("%s: expected error: %s, got: %s", tt.name, tt.expectedErr, err.Error()) + } continue } t.Fatal(err) From 1d95d8396bd57d26ce98a001526b495c0bb413a5 Mon Sep 17 00:00:00 2001 From: ds-ms Date: Tue, 5 Feb 2019 18:36:07 +0530 Subject: [PATCH 068/327] Wait for ingress host to be ready Signed-off-by: ds-ms --- pkg/kube/wait.go | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/pkg/kube/wait.go b/pkg/kube/wait.go index 105d79b93..6de57cfd6 100644 --- a/pkg/kube/wait.go +++ b/pkg/kube/wait.go @@ -52,6 +52,7 @@ func (c *Client) waitForResources(timeout time.Duration, created Result) error { services := []v1.Service{} pvc := []v1.PersistentVolumeClaim{} deployments := []deployment{} + ingresses := []extensions.Ingress{} for _, v := range created { switch value := asVersioned(v).(type) { case *v1.ReplicationController: @@ -192,9 +193,15 @@ func (c *Client) waitForResources(timeout time.Duration, created Result) error { return false, err } services = append(services, *svc) + case *extensions.Ingress: + ingress, err := kcs.ExtensionsV1beta1().Ingresses(value.Namespace).Get(value.Name, metav1.GetOptions{}) + if err != nil { + return false, err + } + ingresses = append(ingresses, *ingress) } } - isReady := c.podsReady(pods) && c.servicesReady(services) && c.volumesReady(pvc) && c.deploymentsReady(deployments) + isReady := c.podsReady(pods) && c.servicesReady(services) && c.volumesReady(pvc) && c.deploymentsReady(deployments) && c.ingressesReady(ingresses) return isReady, nil }) } @@ -269,3 +276,13 @@ func isPodReady(pod *v1.Pod) bool { } return false } + +func (c *Client) ingressesReady(ingresses []extensions.Ingress) bool { + for _, ingress := range ingresses { + if &ingress.Status == nil && len(ingress.Status.LoadBalancer.Ingress) > 0 { + c.Log("Ingress is not ready: %s/%s", ingress.GetNamespace(), ingress.GetName()) + return false + } + } + return true +} From 16c10be8e652165414eef007be3f57638d6894cf Mon Sep 17 00:00:00 2001 From: Henry Nash Date: Tue, 5 Feb 2019 16:24:54 +0000 Subject: [PATCH 069/327] Improve language describing deletion of hooks (#5065) * Improve language describing deletion of hooks The existing language was somewhat confusing and grammatically poor. Closes #5035 Signed-off-by: Henry Nash * Improve language describing deletion of hooks The existing language was somewhat confusing and grammatically poor. Closes #5035 Signed-off-by: Henry Nash --- docs/charts_hooks.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/docs/charts_hooks.md b/docs/charts_hooks.md index 59c9c91a2..fbb302481 100644 --- a/docs/charts_hooks.md +++ b/docs/charts_hooks.md @@ -246,12 +246,10 @@ annotated. ### Automatically delete hook from previous release -When helm release being updated it is possible, that hook resource already exists in cluster. By default helm will try to create resource and fail with `"... already exists"` error. +When a helm release, that uses a hook, is being updated, it is possible that the hook resource might already exist in the cluster. In such circumstances, by default, helm will fail trying to install the hook resource with an `"... already exists"` error. -One might choose `"helm.sh/hook-delete-policy": "before-hook-creation"` over `"helm.sh/hook-delete-policy": "hook-succeeded,hook-failed"` because: +A common reason why the hook resource might already exist is that it was not deleted following use on a previous install/upgrade. There are, in fact, good reasons why one might want to keep the hook: for example, to aid manual debugging in case something went wrong. In this case, the recommended way of ensuring subsequent attemps to create the hook do not fail is to define a `"hook-delete-policy"` that can handle this: `"helm.sh/hook-delete-policy": "before-hook-creation"`. This hook annotation causes any existing hook to be removed, before the new hook is installed. + +If it is preferred to actually delete the hook after each use (rather than have to handle it on a subsequent use, as shown above), then this can be achived using a delete policy of `"helm.sh/hook-delete-policy": "hook-succeeded,hook-failed"`. -* It is convenient to keep failed hook job resource in kubernetes for example for manual debug. -* It may be necessary to keep succeeded hook resource in kubernetes for some reason. -* At the same time it is not desirable to do manual resource deletion before helm release upgrade. -`"helm.sh/hook-delete-policy": "before-hook-creation"` annotation on hook causes tiller to remove the hook from previous release if there is one before the new hook is launched and can be used with another policy. From 3b716b6d735b5a3d8d92b28d25ab8be7a9083609 Mon Sep 17 00:00:00 2001 From: Don Bowman Date: Wed, 6 Feb 2019 12:10:30 -0500 Subject: [PATCH 070/327] Add imagePullSecret to the `default` helm create template This relates to [#3529](https://github.com/helm/helm/issues/3529). It adds image.pullSecret to the default generate blank chart when the user does `helm create`. Signed-off-by: Don Bowman --- pkg/chartutil/create.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/chartutil/create.go b/pkg/chartutil/create.go index 9af4b8f45..2577527b3 100644 --- a/pkg/chartutil/create.go +++ b/pkg/chartutil/create.go @@ -62,6 +62,7 @@ image: repository: nginx tag: stable pullPolicy: IfNotPresent + # pullSecret: my_secret nameOverride: "" fullnameOverride: "" @@ -189,6 +190,10 @@ spec: app.kubernetes.io/name: {{ include ".name" . }} app.kubernetes.io/instance: {{ .Release.Name }} spec: + {{- if .Values.image.pullSecret -}} + imagePullSecrets: + - name: {{ .Values.image.pullSecret }} + {{- end }} containers: - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" From 6e26320befd19cc112f72d51e29230c26a191d9e Mon Sep 17 00:00:00 2001 From: Alex Ellis Date: Wed, 6 Feb 2019 21:01:46 +0000 Subject: [PATCH 071/327] Fix issue #5273 for get script on armv7l (#5275) This fixes issue #5273 in the get script by making the armv7l architecture point at the correctly named "arm" binary on the release page. Signed-off-by: Alex Ellis --- scripts/get | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/get b/scripts/get index bf13d25bc..9c93e1e84 100755 --- a/scripts/get +++ b/scripts/get @@ -29,7 +29,7 @@ initArch() { case $ARCH in armv5*) ARCH="armv5";; armv6*) ARCH="armv6";; - armv7*) ARCH="armv7";; + armv7*) ARCH="arm";; aarch64) ARCH="arm64";; x86) ARCH="386";; x86_64) ARCH="amd64";; From a1ea9678be1442fc04883cc4b2c8bab526f72a9c Mon Sep 17 00:00:00 2001 From: Ian Howell Date: Wed, 6 Feb 2019 15:51:11 -0600 Subject: [PATCH 072/327] Add unit tests for checking sort order on helm get Signed-off-by: Ian Howell --- pkg/kube/client.go | 2 +- pkg/kube/client_test.go | 131 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 132 insertions(+), 1 deletion(-) diff --git a/pkg/kube/client.go b/pkg/kube/client.go index 9aa821b5a..c5f3bf77f 100644 --- a/pkg/kube/client.go +++ b/pkg/kube/client.go @@ -266,8 +266,8 @@ func (c *Client) Get(namespace string, reader io.Reader) (string, error) { // Now that each individual resource within the specific version/kind // is sorted, we print each resource using the k8s printer + vk := objs[t] for _, resourceName := range sortedResources { - vk := objs[t] if err := typePrinter.PrintObj(vk[resourceName], buf); err != nil { c.Log("failed to print object type %s, object: %q :\n %v", t, resourceName, err) return "", err diff --git a/pkg/kube/client_test.go b/pkg/kube/client_test.go index de33881c8..81356540e 100644 --- a/pkg/kube/client_test.go +++ b/pkg/kube/client_test.go @@ -21,6 +21,7 @@ import ( "io" "io/ioutil" "net/http" + "sort" "strings" "testing" @@ -77,6 +78,18 @@ func newPodList(names ...string) v1.PodList { return list } +func newService(name string) v1.Service { + ns := v1.NamespaceDefault + return v1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: ns, + SelfLink: "/api/v1/namespaces/default/services/" + name, + }, + Spec: v1.ServiceSpec{}, + } +} + func notFoundBody() *metav1.Status { return &metav1.Status{ Code: http.StatusNotFound, @@ -280,6 +293,95 @@ func TestGet(t *testing.T) { } } +func TestResourceTypeSortOrder(t *testing.T) { + pod := newPod("my-pod") + service := newService("my-service") + c := newTestClient() + defer c.Cleanup() + c.TestFactory.UnstructuredClient = &fake.RESTClient{ + GroupVersion: schema.GroupVersion{Version: "v1"}, + NegotiatedSerializer: unstructuredSerializer, + Client: fake.CreateHTTPClient(func(req *http.Request) (*http.Response, error) { + p, m := req.URL.Path, req.Method + t.Logf("got request %s %s", p, m) + switch { + case p == "/namespaces/default/pods/my-pod" && m == "GET": + return newResponse(200, &pod) + case p == "/namespaces/default/services/my-service" && m == "GET": + return newResponse(200, &service) + default: + t.Fatalf("unexpected request: %s %s", req.Method, req.URL.Path) + return nil, nil + } + }), + } + + // Test sorting order + data := strings.NewReader(testResourceTypeSortOrder) + o, err := c.Get("default", data) + if err != nil { + t.Errorf("Expected missing results, got %q", err) + } + podIndex := strings.Index(o, "my-pod") + serviceIndex := strings.Index(o, "my-service") + if podIndex == -1 { + t.Errorf("Expected v1/Pod my-pod, got %s", o) + } + if serviceIndex == -1 { + t.Errorf("Expected v1/Service my-service, got %s", o) + } + if !sort.IntsAreSorted([]int{podIndex, serviceIndex}) { + t.Errorf("Expected order: [v1/Pod v1/Service], got %s", o) + } +} + +func TestResourceSortOrder(t *testing.T) { + list := newPodList("albacore", "coral", "beluga") + c := newTestClient() + defer c.Cleanup() + c.TestFactory.UnstructuredClient = &fake.RESTClient{ + GroupVersion: schema.GroupVersion{Version: "v1"}, + NegotiatedSerializer: unstructuredSerializer, + Client: fake.CreateHTTPClient(func(req *http.Request) (*http.Response, error) { + p, m := req.URL.Path, req.Method + t.Logf("got request %s %s", p, m) + switch { + case p == "/namespaces/default/pods/albacore" && m == "GET": + return newResponse(200, &list.Items[0]) + case p == "/namespaces/default/pods/coral" && m == "GET": + return newResponse(200, &list.Items[1]) + case p == "/namespaces/default/pods/beluga" && m == "GET": + return newResponse(200, &list.Items[2]) + default: + t.Fatalf("unexpected request: %s %s", req.Method, req.URL.Path) + return nil, nil + } + }), + } + + // Test sorting order + data := strings.NewReader(testResourceSortOrder) + o, err := c.Get("default", data) + if err != nil { + t.Errorf("Expected missing results, got %q", err) + } + albacoreIndex := strings.Index(o, "albacore") + belugaIndex := strings.Index(o, "beluga") + coralIndex := strings.Index(o, "coral") + if albacoreIndex == -1 { + t.Errorf("Expected v1/Pod albacore, got %s", o) + } + if belugaIndex == -1 { + t.Errorf("Expected v1/Pod beluga, got %s", o) + } + if coralIndex == -1 { + t.Errorf("Expected v1/Pod coral, got %s", o) + } + if !sort.IntsAreSorted([]int{albacoreIndex, belugaIndex, coralIndex}) { + t.Errorf("Expected order: [albacore beluga coral], got %s", o) + } +} + func TestPerform(t *testing.T) { tests := []struct { name string @@ -361,6 +463,35 @@ func TestReal(t *testing.T) { } } +const testResourceTypeSortOrder = ` +kind: Service +apiVersion: v1 +metadata: + name: my-service +--- +kind: Pod +apiVersion: v1 +metadata: + name: my-pod +` + +const testResourceSortOrder = ` +kind: Pod +apiVersion: v1 +metadata: + name: albacore +--- +kind: Pod +apiVersion: v1 +metadata: + name: beluga +--- +kind: Pod +apiVersion: v1 +metadata: + name: coral +` + const testServiceManifest = ` kind: Service apiVersion: v1 From 2734066bcccb67e2021e28c90f595ed25259f0bb Mon Sep 17 00:00:00 2001 From: Elad Iwanir Date: Thu, 7 Feb 2019 22:56:38 +0200 Subject: [PATCH 073/327] changing return order of test items so the sorting tests will fail if actually broken Signed-off-by: Elad Iwanir --- pkg/kube/client_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/kube/client_test.go b/pkg/kube/client_test.go index 81356540e..9c60f57e3 100644 --- a/pkg/kube/client_test.go +++ b/pkg/kube/client_test.go @@ -484,12 +484,12 @@ metadata: kind: Pod apiVersion: v1 metadata: - name: beluga + name: coral --- kind: Pod apiVersion: v1 metadata: - name: coral + name: beluga ` const testServiceManifest = ` From a3d7027152fc5ad0c7f057497026e6719f26d2bf Mon Sep 17 00:00:00 2001 From: Josh Dolitsky Date: Fri, 8 Feb 2019 12:09:45 -0600 Subject: [PATCH 074/327] Add docs on how to host repo with ChartMuseum (#5282) Signed-off-by: Josh Dolitsky --- docs/chart_repository.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/docs/chart_repository.md b/docs/chart_repository.md index 5291f65e4..e3bbe3c7d 100644 --- a/docs/chart_repository.md +++ b/docs/chart_repository.md @@ -123,6 +123,35 @@ startup. This part shows several ways to serve a chart repository. +### ChartMuseum + +The Helm project provides an open-source Helm repository server called [ChartMuseum](https://chartmuseum.com) that you can host yourself. + +ChartMuseum supports multiple cloud storage backends. Configure it to point to the directory or bucket containing your chart packages, and the index.yaml file will be generated dynamically. + +It can be deployed easily as a [Helm chart](https://github.com/helm/charts/tree/master/stable/chartmuseum): +``` +helm install stable/chartmuseum +``` + +and also as a [Docker image](https://hub.docker.com/r/chartmuseum/chartmuseum/tags): +``` +docker run --rm -it \ + -p 8080:8080 \ + -v $(pwd)/charts:/charts \ + -e DEBUG=true \ + -e STORAGE=local \ + -e STORAGE_LOCAL_ROOTDIR=/charts \ + chartmuseum/chartmuseum +``` + +You can then add the repo to your local repository list: +``` +helm repo add chartmuseum http://localhost:8080 +``` + +ChartMuseum provides other features, such as an API for chart uploads. Please see the [README](https://github.com/helm/chartmuseum) for more info. + ### Google Cloud Storage The first step is to **create your GCS bucket**. We'll call ours From bed4054c412f95d140c8c98b6387f40df7f3139e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Lipt=C3=A1k?= Date: Sun, 10 Feb 2019 04:14:32 -0500 Subject: [PATCH 075/327] Correct golint warning (#5287) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Gábor Lipták --- pkg/tiller/kind_sorter.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/tiller/kind_sorter.go b/pkg/tiller/kind_sorter.go index ceeb0f928..f980277d2 100644 --- a/pkg/tiller/kind_sorter.go +++ b/pkg/tiller/kind_sorter.go @@ -129,9 +129,8 @@ func (k *kindSorter) Less(i, j int) bool { // if both are unknown then sort alphabetically by kind and name if a.Head.Kind != b.Head.Kind { return a.Head.Kind < b.Head.Kind - } else { - return a.Name < b.Name } + return a.Name < b.Name } // unknown kind is last From 5767f13aaa5bfb513747b73f3c5d8cd4b0640684 Mon Sep 17 00:00:00 2001 From: xichengliudui <1693291525@qq.com> Date: Sun, 10 Feb 2019 23:57:53 -0500 Subject: [PATCH 076/327] Fix function comment to consistent with its name Signed-off-by: xichengliudui <1693291525@qq.com> --- pkg/chartutil/capabilities.go | 2 +- pkg/chartutil/requirements.go | 2 +- pkg/downloader/chart_downloader.go | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pkg/chartutil/capabilities.go b/pkg/chartutil/capabilities.go index d7e660b8a..b4533e417 100644 --- a/pkg/chartutil/capabilities.go +++ b/pkg/chartutil/capabilities.go @@ -40,7 +40,7 @@ var ( // Capabilities describes the capabilities of the Kubernetes cluster that Tiller is attached to. type Capabilities struct { - // List of all supported API versions + // APIVersions list of all supported API versions APIVersions VersionSet // KubeVersion is the Kubernetes version KubeVersion *version.Info diff --git a/pkg/chartutil/requirements.go b/pkg/chartutil/requirements.go index 0f1128305..f21a22005 100644 --- a/pkg/chartutil/requirements.go +++ b/pkg/chartutil/requirements.go @@ -85,7 +85,7 @@ type Requirements struct { // // It represents the state that the dependencies should be in. type RequirementsLock struct { - // Genderated is the date the lock file was last generated. + // Generated is the date the lock file was last generated. Generated time.Time `json:"generated"` // Digest is a hash of the requirements file used to generate it. Digest string `json:"digest"` diff --git a/pkg/downloader/chart_downloader.go b/pkg/downloader/chart_downloader.go index 5e6287299..453e81470 100644 --- a/pkg/downloader/chart_downloader.go +++ b/pkg/downloader/chart_downloader.go @@ -65,11 +65,11 @@ type ChartDownloader struct { Keyring string // HelmHome is the $HELM_HOME. HelmHome helmpath.Home - // Getter collection for the operation + // Getters collection for the operation Getters getter.Providers - // Chart repository username + // Username chart repository username Username string - // Chart repository password + // Password chart repository password Password string } @@ -243,14 +243,14 @@ func (c *ChartDownloader) ResolveChartVersion(ref, version string) (*url.URL, ge return u, r.Client, nil } -// If HttpGetter is used, this method sets the configured repository credentials on the HttpGetter. +// setCredentials if HttpGetter is used, this method sets the configured repository credentials on the HttpGetter. func (c *ChartDownloader) setCredentials(r *repo.ChartRepository) { if t, ok := r.Client.(*getter.HttpGetter); ok { t.SetCredentials(c.getRepoCredentials(r)) } } -// If this ChartDownloader is not configured to use credentials, and the chart repository sent as an argument is, +// getRepoCredentials if this ChartDownloader is not configured to use credentials, and the chart repository sent as an argument is, // then the repository's configured credentials are returned. // Else, this ChartDownloader's credentials are returned. func (c *ChartDownloader) getRepoCredentials(r *repo.ChartRepository) (username, password string) { From 9fb9850aca4afab0d38bcd73218098a145b4e7ac Mon Sep 17 00:00:00 2001 From: lIuDuI <1693291525@qq.com> Date: Tue, 12 Feb 2019 22:26:24 +0800 Subject: [PATCH 077/327] Fix function comment to consistent with its name (#5294) Signed-off-by: xichengliudui <1693291525@qq.com> --- pkg/downloader/manager.go | 2 +- pkg/engine/engine.go | 2 +- pkg/helm/client.go | 22 +++++++++++----------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/pkg/downloader/manager.go b/pkg/downloader/manager.go index aea48bd7e..372940880 100644 --- a/pkg/downloader/manager.go +++ b/pkg/downloader/manager.go @@ -604,7 +604,7 @@ func writeLock(chartpath string, lock *chartutil.RequirementsLock) error { return ioutil.WriteFile(dest, data, 0644) } -// archive a dep chart from local directory and save it into charts/ +// tarFromLocalDir archive a dep chart from local directory and save it into charts/ func tarFromLocalDir(chartpath string, name string, repo string, version string) (string, error) { destPath := filepath.Join(chartpath, "charts") diff --git a/pkg/engine/engine.go b/pkg/engine/engine.go index f3dd869c9..9a155de2e 100644 --- a/pkg/engine/engine.go +++ b/pkg/engine/engine.go @@ -130,7 +130,7 @@ type renderable struct { tpl string // vals are the values to be supplied to the template. vals chartutil.Values - // namespace prefix to the templates of the current chart + // basePath namespace prefix to the templates of the current chart basePath string } diff --git a/pkg/helm/client.go b/pkg/helm/client.go index 0d4d16039..fa867c2d3 100644 --- a/pkg/helm/client.go +++ b/pkg/helm/client.go @@ -334,7 +334,7 @@ func (h *Client) connect(ctx context.Context) (conn *grpc.ClientConn, err error) return conn, nil } -// Executes tiller.ListReleases RPC. +// list executes tiller.ListReleases RPC. func (h *Client) list(ctx context.Context, req *rls.ListReleasesRequest) (*rls.ListReleasesResponse, error) { c, err := h.connect(ctx) if err != nil { @@ -365,7 +365,7 @@ func (h *Client) list(ctx context.Context, req *rls.ListReleasesRequest) (*rls.L return resp, nil } -// Executes tiller.InstallRelease RPC. +// install executes tiller.InstallRelease RPC. func (h *Client) install(ctx context.Context, req *rls.InstallReleaseRequest) (*rls.InstallReleaseResponse, error) { c, err := h.connect(ctx) if err != nil { @@ -377,7 +377,7 @@ func (h *Client) install(ctx context.Context, req *rls.InstallReleaseRequest) (* return rlc.InstallRelease(ctx, req) } -// Executes tiller.UninstallRelease RPC. +// delete executes tiller.UninstallRelease RPC. func (h *Client) delete(ctx context.Context, req *rls.UninstallReleaseRequest) (*rls.UninstallReleaseResponse, error) { c, err := h.connect(ctx) if err != nil { @@ -389,7 +389,7 @@ func (h *Client) delete(ctx context.Context, req *rls.UninstallReleaseRequest) ( return rlc.UninstallRelease(ctx, req) } -// Executes tiller.UpdateRelease RPC. +// update executes tiller.UpdateRelease RPC. func (h *Client) update(ctx context.Context, req *rls.UpdateReleaseRequest) (*rls.UpdateReleaseResponse, error) { c, err := h.connect(ctx) if err != nil { @@ -401,7 +401,7 @@ func (h *Client) update(ctx context.Context, req *rls.UpdateReleaseRequest) (*rl return rlc.UpdateRelease(ctx, req) } -// Executes tiller.RollbackRelease RPC. +// rollback executes tiller.RollbackRelease RPC. func (h *Client) rollback(ctx context.Context, req *rls.RollbackReleaseRequest) (*rls.RollbackReleaseResponse, error) { c, err := h.connect(ctx) if err != nil { @@ -413,7 +413,7 @@ func (h *Client) rollback(ctx context.Context, req *rls.RollbackReleaseRequest) return rlc.RollbackRelease(ctx, req) } -// Executes tiller.GetReleaseStatus RPC. +// status executes tiller.GetReleaseStatus RPC. func (h *Client) status(ctx context.Context, req *rls.GetReleaseStatusRequest) (*rls.GetReleaseStatusResponse, error) { c, err := h.connect(ctx) if err != nil { @@ -425,7 +425,7 @@ func (h *Client) status(ctx context.Context, req *rls.GetReleaseStatusRequest) ( return rlc.GetReleaseStatus(ctx, req) } -// Executes tiller.GetReleaseContent RPC. +// content executes tiller.GetReleaseContent RPC. func (h *Client) content(ctx context.Context, req *rls.GetReleaseContentRequest) (*rls.GetReleaseContentResponse, error) { c, err := h.connect(ctx) if err != nil { @@ -437,7 +437,7 @@ func (h *Client) content(ctx context.Context, req *rls.GetReleaseContentRequest) return rlc.GetReleaseContent(ctx, req) } -// Executes tiller.GetVersion RPC. +// version executes tiller.GetVersion RPC. func (h *Client) version(ctx context.Context, req *rls.GetVersionRequest) (*rls.GetVersionResponse, error) { c, err := h.connect(ctx) if err != nil { @@ -449,7 +449,7 @@ func (h *Client) version(ctx context.Context, req *rls.GetVersionRequest) (*rls. return rlc.GetVersion(ctx, req) } -// Executes tiller.GetHistory RPC. +// history executes tiller.GetHistory RPC. func (h *Client) history(ctx context.Context, req *rls.GetHistoryRequest) (*rls.GetHistoryResponse, error) { c, err := h.connect(ctx) if err != nil { @@ -461,7 +461,7 @@ func (h *Client) history(ctx context.Context, req *rls.GetHistoryRequest) (*rls. return rlc.GetHistory(ctx, req) } -// Executes tiller.TestRelease RPC. +// test executes tiller.TestRelease RPC. func (h *Client) test(ctx context.Context, req *rls.TestReleaseRequest) (<-chan *rls.TestReleaseResponse, <-chan error) { errc := make(chan error, 1) c, err := h.connect(ctx) @@ -499,7 +499,7 @@ func (h *Client) test(ctx context.Context, req *rls.TestReleaseRequest) (<-chan return ch, errc } -// Executes tiller.Ping RPC. +// ping executes tiller.Ping RPC. func (h *Client) ping(ctx context.Context) error { c, err := h.connect(ctx) if err != nil { From 70c509e77ee2acecc722c429bc78415b2c660616 Mon Sep 17 00:00:00 2001 From: Matt Butcher Date: Tue, 12 Feb 2019 08:42:58 -0700 Subject: [PATCH 078/327] fix: Update gRPC to get better TLS connection handling (v2 minor release) (#5210) * fix: Update gRPC to get better TLS connection handling To avoid backward compatibility breakers, we have been pinned to a very old version of gRPC. But it appears that there have been some very significant network fixes since then. Looking closely at #3480, it appears that some of this fixes may be directly related to solving that bug. Note that this regenerates a few of the Go proto files, so the binary wire format may be broken. That means this MUST be held to a minor version, not a patch release. To test: - Build both client and server - Install Tiller into your cluster - Perform a number of Helm-Tiller interactions (`helm version`, `helm list`) Closes #3480 Signed-off-by: Matt Butcher * Switched to latest protobuf Signed-off-by: Matt Butcher --- glide.lock | 34 +++-- glide.yaml | 10 +- pkg/proto/hapi/services/tiller.pb.go | 195 ++++++++++++++------------- 3 files changed, 130 insertions(+), 109 deletions(-) diff --git a/glide.lock b/glide.lock index 105dada1f..1fa7c3d95 100644 --- a/glide.lock +++ b/glide.lock @@ -1,5 +1,5 @@ -hash: 2af9a5c4f891a0f44109a929a494b5aeaaffa3a87cd1f3881f25f79845703d5b -updated: 2018-12-14T21:39:31.112097Z +hash: 5dc21cc57b38ab1076f9e12d1e4248047ccc4470af8f81c8560560cb492bee9e +updated: 2019-02-08T15:20:12.179155-07:00 imports: - name: cloud.google.com/go version: 3b1ae45394a234c385be014e9a488f2bb6eef821 @@ -122,7 +122,7 @@ imports: subpackages: - lru - name: github.com/golang/protobuf - version: 1643683e1b54a9e88ad26d98f81400c8c9d9f4f9 + version: aa810b61a9c79d51363740d207bb46cf8e620ed5 subpackages: - proto - ptypes @@ -166,7 +166,7 @@ imports: subpackages: - simplelru - name: github.com/huandu/xstrings - version: 3959339b333561bf62a38b424fd41517c2c90f40 + version: f02667b379e2fb5916c3cda2cf31e0eb885d79f8 - name: github.com/imdario/mergo version: 9316a62528ac99aaecb4e47eadd6dc8aa6533d58 - name: github.com/inconshreveable/mousetrap @@ -184,7 +184,7 @@ imports: - name: github.com/Masterminds/semver version: 517734cc7d6470c0d07130e40fd40bdeb9bcd3fd - name: github.com/Masterminds/sprig - version: 15f9564e7e9cf0da02a48e0d25f12a7b83559aa6 + version: 544a9b1d90f323f6509491b389714fbbd126bee3 - name: github.com/Masterminds/vcs version: 3084677c2c188840777bff30054f2b553729d329 - name: github.com/mattn/go-runewidth @@ -281,7 +281,7 @@ imports: subpackages: - semaphore - name: golang.org/x/sys - version: 95c6576299259db960f6c5b9b69ea52422860fce + version: b90733256f2e882e81d52f9126de08df5615afd9 subpackages: - unix - windows @@ -325,26 +325,40 @@ imports: subpackages: - googleapis/rpc/status - name: google.golang.org/grpc - version: 5ffe3083946d5603a0578721101dc8165b1d5b5f + version: a02b0774206b209466313a0b525d2c738fe407eb subpackages: - balancer + - balancer/base + - balancer/roundrobin + - binarylog/grpc_binarylog_v1 - codes - connectivity - credentials - - grpclb/grpc_lb_v1/messages + - credentials/internal + - encoding + - encoding/proto - grpclog - health - health/grpc_health_v1 - internal + - internal/backoff + - internal/binarylog + - internal/channelz + - internal/envconfig + - internal/grpcrand + - internal/grpcsync + - internal/syscall + - internal/transport - keepalive - metadata - naming - peer - resolver + - resolver/dns + - resolver/passthrough - stats - status - tap - - transport - name: gopkg.in/inf.v0 version: 3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4 - name: gopkg.in/square/go-jose.v2 @@ -597,7 +611,7 @@ imports: - pkg/util/proto/testing - pkg/util/proto/validation - name: k8s.io/kubernetes - version: f2c8f1cadf1808ec28476682e49a3cce2b09efbf + version: c6d339953bd4fd8c021a6b5fb46d7952b30be9f9 subpackages: - pkg/api/legacyscheme - pkg/api/service diff --git a/glide.yaml b/glide.yaml index bf81b22ee..42c10b347 100644 --- a/glide.yaml +++ b/glide.yaml @@ -6,6 +6,12 @@ import: - package: golang.org/x/sync subpackages: - semaphore + # This is temporary and can probably be removed the next time gRPC is updated + - package: golang.org/x/sys + version: b90733256f2e882e81d52f9126de08df5615afd9 + subpackages: + - unix + - windows - package: github.com/spf13/cobra version: fe5e611709b0c57fa4a89136deaa8e1d4004d053 - package: github.com/spf13/pflag @@ -22,13 +28,13 @@ import: - package: github.com/technosophos/moniker version: ~0.2 - package: github.com/golang/protobuf - version: 1643683e1b54a9e88ad26d98f81400c8c9d9f4f9 + version: 1.2.0 subpackages: - proto - ptypes/any - ptypes/timestamp - package: google.golang.org/grpc - version: 1.7.2 + version: 1.18.0 - package: github.com/gosuri/uitable - package: github.com/asaskevich/govalidator version: ^4.0.0 diff --git a/pkg/proto/hapi/services/tiller.pb.go b/pkg/proto/hapi/services/tiller.pb.go index 8708d0a18..ce76cad12 100644 --- a/pkg/proto/hapi/services/tiller.pb.go +++ b/pkg/proto/hapi/services/tiller.pb.go @@ -467,18 +467,18 @@ func (m *UpdateReleaseRequest) GetForce() bool { return false } -func (m *UpdateReleaseRequest) GetSubNotes() bool { +func (m *UpdateReleaseRequest) GetDescription() string { if m != nil { - return m.SubNotes + return m.Description } - return false + return "" } -func (m *UpdateReleaseRequest) GetDescription() string { +func (m *UpdateReleaseRequest) GetSubNotes() bool { if m != nil { - return m.Description + return m.SubNotes } - return "" + return false } // UpdateReleaseResponse is the response to an update request. @@ -711,18 +711,18 @@ func (m *InstallReleaseRequest) GetDisableCrdHook() bool { return false } -func (m *InstallReleaseRequest) GetSubNotes() bool { +func (m *InstallReleaseRequest) GetDescription() string { if m != nil { - return m.SubNotes + return m.Description } - return false + return "" } -func (m *InstallReleaseRequest) GetDescription() string { +func (m *InstallReleaseRequest) GetSubNotes() bool { if m != nil { - return m.Description + return m.SubNotes } - return "" + return false } // InstallReleaseResponse is the response from a release installation. @@ -752,7 +752,7 @@ type UninstallReleaseRequest struct { Purge bool `protobuf:"varint,3,opt,name=purge" json:"purge,omitempty"` // timeout specifies the max amount of time any kubernetes client command can run. Timeout int64 `protobuf:"varint,4,opt,name=timeout" json:"timeout,omitempty"` - // Description, if set, will set the description for the uninnstalled release + // Description, if set, will set the description for the uninstalled release Description string `protobuf:"bytes,5,opt,name=description" json:"description,omitempty"` } @@ -1018,7 +1018,7 @@ type ReleaseServiceClient interface { GetVersion(ctx context.Context, in *GetVersionRequest, opts ...grpc.CallOption) (*GetVersionResponse, error) // RollbackRelease rolls back a release to a previous version. RollbackRelease(ctx context.Context, in *RollbackReleaseRequest, opts ...grpc.CallOption) (*RollbackReleaseResponse, error) - // ReleaseHistory retrieves a releasse's history. + // ReleaseHistory retrieves a release's history. GetHistory(ctx context.Context, in *GetHistoryRequest, opts ...grpc.CallOption) (*GetHistoryResponse, error) // RunReleaseTest executes the tests defined of a named release RunReleaseTest(ctx context.Context, in *TestReleaseRequest, opts ...grpc.CallOption) (ReleaseService_RunReleaseTestClient, error) @@ -1190,7 +1190,7 @@ type ReleaseServiceServer interface { GetVersion(context.Context, *GetVersionRequest) (*GetVersionResponse, error) // RollbackRelease rolls back a release to a previous version. RollbackRelease(context.Context, *RollbackReleaseRequest) (*RollbackReleaseResponse, error) - // ReleaseHistory retrieves a releasse's history. + // ReleaseHistory retrieves a release's history. GetHistory(context.Context, *GetHistoryRequest) (*GetHistoryResponse, error) // RunReleaseTest executes the tests defined of a named release RunReleaseTest(*TestReleaseRequest, ReleaseService_RunReleaseTestServer) error @@ -1441,86 +1441,87 @@ var _ReleaseService_serviceDesc = grpc.ServiceDesc{ func init() { proto.RegisterFile("hapi/services/tiller.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 1289 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xed, 0x72, 0xdb, 0x44, - 0x17, 0x8e, 0x2d, 0x7f, 0x1e, 0xa7, 0x7e, 0xdd, 0x6d, 0x9a, 0xa8, 0x7a, 0x0b, 0x63, 0xc4, 0x40, - 0xdd, 0x42, 0x1d, 0x30, 0xfc, 0x61, 0x86, 0x61, 0x26, 0x75, 0x3d, 0x49, 0x21, 0xa4, 0x33, 0x72, - 0x5b, 0x66, 0x98, 0x61, 0x3c, 0x8a, 0xbd, 0x6e, 0x45, 0x65, 0xc9, 0x68, 0x57, 0xa1, 0xb9, 0x00, - 0x98, 0xe1, 0x3e, 0xb8, 0x10, 0xee, 0x83, 0xeb, 0xe0, 0x3f, 0xb3, 0x5f, 0x8a, 0x56, 0x96, 0x1c, - 0x91, 0x3f, 0xb1, 0x76, 0xcf, 0xd9, 0xf3, 0xf1, 0x3c, 0x7b, 0xce, 0x9e, 0x80, 0xf5, 0xc6, 0x5d, - 0x7b, 0x87, 0x04, 0x47, 0x17, 0xde, 0x1c, 0x93, 0x43, 0xea, 0xf9, 0x3e, 0x8e, 0x86, 0xeb, 0x28, - 0xa4, 0x21, 0xda, 0x63, 0xb2, 0xa1, 0x92, 0x0d, 0x85, 0xcc, 0xda, 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x3d, 0x2a, 0x80, 0x26, 0x7f, 0x38, 0xb2, 0x1e, 0x97, 0xd4, 0xce, 0x24, 0x25, 0x3b, 0xd6, - 0x96, 0xa4, 0xf4, 0x76, 0xb8, 0x25, 0xa9, 0x4c, 0xf3, 0xb3, 0x77, 0x90, 0x07, 0x5d, 0x27, 0x0e, - 0xa4, 0x6b, 0xd6, 0x16, 0x50, 0xc1, 0xe9, 0xcd, 0x8e, 0x67, 0x3d, 0x2c, 0xa1, 0x79, 0x55, 0xdf, - 0x4f, 0xe0, 0xc7, 0x96, 0x52, 0x3d, 0x6f, 0xf0, 0xff, 0xd8, 0xbf, 0xf8, 0x37, 0x00, 0x00, 0xff, - 0xff, 0xb6, 0x48, 0x98, 0x76, 0x9f, 0x10, 0x00, 0x00, + // 1308 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xed, 0x6e, 0x1b, 0x45, + 0x17, 0x8e, 0xbd, 0xfe, 0x3c, 0x4e, 0xfc, 0xba, 0xd3, 0x34, 0xd9, 0xee, 0x5b, 0x50, 0x58, 0x04, + 0x75, 0x0b, 0x75, 0xc0, 0xf0, 0x07, 0x09, 0x21, 0xa5, 0xae, 0x95, 0x14, 0x82, 0x2b, 0xad, 0xdb, + 0x22, 0x21, 0x21, 0x6b, 0x63, 0x8f, 0xdb, 0xa5, 0xeb, 0x5d, 0xb3, 0x33, 0x1b, 0x9a, 0x1b, 0x40, + 0xe2, 0x27, 0x97, 0x80, 0xc4, 0x85, 0x70, 0x1f, 0xdc, 0x0c, 0x9a, 0xaf, 0xcd, 0xce, 0x7a, 0xd7, + 0x5d, 0xf2, 0x27, 0xde, 0x99, 0x73, 0xe6, 0x7c, 0x3c, 0xcf, 0x9c, 0x33, 0x27, 0x60, 0xbd, 0x76, + 0xd7, 0xde, 0x31, 0xc1, 0xd1, 0xa5, 0x37, 0xc7, 0xe4, 0x98, 0x7a, 0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b, 0x5f, 0x8a, 0x78, 0x2c, 0xe8, 0x96, 0x45, 0x3c, 0x16, 0xb5, 0x2d, 0x7b, 0x07, 0xb9, 0x00, + 0xd7, 0xed, 0x05, 0xdd, 0x2f, 0x24, 0x44, 0xef, 0x4a, 0x56, 0xff, 0xdd, 0x8a, 0x89, 0x8b, 0x35, + 0xfc, 0x2f, 0x33, 0x09, 0xa0, 0x02, 0x68, 0xf2, 0x07, 0x27, 0xeb, 0x51, 0x49, 0xed, 0x4c, 0x52, + 0xb2, 0x63, 0x6d, 0x49, 0x4a, 0x6f, 0x87, 0x5b, 0x92, 0xca, 0x34, 0x3f, 0x7b, 0x07, 0x79, 0xd0, + 0x75, 0xe2, 0x40, 0xba, 0x66, 0x6d, 0x01, 0x15, 0x9c, 0xde, 0xec, 0x78, 0xd6, 0x83, 0x12, 0x9a, + 0xd7, 0xf5, 0xfd, 0x18, 0x7e, 0x6c, 0x29, 0xd5, 0x8b, 0x06, 0xff, 0x4f, 0xff, 0x8b, 0x7f, 0x03, + 0x00, 0x00, 0xff, 0xff, 0x30, 0x18, 0x95, 0x9c, 0xd7, 0x10, 0x00, 0x00, } From f5986db184cf6d16dcd48760ac749a20236fb845 Mon Sep 17 00:00:00 2001 From: liaoj Date: Wed, 13 Feb 2019 01:02:09 +0800 Subject: [PATCH 079/327] fix: helm fetch wrong version chart (#4850) when customer use --version flag, the version format include the Build metadata, the metadata will be ingorned Signed-off-by: jliao --- pkg/repo/index.go | 9 +++++++++ pkg/repo/index_test.go | 20 +++++++++++++++++--- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/pkg/repo/index.go b/pkg/repo/index.go index 9031463f3..ac19528fa 100644 --- a/pkg/repo/index.go +++ b/pkg/repo/index.go @@ -168,6 +168,15 @@ func (i IndexFile) Get(name, version string) (*ChartVersion, error) { } } + // when customer input exact version, check whether have exact match one first + if len(version) != 0 { + for _, ver := range vs { + if version == ver.Version { + return ver, nil + } + } + } + for _, ver := range vs { test, err := semver.NewVersion(ver.Version) if err != nil { diff --git a/pkg/repo/index_test.go b/pkg/repo/index_test.go index 7c9239b7a..7e9998a4d 100644 --- a/pkg/repo/index_test.go +++ b/pkg/repo/index_test.go @@ -20,6 +20,7 @@ import ( "io/ioutil" "os" "path/filepath" + "strings" "testing" "k8s.io/helm/pkg/getter" @@ -39,14 +40,17 @@ func TestIndexFile(t *testing.T) { i.Add(&chart.Metadata{Name: "cutter", Version: "0.1.1"}, "cutter-0.1.1.tgz", "http://example.com/charts", "sha256:1234567890abc") i.Add(&chart.Metadata{Name: "cutter", Version: "0.1.0"}, "cutter-0.1.0.tgz", "http://example.com/charts", "sha256:1234567890abc") i.Add(&chart.Metadata{Name: "cutter", Version: "0.2.0"}, "cutter-0.2.0.tgz", "http://example.com/charts", "sha256:1234567890abc") + i.Add(&chart.Metadata{Name: "setter", Version: "0.1.9+alpha"}, "setter-0.1.9+alpha.tgz", "http://example.com/charts", "sha256:1234567890abc") + i.Add(&chart.Metadata{Name: "setter", Version: "0.1.9+beta"}, "setter-0.1.9+beta.tgz", "http://example.com/charts", "sha256:1234567890abc") + i.SortEntries() if i.APIVersion != APIVersionV1 { t.Error("Expected API version v1") } - if len(i.Entries) != 2 { - t.Errorf("Expected 2 charts. Got %d", len(i.Entries)) + if len(i.Entries) != 3 { + t.Errorf("Expected 3 charts. Got %d", len(i.Entries)) } if i.Entries["clipper"][0].Name != "clipper" { @@ -54,13 +58,23 @@ func TestIndexFile(t *testing.T) { } if len(i.Entries["cutter"]) != 3 { - t.Error("Expected two cutters.") + t.Error("Expected three cutters.") } // Test that the sort worked. 0.2 should be at the first index for Cutter. if v := i.Entries["cutter"][0].Version; v != "0.2.0" { t.Errorf("Unexpected first version: %s", v) } + + cv, err := i.Get("setter", "0.1.9") + if err == nil && strings.Index(cv.Metadata.Version, "0.1.9") < 0 { + t.Errorf("Unexpected version: %s", cv.Metadata.Version) + } + + cv, err = i.Get("setter", "0.1.9+alpha") + if err != nil || cv.Metadata.Version != "0.1.9+alpha" { + t.Errorf("Expected version: 0.1.9+alpha") + } } func TestLoadIndex(t *testing.T) { From 5b38cc2d888218b74a8ba1cef4341e7a18e1df26 Mon Sep 17 00:00:00 2001 From: Matt Butcher Date: Tue, 12 Feb 2019 13:54:11 -0700 Subject: [PATCH 080/327] ref: Update Sprig to 2.18.0 (#5300) * ref: Update Sprig to 2.18.0 This fixes a problem with Go 1.11 and also adds some new functions. Signed-off-by: Matt Butcher * Added the glide.lock file. Signed-off-by: Matt Butcher --- glide.lock | 10 +++++----- glide.yaml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/glide.lock b/glide.lock index 1fa7c3d95..792ef28cd 100644 --- a/glide.lock +++ b/glide.lock @@ -1,13 +1,11 @@ -hash: 5dc21cc57b38ab1076f9e12d1e4248047ccc4470af8f81c8560560cb492bee9e -updated: 2019-02-08T15:20:12.179155-07:00 +hash: 70f4fe304d0034fd077f122570adc6bb5f40ceee5f4f53d8930ba5ad700a911d +updated: 2019-02-12T13:10:08.039408-07:00 imports: - name: cloud.google.com/go version: 3b1ae45394a234c385be014e9a488f2bb6eef821 subpackages: - compute/metadata - internal -- name: github.com/aokoli/goutils - version: 9c37978a95bd5c709a15883b6242714ea6709e64 - name: github.com/asaskevich/govalidator version: 7664702784775e51966f0885f5cd27435916517b - name: github.com/Azure/go-ansiterm @@ -181,10 +179,12 @@ imports: - jwriter - name: github.com/MakeNowJust/heredoc version: bb23615498cded5e105af4ce27de75b089cbe851 +- name: github.com/Masterminds/goutils + version: 41ac8693c5c10a92ea1ff5ac3a7f95646f6123b0 - name: github.com/Masterminds/semver version: 517734cc7d6470c0d07130e40fd40bdeb9bcd3fd - name: github.com/Masterminds/sprig - version: 544a9b1d90f323f6509491b389714fbbd126bee3 + version: b1fe2752acccf8c3d7f8a1e7c75c7ae7d83a1975 - name: github.com/Masterminds/vcs version: 3084677c2c188840777bff30054f2b553729d329 - name: github.com/mattn/go-runewidth diff --git a/glide.yaml b/glide.yaml index 42c10b347..e482e23c2 100644 --- a/glide.yaml +++ b/glide.yaml @@ -21,7 +21,7 @@ import: - package: github.com/imdario/mergo version: v0.3.5 - package: github.com/Masterminds/sprig - version: ^2.16.0 + version: ^2.18.0 - package: github.com/ghodss/yaml - package: github.com/Masterminds/semver version: ~1.3.1 From c99a3c676a11206352024d7851076106d2840b45 Mon Sep 17 00:00:00 2001 From: tuanvcw Date: Wed, 13 Feb 2019 21:59:17 +0700 Subject: [PATCH 081/327] Update deprecated links in docs (#5302) Signed-off-by: Vu Cong Tuan --- docs/chart_template_guide/control_structures.md | 2 +- docs/chart_template_guide/getting_started.md | 4 ++-- docs/chart_template_guide/wrapping_up.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/chart_template_guide/control_structures.md b/docs/chart_template_guide/control_structures.md index e2f9ca89d..d411c2f79 100644 --- a/docs/chart_template_guide/control_structures.md +++ b/docs/chart_template_guide/control_structures.md @@ -329,7 +329,7 @@ data: - "Onions" ``` -Now, in this example we've done something tricky. The `toppings: |-` line is declaring a multi-line string. So our list of toppings is actually not a YAML list. It's a big string. Why would we do this? Because the data in ConfigMaps `data` is composed of key/value pairs, where both the key and the value are simple strings. To understand why this is the case, take a look at the [Kubernetes ConfigMap docs](http://kubernetes.io/docs/user-guide/configmap/). For us, though, this detail doesn't matter much. +Now, in this example we've done something tricky. The `toppings: |-` line is declaring a multi-line string. So our list of toppings is actually not a YAML list. It's a big string. Why would we do this? Because the data in ConfigMaps `data` is composed of key/value pairs, where both the key and the value are simple strings. To understand why this is the case, take a look at the [Kubernetes ConfigMap docs](https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/). For us, though, this detail doesn't matter much. > The `|-` marker in YAML takes a multi-line string. This can be a useful technique for embedding big blocks of data inside of your manifests, as exemplified here. diff --git a/docs/chart_template_guide/getting_started.md b/docs/chart_template_guide/getting_started.md index 87ae5fa3c..eb1d966d3 100644 --- a/docs/chart_template_guide/getting_started.md +++ b/docs/chart_template_guide/getting_started.md @@ -51,8 +51,8 @@ already there. - `NOTES.txt`: The "help text" for your chart. This will be displayed to your users when they run `helm install`. -- `deployment.yaml`: A basic manifest for creating a Kubernetes [deployment](http://kubernetes.io/docs/user-guide/deployments/) -- `service.yaml`: A basic manifest for creating a [service endpoint](http://kubernetes.io/docs/user-guide/services/) for your deployment +- `deployment.yaml`: A basic manifest for creating a Kubernetes [deployment](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/) +- `service.yaml`: A basic manifest for creating a [service endpoint](https://kubernetes.io/docs/concepts/services-networking/service/) for your deployment - `_helpers.tpl`: A place to put template helpers that you can re-use throughout the chart And what we're going to do is... _remove them all!_ That way we can work through our tutorial from scratch. We'll actually create our own `NOTES.txt` and `_helpers.tpl` as we go. diff --git a/docs/chart_template_guide/wrapping_up.md b/docs/chart_template_guide/wrapping_up.md index ea5dc1183..c7ecad475 100755 --- a/docs/chart_template_guide/wrapping_up.md +++ b/docs/chart_template_guide/wrapping_up.md @@ -5,7 +5,7 @@ This guide is intended to give you, the chart developer, a strong understanding But there are many things this guide has not covered when it comes to the practical day-to-day development of charts. Here are some useful pointers to other documentation that will help you as you create new charts: - The [Helm Charts project](https://github.com/helm/charts) is an indispensable source of charts. That project is also sets the standard for best practices in chart development. -- The Kubernetes [User's Guide](http://kubernetes.io/docs/user-guide/) provides detailed examples of the various resource kinds that you can use, from ConfigMaps and Secrets to DaemonSets and Deployments. +- The Kubernetes [Documentation](https://kubernetes.io/docs/home/) provides detailed examples of the various resource kinds that you can use, from ConfigMaps and Secrets to DaemonSets and Deployments. - The Helm [Charts Guide](../charts.md) explains the workflow of using charts. - The Helm [Chart Hooks Guide](../charts_hooks.md) explains how to create lifecycle hooks. - The Helm [Charts Tips and Tricks](../charts_tips_and_tricks.md) article provides some useful tips for writing charts. From 914545851e8acec2dfc6c06eb673bef7e9c67895 Mon Sep 17 00:00:00 2001 From: ds-ms Date: Thu, 14 Feb 2019 14:10:56 +0530 Subject: [PATCH 082/327] Fixing condition Signed-off-by: ds-ms --- pkg/kube/wait.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/kube/wait.go b/pkg/kube/wait.go index 6de57cfd6..cd66edf95 100644 --- a/pkg/kube/wait.go +++ b/pkg/kube/wait.go @@ -279,7 +279,7 @@ func isPodReady(pod *v1.Pod) bool { func (c *Client) ingressesReady(ingresses []extensions.Ingress) bool { for _, ingress := range ingresses { - if &ingress.Status == nil && len(ingress.Status.LoadBalancer.Ingress) > 0 { + if &ingress.Status == nil || len(ingress.Status.LoadBalancer.Ingress) == 0 { c.Log("Ingress is not ready: %s/%s", ingress.GetNamespace(), ingress.GetName()) return false } From 5464a822ccd6d99da8b25d8ef690263c6d7a2d8c Mon Sep 17 00:00:00 2001 From: Nguyen Van Trung Date: Fri, 15 Feb 2019 12:17:44 +0700 Subject: [PATCH 083/327] Change http to https for security links Signed-off-by: Nguyen Van Trung --- CONTRIBUTING.md | 2 +- docs/chart_best_practices/conventions.md | 2 +- docs/chart_template_guide/yaml_techniques.md | 2 +- docs/charts.md | 4 ++-- docs/developers.md | 4 ++-- docs/glossary.md | 2 +- docs/history.md | 2 +- docs/provenance.md | 6 +++--- docs/related.md | 6 +++--- docs/release_checklist.md | 2 +- docs/using_helm.md | 4 ++-- 11 files changed, 18 insertions(+), 18 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7736cbd6b..a20c2b90b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,7 +15,7 @@ us a chance to try to fix the issue before it is exploited in the wild. The sign-off is a simple line at the end of the explanation for a commit. All commits needs to be signed. Your signature certifies that you wrote the patch or otherwise have the right to contribute the material. The rules are pretty simple, -if you can certify the below (from [developercertificate.org](http://developercertificate.org/)): +if you can certify the below (from [developercertificate.org](https://developercertificate.org/)): ``` Developer Certificate of Origin diff --git a/docs/chart_best_practices/conventions.md b/docs/chart_best_practices/conventions.md index 524928e25..c8bbd7d94 100644 --- a/docs/chart_best_practices/conventions.md +++ b/docs/chart_best_practices/conventions.md @@ -22,7 +22,7 @@ The directory that contains a chart MUST have the same name as the chart. Thus, ## Version Numbers -Wherever possible, Helm uses [SemVer 2](http://semver.org) to represent version numbers. (Note that Docker image tags do not necessarily follow SemVer, and are thus considered an unfortunate exception to the rule.) +Wherever possible, Helm uses [SemVer 2](https://semver.org) to represent version numbers. (Note that Docker image tags do not necessarily follow SemVer, and are thus considered an unfortunate exception to the rule.) When SemVer versions are stored in Kubernetes labels, we conventionally alter the `+` character to an `_` character, as labels do not allow the `+` sign as a value. diff --git a/docs/chart_template_guide/yaml_techniques.md b/docs/chart_template_guide/yaml_techniques.md index 00b33b674..0a84e4a25 100644 --- a/docs/chart_template_guide/yaml_techniques.md +++ b/docs/chart_template_guide/yaml_techniques.md @@ -7,7 +7,7 @@ to read. ## Scalars and Collections -According to the [YAML spec](http://yaml.org/spec/1.2/spec.html), there are two +According to the [YAML spec](https://yaml.org/spec/1.2/spec.html), there are two types of collections, and many scalar types. The two types of collections are maps and sequences: diff --git a/docs/charts.md b/docs/charts.md index 7bc4f0020..d91dfe54e 100644 --- a/docs/charts.md +++ b/docs/charts.md @@ -71,7 +71,7 @@ Other fields will be silently ignored. ### Charts and Versioning Every chart must have a version number. A version must follow the -[SemVer 2](http://semver.org/) standard. Unlike Helm Classic, Kubernetes +[SemVer 2](https://semver.org/) standard. Unlike Helm Classic, Kubernetes Helm uses version numbers as release markers. Packages in repositories are identified by name plus version. @@ -792,7 +792,7 @@ standard references that will help you out. - [Go templates](https://godoc.org/text/template) - [Extra template functions](https://godoc.org/github.com/Masterminds/sprig) -- [The YAML format](http://yaml.org/spec/) +- [The YAML format](https://yaml.org/spec/) ## Using Helm to Manage Charts diff --git a/docs/developers.md b/docs/developers.md index 4edc4bea1..fb704cb17 100644 --- a/docs/developers.md +++ b/docs/developers.md @@ -170,7 +170,7 @@ workflow for doing this is as follows: 5. When you are ready for us to review, sign your commit, push your branch to GitHub, and then open a new pull request with us. -For Git commit messages, we follow the [Semantic Commit Messages](http://karma-runner.github.io/0.13/dev/git-commit-msg.html): +For Git commit messages, we follow the [Semantic Commit Messages](https://karma-runner.github.io/0.13/dev/git-commit-msg.html): ``` fix(helm): add --foo flag to 'helm install' @@ -201,7 +201,7 @@ Common scopes: Read more: - The [Deis Guidelines](https://github.com/deis/workflow/blob/master/src/contributing/submitting-a-pull-request.md) were the inspiration for this section. -- Karma Runner [defines](http://karma-runner.github.io/0.13/dev/git-commit-msg.html) the semantic commit message idea. +- Karma Runner [defines](https://karma-runner.github.io/0.13/dev/git-commit-msg.html) the semantic commit message idea. ### Go Conventions diff --git a/docs/glossary.md b/docs/glossary.md index 875807268..02a5c125f 100644 --- a/docs/glossary.md +++ b/docs/glossary.md @@ -37,7 +37,7 @@ are bundled with it. ## Chart Version Charts are versioned according to the [SemVer 2 -spec](http://semver.org). A version number is required on every chart. +spec](https://semver.org). A version number is required on every chart. ## Chart.yaml diff --git a/docs/history.md b/docs/history.md index 71e63c6b2..1a3d9dbe4 100644 --- a/docs/history.md +++ b/docs/history.md @@ -12,7 +12,7 @@ Differences from Helm Classic: - Helm's chart format has changed for the better: - Dependencies are immutable and stored inside of a chart's `charts/` directory. - - Charts are strongly versioned using [SemVer 2](http://semver.org/spec/v2.0.0.html) + - Charts are strongly versioned using [SemVer 2](https://semver.org/spec/v2.0.0.html) - Charts can be loaded from directories or from chart archive files - Helm supports Go templates without requiring you to run `generate` or `template` commands. diff --git a/docs/provenance.md b/docs/provenance.md index 163e72842..3f259a391 100644 --- a/docs/provenance.md +++ b/docs/provenance.md @@ -180,7 +180,7 @@ The following pieces of provenance data are added: * The signature (SHA256, just like Docker) of the chart package (the .tgz file) is included, and may be used to verify the integrity of the chart package. * The entire body is signed using the algorithm used by PGP (see - [http://keybase.io] for an emerging way of making crypto signing and + [https://keybase.io] for an emerging way of making crypto signing and verification easy). The combination of this gives users the following assurances: @@ -202,7 +202,7 @@ keywords: - proxy source: - https://github.com/foo/bar -home: http://nginx.com +home: https://nginx.com ... files: @@ -221,7 +221,7 @@ first is the Chart.yaml. The second is the checksums, a map of filenames to SHA-256 digests (value shown is fake/truncated) The signature block is a standard PGP signature, which provides [tamper -resistance](http://www.rossde.com/PGP/pgp_signatures.html). +resistance](https://www.rossde.com/PGP/pgp_signatures.html). ## Chart Repositories diff --git a/docs/related.md b/docs/related.md index ba1b0dfbf..a8e494172 100644 --- a/docs/related.md +++ b/docs/related.md @@ -8,9 +8,9 @@ or [pull request](https://github.com/helm/helm/pulls). ## Article, Blogs, How-Tos, and Extra Documentation - [Awesome Helm](https://github.com/cdwv/awesome-helm) - List of awesome Helm resources -- [CI/CD with Kubernetes, Helm & Wercker ](http://www.slideshare.net/Diacode/cicd-with-kubernetes-helm-wercker-madscalability) +- [CI/CD with Kubernetes, Helm & Wercker ](https://www.slideshare.net/Diacode/cicd-with-kubernetes-helm-wercker-madscalability) - [Creating a Helm Plugin in 3 Steps](http://technosophos.com/2017/03/21/creating-a-helm-plugin.html) -- [Deploying Kubernetes Applications with Helm](http://cloudacademy.com/blog/deploying-kubernetes-applications-with-helm/) +- [Deploying Kubernetes Applications with Helm](https://cloudacademy.com/blog/deploying-kubernetes-applications-with-helm/) - [GitLab, Consumer Driven Contracts, Helm and Kubernetes](https://medium.com/@enxebre/gitlab-consumer-driven-contracts-helm-and-kubernetes-b7235a60a1cb#.xwp1y4tgi) - [Honestbee's Helm Chart Conventions](https://gist.github.com/so0k/f927a4b60003cedd101a0911757c605a) - [Releasing backward-incompatible changes: Kubernetes, Jenkins, Prometheus Operator, Helm and Traefik](https://medium.com/@enxebre/releasing-backward-incompatible-changes-kubernetes-jenkins-plugin-prometheus-operator-helm-self-6263ca61a1b1#.e0c7elxhq) @@ -90,7 +90,7 @@ Tools layered on top of Helm or Tiller. Platforms, distributions, and services that include Helm support. - [Fabric8](https://fabric8.io) - Integrated development platform for Kubernetes -- [Jenkins X](http://jenkins-x.io/) - open source automated CI/CD for Kubernetes which uses Helm for [promoting](http://jenkins-x.io/about/features/#promotion) applications through [environments via GitOps](http://jenkins-x.io/about/features/#environments) +- [Jenkins X](https://jenkins-x.io/) - open source automated CI/CD for Kubernetes which uses Helm for [promoting](https://jenkins-x.io/about/features/#promotion) applications through [environments via GitOps](https://jenkins-x.io/about/features/#environments) - [Kubernetic](https://kubernetic.com/) - Kubernetes Desktop Client - [Qstack](https://qstack.com) diff --git a/docs/release_checklist.md b/docs/release_checklist.md index 4011b6675..d1c6c967a 100644 --- a/docs/release_checklist.md +++ b/docs/release_checklist.md @@ -41,7 +41,7 @@ Just kidding! :trollface: All releases will be of the form vX.Y.Z where X is the major version number, Y is the minor version number and Z is the patch release number. This project -strictly follows [semantic versioning](http://semver.org/) so following this +strictly follows [semantic versioning](https://semver.org/) so following this step is critical. It is important to note that this document assumes that the git remote in your diff --git a/docs/using_helm.md b/docs/using_helm.md index db723d993..79b5aef6f 100755 --- a/docs/using_helm.md +++ b/docs/using_helm.md @@ -17,7 +17,7 @@ cluster. Think of it like the Kubernetes equivalent of a Homebrew formula, an Apt dpkg, or a Yum RPM file. A *Repository* is the place where charts can be collected and shared. -It's like Perl's [CPAN archive](http://www.cpan.org) or the +It's like Perl's [CPAN archive](https://www.cpan.org) or the [Fedora Package Database](https://admin.fedoraproject.org/pkgdb/), but for Kubernetes packages. @@ -190,7 +190,7 @@ imageTag: 10.1.14-r3 ## Specify a imagePullPolicy ## Default to 'Always' if imageTag is 'latest', else set to 'IfNotPresent' -## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images +## ref: https://kubernetes.io/docs/user-guide/images/#pre-pulling-images ## # imagePullPolicy: From 9f964c11da1c1ae865aed2be87c1929f04683b82 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 15 Feb 2019 17:28:31 +0000 Subject: [PATCH 084/327] fix: helm display confused error message if version is empty (without quotes) (#5310) Signed-off-by: Alex Gladkikh --- pkg/downloader/chart_downloader.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/downloader/chart_downloader.go b/pkg/downloader/chart_downloader.go index 453e81470..1ef85f501 100644 --- a/pkg/downloader/chart_downloader.go +++ b/pkg/downloader/chart_downloader.go @@ -213,7 +213,7 @@ func (c *ChartDownloader) ResolveChartVersion(ref, version string) (*url.URL, ge cv, err := i.Get(chartName, version) if err != nil { - return u, r.Client, fmt.Errorf("chart %q matching %s not found in %s index. (try 'helm repo update'). %s", chartName, version, r.Config.Name, err) + return u, r.Client, fmt.Errorf("chart %q matching %q not found in %s index. (try 'helm repo update'). %s", chartName, version, r.Config.Name, err) } if len(cv.URLs) == 0 { From 35b782219041d39a56557728b5b6933cca7178d9 Mon Sep 17 00:00:00 2001 From: Matt Farina Date: Fri, 15 Feb 2019 12:48:46 -0500 Subject: [PATCH 085/327] Noting the version as the match element That the match is based on version is implicit. Making it explicit because I had to think when I saw it. Signed-off-by: Matt Farina --- pkg/downloader/chart_downloader.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/downloader/chart_downloader.go b/pkg/downloader/chart_downloader.go index 1ef85f501..563188ec3 100644 --- a/pkg/downloader/chart_downloader.go +++ b/pkg/downloader/chart_downloader.go @@ -213,7 +213,7 @@ func (c *ChartDownloader) ResolveChartVersion(ref, version string) (*url.URL, ge cv, err := i.Get(chartName, version) if err != nil { - return u, r.Client, fmt.Errorf("chart %q matching %q not found in %s index. (try 'helm repo update'). %s", chartName, version, r.Config.Name, err) + return u, r.Client, fmt.Errorf("chart %q matching version %q not found in %s index. (try 'helm repo update'). %s", chartName, version, r.Config.Name, err) } if len(cv.URLs) == 0 { From 63d262e5ec3c1b0d935995c7354b2b239c18ff14 Mon Sep 17 00:00:00 2001 From: Matt Farina Date: Fri, 15 Feb 2019 12:58:23 -0500 Subject: [PATCH 086/327] Display the checksums in CI When Helm is packaging up the bundles it generates the checksums but does not display them. Having them here will aide in the generation of release notes and provide another source listing them. Signed-off-by: Matt Farina --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 0677cafe4..20ce7e5a4 100644 --- a/Makefile +++ b/Makefile @@ -48,6 +48,7 @@ dist: checksum: for f in _dist/*.{gz,zip} ; do \ shasum -a 256 "$${f}" | awk '{print $$1}' > "$${f}.sha256" ; \ + echo -n "Checksum: " && cat $${f}.sha256 ; \ done .PHONY: check-docker From d76eebb319eda349371f561c881ca91cc53907ad Mon Sep 17 00:00:00 2001 From: Matt Farina Date: Fri, 15 Feb 2019 15:22:23 -0500 Subject: [PATCH 087/327] Adding PGP signing to the release process Signed-off-by: Matt Farina --- docs/release_checklist.md | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/docs/release_checklist.md b/docs/release_checklist.md index d1c6c967a..c1595fb58 100644 --- a/docs/release_checklist.md +++ b/docs/release_checklist.md @@ -250,7 +250,21 @@ git tag --sign --annotate "${RELEASE_NAME}" --message "Helm release ${RELEASE_NA git push upstream $RELEASE_NAME ``` -## 7. Write the Release Notes +## 7. PGP Sign the downloads + +While hashes provide a signature that the content of the downloads is what it +was generated, signed packages provide traceability of where the package came +from. + +To do this follow the following steps: + +1. Download each of the release bundles generated by the CI system +2. Sign each of them using GnuPG using the command `gpg --armor --detach-sign [FILE NAME]`. + This will generate a file name `[FILE NAME].asc` with an ascii armored signature. + +Each of the signature files needs to be uploaded to the release on GitHub. + +## 8. Write the Release Notes We will auto-generate a changelog based on the commits that occurred during a release cycle, but it is usually more beneficial to the end-user if the release @@ -286,14 +300,14 @@ The community keeps growing, and we'd love to see you there! Download Helm X.Y. The common platform binaries are here: -- [MacOS amd64](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-darwin-amd64.tar.gz) ([checksum](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-darwin-amd64.tar.gz.sha256)) -- [Linux amd64](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-linux-amd64.tar.gz) ([checksum](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-linux-amd64.tar.gz.sha256)) -- [Linux arm](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-linux-arm.tar.gz) ([checksum](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-linux-arm.tar.gz.sha256)) -- [Linux arm64](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-linux-arm64.tar.gz) ([checksum](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-linux-arm64.tar.gz.sha256)) -- [Linux i386](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-linux-386.tar.gz) ([checksum](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-linux-386.tar.gz.sha256)) -- [Linux ppc64le](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-linux-ppc64le.tar.gz) ([checksum](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-linux-ppc64le.tar.gz.sha256)) -- [Linux s390x](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-linux-s390x.tar.gz) ([checksum](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-linux-s390x.tar.gz.sha256)) -- [Windows amd64](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-windows-amd64.zip) ([checksum](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-windows-amd64.zip.sha256)) +- [MacOS amd64](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-darwin-amd64.tar.gz) ([checksum](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-darwin-amd64.tar.gz.sha256) / CHECKSUM_VAL) +- [Linux amd64](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-linux-amd64.tar.gz) ([checksum](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-linux-amd64.tar.gz.sha256) / CHECKSUM_VAL) +- [Linux arm](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-linux-arm.tar.gz) ([checksum](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-linux-arm.tar.gz.sha256) / CHECKSUM_VAL) +- [Linux arm64](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-linux-arm64.tar.gz) ([checksum](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-linux-arm64.tar.gz.sha256) / CHECKSUM_VAL) +- [Linux i386](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-linux-386.tar.gz) ([checksum](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-linux-386.tar.gz.sha256) / CHECKSUM_VAL) +- [Linux ppc64le](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-linux-ppc64le.tar.gz) ([checksum](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-linux-ppc64le.tar.gz.sha256) / CHECKSUM_VAL) +- [Linux s390x](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-linux-s390x.tar.gz) ([checksum](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-linux-s390x.tar.gz.sha256) / CHECKSUM_VAL) +- [Windows amd64](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-windows-amd64.zip) ([checksum](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-windows-amd64.zip.sha256) / CHECKSUM_VAL) Once you have the client installed, upgrade Tiller with `helm init --upgrade`. @@ -335,7 +349,7 @@ in the example above. Once finished, go into GitHub and edit the release notes for the tagged release with the notes written here. -## 8. Evangelize +## 9. Evangelize Congratulations! You're done. Go grab yourself a $DRINK_OF_CHOICE. You've earned it. From fdbbcab3b381c029ff0d586f8deeb5bdf06a2fd0 Mon Sep 17 00:00:00 2001 From: Michel Belleau Date: Mon, 18 Feb 2019 16:08:46 -0500 Subject: [PATCH 088/327] Fix for missing $root $root is used in $root.Files.Get and needs to be defined Signed-off-by: Michel Belleau --- docs/chart_template_guide/accessing_files.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/chart_template_guide/accessing_files.md b/docs/chart_template_guide/accessing_files.md index 206ad0cec..9977aad8f 100644 --- a/docs/chart_template_guide/accessing_files.md +++ b/docs/chart_template_guide/accessing_files.md @@ -129,6 +129,7 @@ You have multiple options with Globs: Or ```yaml +{{ $root := . }} {{ range $path, $bytes := .Files.Glob "foo/*" }} {{ base $path }}: '{{ $root.Files.Get $path | b64enc }}' {{ end }} From 8224e3348ef004cbff7321e2b26b8fbcd7e190a3 Mon Sep 17 00:00:00 2001 From: Marc Jansen Date: Tue, 19 Feb 2019 13:31:47 +0100 Subject: [PATCH 089/327] Symmetrical asterisks (#5325) Signed-off-by: Marc Jansen --- cmd/helm/repo_update.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/helm/repo_update.go b/cmd/helm/repo_update.go index 1a239b407..42d242b83 100644 --- a/cmd/helm/repo_update.go +++ b/cmd/helm/repo_update.go @@ -124,6 +124,6 @@ func updateCharts(repos []*repo.ChartRepository, out io.Writer, home helmpath.Ho return errors.New("Update Failed. Check log for details") } - fmt.Fprintln(out, "Update Complete. ⎈ Happy Helming!⎈ ") + fmt.Fprintln(out, "Update Complete. ⎈ Happy Helming! ⎈") return nil } From 73a17eb59900348234ad7c4cba75a537dcef9708 Mon Sep 17 00:00:00 2001 From: Miroslav Spousta Date: Tue, 19 Feb 2019 23:46:01 +0100 Subject: [PATCH 090/327] Fix wording in error message (#5322) Signed-off-by: Miroslav Spousta --- pkg/tiller/release_server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/tiller/release_server.go b/pkg/tiller/release_server.go index b85118cd2..ffb922e40 100644 --- a/pkg/tiller/release_server.go +++ b/pkg/tiller/release_server.go @@ -61,7 +61,7 @@ var ( // errInvalidRevision indicates that an invalid release revision number was provided. errInvalidRevision = errors.New("invalid release revision") //errInvalidName indicates that an invalid release name was provided - errInvalidName = errors.New("invalid release name, must match regex ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])+$ and the length must not longer than 53") + errInvalidName = errors.New("invalid release name, must match regex ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])+$ and the length must not be longer than 53") ) // ListDefaultLimit is the default limit for number of items returned in a list. From d24ba97faeb39f692f74c87d183a723b4138ee52 Mon Sep 17 00:00:00 2001 From: Nguyen Hai Truong Date: Wed, 20 Feb 2019 13:29:50 +0700 Subject: [PATCH 091/327] Correct misspelling of Helm Although it is spelling mistakes, it might make an affects while reading. Signed-off-by: Nguyen Hai Truong --- _proto/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_proto/README.md b/_proto/README.md index 0ebd6b6a4..7704572eb 100644 --- a/_proto/README.md +++ b/_proto/README.md @@ -3,7 +3,7 @@ Protobuf3 type declarations for the Helm API Packages - - `hapi.chart` Complete serialization of Heml charts + - `hapi.chart` Complete serialization of Helm charts - `hapi.release` Information about installed charts (Releases) such as metadata about when they were installed, their status, and how they were configured. - `hapi.services.rudder` Definition for the ReleaseModuleService used by Tiller to manipulate releases on a given node - `hapi.services.tiller` Definition of the ReleaseService provided by Tiller and used by Helm clients to manipulate releases cluster wide. From 2ca5d2ab9cf41a23a1d650ae2dc88a44344c898b Mon Sep 17 00:00:00 2001 From: Nguyen Hai Truong Date: Wed, 20 Feb 2019 14:35:35 +0700 Subject: [PATCH 092/327] trivial fix typo Signed-off-by: Nguyen Hai Truong --- docs/tiller_ssl.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tiller_ssl.md b/docs/tiller_ssl.md index 41e704653..3d64635ae 100644 --- a/docs/tiller_ssl.md +++ b/docs/tiller_ssl.md @@ -288,7 +288,7 @@ not available for public resolution. By default, the Helm client connects to Tiller via tunnel (i.e. kube proxy) at 127.0.0.1. During the TLS handshake, a target, usually provided as a hostname (e.g. example.com), is checked against the subject and subject alternative -names of the certificate (i.e. hostname verficiation). However, because of the tunnel, the target is an IP address. +names of the certificate (i.e. hostname verification). However, because of the tunnel, the target is an IP address. Therefore, to validate the certificate, the IP address 127.0.0.1 must be listed as an IP subject alternative name (IP SAN) in the Tiller certificate. From 8f9144332665f1aecb1b29925e70504cfb9210f5 Mon Sep 17 00:00:00 2001 From: Nguyen Hai Truong Date: Thu, 21 Feb 2019 01:25:43 +0700 Subject: [PATCH 093/327] Adding '/usr/bin/env bash' (#5334) This commit aims to add '/usr/bin/env bash' as a shebang line to indicates scripts use bash shell for interpreting. Signed-off-by: Nguyen Hai Truong --- scripts/completions.bash | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/completions.bash b/scripts/completions.bash index c24f3d257..36cb01f15 100644 --- a/scripts/completions.bash +++ b/scripts/completions.bash @@ -1,3 +1,5 @@ +#!/usr/bin/env bash + # bash completion for helm -*- shell-script -*- __debug() From fbc89e13d1e0a92b39d3088dc02f5fdccae48aca Mon Sep 17 00:00:00 2001 From: Nguyen Hai Truong Date: Thu, 21 Feb 2019 01:25:59 +0700 Subject: [PATCH 094/327] The 'Linuxes' is obscure (#5332) Using `Linux distributions` instead of `Linuxes` Signed-off-by: Nguyen Hai Truong --- docs/developers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/developers.md b/docs/developers.md index fb704cb17..70203b2d0 100644 --- a/docs/developers.md +++ b/docs/developers.md @@ -32,7 +32,7 @@ docker-test`. To run Helm and Tiller locally, you can run `bin/helm` or `bin/tiller`. -- Helm and Tiller are known to run on macOS and most Linuxes, including +- Helm and Tiller are known to run on macOS and most Linux distributions, including Alpine. - Tiller must have access to a Kubernetes cluster. It learns about the cluster by examining the Kube config files that `kubectl` uses. From ead111dd4f699b3cb0a56f1e6d4585e3363f925b Mon Sep 17 00:00:00 2001 From: Matthew Fisher Date: Wed, 20 Feb 2019 10:30:31 -0800 Subject: [PATCH 095/327] add `make sign` and `make fetch-dist` (#5329) Signed-off-by: Matthew Fisher --- Makefile | 15 +++++++++++++++ docs/release_checklist.md | 21 +++++++++++++-------- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 20ce7e5a4..7248bbed2 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,7 @@ DEV_IMAGE ?= golang:1.11 SHORT_NAME ?= tiller SHORT_NAME_RUDDER ?= rudder TARGETS ?= darwin/amd64 linux/amd64 linux/386 linux/arm linux/arm64 linux/ppc64le linux/s390x windows/amd64 +TARGET_OBJS ?= darwin-amd64.tar.gz darwin-amd64.tar.gz.sha256 linux-amd64.tar.gz linux-amd64.tar.gz.sha256 linux-386.tar.gz linux-386.tar.gz.sha256 linux-arm.tar.gz linux-arm.tar.gz.sha256 linux-arm64.tar.gz linux-arm64.tar.gz.sha256 linux-ppc64le.tar.gz linux-ppc64le.tar.gz.sha256 linux-s390x.tar.gz linux-s390x.tar.gz.sha256 windows-amd64.zip windows-amd64.zip.sha256 DIST_DIRS = find * -type d -exec # go option @@ -44,6 +45,20 @@ dist: $(DIST_DIRS) zip -r helm-${VERSION}-{}.zip {} \; \ ) +.PHONY: fetch-dist +fetch-dist: + mkdir -p _dist + cd _dist && \ + for obj in ${TARGET_OBJS} ; do \ + curl -sSL -o helm-${VERSION}-$${obj} https://storage.googleapis.com/kubernetes-helm/helm-${VERSION}-$${obj} ; \ + done + +.PHONY: sign +sign: + for f in _dist/*.{gz,zip,sha256} ; do \ + gpg --armor --detach-sign $${f} ; \ + done + .PHONY: checksum checksum: for f in _dist/*.{gz,zip} ; do \ diff --git a/docs/release_checklist.md b/docs/release_checklist.md index c1595fb58..bddb50ffb 100644 --- a/docs/release_checklist.md +++ b/docs/release_checklist.md @@ -256,13 +256,17 @@ While hashes provide a signature that the content of the downloads is what it was generated, signed packages provide traceability of where the package came from. -To do this follow the following steps: +To do this, run the following `make` commands: -1. Download each of the release bundles generated by the CI system -2. Sign each of them using GnuPG using the command `gpg --armor --detach-sign [FILE NAME]`. - This will generate a file name `[FILE NAME].asc` with an ascii armored signature. +```shell +make clean +make fetch-dist +make sign +``` -Each of the signature files needs to be uploaded to the release on GitHub. +This will generate ascii armored signature files for each of the files pushed by CI. + +All of the signature files need to be uploaded to the release on GitHub. ## 8. Write the Release Notes @@ -322,7 +326,7 @@ The [Quickstart Guide](https://docs.helm.sh/using_helm/#quickstart-guide) will g ### Features - ref(*): kubernetes v1.11 support efadbd88035654b2951f3958167afed014c46bc6 (Adam Reese) -- feat(helm): add $HELM_KEY_PASSPHRASE environment variable for signing helm charts (#4778) 1e26b5300b5166fabb90002535aacd2f9cc7d787 +- feat(helm): add $HELM_KEY_PASSPHRASE environment variable for signing helm charts (#4778) 1e26b5300b5166fabb90002535aacd2f9cc7d787 ### Bug fixes - fix circle not building tags f4f932fabd197f7e6d608c8672b33a483b4b76fa (Matthew Fisher) @@ -346,8 +350,9 @@ git log --no-merges --pretty=format:'- %s %H (%aN)' $PREVIOUS_RELEASE..$RELEASE_ After generating the changelog, you will need to categorize the changes as shown in the example above. -Once finished, go into GitHub and edit the release notes for the tagged release -with the notes written here. +Once finished, go into GitHub and edit the release notes for the tagged release with the notes written here. + +Remember to attach the ascii armored signatures generated in the previous step to the release notes. ## 9. Evangelize From 9af6187c9c439d9447894053fb1c1aa4bb3fb93a Mon Sep 17 00:00:00 2001 From: Kim Bao Long Date: Fri, 22 Feb 2019 14:28:01 +0700 Subject: [PATCH 096/327] Replacing 'HTTP' by 'HTTPS' for securing links Currently, when we access the modified pages with **HTTP**, it is redirected to **HTTPS** automatically. So this commit aims to replace **HTTP** to **HTTPs** for security. Co-Authored-By: Nguyen Phuong An Signed-off-by: Kim Bao Long --- .../repository/cache/stable-index.yaml | 116 +++++++++--------- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/pkg/getter/testdata/repository/cache/stable-index.yaml b/pkg/getter/testdata/repository/cache/stable-index.yaml index d4f883a25..40d2d04b5 100644 --- a/pkg/getter/testdata/repository/cache/stable-index.yaml +++ b/pkg/getter/testdata/repository/cache/stable-index.yaml @@ -412,7 +412,7 @@ entries: companies. All data is stored in plain text files, so no database is required. digest: 5cfff9542341a391abf9029dd9b42e7c44813c520ef0301ce62e9c08586ceca2 engine: gotpl - home: http://www.dokuwiki.org/ + home: https://www.dokuwiki.org/ icon: https://bitnami.com/assets/stacks/dokuwiki/img/dokuwiki-stack-110x117.png keywords: - dokuwiki @@ -433,7 +433,7 @@ entries: companies. All data is stored in plain text files, so no database is required. digest: 3c46f9d9196bbf975711b2bb7c889fd3df1976cc57c3c120c7374d721da0e240 engine: gotpl - home: http://www.dokuwiki.org/ + home: https://www.dokuwiki.org/ icon: https://bitnami.com/assets/stacks/dokuwiki/img/dokuwiki-stack-110x117.png keywords: - dokuwiki @@ -454,7 +454,7 @@ entries: companies. All data is stored in plain text files, so no database is required. digest: f533bc20e08179a49cca77b175f897087dc3f2c57e6c89ecbd7264ab5975d66a engine: gotpl - home: http://www.dokuwiki.org/ + home: https://www.dokuwiki.org/ icon: https://bitnami.com/assets/stacks/dokuwiki/img/dokuwiki-stack-110x117.png keywords: - dokuwiki @@ -475,7 +475,7 @@ entries: companies. All data is stored in plain text files, so no database is required. digest: 34a926398cfafbf426ff468167ef49577252e260ebce5df33380e6e67b79fe59 engine: gotpl - home: http://www.dokuwiki.org/ + home: https://www.dokuwiki.org/ icon: https://bitnami.com/assets/stacks/dokuwiki/img/dokuwiki-stack-110x117.png keywords: - dokuwiki @@ -496,7 +496,7 @@ entries: companies. All data is stored in plain text files, so no database is required. digest: 6825fbacb709cf05901985561be10ba9473a379488d99b71d1590d33f5a81374 engine: gotpl - home: http://www.dokuwiki.org/ + home: https://www.dokuwiki.org/ icon: https://bitnami.com/assets/stacks/dokuwiki/img/dokuwiki-stack-110x117.png keywords: - dokuwiki @@ -516,7 +516,7 @@ entries: description: One of the most versatile open source content management systems. digest: db95c255b19164c5051eb75a6860f3775a1011399a62b27e474cd9ebee0cb578 engine: gotpl - home: http://www.drupal.org/ + home: https://www.drupal.org/ icon: https://bitnami.com/assets/stacks/drupal/img/drupal-stack-220x234.png keywords: - drupal @@ -539,7 +539,7 @@ entries: description: One of the most versatile open source content management systems. digest: 84c13154a9aeb7215dc0d98e9825207207e69ca870f3d54b273bfc2d34699f61 engine: gotpl - home: http://www.drupal.org/ + home: https://www.drupal.org/ icon: https://bitnami.com/assets/stacks/drupal/img/drupal-stack-220x234.png keywords: - drupal @@ -562,7 +562,7 @@ entries: description: One of the most versatile open source content management systems. digest: 17d0bfdcdf5a1a650941343c76b6b928d76d3332fece127c502e91f9597f419e engine: gotpl - home: http://www.drupal.org/ + home: https://www.drupal.org/ icon: https://bitnami.com/assets/stacks/drupal/img/drupal-stack-220x234.png keywords: - drupal @@ -585,7 +585,7 @@ entries: description: One of the most versatile open source content management systems. digest: 317674c89762e0b54156b734203ee93638dd7a25df35120c5cab45546814d89b engine: gotpl - home: http://www.drupal.org/ + home: https://www.drupal.org/ icon: https://bitnami.com/assets/stacks/drupal/img/drupal-stack-220x234.png keywords: - drupal @@ -608,7 +608,7 @@ entries: description: One of the most versatile open source content management systems. digest: 24c4f187b50c0e961cc2cacf6e6b2ce6d6b225c73637c578e001bebd9b3f5d48 engine: gotpl - home: http://www.drupal.org/ + home: https://www.drupal.org/ icon: https://bitnami.com/assets/stacks/drupal/img/drupal-stack-220x234.png keywords: - drupal @@ -631,7 +631,7 @@ entries: description: One of the most versatile open source content management systems. digest: 7fcea4684a3d520454aeaa10beb9f9b1789c09c097680fc484954084f283feb3 engine: gotpl - home: http://www.drupal.org/ + home: https://www.drupal.org/ icon: https://bitnami.com/assets/stacks/drupal/img/drupal-stack-220x234.png keywords: - drupal @@ -654,7 +654,7 @@ entries: description: One of the most versatile open source content management systems. digest: adb23bc71125b9691b407a47dadf4298de3516805218813b56067967e39db7d8 engine: gotpl - home: http://www.drupal.org/ + home: https://www.drupal.org/ icon: https://bitnami.com/assets/stacks/drupal/img/drupal-stack-220x234.png keywords: - drupal @@ -677,7 +677,7 @@ entries: description: One of the most versatile open source content management systems. digest: 5de529e25767e8a37b8d6f413daa0fe99f5c304e48ddcfa8adb4d8c7a0496aa7 engine: gotpl - home: http://www.drupal.org/ + home: https://www.drupal.org/ keywords: - drupal - cms @@ -699,7 +699,7 @@ entries: description: One of the most versatile open source content management systems. digest: a35dbf9d470972cc2461de3e0a8fcf2fec8d0adc04f5a0f1e924505f22c714d7 engine: gotpl - home: http://www.drupal.org/ + home: https://www.drupal.org/ keywords: - drupal - cms @@ -721,7 +721,7 @@ entries: description: One of the most versatile open source content management systems. digest: a62d686d6bd47643dfa489e395dda89286954f785123a43a88db7ef34f3ea48d engine: gotpl - home: http://www.drupal.org/ + home: https://www.drupal.org/ keywords: - drupal - cms @@ -743,7 +743,7 @@ entries: description: One of the most versatile open source content management systems. digest: 2c189424bda94eeebb7e6370e96884f09bdfa81498cb93ac4723d24c92a3938e engine: gotpl - home: http://www.drupal.org/ + home: https://www.drupal.org/ keywords: - drupal - cms @@ -765,7 +765,7 @@ entries: description: One of the most versatile open source content management systems. digest: 3596f47c5dcaa7a975d1c4cb7bf7ef6790c9ad8dda41a5a329e30c1ea8a40d11 engine: gotpl - home: http://www.drupal.org/ + home: https://www.drupal.org/ keywords: - drupal - cms @@ -787,7 +787,7 @@ entries: description: One of the most versatile open source content management systems. digest: 78b2bb3717be63dccb02ea06b711ca7cf7869848b296b880099c6264e86d86d3 engine: gotpl - home: http://www.drupal.org/ + home: https://www.drupal.org/ keywords: - drupal - cms @@ -809,7 +809,7 @@ entries: description: One of the most versatile open source content management systems. digest: 5508b29e20a5d609f76319869774f008dcc4bed13bbbc7ed40546bc9af8c7cd7 engine: gotpl - home: http://www.drupal.org/ + home: https://www.drupal.org/ keywords: - drupal - cms @@ -831,7 +831,7 @@ entries: description: One of the most versatile open source content management systems. digest: 023a282c93f8411fb81bb4fff7820c1337aad0586ccf7dae55bdbed515ad8b05 engine: gotpl - home: http://www.drupal.org/ + home: https://www.drupal.org/ keywords: - drupal - cms @@ -853,7 +853,7 @@ entries: description: One of the most versatile open source content management systems. digest: 9bdaa53f7a9e82c9b32c7ac9b34b84fd142671732a54423a2dcdc893c4162801 engine: gotpl - home: http://www.drupal.org/ + home: https://www.drupal.org/ keywords: - drupal - cms @@ -875,7 +875,7 @@ entries: description: One of the most versatile open source content management systems. digest: 25650526abc1036398dbb314d77a0062cbb644b2c5791a258fb863fdaad5093d engine: gotpl - home: http://www.drupal.org/ + home: https://www.drupal.org/ keywords: - drupal - cms @@ -897,7 +897,7 @@ entries: description: One of the most versatile open source content management systems. digest: 13d5d32d316c08359221d230004dd2adc0152362e87abcc0d61ea191241fa69f engine: gotpl - home: http://www.drupal.org/ + home: https://www.drupal.org/ keywords: - drupal - cms @@ -919,7 +919,7 @@ entries: description: One of the most versatile open source content management systems. digest: b3f09ecd191f8c06275c96d9af4d77a97c94355525864201e9baf151b17bd5a7 engine: gotpl - home: http://www.drupal.org/ + home: https://www.drupal.org/ keywords: - drupal - cms @@ -941,7 +941,7 @@ entries: description: One of the most versatile open source content management systems. digest: c56fc55b93b0dead65af7b81bbd54befd5115860698ca475baa5acb178a12e5a engine: gotpl - home: http://www.drupal.org/ + home: https://www.drupal.org/ keywords: - drupal - cms @@ -1154,7 +1154,7 @@ entries: stories with the world digest: 91d195c99e00b2801eafef5c23fcf9ced218bb29c7097f08139e2bdc80e38a0f engine: gotpl - home: http://www.ghost.org/ + home: https://www.ghost.org/ icon: https://bitnami.com/assets/stacks/ghost/img/ghost-stack-220x234.png keywords: - ghost @@ -1178,7 +1178,7 @@ entries: stories with the world digest: 6342a95aeef40690430c2e80b167fbb116a632746cdca49cfac4cbd535eadb22 engine: gotpl - home: http://www.ghost.org/ + home: https://www.ghost.org/ icon: https://bitnami.com/assets/stacks/ghost/img/ghost-stack-220x234.png keywords: - ghost @@ -1202,7 +1202,7 @@ entries: stories with the world digest: 8998a9a4e75e777edb6f06c05b45d461daebba09021161af3bef523efd193b15 engine: gotpl - home: http://www.ghost.org/ + home: https://www.ghost.org/ icon: https://bitnami.com/assets/stacks/ghost/img/ghost-stack-220x234.png keywords: - ghost @@ -1226,7 +1226,7 @@ entries: stories with the world digest: e44c9a53355086ded1832f769dca515b863337ad118ba618ef97f37b3ef84030 engine: gotpl - home: http://www.ghost.org/ + home: https://www.ghost.org/ icon: https://bitnami.com/assets/stacks/ghost/img/ghost-stack-220x234.png keywords: - ghost @@ -1250,7 +1250,7 @@ entries: stories with the world digest: b0c94a93c88fde68bb4fc78e92691d46cd2eb4d32cbac011e034565fbd35d46b engine: gotpl - home: http://www.ghost.org/ + home: https://www.ghost.org/ keywords: - ghost - blog @@ -1273,7 +1273,7 @@ entries: stories with the world digest: 791ccb42b62d56d50c72b37db3282eb3f2af75d667a25542d76c7991004eb822 engine: gotpl - home: http://www.ghost.org/ + home: https://www.ghost.org/ keywords: - ghost - blog @@ -1296,7 +1296,7 @@ entries: stories with the world digest: 331a2b145bfdb39b626313cda7dc539f32dbda5149893957589c5406317fca53 engine: gotpl - home: http://www.ghost.org/ + home: https://www.ghost.org/ keywords: - ghost - blog @@ -1319,7 +1319,7 @@ entries: stories with the world digest: 804227af037082a0f5c3c579feb9e24eb3682449e78876971c93a109bc716f40 engine: gotpl - home: http://www.ghost.org/ + home: https://www.ghost.org/ keywords: - ghost - blog @@ -1758,7 +1758,7 @@ entries: visualization, and a dashboard feature for compiling multiple custom views digest: 8a649026f55b2fa1e743c93fd331e127e66b49c4d7f20116a2bb06e5937f4828 engine: gotpl - home: http://community.jaspersoft.com/project/jasperreports-server + home: https://community.jaspersoft.com/project/jasperreports-server icon: https://bitnami.com/assets/stacks/jasperserver/img/jasperserver-stack-110x117.png keywords: - business intelligence @@ -1782,7 +1782,7 @@ entries: visualization, and a dashboard feature for compiling multiple custom views digest: d4a62f7ace55256852e5c650a56ccf671633c4f223180d304cfb03b9cd7993aa engine: gotpl - home: http://community.jaspersoft.com/project/jasperreports-server + home: https://community.jaspersoft.com/project/jasperreports-server icon: https://bitnami.com/assets/stacks/jasperserver/img/jasperserver-stack-110x117.png keywords: - business intelligence @@ -1806,7 +1806,7 @@ entries: visualization, and a dashboard feature for compiling multiple custom views digest: 99af0fca7ef1c475b239f2c8fc2dee6b040ea76b3c30bba1431f358df873aa49 engine: gotpl - home: http://community.jaspersoft.com/project/jasperreports-server + home: https://community.jaspersoft.com/project/jasperreports-server icon: https://bitnami.com/assets/stacks/jasperserver/img/jasperserver-stack-110x117.png keywords: - business intelligence @@ -1830,7 +1830,7 @@ entries: visualization, and a dashboard feature for compiling multiple custom views digest: f01e53d1b89c4fb1fcd9702cd5f4e48d77607aed65f249e1f94b8b21f7eef3f4 engine: gotpl - home: http://community.jaspersoft.com/project/jasperreports-server + home: https://community.jaspersoft.com/project/jasperreports-server icon: https://bitnami.com/assets/stacks/jasperserver/img/jasperserver-stack-110x117.png keywords: - business intelligence @@ -1854,7 +1854,7 @@ entries: visualization, and a dashboard feature for compiling multiple custom views digest: 5cc4af8c88691d7030602c97be2ccbc125ef11129b361da0aa236a127c31b965 engine: gotpl - home: http://community.jaspersoft.com/project/jasperreports-server + home: https://community.jaspersoft.com/project/jasperreports-server icon: https://bitnami.com/assets/stacks/jasperserver/img/jasperserver-stack-110x117.png keywords: - business intelligence @@ -2265,7 +2265,7 @@ entries: description: PHP content management system (CMS) for publishing web content digest: 6f9934487533f325515f4877b3af1306c87d64bf3ece9d4bd875289cd73b340d engine: gotpl - home: http://www.joomla.org/ + home: https://www.joomla.org/ icon: https://bitnami.com/assets/stacks/joomla/img/joomla-stack-220x234.png keywords: - joomla @@ -2286,7 +2286,7 @@ entries: description: PHP content management system (CMS) for publishing web content digest: f9dedab2fc2dbf170cf45b2c230baa6d20aad9a6f8ccfcb09c459602fc5213dc engine: gotpl - home: http://www.joomla.org/ + home: https://www.joomla.org/ icon: https://bitnami.com/assets/stacks/joomla/img/joomla-stack-220x234.png keywords: - joomla @@ -2307,7 +2307,7 @@ entries: description: PHP content management system (CMS) for publishing web content digest: 1e067e459873ae832d54ff516a3420f7f0e16ecd8f72f4c4f02be22e47702077 engine: gotpl - home: http://www.joomla.org/ + home: https://www.joomla.org/ icon: https://bitnami.com/assets/stacks/joomla/img/joomla-stack-220x234.png keywords: - joomla @@ -2328,7 +2328,7 @@ entries: description: PHP content management system (CMS) for publishing web content digest: 9a99b15e83e18955eb364985cd545659f1176ef203ac730876dfe39499edfb18 engine: gotpl - home: http://www.joomla.org/ + home: https://www.joomla.org/ icon: https://bitnami.com/assets/stacks/joomla/img/joomla-stack-220x234.png keywords: - joomla @@ -2349,7 +2349,7 @@ entries: description: PHP content management system (CMS) for publishing web content digest: 07c3a16eb674ffc74fe5b2b16191b8bb24c63bdae9bce9710bda1999920c46fc engine: gotpl - home: http://www.joomla.org/ + home: https://www.joomla.org/ keywords: - joomla - cms @@ -2369,7 +2369,7 @@ entries: description: PHP content management system (CMS) for publishing web content digest: 95fbe272015941544609eee90b3bffd5172bfdec10be13636510caa8478a879e engine: gotpl - home: http://www.joomla.org/ + home: https://www.joomla.org/ keywords: - joomla - cms @@ -2389,7 +2389,7 @@ entries: description: PHP content management system (CMS) for publishing web content digest: 0a01ea051ec15274932c8d82076c1a9fd62584b0fb916a81372319bef223c20e engine: gotpl - home: http://www.joomla.org/ + home: https://www.joomla.org/ keywords: - joomla - cms @@ -2771,7 +2771,7 @@ entries: - created: 2017-04-28T00:18:30.087097677Z description: A modern load testing framework digest: eb91b0e3c0b618cf5ad0f24d2685fe4086bc6f497685e58ad8a64032c4e82b7a - home: http://locust.io + home: https://locust.io icon: https://pbs.twimg.com/profile_images/1867636195/locust-logo-orignal.png maintainers: - email: vincent.drl@gmail.com @@ -3351,7 +3351,7 @@ entries: that uses PHP to process and display data stored in a database. digest: 0e51822c5547895109a5b41ce426c77f62d0434b40f3021afee8471ab976a6f5 engine: gotpl - home: http://www.mediawiki.org/ + home: https://www.mediawiki.org/ icon: https://bitnami.com/assets/stacks/mediawiki/img/mediawiki-stack-220x234.png keywords: - mediawiki @@ -3372,7 +3372,7 @@ entries: that uses PHP to process and display data stored in a database. digest: 0e419c2c5d87997f94a32da6597af3f3b52120dc1ec682dcbb6b238fb4825e06 engine: gotpl - home: http://www.mediawiki.org/ + home: https://www.mediawiki.org/ icon: https://bitnami.com/assets/stacks/mediawiki/img/mediawiki-stack-220x234.png keywords: - mediawiki @@ -3393,7 +3393,7 @@ entries: that uses PHP to process and display data stored in a database. digest: 6f4dde26737f7f1aa63ffda6c259ce388e3a3509225f90f334bfc3f0f7617bc1 engine: gotpl - home: http://www.mediawiki.org/ + home: https://www.mediawiki.org/ icon: https://bitnami.com/assets/stacks/mediawiki/img/mediawiki-stack-220x234.png keywords: - mediawiki @@ -3414,7 +3414,7 @@ entries: that uses PHP to process and display data stored in a database. digest: 0ba52b8c4c9e0bee3eb76fe625d2dc88729a1cdf41ace9d13cd4abc5b477cfb8 engine: gotpl - home: http://www.mediawiki.org/ + home: https://www.mediawiki.org/ keywords: - mediawiki - wiki @@ -3434,7 +3434,7 @@ entries: that uses PHP to process and display data stored in a database. digest: f49df3e17f97b238743aad0376eb9db7e4a9bca3829a3a65d7bbb349344a73be engine: gotpl - home: http://www.mediawiki.org/ + home: https://www.mediawiki.org/ keywords: - mediawiki - wiki @@ -3454,7 +3454,7 @@ entries: that uses PHP to process and display data stored in a database. digest: 339a90050d5cf4216140409349a356aa7cd8dc95e2cbdca06e4fdd11e87aa963 engine: gotpl - home: http://www.mediawiki.org/ + home: https://www.mediawiki.org/ keywords: - mediawiki - wiki @@ -3474,7 +3474,7 @@ entries: that uses PHP to process and display data stored in a database. digest: 9617f13f51f5bb016a072f2a026c627420721a1c5b7cd22f32d6cd0c90f34eda engine: gotpl - home: http://www.mediawiki.org/ + home: https://www.mediawiki.org/ keywords: - mediawiki - wiki @@ -3495,7 +3495,7 @@ entries: system. digest: 36ceb2767094598171b2851ecda54bd43d862b9b81aa4b294f3d8c8d59ddd79c engine: gotpl - home: http://memcached.org/ + home: https://memcached.org/ icon: https://upload.wikimedia.org/wikipedia/en/thumb/2/27/Memcached.svg/1024px-Memcached.svg.png keywords: - memcached @@ -3513,7 +3513,7 @@ entries: description: Chart for Memcached digest: 2b918dd8129a9d706e58b3de459004e3367c05a162d3e3cdb031cb6818d5f820 engine: gotpl - home: http://memcached.org/ + home: https://memcached.org/ keywords: - memcached - cache @@ -3911,7 +3911,7 @@ entries: learning environments digest: 386bff8ce61cf61961daf8ed6d68a76cd3a360560a08c1fca80bcbd897f11270 engine: gotpl - home: http://www.moodle.org/ + home: https://www.moodle.org/ icon: https://bitnami.com/assets/stacks/moodle/img/moodle-stack-110x117.png keywords: - moodle @@ -3932,7 +3932,7 @@ entries: learning environments digest: bd85420a7cefd82e9d96088591601f832ecc60016d6389dbcde51a2050327a66 engine: gotpl - home: http://www.moodle.org/ + home: https://www.moodle.org/ icon: https://bitnami.com/assets/stacks/moodle/img/moodle-stack-110x117.png keywords: - moodle @@ -3953,7 +3953,7 @@ entries: learning environments digest: 8656c544a71fa8cc4ac23380e999e072740ec8e481a22aff86517d8362e70121 engine: gotpl - home: http://www.moodle.org/ + home: https://www.moodle.org/ icon: https://bitnami.com/assets/stacks/moodle/img/moodle-stack-110x117.png keywords: - moodle From 7d2e42669a214f55f78ad4bb007d67094d6c1f15 Mon Sep 17 00:00:00 2001 From: Nguyen Hai Truong Date: Fri, 22 Feb 2019 15:17:32 +0700 Subject: [PATCH 097/327] Adding github workflow for contributing to helm Describe detail step-by-step of using github to contribute to helm project. Co-Authored-By: Dao Cong Tien tiendc@vn.fujitsu.com Signed-off-by: Nguyen Hai Truong --- CONTRIBUTING.md | 40 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a20c2b90b..4368c6a9e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -172,10 +172,44 @@ contributing to Helm. All issue types follow the same general lifecycle. Differe ## How to Contribute a Patch -1. Fork the repo, develop and test your code changes. -1. Use sign-off when making each of your commits (see [above](#sign-your-work)). +1. **Fork** the repo [helm](https://github.com/helm/helm) + +Go to https://github.com/helm/helm then hit the `Fork` button to fork your own copy of repository **helm** to your github account. + +2. **Clone** the forked repo to your local working directory. +```sh +$ git clone https://github.com/$your_github_account/helm.git +``` +3. Add an `upstream` remote to keep your fork in sync with the main repo. +```sh +$ cd helm +$ git remote add upstream https://github.com/helm/helm.git +$ git remote -v + +origin https://github.com/$your_github_account/helm.git (fetch) +origin https://github.com/$your_github_account/helm.git (push) +upstream https://github.com/helm/helm.git (fetch) +upstream https://github.com/helm/helm.git (push) +``` +4. Sync your local `master` branch. +```sh +$ git pull upstream master +``` +5. Create a branch to add a new feature or fix issues. +```sh +$ git checkout -b new-feature +``` +6. Make any change on the branch `new-feature` then build and test your codes. +7. Include in what will be committed. +```sh +$ git add +``` +8. Use sign-off when making each of your commits (see [above](#sign-your-work)). If you forgot to sign some commits that are part of the contribution, you can ask [git to rewrite your commit history](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History). -1. Submit a pull request. +```sh +$ git commit --signoff +``` +9. Submit a pull request. Coding conventions and standards are explained in the official developer docs: [Developers Guide](docs/developers.md) From d819efa48b820591e314562975cf11175cbf283a Mon Sep 17 00:00:00 2001 From: Don Bowman Date: Sat, 23 Feb 2019 17:47:44 -0500 Subject: [PATCH 098/327] Make imagePullSecrets and array, move to root level Changes as per PR https://github.com/helm/helm/pull/5271 - make imagePullSecrets be an array - move imagePullSecrets to 'root' level of Values Signed-off-by: Don Bowman --- pkg/chartutil/create.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/chartutil/create.go b/pkg/chartutil/create.go index 2577527b3..c5bd6805e 100644 --- a/pkg/chartutil/create.go +++ b/pkg/chartutil/create.go @@ -62,8 +62,8 @@ image: repository: nginx tag: stable pullPolicy: IfNotPresent - # pullSecret: my_secret +imagePullSecrets: [] nameOverride: "" fullnameOverride: "" @@ -190,9 +190,9 @@ spec: app.kubernetes.io/name: {{ include ".name" . }} app.kubernetes.io/instance: {{ .Release.Name }} spec: - {{- if .Values.image.pullSecret -}} + {{- with .Values.imagePullSecrets }} imagePullSecrets: - - name: {{ .Values.image.pullSecret }} + {{- toYaml . | nindent 8 }} {{- end }} containers: - name: {{ .Chart.Name }} From d9d2b3ae4812d756297ac89b8930eee61273c871 Mon Sep 17 00:00:00 2001 From: Nguyen Hai Truong Date: Tue, 26 Feb 2019 22:36:23 +0700 Subject: [PATCH 099/327] Fix many misspelling words (#5357) Although it is spelling mistakes, it might make an affects while reading. Co-Authored-By: Dao Cong Tien tiendc@vn.fujitsu.com Signed-off-by: Nguyen Hai Truong --- cmd/helm/verify.go | 2 +- docs/helm/helm_verify.md | 2 +- docs/man/man1/helm_verify.1 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/helm/verify.go b/cmd/helm/verify.go index bbc8347c1..6b8e6895d 100644 --- a/cmd/helm/verify.go +++ b/cmd/helm/verify.go @@ -27,7 +27,7 @@ import ( const verifyDesc = ` Verify that the given chart has a valid provenance file. -Provenance files provide crytographic verification that a chart has not been +Provenance files provide cryptographic verification that a chart has not been tampered with, and was packaged by a trusted provider. This command can be used to verify a local chart. Several other commands provide diff --git a/docs/helm/helm_verify.md b/docs/helm/helm_verify.md index 30ed43679..acd1c2923 100644 --- a/docs/helm/helm_verify.md +++ b/docs/helm/helm_verify.md @@ -7,7 +7,7 @@ verify that a chart at the given path has been signed and is valid Verify that the given chart has a valid provenance file. -Provenance files provide crytographic verification that a chart has not been +Provenance files provide cryptographic verification that a chart has not been tampered with, and was packaged by a trusted provider. This command can be used to verify a local chart. Several other commands provide diff --git a/docs/man/man1/helm_verify.1 b/docs/man/man1/helm_verify.1 index 5297924ae..341449ad8 100644 --- a/docs/man/man1/helm_verify.1 +++ b/docs/man/man1/helm_verify.1 @@ -18,7 +18,7 @@ helm\-verify \- verify that a chart at the given path has been signed and is val Verify that the given chart has a valid provenance file. .PP -Provenance files provide crytographic verification that a chart has not been +Provenance files provide cryptographic verification that a chart has not been tampered with, and was packaged by a trusted provider. .PP From 44eba6d28c87a58299d94e0832fb52385923d2d1 Mon Sep 17 00:00:00 2001 From: hnwolf Date: Tue, 26 Feb 2019 22:40:06 +0700 Subject: [PATCH 100/327] Update incorrect link (#5359) Signed-off-by: Nguyen Hung Phuong --- docs/using_helm.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/using_helm.md b/docs/using_helm.md index 79b5aef6f..faf3cc20f 100755 --- a/docs/using_helm.md +++ b/docs/using_helm.md @@ -18,8 +18,8 @@ an Apt dpkg, or a Yum RPM file. A *Repository* is the place where charts can be collected and shared. It's like Perl's [CPAN archive](https://www.cpan.org) or the -[Fedora Package Database](https://admin.fedoraproject.org/pkgdb/), but for -Kubernetes packages. +[Fedora Package Database](https://apps.fedoraproject.org/packages/s/pkgdb), but +for Kubernetes packages. A *Release* is an instance of a chart running in a Kubernetes cluster. One chart can often be installed many times into the same cluster. And From 268695813ba957821e53a784ac849aa3ca7f70a3 Mon Sep 17 00:00:00 2001 From: tuanvcw Date: Tue, 26 Feb 2019 22:41:50 +0700 Subject: [PATCH 101/327] Fix typos in various places (#5360) Signed-off-by: Vu Cong Tuan --- _proto/hapi/release/status.proto | 2 +- pkg/repo/chartrepo_test.go | 2 +- pkg/tiller/release_server.go | 4 ++-- pkg/tlsutil/cfg.go | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/_proto/hapi/release/status.proto b/_proto/hapi/release/status.proto index aa90760b3..e6ccd3d6e 100644 --- a/_proto/hapi/release/status.proto +++ b/_proto/hapi/release/status.proto @@ -29,7 +29,7 @@ message Status { UNKNOWN = 0; // Status_DEPLOYED indicates that the release has been pushed to Kubernetes. DEPLOYED = 1; - // Status_DELETED indicates that a release has been deleted from Kubermetes. + // Status_DELETED indicates that a release has been deleted from Kubernetes. DELETED = 2; // Status_SUPERSEDED indicates that this release object is outdated and a newer one exists. SUPERSEDED = 3; diff --git a/pkg/repo/chartrepo_test.go b/pkg/repo/chartrepo_test.go index a2f1daeb8..ed09b5c6d 100644 --- a/pkg/repo/chartrepo_test.go +++ b/pkg/repo/chartrepo_test.go @@ -175,7 +175,7 @@ func verifyIndex(t *testing.T, actual *IndexFile) { t.Errorf("Expected %q, got %q", e.Version, g.Version) } if len(g.Keywords) != 3 { - t.Error("Expected 3 keyrwords.") + t.Error("Expected 3 keywords.") } if len(g.Maintainers) != 2 { t.Error("Expected 2 maintainers.") diff --git a/pkg/tiller/release_server.go b/pkg/tiller/release_server.go index ffb922e40..eb3e876d0 100644 --- a/pkg/tiller/release_server.go +++ b/pkg/tiller/release_server.go @@ -115,7 +115,7 @@ func NewReleaseServer(env *environment.Environment, clientset kubernetes.Interfa // request values are not altered. func (s *ReleaseServer) reuseValues(req *services.UpdateReleaseRequest, current *release.Release) error { if req.ResetValues { - // If ResetValues is set, we comletely ignore current.Config. + // If ResetValues is set, we completely ignore current.Config. s.Log("resetting values to the chart's original version") return nil } @@ -191,7 +191,7 @@ func (s *ReleaseServer) uniqName(start string, reuse bool) (string, error) { rel := h[0] if st := rel.Info.Status.Code; reuse && (st == release.Status_DELETED || st == release.Status_FAILED) { - // Allowe re-use of names if the previous release is marked deleted. + // Allow re-use of names if the previous release is marked deleted. s.Log("name %s exists but is not in use, reusing name", start) return start, nil } else if reuse { diff --git a/pkg/tlsutil/cfg.go b/pkg/tlsutil/cfg.go index 2c1dfd340..6c2a829df 100644 --- a/pkg/tlsutil/cfg.go +++ b/pkg/tlsutil/cfg.go @@ -40,7 +40,7 @@ type Options struct { ClientAuth tls.ClientAuthType } -// ClientConfig retusn a TLS configuration for use by a Helm client. +// ClientConfig returns a TLS configuration for use by a Helm client. func ClientConfig(opts Options) (cfg *tls.Config, err error) { var cert *tls.Certificate var pool *x509.CertPool From cdc09e54bca50a53c1e54f0e67b15a0913f5af1d Mon Sep 17 00:00:00 2001 From: Nguyen Hai Truong Date: Wed, 27 Feb 2019 01:30:52 +0700 Subject: [PATCH 102/327] Ignore Unix swap files `*.swp` in .gitignore (#5364) Co-Authored-By: Dao Cong Tien tiendc@vn.fujitsu.com Signed-off-by: Nguyen Hai Truong --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 2414f7f2b..cfba70998 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,5 @@ rootfs/rudder vendor/ *.exe .idea/ -*.iml \ No newline at end of file +*.iml +*.swp From 42e424bb3bd24df1508d43b0bd40e0047e24abe9 Mon Sep 17 00:00:00 2001 From: Nguyen Hai Truong Date: Wed, 27 Feb 2019 10:09:39 +0700 Subject: [PATCH 103/327] Insert *~ when using emacs in .gitignore (#5366) Ignore temporary files *~ when editting source codes with emacs. Signed-off-by: Nguyen Hai Truong --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index cfba70998..14d942bf1 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ vendor/ .idea/ *.iml *.swp +*~ From 680b3fd05ac2dc5051afd69c96bca3fa929969e9 Mon Sep 17 00:00:00 2001 From: Vu Cong Tuan Date: Tue, 19 Feb 2019 14:55:28 +0700 Subject: [PATCH 104/327] Fixing many typos in docs Signed-off-by: Vu Cong Tuan --- docs/chart_template_guide/functions_and_pipelines.md | 2 +- docs/chart_template_guide/helm_ignore_file.md | 2 +- docs/helm/helm_verify.md | 2 +- docs/man/man1/helm_install.1 | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/chart_template_guide/functions_and_pipelines.md b/docs/chart_template_guide/functions_and_pipelines.md index fe5a3c2b2..1c099887d 100644 --- a/docs/chart_template_guide/functions_and_pipelines.md +++ b/docs/chart_template_guide/functions_and_pipelines.md @@ -150,7 +150,7 @@ Template functions and pipelines are a powerful way to transform information and ## Operators are functions -Operators are implemented as functions that return a boolean value. To use `eq`, `ne`, `lt`, `gt`, `and`, `or`, `not` etcetera place the operator at the front of the statement followed by its parameters just as you would a function. To chain multiple operations together, separate individual functions by surrounding them with paranthesis. +Operators are implemented as functions that return a boolean value. To use `eq`, `ne`, `lt`, `gt`, `and`, `or`, `not` etcetera place the operator at the front of the statement followed by its parameters just as you would a function. To chain multiple operations together, separate individual functions by surrounding them with parentheses. ```yaml {{/* include the body of this if statement when the variable .Values.fooString exists and is set to "foo" */}} diff --git a/docs/chart_template_guide/helm_ignore_file.md b/docs/chart_template_guide/helm_ignore_file.md index 6793bdfec..5980f439c 100644 --- a/docs/chart_template_guide/helm_ignore_file.md +++ b/docs/chart_template_guide/helm_ignore_file.md @@ -4,7 +4,7 @@ The `.helmignore` file is used to specify files you don't want to include in you If this file exists, the `helm package` command will ignore all the files that match the pattern specified in the `.helmignore` file while packaging your application. -This can help in avoiding unncessary or sensitive files or directories from being added in your helm chart. +This can help in avoiding unnecessary or sensitive files or directories from being added in your helm chart. The `.helmignore` file supports Unix shell glob matching, relative path matching, and negation (prefixed with !). Only one pattern per line is considered. diff --git a/docs/helm/helm_verify.md b/docs/helm/helm_verify.md index acd1c2923..e6d683dfb 100644 --- a/docs/helm/helm_verify.md +++ b/docs/helm/helm_verify.md @@ -42,4 +42,4 @@ helm verify [flags] PATH * [helm](helm.md) - The Helm package manager for Kubernetes. -###### Auto generated by spf13/cobra on 1-Aug-2018 +###### Auto generated by spf13/cobra on 25-Feb-2019 diff --git a/docs/man/man1/helm_install.1 b/docs/man/man1/helm_install.1 index fe1856bed..df4011a62 100644 --- a/docs/man/man1/helm_install.1 +++ b/docs/man/man1/helm_install.1 @@ -80,7 +80,7 @@ the '\-\-debug' and '\-\-dry\-run' flags can be combined. This will still requir round\-trip to the Tiller server. .PP -If \-\-verify is set, the chart MUST have a provenance file, and the provenenace +If \-\-verify is set, the chart MUST have a provenance file, and the provenance fall MUST pass all verification steps. .PP From 63c970c5ce29b0971cdc6409d9c0e156321ea32a Mon Sep 17 00:00:00 2001 From: Nguyen Quang Huy Date: Wed, 27 Feb 2019 22:00:20 +0700 Subject: [PATCH 105/327] Fix some typos (#5352) Correct some words spelling for reading more easily. Signed-off-by: Nguyen Quang Huy Co-Authored-By: Nguyen Van Trung --- CONTRIBUTING.md | 2 +- docs/chart_template_guide/functions_and_pipelines.md | 2 +- docs/chart_template_guide/helm_ignore_file.md | 2 +- docs/charts.md | 2 +- docs/charts_hooks.md | 4 ++-- docs/charts_tips_and_tricks.md | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a20c2b90b..c9716d0ce 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -242,7 +242,7 @@ Documentation PRs will follow the same lifecycle as other PRs. They will also be ## The Triager Each week, one of the core maintainers will serve as the designated "triager" starting after the -public standup meetings on Thursday. This person will be in charge triaging new PRs and issues +public stand-up meetings on Thursday. This person will be in charge triaging new PRs and issues throughout the work week. ## Labels diff --git a/docs/chart_template_guide/functions_and_pipelines.md b/docs/chart_template_guide/functions_and_pipelines.md index fe5a3c2b2..1c099887d 100644 --- a/docs/chart_template_guide/functions_and_pipelines.md +++ b/docs/chart_template_guide/functions_and_pipelines.md @@ -150,7 +150,7 @@ Template functions and pipelines are a powerful way to transform information and ## Operators are functions -Operators are implemented as functions that return a boolean value. To use `eq`, `ne`, `lt`, `gt`, `and`, `or`, `not` etcetera place the operator at the front of the statement followed by its parameters just as you would a function. To chain multiple operations together, separate individual functions by surrounding them with paranthesis. +Operators are implemented as functions that return a boolean value. To use `eq`, `ne`, `lt`, `gt`, `and`, `or`, `not` etcetera place the operator at the front of the statement followed by its parameters just as you would a function. To chain multiple operations together, separate individual functions by surrounding them with parentheses. ```yaml {{/* include the body of this if statement when the variable .Values.fooString exists and is set to "foo" */}} diff --git a/docs/chart_template_guide/helm_ignore_file.md b/docs/chart_template_guide/helm_ignore_file.md index 6793bdfec..5980f439c 100644 --- a/docs/chart_template_guide/helm_ignore_file.md +++ b/docs/chart_template_guide/helm_ignore_file.md @@ -4,7 +4,7 @@ The `.helmignore` file is used to specify files you don't want to include in you If this file exists, the `helm package` command will ignore all the files that match the pattern specified in the `.helmignore` file while packaging your application. -This can help in avoiding unncessary or sensitive files or directories from being added in your helm chart. +This can help in avoiding unnecessary or sensitive files or directories from being added in your helm chart. The `.helmignore` file supports Unix shell glob matching, relative path matching, and negation (prefixed with !). Only one pattern per line is considered. diff --git a/docs/charts.md b/docs/charts.md index d91dfe54e..6137898c2 100644 --- a/docs/charts.md +++ b/docs/charts.md @@ -492,7 +492,7 @@ create/update all of the above Kubernetes objects in the following order: This is because when Helm installs/upgrades charts, the Kubernetes objects from the charts and all its dependencies are -- aggregrated into a single set; then +- aggregated into a single set; then - sorted by type followed by name; and then - created/updated in that order. diff --git a/docs/charts_hooks.md b/docs/charts_hooks.md index fbb302481..6d436402d 100644 --- a/docs/charts_hooks.md +++ b/docs/charts_hooks.md @@ -248,8 +248,8 @@ annotated. When a helm release, that uses a hook, is being updated, it is possible that the hook resource might already exist in the cluster. In such circumstances, by default, helm will fail trying to install the hook resource with an `"... already exists"` error. -A common reason why the hook resource might already exist is that it was not deleted following use on a previous install/upgrade. There are, in fact, good reasons why one might want to keep the hook: for example, to aid manual debugging in case something went wrong. In this case, the recommended way of ensuring subsequent attemps to create the hook do not fail is to define a `"hook-delete-policy"` that can handle this: `"helm.sh/hook-delete-policy": "before-hook-creation"`. This hook annotation causes any existing hook to be removed, before the new hook is installed. +A common reason why the hook resource might already exist is that it was not deleted following use on a previous install/upgrade. There are, in fact, good reasons why one might want to keep the hook: for example, to aid manual debugging in case something went wrong. In this case, the recommended way of ensuring subsequent attempts to create the hook do not fail is to define a `"hook-delete-policy"` that can handle this: `"helm.sh/hook-delete-policy": "before-hook-creation"`. This hook annotation causes any existing hook to be removed, before the new hook is installed. -If it is preferred to actually delete the hook after each use (rather than have to handle it on a subsequent use, as shown above), then this can be achived using a delete policy of `"helm.sh/hook-delete-policy": "hook-succeeded,hook-failed"`. +If it is preferred to actually delete the hook after each use (rather than have to handle it on a subsequent use, as shown above), then this can be achieved using a delete policy of `"helm.sh/hook-delete-policy": "hook-succeeded,hook-failed"`. diff --git a/docs/charts_tips_and_tricks.md b/docs/charts_tips_and_tricks.md index e2c73b14f..d988184c5 100644 --- a/docs/charts_tips_and_tricks.md +++ b/docs/charts_tips_and_tricks.md @@ -281,7 +281,7 @@ According to the YAML specification, YAML is a superset of JSON. That means that any valid JSON structure ought to be valid in YAML. This has an advantage: Sometimes template developers may find it easier -to express a datastructure with a JSON-like syntax rather than deal with +to express a data structure with a JSON-like syntax rather than deal with YAML's whitespace sensitivity. As a best practice, templates should follow a YAML-like syntax _unless_ From 33589472cf02d8d10e96e06085d95791c0611a75 Mon Sep 17 00:00:00 2001 From: Nguyen Van Duc Date: Thu, 28 Feb 2019 01:38:51 +0700 Subject: [PATCH 106/327] Add .gitignore files for Eclipse (#5368) Signed-off-by: vanduc95 --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 14d942bf1..d1ec13265 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,6 @@ vendor/ *.iml *.swp *~ +.classpath +.project +.settings/** From e80f1735260dadb7da11ded78c77d88ab471e041 Mon Sep 17 00:00:00 2001 From: Don Bowman Date: Sat, 2 Mar 2019 10:55:38 -0500 Subject: [PATCH 107/327] Change indent of {{ with }} Signed-off-by: Don Bowman --- pkg/chartutil/create.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/chartutil/create.go b/pkg/chartutil/create.go index c5bd6805e..10395edaa 100644 --- a/pkg/chartutil/create.go +++ b/pkg/chartutil/create.go @@ -190,10 +190,10 @@ spec: app.kubernetes.io/name: {{ include ".name" . }} app.kubernetes.io/instance: {{ .Release.Name }} spec: - {{- with .Values.imagePullSecrets }} + {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} - {{- end }} + {{- end }} containers: - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" From 55fbed95d586db554b33cfa4dceff1475d2d4d41 Mon Sep 17 00:00:00 2001 From: Jacob LeGrone Date: Mon, 4 Mar 2019 10:09:05 -0500 Subject: [PATCH 108/327] feat(resource-policy): delete manifests when policy value is delete Signed-off-by: Jacob LeGrone --- pkg/kube/client.go | 8 +++++--- pkg/kube/resource_policy.go | 23 +++++++++++++++++++---- pkg/tiller/resource_policy.go | 12 +++--------- 3 files changed, 27 insertions(+), 16 deletions(-) diff --git a/pkg/kube/client.go b/pkg/kube/client.go index eccf888e8..955c75ab1 100644 --- a/pkg/kube/client.go +++ b/pkg/kube/client.go @@ -23,12 +23,13 @@ import ( goerrors "errors" "fmt" "io" - "k8s.io/apimachinery/pkg/api/meta" "log" "sort" "strings" "time" + "k8s.io/apimachinery/pkg/api/meta" + "github.com/evanphx/json-patch" appsv1 "k8s.io/api/apps/v1" appsv1beta1 "k8s.io/api/apps/v1beta1" @@ -362,8 +363,9 @@ func (c *Client) Update(namespace string, originalReader, targetReader io.Reader if err != nil { c.Log("Unable to get annotations on %q, err: %s", info.Name, err) } - if annotations != nil && annotations[ResourcePolicyAnno] == KeepPolicy { - c.Log("Skipping delete of %q due to annotation [%s=%s]", info.Name, ResourcePolicyAnno, KeepPolicy) + if ResourcePolicyIsKeep(annotations) { + policy := annotations[ResourcePolicyAnno] + c.Log("Skipping delete of %q due to annotation [%s=%s]", info.Name, ResourcePolicyAnno, policy) continue } diff --git a/pkg/kube/resource_policy.go b/pkg/kube/resource_policy.go index 45cebcba8..9bce63a7c 100644 --- a/pkg/kube/resource_policy.go +++ b/pkg/kube/resource_policy.go @@ -19,8 +19,23 @@ package kube // ResourcePolicyAnno is the annotation name for a resource policy const ResourcePolicyAnno = "helm.sh/resource-policy" -// KeepPolicy is the resource policy type for keep +// deletePolicy is the resource policy type for delete // -// This resource policy type allows resources to skip being deleted -// during an uninstallRelease action. -const KeepPolicy = "keep" +// 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" + +// ResourcePolicyIsKeep accepts a map of Kubernetes resource annotations and +// returns true if the resource should be kept, otherwise false if it is safe +// for Helm to delete. +func ResourcePolicyIsKeep(annotations map[string]string) bool { + if annotations != nil { + resourcePolicyType, ok := annotations[ResourcePolicyAnno] + if ok && resourcePolicyType != deletePolicy { + return true + } + } + return false +} diff --git a/pkg/tiller/resource_policy.go b/pkg/tiller/resource_policy.go index aa9c5d2bd..c97621fcd 100644 --- a/pkg/tiller/resource_policy.go +++ b/pkg/tiller/resource_policy.go @@ -34,17 +34,11 @@ func filterManifestsToKeep(manifests []Manifest) ([]Manifest, []Manifest) { continue } - resourcePolicyType, ok := m.Head.Metadata.Annotations[kube.ResourcePolicyAnno] - if !ok { - remaining = append(remaining, m) - continue - } - - resourcePolicyType = strings.ToLower(strings.TrimSpace(resourcePolicyType)) - if resourcePolicyType == kube.KeepPolicy { + if kube.ResourcePolicyIsKeep(m.Head.Metadata.Annotations) { keep = append(keep, m) + } else { + remaining = append(remaining, m) } - } return keep, remaining } From ce4c3f51ade97b71a6eee5068d4f529d60b1272b Mon Sep 17 00:00:00 2001 From: Jacob LeGrone Date: Mon, 4 Mar 2019 10:17:37 -0500 Subject: [PATCH 109/327] test(resource-policy): verify behavior of non-standard policy types Signed-off-by: Jacob LeGrone --- pkg/kube/client_test.go | 2 +- pkg/kube/resource_policy_test.go | 72 ++++++++++++++++++++++++++++ pkg/tiller/release_server_test.go | 27 ++++++++--- pkg/tiller/release_uninstall_test.go | 5 +- 4 files changed, 97 insertions(+), 9 deletions(-) create mode 100644 pkg/kube/resource_policy_test.go diff --git a/pkg/kube/client_test.go b/pkg/kube/client_test.go index f601b6536..89e630bb3 100644 --- a/pkg/kube/client_test.go +++ b/pkg/kube/client_test.go @@ -213,7 +213,7 @@ func TestUpdate(t *testing.T) { // Test resource policy is respected actions = nil - listA.Items[2].ObjectMeta.Annotations = map[string]string{ResourcePolicyAnno: KeepPolicy} + listA.Items[2].ObjectMeta.Annotations = map[string]string{ResourcePolicyAnno: "keep"} if err := c.Update(v1.NamespaceDefault, objBody(&listA), objBody(&listB), false, false, 0, false); err != nil { t.Fatal(err) } diff --git a/pkg/kube/resource_policy_test.go b/pkg/kube/resource_policy_test.go new file mode 100644 index 000000000..de6061b48 --- /dev/null +++ b/pkg/kube/resource_policy_test.go @@ -0,0 +1,72 @@ +/* +Copyright The Helm Authors. + +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 kube + +import "testing" + +func TestResourcePolicyIsKeep(t *testing.T) { + type annotations map[string]string + type testcase struct { + annotations + keep bool + } + cases := []testcase{ + {nil, false}, + { + annotations{ + "foo": "bar", + }, + false, + }, + { + annotations{ + ResourcePolicyAnno: "keep", + }, + true, + }, + { + annotations{ + ResourcePolicyAnno: "KEEP ", + }, + true, + }, + { + annotations{ + ResourcePolicyAnno: "", + }, + true, + }, + { + annotations{ + ResourcePolicyAnno: "delete", + }, + false, + }, + { + annotations{ + ResourcePolicyAnno: "DELETE", + }, + true, + }, + } + + for _, tc := range cases { + if tc.keep != ResourcePolicyIsKeep(tc.annotations) { + t.Errorf("Expected function to return %t for annotations %v", tc.keep, tc.annotations) + } + } +} diff --git a/pkg/tiller/release_server_test.go b/pkg/tiller/release_server_test.go index a1502e8a2..4e29e4413 100644 --- a/pkg/tiller/release_server_test.go +++ b/pkg/tiller/release_server_test.go @@ -89,13 +89,22 @@ spec: var manifestWithKeep = `kind: ConfigMap metadata: - name: test-cm-keep + name: test-cm-keep-a annotations: "helm.sh/resource-policy": keep data: name: value ` +var manifestWithKeepEmpty = `kind: ConfigMap +metadata: + name: test-cm-keep-b + annotations: + "helm.sh/resource-policy": "" +data: + name: value +` + var manifestWithUpgradeHooks = `kind: ConfigMap metadata: name: test-cm @@ -449,23 +458,27 @@ func releaseWithKeepStub(rlsName string) *release.Release { Name: "bunnychart", }, Templates: []*chart.Template{ - {Name: "templates/configmap", Data: []byte(manifestWithKeep)}, + {Name: "templates/configmap-keep-a", Data: []byte(manifestWithKeep)}, + {Name: "templates/configmap-keep-b", Data: []byte(manifestWithKeepEmpty)}, }, } date := timestamp.Timestamp{Seconds: 242085845, Nanos: 0} - return &release.Release{ + rl := &release.Release{ Name: rlsName, Info: &release.Info{ FirstDeployed: &date, LastDeployed: &date, Status: &release.Status{Code: release.Status_DEPLOYED}, }, - Chart: ch, - Config: &chart.Config{Raw: `name: value`}, - Version: 1, - Manifest: manifestWithKeep, + Chart: ch, + Config: &chart.Config{Raw: `name: value`}, + Version: 1, } + + helm.RenderReleaseMock(rl, false) + + return rl } func MockEnvironment() *environment.Environment { diff --git a/pkg/tiller/release_uninstall_test.go b/pkg/tiller/release_uninstall_test.go index cb59b6bf5..d95a52c4d 100644 --- a/pkg/tiller/release_uninstall_test.go +++ b/pkg/tiller/release_uninstall_test.go @@ -150,7 +150,10 @@ func TestUninstallReleaseWithKeepPolicy(t *testing.T) { if res.Info == "" { t.Errorf("Expected response info to not be empty") } else { - if !strings.Contains(res.Info, "[ConfigMap] test-cm-keep") { + if !strings.Contains(res.Info, "[ConfigMap] test-cm-keep-a") { + t.Errorf("unexpected output: %s", res.Info) + } + if !strings.Contains(res.Info, "[ConfigMap] test-cm-keep-b") { t.Errorf("unexpected output: %s", res.Info) } } From e06c605b88d38c369a52dc86a2fa9890ea1aab66 Mon Sep 17 00:00:00 2001 From: Jacob LeGrone Date: Mon, 4 Mar 2019 10:18:26 -0500 Subject: [PATCH 110/327] docs(resource-policy): explain "delete" policy type Signed-off-by: Jacob LeGrone --- docs/charts_tips_and_tricks.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/charts_tips_and_tricks.md b/docs/charts_tips_and_tricks.md index d988184c5..fd7a08f7e 100644 --- a/docs/charts_tips_and_tricks.md +++ b/docs/charts_tips_and_tricks.md @@ -235,6 +235,9 @@ orphaned. Helm will no longer manage it in any way. This can lead to problems if using `helm install --replace` on a release that has already been deleted, but has kept resources. +To explicitly opt in to resource deletion, for example when overriding a chart's +default annotations, set the resource policy annotation value to `delete`. + ## Using "Partials" and Template Includes Sometimes you want to create some reusable parts in your chart, whether From 9689b02321be284f001a58c469d5ce13cd044b71 Mon Sep 17 00:00:00 2001 From: anton <0verc1ocker@users.noreply.github.com> Date: Mon, 4 Mar 2019 18:18:26 -0500 Subject: [PATCH 111/327] Add --max-history tip and to the quickstart helm init docs (#5328) Signed-off-by: 0verc1ocker --- docs/quickstart.md | 4 +++- docs/rbac.md | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/quickstart.md b/docs/quickstart.md index ef3cb460e..d7f2e3b91 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -54,9 +54,11 @@ Once you have Helm ready, you can initialize the local CLI and also install Tiller into your Kubernetes cluster in one step: ```console -$ helm init +$ helm init --max-history 200 ``` +**TIP:** Setting `--max-history` on helm init is recommended as configmaps and other objects in helm history can grow large in number if not purged by max limit. Without a max history set the history is kept indefinitely, leaving a large number of records for helm and tiller to maintain. + This will install Tiller into the Kubernetes cluster you saw with `kubectl config current-context`. diff --git a/docs/rbac.md b/docs/rbac.md index 4b39ecdc6..45371cda8 100644 --- a/docs/rbac.md +++ b/docs/rbac.md @@ -43,7 +43,7 @@ _Note: The cluster-admin role is created by default in a Kubernetes cluster, so $ kubectl create -f rbac-config.yaml serviceaccount "tiller" created clusterrolebinding "tiller" created -$ helm init --service-account tiller +$ helm init --service-account tiller --max-history 200 ``` ### Example: Deploy Tiller in a namespace, restricted to deploying resources only in that namespace From c94c00915f29fba5e816c277ff617babb3790cb1 Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Tue, 5 Mar 2019 18:04:54 -0500 Subject: [PATCH 112/327] Fix #5046 compatible with MacOS (#5406) Signed-off-by: Marc Khouzam --- cmd/helm/completion.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/helm/completion.go b/cmd/helm/completion.go index d0249b2ea..3c0318941 100644 --- a/cmd/helm/completion.go +++ b/cmd/helm/completion.go @@ -212,7 +212,7 @@ __helm_convert_bash_to_zsh() { -e "s/${LWORD}compopt${RWORD}/__helm_compopt/g" \ -e "s/${LWORD}declare${RWORD}/__helm_declare/g" \ -e "s/\\\$(type${RWORD}/\$(__helm_type/g" \ - -e 's/aliashash\["\(\w\+\)"\]/aliashash[\1]/g' \ + -e 's/aliashash\["\(.\{1,\}\)"\]/aliashash[\1]/g' \ <<'BASH_COMPLETION_EOF' ` out.Write([]byte(zshInitialization)) From 7da53d6e70e7dde7760fb89a29bd63a8cf30e897 Mon Sep 17 00:00:00 2001 From: Patrick Decat Date: Sat, 19 Jan 2019 14:52:14 +0100 Subject: [PATCH 113/327] Refactor helm init command for reuse, allowing other programs to initialize local helm home directory without shelling out to the helm binary Signed-off-by: Patrick Decat --- cmd/helm/helm_test.go | 3 +- cmd/helm/init.go | 129 +----------------- cmd/helm/init_test.go | 47 +------ cmd/helm/installer/init.go | 166 +++++++++++++++++++++++ cmd/helm/installer/init_test.go | 120 ++++++++++++++++ cmd/helm/{ => installer}/init_unix.go | 2 +- cmd/helm/{ => installer}/init_windows.go | 2 +- cmd/helm/repo_update.go | 3 +- 8 files changed, 295 insertions(+), 177 deletions(-) create mode 100644 cmd/helm/installer/init.go create mode 100644 cmd/helm/installer/init_test.go rename cmd/helm/{ => installer}/init_unix.go (92%) rename cmd/helm/{ => installer}/init_windows.go (92%) diff --git a/cmd/helm/helm_test.go b/cmd/helm/helm_test.go index 6e915fa7b..83f1173f2 100644 --- a/cmd/helm/helm_test.go +++ b/cmd/helm/helm_test.go @@ -30,6 +30,7 @@ import ( "github.com/spf13/cobra" "k8s.io/client-go/util/homedir" + "k8s.io/helm/cmd/helm/installer" "k8s.io/helm/pkg/helm" "k8s.io/helm/pkg/helm/environment" "k8s.io/helm/pkg/helm/helmpath" @@ -137,7 +138,7 @@ func ensureTestHome(home helmpath.Home, t *testing.T) error { } } - localRepoIndexFile := home.LocalRepository(localRepositoryIndexFile) + localRepoIndexFile := home.LocalRepository(installer.LocalRepositoryIndexFile) if fi, err := os.Stat(localRepoIndexFile); err != nil { i := repo.NewIndexFile() if err := i.WriteFile(localRepoIndexFile, 0644); err != nil { diff --git a/cmd/helm/init.go b/cmd/helm/init.go index db35ef037..682189f84 100644 --- a/cmd/helm/init.go +++ b/cmd/helm/init.go @@ -31,11 +31,9 @@ import ( "k8s.io/apimachinery/pkg/util/yaml" "k8s.io/helm/cmd/helm/installer" - "k8s.io/helm/pkg/getter" "k8s.io/helm/pkg/helm" "k8s.io/helm/pkg/helm/helmpath" "k8s.io/helm/pkg/helm/portforwarder" - "k8s.io/helm/pkg/repo" "k8s.io/helm/pkg/version" ) @@ -60,12 +58,6 @@ To dump a manifest containing the Tiller deployment YAML, combine the '--dry-run' and '--debug' flags. ` -const ( - stableRepository = "stable" - localRepository = "local" - localRepositoryIndexFile = "index.yaml" -) - var ( stableRepositoryURL = "https://kubernetes-charts.storage.googleapis.com" // This is the IPv4 loopback, not localhost, because we have to force IPv4 @@ -266,14 +258,8 @@ func (i *initCmd) run() error { return nil } - if err := ensureDirectories(i.home, i.out); err != nil { - return err - } - if err := ensureDefaultRepos(i.home, i.out, i.skipRefresh); err != nil { - return err - } - if err := ensureRepoFileFormat(i.home.RepositoryFile(), i.out); err != nil { - return err + if err := installer.Initialize(i.home, i.out, i.skipRefresh, settings, stableRepositoryURL, localRepositoryURL); err != nil { + return fmt.Errorf("error initializing: %s", err) } fmt.Fprintf(i.out, "$HELM_HOME has been configured at %s.\n", settings.Home) @@ -351,117 +337,6 @@ func (i *initCmd) ping(image string) error { return nil } -// ensureDirectories checks to see if $HELM_HOME exists. -// -// If $HELM_HOME does not exist, this function will create it. -func ensureDirectories(home helmpath.Home, out io.Writer) error { - configDirectories := []string{ - home.String(), - home.Repository(), - home.Cache(), - home.LocalRepository(), - home.Plugins(), - home.Starters(), - home.Archive(), - } - for _, p := range configDirectories { - if fi, err := os.Stat(p); err != nil { - fmt.Fprintf(out, "Creating %s \n", p) - if err := os.MkdirAll(p, 0755); err != nil { - return fmt.Errorf("Could not create %s: %s", p, err) - } - } else if !fi.IsDir() { - return fmt.Errorf("%s must be a directory", p) - } - } - - return nil -} - -func ensureDefaultRepos(home helmpath.Home, out io.Writer, skipRefresh bool) error { - repoFile := home.RepositoryFile() - if fi, err := os.Stat(repoFile); err != nil { - fmt.Fprintf(out, "Creating %s \n", repoFile) - f := repo.NewRepoFile() - sr, err := initStableRepo(home.CacheIndex(stableRepository), out, skipRefresh, home) - if err != nil { - return err - } - lr, err := initLocalRepo(home.LocalRepository(localRepositoryIndexFile), home.CacheIndex("local"), out, home) - if err != nil { - return err - } - f.Add(sr) - f.Add(lr) - if err := f.WriteFile(repoFile, 0644); err != nil { - return err - } - } else if fi.IsDir() { - return fmt.Errorf("%s must be a file, not a directory", repoFile) - } - return nil -} - -func initStableRepo(cacheFile string, out io.Writer, skipRefresh bool, home helmpath.Home) (*repo.Entry, error) { - fmt.Fprintf(out, "Adding %s repo with URL: %s \n", stableRepository, stableRepositoryURL) - c := repo.Entry{ - Name: stableRepository, - URL: stableRepositoryURL, - Cache: cacheFile, - } - r, err := repo.NewChartRepository(&c, getter.All(settings)) - if err != nil { - return nil, err - } - - if skipRefresh { - return &c, nil - } - - // In this case, the cacheFile is always absolute. So passing empty string - // is safe. - if err := r.DownloadIndexFile(""); err != nil { - return nil, fmt.Errorf("Looks like %q is not a valid chart repository or cannot be reached: %s", stableRepositoryURL, err.Error()) - } - - return &c, nil -} - -func initLocalRepo(indexFile, cacheFile string, out io.Writer, home helmpath.Home) (*repo.Entry, error) { - if fi, err := os.Stat(indexFile); err != nil { - fmt.Fprintf(out, "Adding %s repo with URL: %s \n", localRepository, localRepositoryURL) - i := repo.NewIndexFile() - if err := i.WriteFile(indexFile, 0644); err != nil { - return nil, err - } - - //TODO: take this out and replace with helm update functionality - if err := createLink(indexFile, cacheFile, home); err != nil { - return nil, err - } - } else if fi.IsDir() { - return nil, fmt.Errorf("%s must be a file, not a directory", indexFile) - } - - return &repo.Entry{ - Name: localRepository, - URL: localRepositoryURL, - Cache: cacheFile, - }, nil -} - -func ensureRepoFileFormat(file string, out io.Writer) error { - r, err := repo.LoadRepositoriesFile(file) - if err == repo.ErrRepoOutOfDate { - fmt.Fprintln(out, "Updating repository file format...") - if err := r.WriteFile(file, 0644); err != nil { - return err - } - } - - return nil -} - // watchTillerUntilReady waits for the tiller pod to become available. This is useful in situations where we // want to wait before we call New(). // diff --git a/cmd/helm/init_test.go b/cmd/helm/init_test.go index fd6ef97c4..b58303f42 100644 --- a/cmd/helm/init_test.go +++ b/cmd/helm/init_test.go @@ -28,7 +28,7 @@ import ( "github.com/ghodss/yaml" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" "k8s.io/api/extensions/v1beta1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -179,51 +179,6 @@ func TestInitCmd_dryRun(t *testing.T) { } } -func TestEnsureHome(t *testing.T) { - home, err := ioutil.TempDir("", "helm_home") - if err != nil { - t.Fatal(err) - } - defer os.RemoveAll(home) - - b := bytes.NewBuffer(nil) - hh := helmpath.Home(home) - settings.Home = hh - if err := ensureDirectories(hh, b); err != nil { - t.Error(err) - } - if err := ensureDefaultRepos(hh, b, false); err != nil { - t.Error(err) - } - if err := ensureDefaultRepos(hh, b, true); err != nil { - t.Error(err) - } - if err := ensureRepoFileFormat(hh.RepositoryFile(), b); err != nil { - t.Error(err) - } - - expectedDirs := []string{hh.String(), hh.Repository(), hh.Cache(), hh.LocalRepository()} - for _, dir := range expectedDirs { - if fi, err := os.Stat(dir); err != nil { - t.Errorf("%s", err) - } else if !fi.IsDir() { - t.Errorf("%s is not a directory", fi) - } - } - - if fi, err := os.Stat(hh.RepositoryFile()); err != nil { - t.Error(err) - } else if fi.IsDir() { - t.Errorf("%s should not be a directory", fi) - } - - if fi, err := os.Stat(hh.LocalRepository(localRepositoryIndexFile)); err != nil { - t.Errorf("%s", err) - } else if fi.IsDir() { - t.Errorf("%s should not be a directory", fi) - } -} - func TestInitCmd_tlsOptions(t *testing.T) { const testDir = "../../testdata" diff --git a/cmd/helm/installer/init.go b/cmd/helm/installer/init.go new file mode 100644 index 000000000..9edfc0797 --- /dev/null +++ b/cmd/helm/installer/init.go @@ -0,0 +1,166 @@ +/* +Copyright The Helm Authors. + +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 installer // import "k8s.io/helm/cmd/helm/installer" + +import ( + "fmt" + "io" + "os" + + "k8s.io/helm/pkg/getter" + helm_env "k8s.io/helm/pkg/helm/environment" + "k8s.io/helm/pkg/helm/helmpath" + "k8s.io/helm/pkg/repo" +) + +const ( + stableRepository = "stable" + + // LocalRepository is the standard name of the local repository + LocalRepository = "local" + + // LocalRepositoryIndexFile is the standard name of the local repository index file + LocalRepositoryIndexFile = "index.yaml" +) + +// Initialize initializes local config +// +// Returns an error if the command failed. +func Initialize(home helmpath.Home, out io.Writer, skipRefresh bool, settings helm_env.EnvSettings, stableRepositoryURL, localRepositoryURL string) error { + if err := ensureDirectories(home, out); err != nil { + return err + } + if err := ensureDefaultRepos(home, out, skipRefresh, settings, stableRepositoryURL, localRepositoryURL); err != nil { + return err + } + if err := ensureRepoFileFormat(home.RepositoryFile(), out); err != nil { + return err + } + + return nil +} + +// ensureDirectories checks to see if $HELM_HOME exists. +// +// If $HELM_HOME does not exist, this function will create it. +func ensureDirectories(home helmpath.Home, out io.Writer) error { + configDirectories := []string{ + home.String(), + home.Repository(), + home.Cache(), + home.LocalRepository(), + home.Plugins(), + home.Starters(), + home.Archive(), + } + for _, p := range configDirectories { + if fi, err := os.Stat(p); err != nil { + fmt.Fprintf(out, "Creating %s \n", p) + if err := os.MkdirAll(p, 0755); err != nil { + return fmt.Errorf("Could not create %s: %s", p, err) + } + } else if !fi.IsDir() { + return fmt.Errorf("%s must be a directory", p) + } + } + + return nil +} + +func ensureDefaultRepos(home helmpath.Home, out io.Writer, skipRefresh bool, settings helm_env.EnvSettings, stableRepositoryURL, localRepositoryURL string) error { + repoFile := home.RepositoryFile() + if fi, err := os.Stat(repoFile); err != nil { + fmt.Fprintf(out, "Creating %s \n", repoFile) + f := repo.NewRepoFile() + sr, err := initStableRepo(home.CacheIndex(stableRepository), home, out, skipRefresh, settings, stableRepositoryURL) + if err != nil { + return err + } + lr, err := initLocalRepo(home.LocalRepository(LocalRepositoryIndexFile), home.CacheIndex("local"), home, out, settings, localRepositoryURL) + if err != nil { + return err + } + f.Add(sr) + f.Add(lr) + if err := f.WriteFile(repoFile, 0644); err != nil { + return err + } + } else if fi.IsDir() { + return fmt.Errorf("%s must be a file, not a directory", repoFile) + } + return nil +} + +func initStableRepo(cacheFile string, home helmpath.Home, out io.Writer, skipRefresh bool, settings helm_env.EnvSettings, stableRepositoryURL string) (*repo.Entry, error) { + fmt.Fprintf(out, "Adding %s repo with URL: %s \n", stableRepository, stableRepositoryURL) + c := repo.Entry{ + Name: stableRepository, + URL: stableRepositoryURL, + Cache: cacheFile, + } + r, err := repo.NewChartRepository(&c, getter.All(settings)) + if err != nil { + return nil, err + } + + if skipRefresh { + return &c, nil + } + + // In this case, the cacheFile is always absolute. So passing empty string + // is safe. + if err := r.DownloadIndexFile(""); err != nil { + return nil, fmt.Errorf("Looks like %q is not a valid chart repository or cannot be reached: %s", stableRepositoryURL, err.Error()) + } + + return &c, nil +} + +func initLocalRepo(indexFile, cacheFile string, home helmpath.Home, out io.Writer, settings helm_env.EnvSettings, localRepositoryURL string) (*repo.Entry, error) { + if fi, err := os.Stat(indexFile); err != nil { + fmt.Fprintf(out, "Adding %s repo with URL: %s \n", LocalRepository, localRepositoryURL) + i := repo.NewIndexFile() + if err := i.WriteFile(indexFile, 0644); err != nil { + return nil, err + } + + //TODO: take this out and replace with helm update functionality + if err := createLink(indexFile, cacheFile, home); err != nil { + return nil, err + } + } else if fi.IsDir() { + return nil, fmt.Errorf("%s must be a file, not a directory", indexFile) + } + + return &repo.Entry{ + Name: LocalRepository, + URL: localRepositoryURL, + Cache: cacheFile, + }, nil +} + +func ensureRepoFileFormat(file string, out io.Writer) error { + r, err := repo.LoadRepositoriesFile(file) + if err == repo.ErrRepoOutOfDate { + fmt.Fprintln(out, "Updating repository file format...") + if err := r.WriteFile(file, 0644); err != nil { + return err + } + } + + return nil +} diff --git a/cmd/helm/installer/init_test.go b/cmd/helm/installer/init_test.go new file mode 100644 index 000000000..1d53687e6 --- /dev/null +++ b/cmd/helm/installer/init_test.go @@ -0,0 +1,120 @@ +/* +Copyright The Helm Authors. + +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 installer // import "k8s.io/helm/cmd/helm/installer" + +import ( + "bytes" + "io/ioutil" + "os" + "testing" + + helm_env "k8s.io/helm/pkg/helm/environment" + "k8s.io/helm/pkg/helm/helmpath" +) + +func TestInitialize(t *testing.T) { + home, err := ioutil.TempDir("", "helm_home") + if err != nil { + t.Fatal(err) + } + defer os.RemoveAll(home) + + b := bytes.NewBuffer(nil) + hh := helmpath.Home(home) + + settings := helm_env.EnvSettings{ + Home: hh, + } + stableRepositoryURL := "https://kubernetes-charts.storage.googleapis.com" + localRepositoryURL := "http://127.0.0.1:8879/charts" + + if err := Initialize(hh, b, false, settings, stableRepositoryURL, localRepositoryURL); err != nil { + t.Error(err) + } + + expectedDirs := []string{hh.String(), hh.Repository(), hh.Cache(), hh.LocalRepository()} + for _, dir := range expectedDirs { + if fi, err := os.Stat(dir); err != nil { + t.Errorf("%s", err) + } else if !fi.IsDir() { + t.Errorf("%s is not a directory", fi) + } + } + + if fi, err := os.Stat(hh.RepositoryFile()); err != nil { + t.Error(err) + } else if fi.IsDir() { + t.Errorf("%s should not be a directory", fi) + } + + if fi, err := os.Stat(hh.LocalRepository(LocalRepositoryIndexFile)); err != nil { + t.Errorf("%s", err) + } else if fi.IsDir() { + t.Errorf("%s should not be a directory", fi) + } +} + +func TestEnsureHome(t *testing.T) { + home, err := ioutil.TempDir("", "helm_home") + if err != nil { + t.Fatal(err) + } + defer os.RemoveAll(home) + + b := bytes.NewBuffer(nil) + hh := helmpath.Home(home) + + settings := helm_env.EnvSettings{ + Home: hh, + } + stableRepositoryURL := "https://kubernetes-charts.storage.googleapis.com" + localRepositoryURL := "http://127.0.0.1:8879/charts" + + if err := ensureDirectories(hh, b); err != nil { + t.Error(err) + } + if err := ensureDefaultRepos(hh, b, false, settings, stableRepositoryURL, localRepositoryURL); err != nil { + t.Error(err) + } + if err := ensureDefaultRepos(hh, b, true, settings, stableRepositoryURL, localRepositoryURL); err != nil { + t.Error(err) + } + if err := ensureRepoFileFormat(hh.RepositoryFile(), b); err != nil { + t.Error(err) + } + + expectedDirs := []string{hh.String(), hh.Repository(), hh.Cache(), hh.LocalRepository()} + for _, dir := range expectedDirs { + if fi, err := os.Stat(dir); err != nil { + t.Errorf("%s", err) + } else if !fi.IsDir() { + t.Errorf("%s is not a directory", fi) + } + } + + if fi, err := os.Stat(hh.RepositoryFile()); err != nil { + t.Error(err) + } else if fi.IsDir() { + t.Errorf("%s should not be a directory", fi) + } + + if fi, err := os.Stat(hh.LocalRepository(LocalRepositoryIndexFile)); err != nil { + t.Errorf("%s", err) + } else if fi.IsDir() { + t.Errorf("%s should not be a directory", fi) + } +} diff --git a/cmd/helm/init_unix.go b/cmd/helm/installer/init_unix.go similarity index 92% rename from cmd/helm/init_unix.go rename to cmd/helm/installer/init_unix.go index bf61f1925..d7f15a1c2 100644 --- a/cmd/helm/init_unix.go +++ b/cmd/helm/installer/init_unix.go @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package installer // import "k8s.io/helm/cmd/helm/installer" import ( "os" diff --git a/cmd/helm/init_windows.go b/cmd/helm/installer/init_windows.go similarity index 92% rename from cmd/helm/init_windows.go rename to cmd/helm/installer/init_windows.go index 447044bba..48c56e288 100644 --- a/cmd/helm/init_windows.go +++ b/cmd/helm/installer/init_windows.go @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package installer // import "k8s.io/helm/cmd/helm/installer" import ( "os" diff --git a/cmd/helm/repo_update.go b/cmd/helm/repo_update.go index 42d242b83..2628b7f2f 100644 --- a/cmd/helm/repo_update.go +++ b/cmd/helm/repo_update.go @@ -24,6 +24,7 @@ import ( "github.com/spf13/cobra" + "k8s.io/helm/cmd/helm/installer" "k8s.io/helm/pkg/getter" "k8s.io/helm/pkg/helm/helmpath" "k8s.io/helm/pkg/repo" @@ -99,7 +100,7 @@ func updateCharts(repos []*repo.ChartRepository, out io.Writer, home helmpath.Ho wg.Add(1) go func(re *repo.ChartRepository) { defer wg.Done() - if re.Config.Name == localRepository { + if re.Config.Name == installer.LocalRepository { mu.Lock() fmt.Fprintf(out, "...Skip %s chart repository\n", re.Config.Name) mu.Unlock() From ea1bd7e1637b2573a2f418ef607fd3a671293cd9 Mon Sep 17 00:00:00 2001 From: Martin Hickey Date: Wed, 6 Mar 2019 17:27:15 +0000 Subject: [PATCH 114/327] Update dependency build doc to improve understanding (#5379) Signed-off-by: Martin Hickey --- cmd/helm/dependency_build.go | 8 ++++---- docs/helm/helm_dependency_build.md | 9 ++++----- docs/man/man1/helm_dependency_build.1 | 9 ++++----- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/cmd/helm/dependency_build.go b/cmd/helm/dependency_build.go index 3af3c1243..64a80f3bd 100644 --- a/cmd/helm/dependency_build.go +++ b/cmd/helm/dependency_build.go @@ -29,11 +29,11 @@ const dependencyBuildDesc = ` Build out the charts/ directory from the requirements.lock file. Build is used to reconstruct a chart's dependencies to the state specified in -the lock file. This will not re-negotiate dependencies, as 'helm dependency update' -does. +the lock file. -If no lock file is found, 'helm dependency build' will mirror the behavior -of 'helm dependency update'. +If no lock file is found, 'helm dependency build' will mirror the behavior of +the 'helm dependency update' command. This means it will update the on-disk +dependencies to mirror the requirements.yaml file and generate a lock file. ` type dependencyBuildCmd struct { diff --git a/docs/helm/helm_dependency_build.md b/docs/helm/helm_dependency_build.md index fba70f2ec..1df32d9ab 100644 --- a/docs/helm/helm_dependency_build.md +++ b/docs/helm/helm_dependency_build.md @@ -8,12 +8,11 @@ rebuild the charts/ directory based on the requirements.lock file Build out the charts/ directory from the requirements.lock file. Build is used to reconstruct a chart's dependencies to the state specified in -the lock file. This will not re-negotiate dependencies, as 'helm dependency update' -does. - -If no lock file is found, 'helm dependency build' will mirror the behavior -of 'helm dependency update'. +the lock file. +If no lock file is found, 'helm dependency build' will mirror the behavior of +the 'helm dependency update' command. This means it will update the on-disk +dependencies to mirror the requirements.yaml file and generate a lock file. ``` helm dependency build [flags] CHART diff --git a/docs/man/man1/helm_dependency_build.1 b/docs/man/man1/helm_dependency_build.1 index adc225a81..ef92e8959 100644 --- a/docs/man/man1/helm_dependency_build.1 +++ b/docs/man/man1/helm_dependency_build.1 @@ -19,13 +19,12 @@ Build out the charts/ directory from the requirements.lock file. .PP Build is used to reconstruct a chart's dependencies to the state specified in -the lock file. This will not re\-negotiate dependencies, as 'helm dependency update' -does. +the lock file. .PP -If no lock file is found, 'helm dependency build' will mirror the behavior -of 'helm dependency update'. - +If no lock file is found, 'helm dependency build' will mirror the behavior of +the 'helm dependency update' command. This means it will update the on-disk +dependencies to mirror the requirements.yaml file and generate a lock file. .SH OPTIONS .PP From 3c86f112e246f3dcf8e5f550c78edbb297d24073 Mon Sep 17 00:00:00 2001 From: Matthew Fisher Date: Wed, 6 Mar 2019 17:39:51 -0800 Subject: [PATCH 115/327] restore klog flags (#5411) Signed-off-by: Matthew Fisher --- cmd/tiller/tiller.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/tiller/tiller.go b/cmd/tiller/tiller.go index 478ca92f4..a1141b591 100644 --- a/cmd/tiller/tiller.go +++ b/cmd/tiller/tiller.go @@ -36,6 +36,7 @@ import ( "google.golang.org/grpc/health" healthpb "google.golang.org/grpc/health/grpc_health_v1" "google.golang.org/grpc/keepalive" + "k8s.io/klog" // Import to initialize client auth plugins. _ "k8s.io/client-go/plugin/pkg/client/auth" @@ -100,6 +101,7 @@ var ( ) func main() { + klog.InitFlags(nil) // TODO: use spf13/cobra for tiller instead of flags flag.Parse() From 29264c5765dd77e7270d4c41ce2e48e43b9408c4 Mon Sep 17 00:00:00 2001 From: Matthew Fisher Date: Wed, 6 Mar 2019 17:43:56 -0800 Subject: [PATCH 116/327] disable AppVeyor for branches other than master This should disable AppVeyor from running against dev-v3 PRs. Signed-off-by: Matthew Fisher --- .appveyor.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.appveyor.yml b/.appveyor.yml index 40d02927d..4fe8ae6e5 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,4 +1,7 @@ version: "{build}" +branches: + only: + - master clone_folder: c:\go\src\k8s.io\helm environment: GOPATH: c:\go From 367b6fc12122536633ff16c67bdd2304192100f5 Mon Sep 17 00:00:00 2001 From: Matt Butcher Date: Thu, 7 Mar 2019 16:58:12 -0700 Subject: [PATCH 117/327] chore: Update sprig to 2.19.0 (#5390) Update to the latest Sprig version, which is a reversion of some of the functions added in 2.18. Signed-off-by: Matt Butcher --- glide.lock | 6 +++--- glide.yaml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/glide.lock b/glide.lock index 792ef28cd..764424e94 100644 --- a/glide.lock +++ b/glide.lock @@ -1,5 +1,5 @@ -hash: 70f4fe304d0034fd077f122570adc6bb5f40ceee5f4f53d8930ba5ad700a911d -updated: 2019-02-12T13:10:08.039408-07:00 +hash: 3a24b27ab669b7bd977526dd455c5739fc2e2c14eace7dab92060ff1a39fd804 +updated: 2019-03-02T10:15:45.243405-07:00 imports: - name: cloud.google.com/go version: 3b1ae45394a234c385be014e9a488f2bb6eef821 @@ -184,7 +184,7 @@ imports: - name: github.com/Masterminds/semver version: 517734cc7d6470c0d07130e40fd40bdeb9bcd3fd - name: github.com/Masterminds/sprig - version: b1fe2752acccf8c3d7f8a1e7c75c7ae7d83a1975 + version: 9f8fceff796fb9f4e992cd2bece016be0121ab74 - name: github.com/Masterminds/vcs version: 3084677c2c188840777bff30054f2b553729d329 - name: github.com/mattn/go-runewidth diff --git a/glide.yaml b/glide.yaml index e482e23c2..c7d823196 100644 --- a/glide.yaml +++ b/glide.yaml @@ -21,7 +21,7 @@ import: - package: github.com/imdario/mergo version: v0.3.5 - package: github.com/Masterminds/sprig - version: ^2.18.0 + version: ^2.19.0 - package: github.com/ghodss/yaml - package: github.com/Masterminds/semver version: ~1.3.1 From a9c10fe104302f19e0eda5cec5b2ca314991cff0 Mon Sep 17 00:00:00 2001 From: Joe Lanford Date: Fri, 8 Mar 2019 17:46:30 -0500 Subject: [PATCH 118/327] pkg/chartutil: fix SaveDir for nested templates directories Signed-off-by: Joe Lanford --- pkg/chartutil/save.go | 6 ++++++ pkg/chartutil/save_test.go | 15 +++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/pkg/chartutil/save.go b/pkg/chartutil/save.go index 400b85e91..0482b1eb9 100644 --- a/pkg/chartutil/save.go +++ b/pkg/chartutil/save.go @@ -63,6 +63,12 @@ func SaveDir(c *chart.Chart, dest string) error { // Save templates for _, f := range c.Templates { n := filepath.Join(outdir, f.Name) + + d := filepath.Dir(n) + if err := os.MkdirAll(d, 0755); err != nil { + return err + } + if err := ioutil.WriteFile(n, f.Data, 0644); err != nil { return err } diff --git a/pkg/chartutil/save_test.go b/pkg/chartutil/save_test.go index 0ec305e78..9952fbbb0 100644 --- a/pkg/chartutil/save_test.go +++ b/pkg/chartutil/save_test.go @@ -48,6 +48,9 @@ func TestSave(t *testing.T) { Files: []*any.Any{ {TypeUrl: "scheherazade/shahryar.txt", Value: []byte("1,001 Nights")}, }, + Templates: []*chart.Template{ + {Name: "templates/scheherazade/shahryar.txt.tmpl", Data: []byte("{{ \"1,001 Nights\" }}")}, + }, } where, err := Save(c, tmp) @@ -75,6 +78,9 @@ func TestSave(t *testing.T) { if len(c2.Files) != 1 || c2.Files[0].TypeUrl != "scheherazade/shahryar.txt" { t.Fatal("Files data did not match") } + if len(c2.Templates) != 1 || c2.Templates[0].Name != "templates/scheherazade/shahryar.txt.tmpl" { + t.Fatal("Templates data did not match") + } } func TestSavePreservesTimestamps(t *testing.T) { @@ -100,6 +106,9 @@ func TestSavePreservesTimestamps(t *testing.T) { Files: []*any.Any{ {TypeUrl: "scheherazade/shahryar.txt", Value: []byte("1,001 Nights")}, }, + Templates: []*chart.Template{ + {Name: "templates/scheherazade/shahryar.txt.tmpl", Data: []byte("{{ \"1,001 Nights\" }}")}, + }, } where, err := Save(c, tmp) @@ -171,6 +180,9 @@ func TestSaveDir(t *testing.T) { Files: []*any.Any{ {TypeUrl: "scheherazade/shahryar.txt", Value: []byte("1,001 Nights")}, }, + Templates: []*chart.Template{ + {Name: "templates/scheherazade/shahryar.txt.tmpl", Data: []byte("{{ \"1,001 Nights\" }}")}, + }, } if err := SaveDir(c, tmp); err != nil { @@ -191,4 +203,7 @@ func TestSaveDir(t *testing.T) { if len(c2.Files) != 1 || c2.Files[0].TypeUrl != "scheherazade/shahryar.txt" { t.Fatal("Files data did not match") } + if len(c2.Templates) != 1 || c2.Templates[0].Name != "templates/scheherazade/shahryar.txt.tmpl" { + t.Fatal("Templates data did not match") + } } From b7b372f693eca152773989079148ec916d09b7c9 Mon Sep 17 00:00:00 2001 From: Luis Davim Date: Wed, 27 Feb 2019 15:19:51 +0000 Subject: [PATCH 119/327] Add app.kubernetes.io/version label Signed-off-by: Luis Davim --- cmd/helm/testdata/testcharts/alpine/templates/alpine-pod.yaml | 1 + cmd/helm/testdata/testcharts/novals/templates/alpine-pod.yaml | 1 + .../testdata/testcharts/prerelease/templates/alpine-pod.yaml | 1 + docs/chart_template_guide/variables.md | 1 + docs/charts_hooks.md | 3 ++- docs/examples/alpine/templates/alpine-pod.yaml | 1 + docs/examples/nginx/templates/configmap.yaml | 1 + docs/examples/nginx/templates/deployment.yaml | 1 + docs/examples/nginx/templates/post-install-job.yaml | 1 + docs/examples/nginx/templates/pre-install-secret.yaml | 1 + docs/examples/nginx/templates/service-test.yaml | 1 + docs/examples/nginx/templates/service.yaml | 1 + pkg/chartutil/create.go | 4 ++++ pkg/lint/rules/testdata/albatross/templates/svc.yaml | 1 + 14 files changed, 18 insertions(+), 1 deletion(-) diff --git a/cmd/helm/testdata/testcharts/alpine/templates/alpine-pod.yaml b/cmd/helm/testdata/testcharts/alpine/templates/alpine-pod.yaml index b8ae22b6c..fc0576d5a 100644 --- a/cmd/helm/testdata/testcharts/alpine/templates/alpine-pod.yaml +++ b/cmd/helm/testdata/testcharts/alpine/templates/alpine-pod.yaml @@ -10,6 +10,7 @@ metadata: # The "release" convention makes it easy to tie a release to all of the # Kubernetes resources that were created as part of that release. app.kubernetes.io/instance: {{.Release.Name | quote }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} # This makes it easy to audit chart usage. helm.sh/chart: "{{.Chart.Name}}-{{.Chart.Version}}" values: {{.Values.test.Name}} diff --git a/cmd/helm/testdata/testcharts/novals/templates/alpine-pod.yaml b/cmd/helm/testdata/testcharts/novals/templates/alpine-pod.yaml index f569d556c..564429dea 100644 --- a/cmd/helm/testdata/testcharts/novals/templates/alpine-pod.yaml +++ b/cmd/helm/testdata/testcharts/novals/templates/alpine-pod.yaml @@ -10,6 +10,7 @@ metadata: # The "release" convention makes it easy to tie a release to all of the # Kubernetes resources that were created as part of that release. app.kubernetes.io/instance: {{.Release.Name | quote }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} # This makes it easy to audit chart usage. helm.sh/chart: "{{.Chart.Name}}-{{.Chart.Version}}" annotations: diff --git a/cmd/helm/testdata/testcharts/prerelease/templates/alpine-pod.yaml b/cmd/helm/testdata/testcharts/prerelease/templates/alpine-pod.yaml index f569d556c..564429dea 100644 --- a/cmd/helm/testdata/testcharts/prerelease/templates/alpine-pod.yaml +++ b/cmd/helm/testdata/testcharts/prerelease/templates/alpine-pod.yaml @@ -10,6 +10,7 @@ metadata: # The "release" convention makes it easy to tie a release to all of the # Kubernetes resources that were created as part of that release. app.kubernetes.io/instance: {{.Release.Name | quote }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} # This makes it easy to audit chart usage. helm.sh/chart: "{{.Chart.Name}}-{{.Chart.Version}}" annotations: diff --git a/docs/chart_template_guide/variables.md b/docs/chart_template_guide/variables.md index dda92559b..984b9b4e5 100644 --- a/docs/chart_template_guide/variables.md +++ b/docs/chart_template_guide/variables.md @@ -114,6 +114,7 @@ metadata: # I cannot reference .Chart.Name, but I can do $.Chart.Name helm.sh/chart: "{{ $.Chart.Name }}-{{ $.Chart.Version }}" app.kubernetes.io/instance: "{{ $.Release.Name }}" + app.kubernetes.io/version: {{ .Chart.AppVersion }} app.kubernetes.io/managed-by: "{{ $.Release.Service }}" type: kubernetes.io/tls data: diff --git a/docs/charts_hooks.md b/docs/charts_hooks.md index 6d436402d..3044414c3 100644 --- a/docs/charts_hooks.md +++ b/docs/charts_hooks.md @@ -76,7 +76,7 @@ hooks, the lifecycle is altered like this: 5. Tiller sorts hooks by weight (assigning a weight of 0 by default) and by name for those hooks with the same weight in ascending order. 6. Tiller then loads the hook with the lowest weight first (negative to positive) 7. Tiller waits until the hook is "Ready" (except for CRDs) -8. Tiller loads the resulting resources into Kubernetes. Note that if the `--wait` +8. Tiller loads the resulting resources into Kubernetes. Note that if the `--wait` flag is set, Tiller will wait until all resources are in a ready state and will not run the `post-install` hook until they are ready. 9. Tiller executes the `post-install` hook (loading hook resources) @@ -129,6 +129,7 @@ metadata: labels: app.kubernetes.io/managed-by: {{.Release.Service | quote }} app.kubernetes.io/instance: {{.Release.Name | quote }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} helm.sh/chart: "{{.Chart.Name}}-{{.Chart.Version}}" annotations: # This is what defines this resource as a hook. Without this line, the diff --git a/docs/examples/alpine/templates/alpine-pod.yaml b/docs/examples/alpine/templates/alpine-pod.yaml index 1fc299b6d..2b54811fd 100644 --- a/docs/examples/alpine/templates/alpine-pod.yaml +++ b/docs/examples/alpine/templates/alpine-pod.yaml @@ -10,6 +10,7 @@ metadata: # The "app.kubernetes.io/instance" convention makes it easy to tie a release to all of the # Kubernetes resources that were created as part of that release. app.kubernetes.io/instance: {{ .Release.Name | quote }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} # This makes it easy to audit chart usage. helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }} app.kubernetes.io/name: {{ template "alpine.name" . }} diff --git a/docs/examples/nginx/templates/configmap.yaml b/docs/examples/nginx/templates/configmap.yaml index 0141cbc69..d47992024 100644 --- a/docs/examples/nginx/templates/configmap.yaml +++ b/docs/examples/nginx/templates/configmap.yaml @@ -6,6 +6,7 @@ metadata: labels: app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }} app.kubernetes.io/name: {{ template "nginx.name" . }} data: diff --git a/docs/examples/nginx/templates/deployment.yaml b/docs/examples/nginx/templates/deployment.yaml index 5bb30f9af..cc4d4ea85 100644 --- a/docs/examples/nginx/templates/deployment.yaml +++ b/docs/examples/nginx/templates/deployment.yaml @@ -14,6 +14,7 @@ metadata: # to all of the Kubernetes resources that were created as part of that # release. app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} # This makes it easy to audit chart usage. helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }} app.kubernetes.io/name: {{ template "nginx.name" . }} diff --git a/docs/examples/nginx/templates/post-install-job.yaml b/docs/examples/nginx/templates/post-install-job.yaml index 3562e6cf5..856782a4d 100644 --- a/docs/examples/nginx/templates/post-install-job.yaml +++ b/docs/examples/nginx/templates/post-install-job.yaml @@ -10,6 +10,7 @@ metadata: # The "app.kubernetes.io/instance" convention makes it easy to tie a release to all of the # Kubernetes resources that were created as part of that release. app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} # This makes it easy to audit chart usage. helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }} app.kubernetes.io/name: {{ template "nginx.name" . }} diff --git a/docs/examples/nginx/templates/pre-install-secret.yaml b/docs/examples/nginx/templates/pre-install-secret.yaml index 07a9504b5..40451800d 100644 --- a/docs/examples/nginx/templates/pre-install-secret.yaml +++ b/docs/examples/nginx/templates/pre-install-secret.yaml @@ -7,6 +7,7 @@ metadata: labels: app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }} app.kubernetes.io/name: {{ template "nginx.name" . }} # This declares the resource to be a hook. By convention, we also name the diff --git a/docs/examples/nginx/templates/service-test.yaml b/docs/examples/nginx/templates/service-test.yaml index ffb37e9f4..867f077ee 100644 --- a/docs/examples/nginx/templates/service-test.yaml +++ b/docs/examples/nginx/templates/service-test.yaml @@ -5,6 +5,7 @@ metadata: labels: app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }} app.kubernetes.io/name: {{ template "nginx.name" . }} annotations: diff --git a/docs/examples/nginx/templates/service.yaml b/docs/examples/nginx/templates/service.yaml index a12cb0982..e8eb8e51e 100644 --- a/docs/examples/nginx/templates/service.yaml +++ b/docs/examples/nginx/templates/service.yaml @@ -10,6 +10,7 @@ metadata: helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }} app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} name: {{ template "nginx.fullname" . }} spec: # Provides options for the service so chart users have the full choice diff --git a/pkg/chartutil/create.go b/pkg/chartutil/create.go index 9af4b8f45..415e6f97b 100644 --- a/pkg/chartutil/create.go +++ b/pkg/chartutil/create.go @@ -137,6 +137,7 @@ metadata: app.kubernetes.io/name: {{ include ".name" . }} helm.sh/chart: {{ include ".chart" . }} app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} app.kubernetes.io/managed-by: {{ .Release.Service }} {{- with .Values.ingress.annotations }} annotations: @@ -176,6 +177,7 @@ metadata: app.kubernetes.io/name: {{ include ".name" . }} helm.sh/chart: {{ include ".chart" . }} app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} app.kubernetes.io/managed-by: {{ .Release.Service }} spec: replicas: {{ .Values.replicaCount }} @@ -229,6 +231,7 @@ metadata: app.kubernetes.io/name: {{ include ".name" . }} helm.sh/chart: {{ include ".chart" . }} app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} app.kubernetes.io/managed-by: {{ .Release.Service }} spec: type: {{ .Values.service.type }} @@ -307,6 +310,7 @@ metadata: app.kubernetes.io/name: {{ include ".name" . }} helm.sh/chart: {{ include ".chart" . }} app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} app.kubernetes.io/managed-by: {{ .Release.Service }} annotations: "helm.sh/hook": test-success diff --git a/pkg/lint/rules/testdata/albatross/templates/svc.yaml b/pkg/lint/rules/testdata/albatross/templates/svc.yaml index aea11d833..a976b4fdd 100644 --- a/pkg/lint/rules/testdata/albatross/templates/svc.yaml +++ b/pkg/lint/rules/testdata/albatross/templates/svc.yaml @@ -7,6 +7,7 @@ metadata: labels: app.kubernetes.io/managed-by: {{ .Release.Service | quote }} app.kubernetes.io/instance: {{ .Release.Name | quote }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} helm.sh/chart: "{{.Chart.Name}}-{{.Chart.Version}}" kubeVersion: {{ .Capabilities.KubeVersion.Major }} tillerVersion: {{ .Capabilities.TillerVersion }} From 4fec4b67661b7cc48b8ed1f1c5827a255c74db75 Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Sat, 9 Mar 2019 22:28:36 -0500 Subject: [PATCH 120/327] Fix debug printouts for zsh completion Cobra provides some out-of-the-box debugging for bash completion. To use it, one must set the variable BASH_COMP_DEBUG_FILE to some file where the debug output will be written. Many of the debug printouts indicate the current method name; they do so by using bash's ${FUNCNAME[0]} variable. This variable is different in zsh. To obtain the current method name in zsh we must use ${funcstack[1]}. This commit adds the proper sed modification to convert from bash to zsh. Signed-off-by: Marc Khouzam --- cmd/helm/completion.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/helm/completion.go b/cmd/helm/completion.go index 3c0318941..962f06e3b 100644 --- a/cmd/helm/completion.go +++ b/cmd/helm/completion.go @@ -213,6 +213,7 @@ __helm_convert_bash_to_zsh() { -e "s/${LWORD}declare${RWORD}/__helm_declare/g" \ -e "s/\\\$(type${RWORD}/\$(__helm_type/g" \ -e 's/aliashash\["\(.\{1,\}\)"\]/aliashash[\1]/g' \ + -e 's/FUNCNAME\[0\]/funcstack[1]/g' \ <<'BASH_COMPLETION_EOF' ` out.Write([]byte(zshInitialization)) From 9cc6902875135a26c5edb2fecb08f39d9eeb2dd6 Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Sun, 10 Mar 2019 00:22:08 -0500 Subject: [PATCH 121/327] Must use index 0 for funcstack Normally zsh arrays start at index 1 but when emulating other shells this may change. During completion, we run the command emulate -L sh which affects the indexing of zsh arrays to make it start at 0. Consequently, when replacing FUNCNAME by funcstack, we should not change the index. Signed-off-by: Marc Khouzam --- cmd/helm/completion.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/helm/completion.go b/cmd/helm/completion.go index 962f06e3b..039dcbe5f 100644 --- a/cmd/helm/completion.go +++ b/cmd/helm/completion.go @@ -213,7 +213,7 @@ __helm_convert_bash_to_zsh() { -e "s/${LWORD}declare${RWORD}/__helm_declare/g" \ -e "s/\\\$(type${RWORD}/\$(__helm_type/g" \ -e 's/aliashash\["\(.\{1,\}\)"\]/aliashash[\1]/g' \ - -e 's/FUNCNAME\[0\]/funcstack[1]/g' \ + -e 's/FUNCNAME/funcstack/g' \ <<'BASH_COMPLETION_EOF' ` out.Write([]byte(zshInitialization)) From 528dc95521674baeb1a61d43d9a1c5378ddba80f Mon Sep 17 00:00:00 2001 From: tariqibrahim Date: Sun, 10 Mar 2019 03:11:30 -0700 Subject: [PATCH 122/327] update docker version and golang image version in helm Signed-off-by: tariqibrahim --- .circleci/config.yml | 4 ++-- Makefile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 96f53ee40..c83ee10cf 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,13 +4,13 @@ jobs: working_directory: /go/src/k8s.io/helm parallelism: 3 docker: - - image: golang:1.11 + - image: golang:1.12 environment: PROJECT_NAME: "kubernetes-helm" steps: - checkout - setup_remote_docker: - version: 17.09.0-ce + version: 18.06.0-ce - restore_cache: keys: - glide-{{ checksum "glide.yaml" }}-{{ checksum "glide.lock" }} diff --git a/Makefile b/Makefile index 0677cafe4..ea7dd5fb7 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ DOCKER_REGISTRY ?= gcr.io IMAGE_PREFIX ?= kubernetes-helm -DEV_IMAGE ?= golang:1.11 +DEV_IMAGE ?= golang:1.12 SHORT_NAME ?= tiller SHORT_NAME_RUDDER ?= rudder TARGETS ?= darwin/amd64 linux/amd64 linux/386 linux/arm linux/arm64 linux/ppc64le linux/s390x windows/amd64 From b480badd05ad01006363763c92b5394cdc5fc9c4 Mon Sep 17 00:00:00 2001 From: Jens Frank Date: Tue, 12 Mar 2019 00:11:26 +0100 Subject: [PATCH 123/327] Fix "helm init" parameters In the quickstart guide, --max-history is recommended as parameter for helm init. The actual name of the parameter is --history-max. Signed-off-by: Jens Frank --- docs/quickstart.md | 4 ++-- docs/rbac.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/quickstart.md b/docs/quickstart.md index d7f2e3b91..6e760ced8 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -54,10 +54,10 @@ Once you have Helm ready, you can initialize the local CLI and also install Tiller into your Kubernetes cluster in one step: ```console -$ helm init --max-history 200 +$ helm init --history-max 200 ``` -**TIP:** Setting `--max-history` on helm init is recommended as configmaps and other objects in helm history can grow large in number if not purged by max limit. Without a max history set the history is kept indefinitely, leaving a large number of records for helm and tiller to maintain. +**TIP:** Setting `--history-max` on helm init is recommended as configmaps and other objects in helm history can grow large in number if not purged by max limit. Without a max history set the history is kept indefinitely, leaving a large number of records for helm and tiller to maintain. This will install Tiller into the Kubernetes cluster you saw with `kubectl config current-context`. diff --git a/docs/rbac.md b/docs/rbac.md index 45371cda8..d53edda49 100644 --- a/docs/rbac.md +++ b/docs/rbac.md @@ -43,7 +43,7 @@ _Note: The cluster-admin role is created by default in a Kubernetes cluster, so $ kubectl create -f rbac-config.yaml serviceaccount "tiller" created clusterrolebinding "tiller" created -$ helm init --service-account tiller --max-history 200 +$ helm init --service-account tiller --history-max 200 ``` ### Example: Deploy Tiller in a namespace, restricted to deploying resources only in that namespace From f2a83630efdd289a8d45581364d6a27e81b93ad1 Mon Sep 17 00:00:00 2001 From: Matthew Fisher Date: Tue, 12 Mar 2019 08:05:23 -0700 Subject: [PATCH 124/327] remove appveyor Signed-off-by: Matthew Fisher --- .appveyor.yml | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 .appveyor.yml diff --git a/.appveyor.yml b/.appveyor.yml deleted file mode 100644 index 4fe8ae6e5..000000000 --- a/.appveyor.yml +++ /dev/null @@ -1,20 +0,0 @@ -version: "{build}" -branches: - only: - - master -clone_folder: c:\go\src\k8s.io\helm -environment: - GOPATH: c:\go - PATH: c:\ProgramData\bin;$(PATH) -install: - - ps: iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/fishworks/gofish/master/scripts/install.ps1')) - - gofish init - - gofish install glide - - glide install --strip-vendor -cache: - - vendor -> glide.lock -build: "off" -deploy: "off" -test_script: - - go build .\cmd\... - - go test .\... From a52b4b915df10f24b11774830738094cfbeacdd9 Mon Sep 17 00:00:00 2001 From: robertavram Date: Fri, 15 Mar 2019 12:19:36 -0400 Subject: [PATCH 125/327] update outdated docs image for google storage permissions Signed-off-by: robertavram --- docs/images/make-bucket-public.png | Bin 15768 -> 54186 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/docs/images/make-bucket-public.png b/docs/images/make-bucket-public.png index f8a5e17f02b62f312325975638ea9bcaa2d7cb9e..e457e34b23adcb6f974c9035db63c1f2cc7f4293 100644 GIT binary patch literal 54186 zcmb4rWn5HU)UOJX($d`^B`q!80)li1NJ)2t^w0_jNJ`fbLpK5g$k5#_J%n^~&-lFW z{e15i@i#Lk_C9N`z5cOIr20E~EDSP?Cr_SWDJsakfARz==gE_&K4>VwCp%)sM^B#6 zJW-U9)bh%JXQFz2_%I!=laL-tPryWOe$8J9at zeqpRGgZzEjH{z|2!^5^we>)W?dT0V}*QNM~|6x-RyktaZ71zf9&IJudo9B@&HWT)BHR=VT- z%HxA4xqw}&6(d#r!cWN%c++;)!j9v+zBo!9eP+ZBL0IX5JDdGES)$48d^7P*WT>ON zx!!((sUC~s%_z3`)yIZ3Y-;hv86)Q&LQd_q{mPE|j)(Kg$a}qqj>p>$Le7IJ9h18K zik9Jujt8Fw&lUdz;L7zHd2(~RMcEFhR9-*DPJYuz`a^mVgQ#!2TwWN_)YAI1pB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#1k^<6A?dlg@?qCM~ClGpd(t zz4i$?9rJ_+mxiph3Vgw?Q4y)5Iga}1m(WzjiIYxh;aNS!Ecm!Z8t3_9!z%|9aBvc; zKSH`T6dyGkf?b=~ae-1z?B1Gi2b#_GQl-)t5gfm3;(Z6a_-8cB8YOpn?Q!bO8-M5t zm;yyZT?atR3wHx+ z;|H(RitHcxQi9GXC7QLjUt*?<#_34P7ho^Sq&$!B;XW_;gi$W7BFTvkz#$B?b?HwI zzB$Nj;#ekyyx#%i{dbrZ(2?t+bqNzrTL(2Wr)=th{r3`Hgd7_Vyh!H7bQ%@Aic0?h zC57_oa-T98MAMvp-C)SC2ns2~hED0J5TcpIeM~>hYxNDG#RiNIN*8yhJ7gtYY9#%t zs}fC*%x5d@QENsOGJ^n(J4-CJV8C+2rqYWL+fz?Jbr{hCrM{@EzOW^)Vf+bc~V%r_o%=rdeAq6whl5Y zKa<+>;*he?&KyM9xv|3VHr`xFSF#O*iv7S^Akupc zMphC-#)08fOPF>j-EvE(=pE4^;h=<}%9{3c&~9SZ;l7-ZsLCjC7jm@Lsl*DU8#?@O zDV6V*M&f*iUK*dq@}Z zJEX&q=x!URYINB1Lz_~c6?(7o0uytggT<*m8XC?#T~B@;G13R{fpgr%g(8;o(cTgO z@^#9xzO(-hf-b!xG8VnU<@IOKi09~h=#OmpSe|!Pt%~FiO!)1__4Csvj8*jx`N%`|xWI z{&*N%(`-Y5&P->->{>!&+c-pjd=1R8a#LF?~BI!k|2DjM|ex- zUsv3fVR*6+j!FD?KJ(8dQggD(H5(CxNBy~qKL-2XrT_OxedBDMW#Kd1?QieT|1n18 MvASaMBlD2|15`@6hX4Qo From bc85db3a196d1f372e91528056dcdcb434903bb9 Mon Sep 17 00:00:00 2001 From: Pavel Eremeev Date: Sat, 16 Mar 2019 15:22:57 +0000 Subject: [PATCH 126/327] refactor(*): make "not found" error message user-friendly Signed-off-by: Pavel Eremeev --- pkg/kube/client.go | 10 ++++++++-- pkg/kube/client_test.go | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 2 deletions(-) diff --git a/pkg/kube/client.go b/pkg/kube/client.go index 955c75ab1..3830c4eef 100644 --- a/pkg/kube/client.go +++ b/pkg/kube/client.go @@ -333,9 +333,15 @@ func (c *Client) Update(namespace string, originalReader, targetReader io.Reader } originalInfo := original.Get(info) + + // Resource exists in the current cluster state, but not in the current helm configuration + // See: https://github.com/helm/helm/issues/1193 for more info if originalInfo == nil { - kind := info.Mapping.GroupVersionKind.Kind - return fmt.Errorf("no %s with the name %q found", kind, info.Name) + return fmt.Errorf( + "%s %q is not managed by Helm; delete the resource from the current cluster state to let Helm manage it", + info.Mapping.GroupVersionKind.Kind, + info.Name, + ) } if err := updateResource(c, info, originalInfo.Object, force, recreate); err != nil { diff --git a/pkg/kube/client_test.go b/pkg/kube/client_test.go index 89e630bb3..5bd9449b7 100644 --- a/pkg/kube/client_test.go +++ b/pkg/kube/client_test.go @@ -224,6 +224,43 @@ func TestUpdate(t *testing.T) { } } +func TestUpdateNonManagedResourceError(t *testing.T) { + actual := newPodList("starfish") + current := newPodList() + target := newPodList("starfish") + + tf := cmdtesting.NewTestFactory() + defer tf.Cleanup() + + tf.UnstructuredClient = &fake.RESTClient{ + NegotiatedSerializer: unstructuredSerializer, + Client: fake.CreateHTTPClient(func(req *http.Request) (*http.Response, error) { + p, m := req.URL.Path, req.Method + t.Logf("got request %s %s", p, m) + switch { + case p == "/namespaces/default/pods/starfish" && m == "GET": + return newResponse(200, &actual.Items[0]) + default: + t.Fatalf("unexpected request: %s %s", req.Method, req.URL.Path) + return nil, nil + } + }), + } + + c := &Client{ + Factory: tf, + Log: nopLogger, + } + + if err := c.Update(v1.NamespaceDefault, objBody(¤t), objBody(&target), false, false, 0, false); err != nil { + if err.Error() != "Pod \"starfish\" is not managed by Helm; delete the resource from the current cluster state to let Helm manage it" { + t.Fatal(err) + } + } else { + t.Fatalf("error expected") + } +} + func TestBuild(t *testing.T) { tests := []struct { name string From 83d66b643c591e8ba9a63f2173115e30c6619bbd Mon Sep 17 00:00:00 2001 From: tariqibrahim Date: Sun, 17 Mar 2019 20:53:54 -0700 Subject: [PATCH 127/327] update kubernetes deps to latest patch releases Signed-off-by: tariqibrahim --- glide.lock | 20 ++++++++++---------- glide.yaml | 12 ++++++------ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/glide.lock b/glide.lock index 764424e94..824e30041 100644 --- a/glide.lock +++ b/glide.lock @@ -1,5 +1,5 @@ -hash: 3a24b27ab669b7bd977526dd455c5739fc2e2c14eace7dab92060ff1a39fd804 -updated: 2019-03-02T10:15:45.243405-07:00 +hash: f86919aea9f9b6df70967eb0b00d8a3807a2f5e924d7bd82d317f7969fddb3ef +updated: 2019-03-17T20:36:59.222397-07:00 imports: - name: cloud.google.com/go version: 3b1ae45394a234c385be014e9a488f2bb6eef821 @@ -85,7 +85,7 @@ imports: subpackages: - spdy - name: github.com/evanphx/json-patch - version: 36442dbdb585210f8d5a1b45e67aa323c197d5c4 + version: 5858425f75500d40c52783dce87d085a483ce135 - name: github.com/exponent-io/jsonpath version: d6023ce2651d8eafb5c75bb0c7167536102ec9f5 - name: github.com/fatih/camelcase @@ -370,7 +370,7 @@ imports: - name: gopkg.in/yaml.v2 version: 670d4cfef0544295bc27a114dbac37980d83185a - name: k8s.io/api - version: 05914d821849570fba9eacfb29466f2d8d3cd229 + version: 5cb15d34447165a97c76ed5a60e4e99c8a01ecfe subpackages: - admission/v1beta1 - admissionregistration/v1alpha1 @@ -407,11 +407,11 @@ imports: - storage/v1alpha1 - storage/v1beta1 - name: k8s.io/apiextensions-apiserver - version: 0fe22c71c47604641d9aa352c785b7912c200562 + version: d002e88f6236312f0289d9d1deab106751718ff0 subpackages: - pkg/features - name: k8s.io/apimachinery - version: 2b1284ed4c93a43499e781493253e2ac5959c4fd + version: 86fb29eff6288413d76bd8506874fddd9fccdff0 subpackages: - pkg/api/equality - pkg/api/errors @@ -467,7 +467,7 @@ imports: - third_party/forked/golang/netutil - third_party/forked/golang/reflect - name: k8s.io/apiserver - version: 3ccfe8365421eb08e334b195786a2973460741d8 + version: 79427f02047f9189a75b8cdaadccaf65a126853e subpackages: - pkg/authentication/authenticator - pkg/authentication/serviceaccount @@ -475,13 +475,13 @@ imports: - pkg/features - pkg/util/feature - name: k8s.io/cli-runtime - version: 835b10687cb6556f6b113099ef925146a56d5981 + version: a9e421a7932607ce4623ff45add8274499cca193 subpackages: - pkg/genericclioptions - pkg/genericclioptions/printers - pkg/genericclioptions/resource - name: k8s.io/client-go - version: 8d9ed539ba3134352c586810e749e58df4e94e4f + version: b40b2a5939e43f7ffe0028ad67586b7ce50bb675 subpackages: - discovery - discovery/fake @@ -611,7 +611,7 @@ imports: - pkg/util/proto/testing - pkg/util/proto/validation - name: k8s.io/kubernetes - version: c6d339953bd4fd8c021a6b5fb46d7952b30be9f9 + version: f2c8f1cadf1808ec28476682e49a3cce2b09efbf subpackages: - pkg/api/legacyscheme - pkg/api/service diff --git a/glide.yaml b/glide.yaml index c7d823196..23a3cdaf4 100644 --- a/glide.yaml +++ b/glide.yaml @@ -53,17 +53,17 @@ import: - package: k8s.io/kubernetes version: release-1.13 - package: k8s.io/client-go - version: kubernetes-1.13.1 + version: kubernetes-1.13.4 - package: k8s.io/api - version: kubernetes-1.13.1 + version: kubernetes-1.13.4 - package: k8s.io/apimachinery - version: kubernetes-1.13.1 + version: kubernetes-1.13.4 - package: k8s.io/apiserver - version: kubernetes-1.13.1 + version: kubernetes-1.13.4 - package: k8s.io/cli-runtime - version: kubernetes-1.13.1 + version: kubernetes-1.13.4 - package: k8s.io/apiextensions-apiserver - version: kubernetes-1.13.1 + version: kubernetes-1.13.4 - package: github.com/cyphar/filepath-securejoin version: ^0.2.1 From 63ef73d4168980e650bc95c225f9be1b63b7b37c Mon Sep 17 00:00:00 2001 From: Mikhail Kirpichev Date: Mon, 18 Mar 2019 18:54:53 +0300 Subject: [PATCH 128/327] fix(tiller): fixed a typo in tiller and unit test There was a typo in a tiller error with "released named" message, I've changed it to "a release named". Also fix a unit-test for it. Signed-off-by: Mikhail Kirpichev --- pkg/tiller/release_server.go | 2 +- pkg/tiller/release_update_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/tiller/release_server.go b/pkg/tiller/release_server.go index eb3e876d0..d32fd82f6 100644 --- a/pkg/tiller/release_server.go +++ b/pkg/tiller/release_server.go @@ -195,7 +195,7 @@ func (s *ReleaseServer) uniqName(start string, reuse bool) (string, error) { s.Log("name %s exists but is not in use, reusing name", start) return start, nil } else if reuse { - return "", fmt.Errorf("a released named %s is in use, cannot re-use a name that is still in use", start) + return "", fmt.Errorf("a release named %s is in use, cannot re-use a name that is still in use", start) } return "", fmt.Errorf("a release named %s already exists.\nRun: helm ls --all %s; to check the status of the release\nOr run: helm del --purge %s; to delete it", start, start, start) diff --git a/pkg/tiller/release_update_test.go b/pkg/tiller/release_update_test.go index ea1c88f62..e47e526d6 100644 --- a/pkg/tiller/release_update_test.go +++ b/pkg/tiller/release_update_test.go @@ -604,7 +604,7 @@ func TestUpdateReleasePendingInstall_Force(t *testing.T) { t.Error("Expected failed update") } - expectedError := "a released named forceful-luke is in use, cannot re-use a name that is still in use" + expectedError := "a release named forceful-luke is in use, cannot re-use a name that is still in use" got := err.Error() if err.Error() != expectedError { t.Errorf("Expected error %q, got %q", expectedError, got) From ab9cc982a0616e28d6e308d69033534cb7e62025 Mon Sep 17 00:00:00 2001 From: Matthew Fisher Date: Tue, 19 Mar 2019 21:00:12 -0700 Subject: [PATCH 129/327] fix(scripts): use a more precise method of grepping Github recently changed the output of the releases page. grepping for the exact tag fixes the issue where the wrong tag was being filtered. Signed-off-by: Matthew Fisher --- scripts/get | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/get b/scripts/get index 9c93e1e84..bc13039e2 100755 --- a/scripts/get +++ b/scripts/get @@ -80,9 +80,9 @@ checkDesiredVersion() { # Use the GitHub releases webpage for the project to find the desired version for this project. local release_url="https://github.com/helm/helm/releases/${DESIRED_VERSION:-latest}" if type "curl" > /dev/null; then - TAG=$(curl -SsL $release_url | awk '/\/tag\//' | grep -v no-underline | head -n 1 | cut -d '"' -f 2 | awk '{n=split($NF,a,"/");print a[n]}' | awk 'a !~ $0{print}; {a=$0}') + TAG=$(curl -SsL $release_url | awk '/\/tag\//' | grep -v no-underline | grep " /dev/null; then - TAG=$(wget -q -O - $release_url | awk '/\/tag\//' | grep -v no-underline | head -n 1 | cut -d '"' -f 2 | awk '{n=split($NF,a,"/");print a[n]}' | awk 'a !~ $0{print}; {a=$0}') + TAG=$(wget -q -O - $release_url | awk '/\/tag\//' | grep -v no-underline | grep " Date: Wed, 20 Mar 2019 10:52:00 -0700 Subject: [PATCH 130/327] style: fix golint error in init.go for redundant err!=nil check Signed-off-by: tariqibrahim --- cmd/helm/installer/init.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cmd/helm/installer/init.go b/cmd/helm/installer/init.go index 9edfc0797..7731a4a98 100644 --- a/cmd/helm/installer/init.go +++ b/cmd/helm/installer/init.go @@ -47,11 +47,8 @@ func Initialize(home helmpath.Home, out io.Writer, skipRefresh bool, settings he if err := ensureDefaultRepos(home, out, skipRefresh, settings, stableRepositoryURL, localRepositoryURL); err != nil { return err } - if err := ensureRepoFileFormat(home.RepositoryFile(), out); err != nil { - return err - } - return nil + return ensureRepoFileFormat(home.RepositoryFile(), out) } // ensureDirectories checks to see if $HELM_HOME exists. From 7cb03fb5628f3decb9ab547c1f71ca6a21a31ee8 Mon Sep 17 00:00:00 2001 From: Arief Hidayat Date: Thu, 21 Mar 2019 17:48:18 +0800 Subject: [PATCH 131/327] fix(script): follow redirected URL of github latest release When checking version and desired version is not set, we follow redirected URL of github latest release to get the latest tag instead of trying to get the tag value from html content. Closes #5480 Signed-off-by: Arief Hidayat --- scripts/get | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/scripts/get b/scripts/get index bc13039e2..4daf504da 100755 --- a/scripts/get +++ b/scripts/get @@ -78,16 +78,31 @@ verifySupported() { # checkDesiredVersion checks if the desired version is available. checkDesiredVersion() { # Use the GitHub releases webpage for the project to find the desired version for this project. - local release_url="https://github.com/helm/helm/releases/${DESIRED_VERSION:-latest}" + local latest_release_url="https://github.com/helm/helm/releases/latest" + local release_url + if [ "x$DESIRED_VERSION" == "x" ]; then + if type "curl" > /dev/null; then + release_url=$(curl -Ls -o /dev/null -w %{url_effective} $latest_release_url) + elif type "wget" > /dev/null; then + release_url=$(wget $latest_release_url --server-response -O /dev/null 2>&1 | awk '/^ Location: /{DEST=$2} END{ print DEST}') + fi + else + release_url="https://github.com/helm/helm/releases/${DESIRED_VERSION}" + fi + + local status_code if type "curl" > /dev/null; then - TAG=$(curl -SsL $release_url | awk '/\/tag\//' | grep -v no-underline | grep " /dev/null; then - TAG=$(wget -q -O - $release_url | awk '/\/tag\//' | grep -v no-underline | grep "&1 | grep "HTTP/" | awk '{print $2}') fi - if [ "x$TAG" == "x" ]; then + + if [[ "$status_code" -ne 200 ]] ; then echo "Cannot determine ${DESIRED_VERSION} tag." exit 1 fi + + TAG=$(echo $release_url | grep -oE "[^/]+$" ) } # checkHelmInstalledVersion checks which version of helm is installed and From 65193adc10bc50edcf96499b5321c7aab46b796c Mon Sep 17 00:00:00 2001 From: Arief Hidayat Date: Fri, 22 Mar 2019 22:50:35 +0700 Subject: [PATCH 132/327] fix(script): remove check on release URL Closes #5480 Signed-off-by: Arief Hidayat --- scripts/get | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/scripts/get b/scripts/get index 4daf504da..5479abddb 100755 --- a/scripts/get +++ b/scripts/get @@ -77,32 +77,17 @@ verifySupported() { # checkDesiredVersion checks if the desired version is available. checkDesiredVersion() { - # Use the GitHub releases webpage for the project to find the desired version for this project. - local latest_release_url="https://github.com/helm/helm/releases/latest" - local release_url if [ "x$DESIRED_VERSION" == "x" ]; then + # Get tag from release URL + local latest_release_url="https://github.com/helm/helm/releases/latest" if type "curl" > /dev/null; then - release_url=$(curl -Ls -o /dev/null -w %{url_effective} $latest_release_url) + TAG=$(curl -Ls -o /dev/null -w %{url_effective} $latest_release_url | grep -oE "[^/]+$" ) elif type "wget" > /dev/null; then - release_url=$(wget $latest_release_url --server-response -O /dev/null 2>&1 | awk '/^ Location: /{DEST=$2} END{ print DEST}') + TAG=$(wget $latest_release_url --server-response -O /dev/null 2>&1 | awk '/^ Location: /{DEST=$2} END{ print DEST}' | grep -oE "[^/]+$") fi else - release_url="https://github.com/helm/helm/releases/${DESIRED_VERSION}" + TAG=$DESIRED_VERSION fi - - local status_code - if type "curl" > /dev/null; then - status_code=$(curl --write-out %{http_code} --silent --output /dev/null $release_url) - elif type "wget" > /dev/null; then - status_code=$(wget --spider -S $release_url -O /dev/null 2>&1 | grep "HTTP/" | awk '{print $2}') - fi - - if [[ "$status_code" -ne 200 ]] ; then - echo "Cannot determine ${DESIRED_VERSION} tag." - exit 1 - fi - - TAG=$(echo $release_url | grep -oE "[^/]+$" ) } # checkHelmInstalledVersion checks which version of helm is installed and From 5ffe4ce5881449d31b9e14cb94d56dcf2453b0d7 Mon Sep 17 00:00:00 2001 From: Timofey Kirillov Date: Fri, 22 Mar 2019 21:15:00 +0300 Subject: [PATCH 133/327] Fix `no RESOURCE with the name NAME found` This is the fix for only one particular, but important case. The case when a new resource has been added to the chart and there is an error in the chart, which leads to release failure. In this case after first failed release upgrade new resource will be created in the cluster. On the next release upgrade there will be the error: `no RESOURCE with the name NAME found` for this newly created resource from the previous release upgrade. The root of this problem is in the side effect of the first release process, Release invariant says: if resouce exists in the kubernetes cluster, then it should exist in the release storage. But this invariant has been broken by helm itself -- because helm created new resources as side effect and not adopted them into release storage. To maintain release invariant for such case during release upgrade operation all newly *successfully* created resources will be deleted in the case of an error in the subsequent resources update. This behaviour will be enabled only when `--cleanup-on-fail` option used for `helm upgrade` or `helm rollback`. Signed-off-by: Timofey Kirillov --- _proto/hapi/rudder/rudder.proto | 2 + _proto/hapi/services/tiller.proto | 10 ++-- cmd/helm/rollback.go | 27 +++++----- cmd/helm/upgrade.go | 61 ++++++++++++---------- cmd/rudder/rudder.go | 16 +++++- docs/helm/helm_rollback.md | 3 +- docs/helm/helm_upgrade.md | 3 +- pkg/helm/option.go | 14 +++++ pkg/kube/client.go | 52 +++++++++++++++--- pkg/tiller/environment/environment.go | 17 +++++- pkg/tiller/environment/environment_test.go | 3 ++ pkg/tiller/release_modules.go | 16 +++++- pkg/tiller/release_server_test.go | 12 +++++ 13 files changed, 177 insertions(+), 59 deletions(-) diff --git a/_proto/hapi/rudder/rudder.proto b/_proto/hapi/rudder/rudder.proto index 188491512..3f3d8030d 100644 --- a/_proto/hapi/rudder/rudder.proto +++ b/_proto/hapi/rudder/rudder.proto @@ -92,6 +92,7 @@ message UpgradeReleaseRequest{ bool Wait = 4; bool Recreate = 5; bool Force = 6; + bool CleanupOnFail = 7; } message UpgradeReleaseResponse{ hapi.release.Release release = 1; @@ -105,6 +106,7 @@ message RollbackReleaseRequest{ bool Wait = 4; bool Recreate = 5; bool Force = 6; + bool CleanupOnFail = 7; } message RollbackReleaseResponse{ hapi.release.Release release = 1; diff --git a/_proto/hapi/services/tiller.proto b/_proto/hapi/services/tiller.proto index 286d22e8b..1d0cc7ec6 100644 --- a/_proto/hapi/services/tiller.proto +++ b/_proto/hapi/services/tiller.proto @@ -212,8 +212,10 @@ message UpdateReleaseRequest { bool force = 11; // Description, if set, will set the description for the updated release string description = 12; - // Render subchart notes if enabled + // Render subchart notes if enabled bool subNotes = 13; + // Allow deletion of new resources created in this update when update failed + bool cleanup_on_fail = 14; } // UpdateReleaseResponse is the response to an update request. @@ -241,6 +243,8 @@ message RollbackReleaseRequest { bool force = 8; // Description, if set, will set the description for the rollback string description = 9; + // Allow deletion of new resources created in this rollback when rollback failed + bool cleanup_on_fail = 10; } // RollbackReleaseResponse is the response to an update request. @@ -283,8 +287,8 @@ message InstallReleaseRequest { // Description, if set, will set the description for the installed release string description = 11; - - bool subNotes = 12; + + bool subNotes = 12; } diff --git a/cmd/helm/rollback.go b/cmd/helm/rollback.go index 78d79659d..4cffd43d5 100644 --- a/cmd/helm/rollback.go +++ b/cmd/helm/rollback.go @@ -36,17 +36,18 @@ second is a revision (version) number. To see revision numbers, run ` type rollbackCmd struct { - name string - revision int32 - dryRun bool - recreate bool - force bool - disableHooks bool - out io.Writer - client helm.Interface - timeout int64 - wait bool - description string + name string + revision int32 + dryRun bool + recreate bool + force bool + disableHooks bool + out io.Writer + client helm.Interface + timeout int64 + wait bool + description string + cleanupOnFail bool } func newRollbackCmd(c helm.Interface, out io.Writer) *cobra.Command { @@ -87,6 +88,7 @@ func newRollbackCmd(c helm.Interface, out io.Writer) *cobra.Command { 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.StringVar(&rollback.description, "description", "", "specify a description for the release") + f.BoolVar(&rollback.cleanupOnFail, "cleanup-on-fail", false, "allow deletion of new resources created in this rollback when rollback failed") // set defaults from environment settings.InitTLS(f) @@ -104,7 +106,8 @@ func (r *rollbackCmd) run() error { helm.RollbackVersion(r.revision), helm.RollbackTimeout(r.timeout), helm.RollbackWait(r.wait), - helm.RollbackDescription(r.description)) + helm.RollbackDescription(r.description), + helm.RollbackCleanupOnFail(r.cleanupOnFail)) if err != nil { return prettyError(err) } diff --git a/cmd/helm/upgrade.go b/cmd/helm/upgrade.go index 044ec045d..e52ca2ba3 100644 --- a/cmd/helm/upgrade.go +++ b/cmd/helm/upgrade.go @@ -84,34 +84,35 @@ which results in "pwd: 3jk$o2z=f\30with'quote". ` type upgradeCmd struct { - release string - chart string - out io.Writer - client helm.Interface - dryRun bool - recreate bool - force bool - disableHooks bool - valueFiles valueFiles - values []string - stringValues []string - fileValues []string - verify bool - keyring string - install bool - namespace string - version string - timeout int64 - resetValues bool - reuseValues bool - wait bool - atomic bool - repoURL string - username string - password string - devel bool - subNotes bool - description string + release string + chart string + out io.Writer + client helm.Interface + dryRun bool + recreate bool + force bool + disableHooks bool + valueFiles valueFiles + values []string + stringValues []string + fileValues []string + verify bool + keyring string + install bool + namespace string + version string + timeout int64 + resetValues bool + reuseValues bool + wait bool + atomic bool + repoURL string + username string + password string + devel bool + subNotes bool + description string + cleanupOnFail bool certFile string keyFile string @@ -179,6 +180,7 @@ func newUpgradeCmd(client helm.Interface, out io.Writer) *cobra.Command { f.BoolVar(&upgrade.devel, "devel", false, "use development versions, too. Equivalent to version '>0.0.0-0'. If --version is set, this is ignored.") f.BoolVar(&upgrade.subNotes, "render-subchart-notes", false, "render subchart notes along with parent") f.StringVar(&upgrade.description, "description", "", "specify the description to use for the upgrade, rather than the default") + f.BoolVar(&upgrade.cleanupOnFail, "cleanup-on-fail", false, "allow deletion of new resources created in this upgrade when upgrade failed") f.MarkDeprecated("disable-hooks", "use --no-hooks instead") @@ -273,7 +275,8 @@ func (u *upgradeCmd) run() error { helm.ReuseValues(u.reuseValues), helm.UpgradeSubNotes(u.subNotes), helm.UpgradeWait(u.wait), - helm.UpgradeDescription(u.description)) + helm.UpgradeDescription(u.description), + helm.UpgradeCleanupOnFail(u.cleanupOnFail)) if err != nil { fmt.Fprintf(u.out, "UPGRADE FAILED\nROLLING BACK\nError: %v\n", prettyError(err)) if u.atomic { diff --git a/cmd/rudder/rudder.go b/cmd/rudder/rudder.go index 051640542..d68daf453 100644 --- a/cmd/rudder/rudder.go +++ b/cmd/rudder/rudder.go @@ -131,7 +131,13 @@ func (r *ReleaseModuleServiceServer) RollbackRelease(ctx context.Context, in *ru grpclog.Print("rollback") c := bytes.NewBufferString(in.Current.Manifest) t := bytes.NewBufferString(in.Target.Manifest) - err := kubeClient.Update(in.Target.Namespace, c, t, in.Force, in.Recreate, in.Timeout, in.Wait) + err := kubeClient.UpdateWithOptions(in.Target.Namespace, c, t, kube.UpdateOptions{ + Force: in.Force, + Recreate: in.Recreate, + Timeout: in.Timeout, + ShouldWait: in.Wait, + CleanupOnFail: in.CleanupOnFail, + }) return &rudderAPI.RollbackReleaseResponse{}, err } @@ -140,7 +146,13 @@ func (r *ReleaseModuleServiceServer) UpgradeRelease(ctx context.Context, in *rud grpclog.Print("upgrade") c := bytes.NewBufferString(in.Current.Manifest) t := bytes.NewBufferString(in.Target.Manifest) - err := kubeClient.Update(in.Target.Namespace, c, t, in.Force, in.Recreate, in.Timeout, in.Wait) + err := kubeClient.UpdateWithOptions(in.Target.Namespace, c, t, kube.UpdateOptions{ + Force: in.Force, + Recreate: in.Recreate, + Timeout: in.Timeout, + ShouldWait: in.Wait, + CleanupOnFail: in.CleanupOnFail, + }) // upgrade response object should be changed to include status return &rudderAPI.UpgradeReleaseResponse{}, err } diff --git a/docs/helm/helm_rollback.md b/docs/helm/helm_rollback.md index 80fc83a83..87c68f6c8 100644 --- a/docs/helm/helm_rollback.md +++ b/docs/helm/helm_rollback.md @@ -20,6 +20,7 @@ helm rollback [flags] [RELEASE] [REVISION] ### Options ``` + --cleanup-on-fail allow deletion of new resources created in this rollback when rollback failed --description string specify a description for the release --dry-run simulate a rollback --force force resource update through delete/recreate if needed @@ -52,4 +53,4 @@ helm rollback [flags] [RELEASE] [REVISION] * [helm](helm.md) - The Helm package manager for Kubernetes. -###### Auto generated by spf13/cobra on 29-Jan-2019 +###### Auto generated by spf13/cobra on 5-Feb-2019 diff --git a/docs/helm/helm_upgrade.md b/docs/helm/helm_upgrade.md index 676c26595..d54b7c3a2 100644 --- a/docs/helm/helm_upgrade.md +++ b/docs/helm/helm_upgrade.md @@ -68,6 +68,7 @@ helm upgrade [RELEASE] [CHART] [flags] --atomic if set, upgrade process rolls back changes made in case of failed upgrade, also sets --wait flag --ca-file string verify certificates of HTTPS-enabled servers using this CA bundle --cert-file string identify HTTPS client using this SSL certificate file + --cleanup-on-fail allow deletion of new resources created in this upgrade when upgrade failed --description string specify the description to use for the upgrade, rather than the default --devel use development versions, too. Equivalent to version '>0.0.0-0'. If --version is set, this is ignored. --dry-run simulate an upgrade @@ -117,4 +118,4 @@ helm upgrade [RELEASE] [CHART] [flags] * [helm](helm.md) - The Helm package manager for Kubernetes. -###### Auto generated by spf13/cobra on 28-Jan-2019 +###### Auto generated by spf13/cobra on 5-Feb-2019 diff --git a/pkg/helm/option.go b/pkg/helm/option.go index 1f5cf6904..930434178 100644 --- a/pkg/helm/option.go +++ b/pkg/helm/option.go @@ -297,6 +297,20 @@ func DeleteDescription(description string) DeleteOption { } } +// UpgradeCleanupOnFail allows deletion of new resources created in this upgrade when upgrade failed +func UpgradeCleanupOnFail(cleanupOnFail bool) UpdateOption { + return func(opts *options) { + opts.updateReq.CleanupOnFail = cleanupOnFail + } +} + +// RollbackCleanupOnFail allows deletion of new resources created in this rollback when rollback failed +func RollbackCleanupOnFail(cleanupOnFail bool) RollbackOption { + return func(opts *options) { + opts.rollbackReq.CleanupOnFail = cleanupOnFail + } +} + // DeleteDisableHooks will disable hooks for a deletion operation. func DeleteDisableHooks(disable bool) DeleteOption { return func(opts *options) { diff --git a/pkg/kube/client.go b/pkg/kube/client.go index 955c75ab1..36cb3f318 100644 --- a/pkg/kube/client.go +++ b/pkg/kube/client.go @@ -290,13 +290,33 @@ func (c *Client) Get(namespace string, reader io.Reader) (string, error) { return buf.String(), nil } -// Update reads in the current configuration and a target configuration from io.reader +// Deprecated; use UpdateWithOptions instead +func (c *Client) Update(namespace string, originalReader, targetReader io.Reader, force bool, recreate bool, timeout int64, shouldWait bool) error { + return c.UpdateWithOptions(namespace, originalReader, targetReader, UpdateOptions{ + Force: force, + Recreate: recreate, + Timeout: timeout, + ShouldWait: shouldWait, + }) +} + +// UpdateOptions provides options to control update behavior +type UpdateOptions struct { + Force bool + Recreate bool + Timeout int64 + ShouldWait bool + // Allow deletion of new resources created in this update when update failed + CleanupOnFail bool +} + +// UpdateWithOptions reads in the current configuration and a target configuration from io.reader // and creates resources that don't already exists, updates resources that have been modified // in the target configuration and deletes resources from the current configuration that are // not present in the target configuration. // // Namespace will set the namespaces. -func (c *Client) Update(namespace string, originalReader, targetReader io.Reader, force bool, recreate bool, timeout int64, shouldWait bool) error { +func (c *Client) UpdateWithOptions(namespace string, originalReader, targetReader io.Reader, opts UpdateOptions) error { original, err := c.BuildUnstructured(namespace, originalReader) if err != nil { return fmt.Errorf("failed decoding reader into objects: %s", err) @@ -308,6 +328,7 @@ func (c *Client) Update(namespace string, originalReader, targetReader io.Reader return fmt.Errorf("failed decoding reader into objects: %s", err) } + newlyCreatedResources := []*resource.Info{} updateErrors := []string{} c.Log("checking %d resources for changes", len(target)) @@ -326,6 +347,7 @@ func (c *Client) Update(namespace string, originalReader, targetReader io.Reader if err := createResource(info); err != nil { return fmt.Errorf("failed to create resource: %s", err) } + newlyCreatedResources = append(newlyCreatedResources, info) kind := info.Mapping.GroupVersionKind.Kind c.Log("Created a new %s called %q\n", kind, info.Name) @@ -338,7 +360,7 @@ func (c *Client) Update(namespace string, originalReader, targetReader io.Reader return fmt.Errorf("no %s with the name %q found", kind, info.Name) } - if err := updateResource(c, info, originalInfo.Object, force, recreate); err != nil { + if err := updateResource(c, info, originalInfo.Object, opts.Force, opts.Recreate); err != nil { c.Log("error updating the resource %q:\n\t %v", info.Name, err) updateErrors = append(updateErrors, err.Error()) } @@ -346,11 +368,27 @@ func (c *Client) Update(namespace string, originalReader, targetReader io.Reader return nil }) + cleanupErrors := []string{} + + if opts.CleanupOnFail { + if err != nil || len(updateErrors) != 0 { + for _, info := range newlyCreatedResources { + kind := info.Mapping.GroupVersionKind.Kind + + c.Log("Deleting newly created %s with the name %q in %s...", kind, info.Name, info.Namespace) + if err := deleteResource(info); err != nil { + c.Log("Error deleting newly created %s with the name %q in %s: %s", kind, info.Name, info.Namespace, err) + cleanupErrors = append(cleanupErrors, err.Error()) + } + } + } + } + switch { case err != nil: - return err + return fmt.Errorf(strings.Join(append([]string{err.Error()}, cleanupErrors...), " && ")) case len(updateErrors) != 0: - return fmt.Errorf(strings.Join(updateErrors, " && ")) + return fmt.Errorf(strings.Join(append(updateErrors, cleanupErrors...), " && ")) } for _, info := range original.Difference(target) { @@ -373,8 +411,8 @@ func (c *Client) Update(namespace string, originalReader, targetReader io.Reader c.Log("Failed to delete %q, err: %s", info.Name, err) } } - if shouldWait { - return c.waitForResources(time.Duration(timeout)*time.Second, target) + if opts.ShouldWait { + return c.waitForResources(time.Duration(opts.Timeout)*time.Second, target) } return nil } diff --git a/pkg/tiller/environment/environment.go b/pkg/tiller/environment/environment.go index 290337d7b..993e27910 100644 --- a/pkg/tiller/environment/environment.go +++ b/pkg/tiller/environment/environment.go @@ -126,14 +126,17 @@ type KubeClient interface { // error. WatchUntilReady(namespace string, reader io.Reader, timeout int64, shouldWait bool) error - // Update updates one or more resources or creates the resource + // Deprecated; use UpdateWithOptions instead + Update(namespace string, originalReader, modifiedReader io.Reader, force bool, recreate bool, timeout int64, shouldWait bool) error + + // UpdateWithOptions updates one or more resources or creates the resource // if it doesn't exist. // // namespace must contain a valid existing namespace. // // reader must contain a YAML stream (one or more YAML documents separated // by "\n---\n"). - Update(namespace string, originalReader, modifiedReader io.Reader, force bool, recreate bool, timeout int64, shouldWait bool) error + UpdateWithOptions(namespace string, originalReader, modifiedReader io.Reader, opts kube.UpdateOptions) error Build(namespace string, reader io.Reader) (kube.Result, error) BuildUnstructured(namespace string, reader io.Reader) (kube.Result, error) @@ -177,6 +180,16 @@ func (p *PrintingKubeClient) WatchUntilReady(ns string, r io.Reader, timeout int // Update implements KubeClient Update. func (p *PrintingKubeClient) Update(ns string, currentReader, modifiedReader io.Reader, force bool, recreate bool, timeout int64, shouldWait bool) error { + return p.UpdateWithOptions(ns, currentReader, modifiedReader, kube.UpdateOptions{ + Force: force, + Recreate: recreate, + Timeout: timeout, + ShouldWait: shouldWait, + }) +} + +// UpdateWithOptions implements KubeClient UpdateWithOptions. +func (p *PrintingKubeClient) UpdateWithOptions(ns string, currentReader, modifiedReader io.Reader, opts kube.UpdateOptions) error { _, err := io.Copy(p.Out, modifiedReader) return err } diff --git a/pkg/tiller/environment/environment_test.go b/pkg/tiller/environment/environment_test.go index 5c19a9b21..c2694a84a 100644 --- a/pkg/tiller/environment/environment_test.go +++ b/pkg/tiller/environment/environment_test.go @@ -52,6 +52,9 @@ func (k *mockKubeClient) Delete(ns string, r io.Reader) error { func (k *mockKubeClient) Update(ns string, currentReader, modifiedReader io.Reader, force bool, recreate bool, timeout int64, shouldWait bool) error { return nil } +func (k *mockKubeClient) UpdateWithOptions(ns string, currentReader, modifiedReader io.Reader, opts kube.UpdateOptions) error { + return nil +} func (k *mockKubeClient) WatchUntilReady(ns string, r io.Reader, timeout int64, shouldWait bool) error { return nil } diff --git a/pkg/tiller/release_modules.go b/pkg/tiller/release_modules.go index 85995480c..360794481 100644 --- a/pkg/tiller/release_modules.go +++ b/pkg/tiller/release_modules.go @@ -58,14 +58,26 @@ func (m *LocalReleaseModule) Create(r *release.Release, req *services.InstallRel func (m *LocalReleaseModule) Update(current, target *release.Release, req *services.UpdateReleaseRequest, env *environment.Environment) error { c := bytes.NewBufferString(current.Manifest) t := bytes.NewBufferString(target.Manifest) - return env.KubeClient.Update(target.Namespace, c, t, req.Force, req.Recreate, req.Timeout, req.Wait) + return env.KubeClient.UpdateWithOptions(target.Namespace, c, t, kube.UpdateOptions{ + Force: req.Force, + Recreate: req.Recreate, + Timeout: req.Timeout, + ShouldWait: req.Wait, + CleanupOnFail: req.CleanupOnFail, + }) } // Rollback performs a rollback from current to target release func (m *LocalReleaseModule) Rollback(current, target *release.Release, req *services.RollbackReleaseRequest, env *environment.Environment) error { c := bytes.NewBufferString(current.Manifest) t := bytes.NewBufferString(target.Manifest) - return env.KubeClient.Update(target.Namespace, c, t, req.Force, req.Recreate, req.Timeout, req.Wait) + return env.KubeClient.UpdateWithOptions(target.Namespace, c, t, kube.UpdateOptions{ + Force: req.Force, + Recreate: req.Recreate, + Timeout: req.Timeout, + ShouldWait: req.Wait, + CleanupOnFail: req.CleanupOnFail, + }) } // Status returns kubectl-like formatted status of release objects diff --git a/pkg/tiller/release_server_test.go b/pkg/tiller/release_server_test.go index 4e29e4413..99fc0e724 100644 --- a/pkg/tiller/release_server_test.go +++ b/pkg/tiller/release_server_test.go @@ -500,6 +500,15 @@ type updateFailingKubeClient struct { } func (u *updateFailingKubeClient) Update(namespace string, originalReader, modifiedReader io.Reader, force bool, recreate bool, timeout int64, shouldWait bool) error { + return u.UpdateWithOptions(namespace, originalReader, modifiedReader, kube.UpdateOptions{ + Force: force, + Recreate: recreate, + Timeout: timeout, + ShouldWait: shouldWait, + }) +} + +func (u *updateFailingKubeClient) UpdateWithOptions(namespace string, originalReader, modifiedReader io.Reader, opts kube.UpdateOptions) error { return errors.New("Failed update in kube client") } @@ -632,6 +641,9 @@ func (kc *mockHooksKubeClient) WatchUntilReady(ns string, r io.Reader, timeout i func (kc *mockHooksKubeClient) Update(ns string, currentReader, modifiedReader io.Reader, force bool, recreate bool, timeout int64, shouldWait bool) error { return nil } +func (kc *mockHooksKubeClient) UpdateWithOptions(ns string, currentReader, modifiedReader io.Reader, opts kube.UpdateOptions) error { + return nil +} func (kc *mockHooksKubeClient) Build(ns string, reader io.Reader) (kube.Result, error) { return []*resource.Info{}, nil } From bf7106f6c0018f3638201752a32529648e253e3e Mon Sep 17 00:00:00 2001 From: Fernando Barbosa Date: Tue, 19 Mar 2019 14:06:33 -0300 Subject: [PATCH 134/327] Add cleanup on fail after wait Signed-off-by: Timofey Kirillov --- pkg/kube/client.go | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/pkg/kube/client.go b/pkg/kube/client.go index 36cb3f318..d5666fedf 100644 --- a/pkg/kube/client.go +++ b/pkg/kube/client.go @@ -35,7 +35,7 @@ import ( appsv1beta1 "k8s.io/api/apps/v1beta1" appsv1beta2 "k8s.io/api/apps/v1beta2" batch "k8s.io/api/batch/v1" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" extv1beta1 "k8s.io/api/extensions/v1beta1" apiequality "k8s.io/apimachinery/pkg/api/equality" "k8s.io/apimachinery/pkg/api/errors" @@ -370,18 +370,8 @@ func (c *Client) UpdateWithOptions(namespace string, originalReader, targetReade cleanupErrors := []string{} - if opts.CleanupOnFail { - if err != nil || len(updateErrors) != 0 { - for _, info := range newlyCreatedResources { - kind := info.Mapping.GroupVersionKind.Kind - - c.Log("Deleting newly created %s with the name %q in %s...", kind, info.Name, info.Namespace) - if err := deleteResource(info); err != nil { - c.Log("Error deleting newly created %s with the name %q in %s: %s", kind, info.Name, info.Namespace, err) - cleanupErrors = append(cleanupErrors, err.Error()) - } - } - } + if opts.CleanupOnFail && (err != nil || len(updateErrors) != 0) { + cleanupErrors = c.cleanup(newlyCreatedResources) } switch { @@ -412,11 +402,30 @@ func (c *Client) UpdateWithOptions(namespace string, originalReader, targetReade } } if opts.ShouldWait { - return c.waitForResources(time.Duration(opts.Timeout)*time.Second, target) + err := c.waitForResources(time.Duration(opts.Timeout)*time.Second, target) + + if opts.CleanupOnFail && err != nil { + cleanupErrors = c.cleanup(newlyCreatedResources) + return fmt.Errorf(strings.Join(append([]string{err.Error()}, cleanupErrors...), " && ")) + } + + return err } return nil } +func (c *Client) cleanup(newlyCreatedResources []*resource.Info) (cleanupErrors []string) { + for _, info := range newlyCreatedResources { + kind := info.Mapping.GroupVersionKind.Kind + c.Log("Deleting newly created %s with the name %q in %s...", kind, info.Name, info.Namespace) + if err := deleteResource(info); err != nil { + c.Log("Error deleting newly created %s with the name %q in %s: %s", kind, info.Name, info.Namespace, err) + cleanupErrors = append(cleanupErrors, err.Error()) + } + } + return +} + // Delete deletes Kubernetes resources from an io.reader. // // Namespace will set the namespace. From 175bb2e4c4aded1f291cfc59d7ce6f63c076b6f4 Mon Sep 17 00:00:00 2001 From: Devin Burnette Date: Sat, 23 Mar 2019 01:54:46 -0400 Subject: [PATCH 135/327] remove kubernetes Signed-off-by: Devin Burnette --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c9716d0ce..fc35e0643 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ # Contributing Guidelines -The Kubernetes Helm project accepts contributions via GitHub pull requests. This document outlines the process to help get your contribution accepted. +The Helm project accepts contributions via GitHub pull requests. This document outlines the process to help get your contribution accepted. ## Reporting a Security Issue From 470203a173942dac23396dbba575cc9b16253486 Mon Sep 17 00:00:00 2001 From: ialidzhikov Date: Sun, 24 Mar 2019 23:17:46 +0200 Subject: [PATCH 136/327] Update golang version Signed-off-by: ialidzhikov --- .circleci/config.yml | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c83ee10cf..7bba262a8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,7 +4,7 @@ jobs: working_directory: /go/src/k8s.io/helm parallelism: 3 docker: - - image: golang:1.12 + - image: golang:1.12.1 environment: PROJECT_NAME: "kubernetes-helm" steps: diff --git a/Makefile b/Makefile index f4b08ace8..3584521a4 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ DOCKER_REGISTRY ?= gcr.io IMAGE_PREFIX ?= kubernetes-helm -DEV_IMAGE ?= golang:1.12 +DEV_IMAGE ?= golang:1.12.1 SHORT_NAME ?= tiller SHORT_NAME_RUDDER ?= rudder TARGETS ?= darwin/amd64 linux/amd64 linux/386 linux/arm linux/arm64 linux/ppc64le linux/s390x windows/amd64 From 535f9cece5c4147c74a88106f83690b197806dfa Mon Sep 17 00:00:00 2001 From: Pavel Eremeev Date: Mon, 25 Mar 2019 12:02:44 +0000 Subject: [PATCH 137/327] refactor(*): update error message Signed-off-by: Pavel Eremeev --- pkg/kube/client.go | 9 ++++++--- pkg/kube/client_test.go | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pkg/kube/client.go b/pkg/kube/client.go index 3830c4eef..37c1d53e4 100644 --- a/pkg/kube/client.go +++ b/pkg/kube/client.go @@ -334,11 +334,14 @@ func (c *Client) Update(namespace string, originalReader, targetReader io.Reader originalInfo := original.Get(info) - // Resource exists in the current cluster state, but not in the current helm configuration - // See: https://github.com/helm/helm/issues/1193 for more info + // The resource already exists in the cluster, but it wasn't defined in the previous release. + // In this case, we consider it to be a resource that was previously un-managed by the release and error out, + // asking for the user to intervene. + // + // See https://github.com/helm/helm/issues/1193 for more info. if originalInfo == nil { return fmt.Errorf( - "%s %q is not managed by Helm; delete the resource from the current cluster state to let Helm manage it", + "kind %s with the name %q already exists in the cluster and wasn't defined in the previous release. Before upgrading, please either delete the resource from the cluster or remove it from the chart", info.Mapping.GroupVersionKind.Kind, info.Name, ) diff --git a/pkg/kube/client_test.go b/pkg/kube/client_test.go index 5bd9449b7..401ac7e58 100644 --- a/pkg/kube/client_test.go +++ b/pkg/kube/client_test.go @@ -253,7 +253,7 @@ func TestUpdateNonManagedResourceError(t *testing.T) { } if err := c.Update(v1.NamespaceDefault, objBody(¤t), objBody(&target), false, false, 0, false); err != nil { - if err.Error() != "Pod \"starfish\" is not managed by Helm; delete the resource from the current cluster state to let Helm manage it" { + if err.Error() != "kind Pod with the name \"starfish\" already exists in the cluster and wasn't defined in the previous release. Before upgrading, please either delete the resource from the cluster or remove it from the chart" { t.Fatal(err) } } else { From bc660928de32f8b21df77890dd365a04ae0bf94b Mon Sep 17 00:00:00 2001 From: Mike Eves Date: Mon, 25 Mar 2019 21:12:02 +0000 Subject: [PATCH 138/327] Don't print ROLLING BACK if atomic is not set Signed-off-by: Mike Eves --- cmd/helm/upgrade.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/helm/upgrade.go b/cmd/helm/upgrade.go index 044ec045d..62ed6ddeb 100644 --- a/cmd/helm/upgrade.go +++ b/cmd/helm/upgrade.go @@ -275,8 +275,9 @@ func (u *upgradeCmd) run() error { helm.UpgradeWait(u.wait), helm.UpgradeDescription(u.description)) if err != nil { - fmt.Fprintf(u.out, "UPGRADE FAILED\nROLLING BACK\nError: %v\n", prettyError(err)) + fmt.Fprintf(u.out, "UPGRADE FAILED\nError: %v\n", prettyError(err)) if u.atomic { + fmt.Fprint(u.out, "ROLLING BACK") rollback := &rollbackCmd{ out: u.out, client: u.client, From 7990363d152dabf8de7b0d59d20d2f1d40733980 Mon Sep 17 00:00:00 2001 From: Xiangxuan Liu Date: Tue, 26 Mar 2019 11:16:41 +0800 Subject: [PATCH 139/327] Fix description of helm dependency command Signed-off-by: Xiangxuan Liu --- cmd/helm/dependency.go | 2 +- docs/helm/helm_dependency.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/helm/dependency.go b/cmd/helm/dependency.go index 1e3079ded..f8fe4cf8f 100644 --- a/cmd/helm/dependency.go +++ b/cmd/helm/dependency.go @@ -73,7 +73,7 @@ the dependency charts stored locally. The path should start with a prefix of repository: "file://../dependency_chart/nginx" If the dependency chart is retrieved locally, it is not required to have the -repository added to helm by "helm add repo". Version matching is also supported +repository added to helm by "helm repo add". Version matching is also supported for this case. ` diff --git a/docs/helm/helm_dependency.md b/docs/helm/helm_dependency.md index 317860bdb..8c7d7d65f 100644 --- a/docs/helm/helm_dependency.md +++ b/docs/helm/helm_dependency.md @@ -49,7 +49,7 @@ the dependency charts stored locally. The path should start with a prefix of repository: "file://../dependency_chart/nginx" If the dependency chart is retrieved locally, it is not required to have the -repository added to helm by "helm add repo". Version matching is also supported +repository added to helm by "helm repo add". Version matching is also supported for this case. @@ -78,4 +78,4 @@ for this case. * [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 -###### Auto generated by spf13/cobra on 1-Aug-2018 +###### Auto generated by spf13/cobra on 26-Mar-2019 From 3c871c0030866519805ee360ae58037cf2129a88 Mon Sep 17 00:00:00 2001 From: Matthew Fisher Date: Tue, 26 Mar 2019 10:51:40 -0700 Subject: [PATCH 140/327] chore(glide): bump kubernetes to 1.14 Signed-off-by: Matthew Fisher --- cmd/helm/installer/uninstall.go | 4 +- glide.lock | 128 +++++++++++++++------ glide.yaml | 14 +-- pkg/kube/client.go | 4 +- pkg/kube/client_test.go | 4 +- pkg/kube/result.go | 2 +- pkg/kube/result_test.go | 2 +- pkg/tiller/environment/environment.go | 4 +- pkg/tiller/environment/environment_test.go | 4 +- pkg/tiller/release_server_test.go | 4 +- 10 files changed, 115 insertions(+), 55 deletions(-) diff --git a/cmd/helm/installer/uninstall.go b/cmd/helm/installer/uninstall.go index 87fbd4050..b1d78004e 100644 --- a/cmd/helm/installer/uninstall.go +++ b/cmd/helm/installer/uninstall.go @@ -31,13 +31,13 @@ const ( // Uninstall uses Kubernetes client to uninstall Tiller. func Uninstall(client kubernetes.Interface, opts *Options) error { - if err := deleteService(client.Core(), opts.Namespace); err != nil { + if err := deleteService(client.CoreV1(), opts.Namespace); err != nil { return err } if err := deleteDeployment(client, opts.Namespace); err != nil { return err } - return deleteSecret(client.Core(), opts.Namespace) + return deleteSecret(client.CoreV1(), opts.Namespace) } // deleteService deletes the Tiller Service resource diff --git a/glide.lock b/glide.lock index 824e30041..eedbd9381 100644 --- a/glide.lock +++ b/glide.lock @@ -1,5 +1,5 @@ -hash: f86919aea9f9b6df70967eb0b00d8a3807a2f5e924d7bd82d317f7969fddb3ef -updated: 2019-03-17T20:36:59.222397-07:00 +hash: 9a8f0b6c906f605bb879fbcdf0c122096f7698fe6a975ec4e6648f2ee85fce3e +updated: 2019-03-26T10:33:38.977361532-07:00 imports: - name: cloud.google.com/go version: 3b1ae45394a234c385be014e9a488f2bb6eef821 @@ -84,6 +84,10 @@ imports: version: 449fdfce4d962303d702fec724ef0ad181c92528 subpackages: - spdy +- name: github.com/emicklei/go-restful + version: ff4f55a206334ef123e4f79bbf348980da81ca46 + subpackages: + - log - name: github.com/evanphx/json-patch version: 5858425f75500d40c52783dce87d085a483ce135 - name: github.com/exponent-io/jsonpath @@ -91,7 +95,7 @@ imports: - name: github.com/fatih/camelcase version: f6a740d52f961c60348ebb109adde9f4635d7540 - name: github.com/ghodss/yaml - version: 73d445a93680fa1a78ae23a5839bad48f32ba1ee + version: c7ce16629ff4cd059ed96ed06419dd3856fd3577 - name: github.com/go-openapi/jsonpointer version: ef5f0afec364d3b9396b7b77b43dbe26bf1f8004 - name: github.com/go-openapi/jsonreference @@ -130,7 +134,7 @@ imports: - name: github.com/google/btree version: 7d79101e329e5a3adf994758c578dab82b90c017 - name: github.com/google/gofuzz - version: 44d81051d367757e1c7c6a5a86423ece9afcf63c + version: 24818f796faf91cd76ec7bddd72458fbced7a6c1 - name: github.com/google/uuid version: 064e2069ce9c359c118179501254f67d7d37ba24 - name: github.com/googleapis/gnostic @@ -140,7 +144,7 @@ imports: - compiler - extensions - name: github.com/gophercloud/gophercloud - version: 781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d + version: c818fa66e4c88b30db28038fe3f18f2f4a0db9a8 subpackages: - openstack - openstack/identity/v2/tenants @@ -160,7 +164,7 @@ imports: - name: github.com/grpc-ecosystem/go-grpc-prometheus version: 0c1b191dbfe51efdabe3c14b9f6f3b96429e0722 - name: github.com/hashicorp/golang-lru - version: a0d98a5f288019575c6d1f4bb1573fef2d1fcdc4 + version: 20f1fb78b0740ba8c3cb143a61e86ba5c8669768 subpackages: - simplelru - name: github.com/huandu/xstrings @@ -171,6 +175,8 @@ imports: version: 76626ae9c91c4f2a10f34cad8ce83ea42c93bb75 - name: github.com/json-iterator/go version: ab8a2e0c74be9d3be70b3184d9acc634935ded82 +- name: github.com/liggitt/tabwriter + version: 89fcab3d43de07060e4fd4c1547430ed57e87f24 - name: github.com/mailru/easyjson version: 2f5df55504ebc322e4d52d34df6a1f5b503bf26d subpackages: @@ -215,7 +221,7 @@ imports: subpackages: - go - name: github.com/prometheus/common - version: 13ba4ddd0caa9c28ca7b7bffe1dfa9ed8d5ef207 + version: cfeb6f9992ffa54aaa4f2170ade4067ee478b250 subpackages: - expfmt - internal/bitbucket.org/ww/goautoneg @@ -259,15 +265,15 @@ imports: - scrypt - ssh/terminal - name: golang.org/x/net - version: 0ed95abb35c445290478a5348a7b38bb154135fd + version: 65e2d4e15006aab9813ff8769e768bbf4bb667a0 subpackages: - context - context/ctxhttp + - http/httpguts - http2 - http2/hpack - idna - internal/timeseries - - lex/httplex - trace - name: golang.org/x/oauth2 version: a6bd8cefa1811bd24b86f8902872e4e8225f74c4 @@ -368,12 +374,11 @@ imports: - json - jwt - name: gopkg.in/yaml.v2 - version: 670d4cfef0544295bc27a114dbac37980d83185a + version: 5420a8b6744d3b0345ab293f6fcba19c978f1183 - name: k8s.io/api - version: 5cb15d34447165a97c76ed5a60e4e99c8a01ecfe + version: 40a48860b5abbba9aa891b02b32da429b08d96a0 subpackages: - admission/v1beta1 - - admissionregistration/v1alpha1 - admissionregistration/v1beta1 - apps/v1 - apps/v1beta1 @@ -390,16 +395,21 @@ imports: - batch/v1beta1 - batch/v2alpha1 - certificates/v1beta1 + - coordination/v1 - coordination/v1beta1 - core/v1 - events/v1beta1 - extensions/v1beta1 - imagepolicy/v1alpha1 - networking/v1 + - networking/v1beta1 + - node/v1alpha1 + - node/v1beta1 - policy/v1beta1 - rbac/v1 - rbac/v1alpha1 - rbac/v1beta1 + - scheduling/v1 - scheduling/v1alpha1 - scheduling/v1beta1 - settings/v1alpha1 @@ -407,11 +417,11 @@ imports: - storage/v1alpha1 - storage/v1beta1 - name: k8s.io/apiextensions-apiserver - version: d002e88f6236312f0289d9d1deab106751718ff0 + version: 53c4693659ed354d76121458fb819202dd1635fa subpackages: - pkg/features - name: k8s.io/apimachinery - version: 86fb29eff6288413d76bd8506874fddd9fccdff0 + version: d7deff9243b165ee192f5551710ea4285dcfd615 subpackages: - pkg/api/equality - pkg/api/errors @@ -467,7 +477,7 @@ imports: - third_party/forked/golang/netutil - third_party/forked/golang/reflect - name: k8s.io/apiserver - version: 79427f02047f9189a75b8cdaadccaf65a126853e + version: 8b27c41bdbb11ff103caa673315e097bf0289171 subpackages: - pkg/authentication/authenticator - pkg/authentication/serviceaccount @@ -475,23 +485,31 @@ imports: - pkg/features - pkg/util/feature - name: k8s.io/cli-runtime - version: a9e421a7932607ce4623ff45add8274499cca193 + version: 2899ed30580fdbc8286718edb4382b529463099d subpackages: - pkg/genericclioptions - - pkg/genericclioptions/printers - - pkg/genericclioptions/resource + - pkg/kustomize + - pkg/kustomize/k8sdeps + - pkg/kustomize/k8sdeps/configmapandsecret + - pkg/kustomize/k8sdeps/kunstruct + - pkg/kustomize/k8sdeps/kv + - pkg/kustomize/k8sdeps/transformer + - pkg/kustomize/k8sdeps/transformer/hash + - pkg/kustomize/k8sdeps/transformer/patch + - pkg/kustomize/k8sdeps/validator + - pkg/printers + - pkg/resource - name: k8s.io/client-go - version: b40b2a5939e43f7ffe0028ad67586b7ce50bb675 + version: 6ee68ca5fd8355d024d02f9db0b3b667e8357a0f subpackages: - discovery + - discovery/cached/disk - discovery/fake - dynamic - dynamic/fake - kubernetes - kubernetes/fake - kubernetes/scheme - - kubernetes/typed/admissionregistration/v1alpha1 - - kubernetes/typed/admissionregistration/v1alpha1/fake - kubernetes/typed/admissionregistration/v1beta1 - kubernetes/typed/admissionregistration/v1beta1/fake - kubernetes/typed/apps/v1 @@ -524,6 +542,8 @@ imports: - kubernetes/typed/batch/v2alpha1/fake - kubernetes/typed/certificates/v1beta1 - kubernetes/typed/certificates/v1beta1/fake + - kubernetes/typed/coordination/v1 + - kubernetes/typed/coordination/v1/fake - kubernetes/typed/coordination/v1beta1 - kubernetes/typed/coordination/v1beta1/fake - kubernetes/typed/core/v1 @@ -534,6 +554,12 @@ imports: - kubernetes/typed/extensions/v1beta1/fake - kubernetes/typed/networking/v1 - kubernetes/typed/networking/v1/fake + - kubernetes/typed/networking/v1beta1 + - kubernetes/typed/networking/v1beta1/fake + - kubernetes/typed/node/v1alpha1 + - kubernetes/typed/node/v1alpha1/fake + - kubernetes/typed/node/v1beta1 + - kubernetes/typed/node/v1beta1/fake - kubernetes/typed/policy/v1beta1 - kubernetes/typed/policy/v1beta1/fake - kubernetes/typed/rbac/v1 @@ -542,6 +568,8 @@ imports: - kubernetes/typed/rbac/v1alpha1/fake - kubernetes/typed/rbac/v1beta1 - kubernetes/typed/rbac/v1beta1/fake + - kubernetes/typed/scheduling/v1 + - kubernetes/typed/scheduling/v1/fake - kubernetes/typed/scheduling/v1alpha1 - kubernetes/typed/scheduling/v1alpha1/fake - kubernetes/typed/scheduling/v1beta1 @@ -588,30 +616,35 @@ imports: - tools/pager - tools/portforward - tools/record + - tools/record/util - tools/reference - tools/remotecommand - tools/watch - transport - transport/spdy - - util/buffer - util/cert - util/connrotation - util/exec - util/flowcontrol - util/homedir - - util/integer - util/jsonpath + - util/keyutil - util/retry +- name: k8s.io/cloud-provider + version: 9c9d72d1bf90eb62005f5112f3eea019b272c44b + subpackages: + - features - name: k8s.io/klog - version: 8139d8cb77af419532b33dfa7dd09fbc5f1d344f + version: 8e90cee79f823779174776412c13478955131846 - name: k8s.io/kube-openapi - version: c59034cc13d587f5ef4e85ca0ade0c1866ae8e1d + version: b3a7cee44a305be0a69e1b9ac03018307287e1b0 subpackages: + - pkg/common - pkg/util/proto - pkg/util/proto/testing - pkg/util/proto/validation - name: k8s.io/kubernetes - version: f2c8f1cadf1808ec28476682e49a3cce2b09efbf + version: b805719a99126e54bcbc0a3d9ee8a45cd7e85632 subpackages: - pkg/api/legacyscheme - pkg/api/service @@ -644,6 +677,7 @@ imports: - pkg/apis/certificates/v1beta1 - pkg/apis/coordination - pkg/apis/coordination/install + - pkg/apis/coordination/v1 - pkg/apis/coordination/v1beta1 - pkg/apis/core - pkg/apis/core/helper @@ -659,6 +693,7 @@ imports: - pkg/apis/extensions/install - pkg/apis/extensions/v1beta1 - pkg/apis/networking + - pkg/apis/node - pkg/apis/policy - pkg/apis/policy/install - pkg/apis/policy/v1beta1 @@ -669,6 +704,7 @@ imports: - pkg/apis/rbac/v1beta1 - pkg/apis/scheduling - pkg/apis/scheduling/install + - pkg/apis/scheduling/v1 - pkg/apis/scheduling/v1alpha1 - pkg/apis/scheduling/v1beta1 - pkg/apis/settings @@ -713,30 +749,54 @@ imports: - pkg/kubectl/util/templates - pkg/kubectl/util/term - pkg/kubectl/validation - - pkg/kubelet/apis - pkg/kubelet/types - pkg/master/ports - pkg/printers - pkg/printers/internalversion - - pkg/scheduler/api - pkg/security/apparmor - pkg/serviceaccount - - pkg/util/file - pkg/util/hash - pkg/util/interrupt - pkg/util/labels - - pkg/util/net/sets - pkg/util/node - pkg/util/parsers - pkg/util/taints - pkg/version - name: k8s.io/utils - version: 66066c83e385e385ccc3c964b44fd7dcd413d0ed + version: c2654d5206da6b7b6ace12841e8f359bb89b443c subpackages: - - clock + - buffer - exec - - exec/testing + - integer + - net + - path - pointer + - trace +- name: sigs.k8s.io/kustomize + version: a6f65144121d1955266b0cd836ce954c04122dc8 + subpackages: + - pkg/commands/build + - pkg/constants + - pkg/expansion + - pkg/factory + - pkg/fs + - pkg/git + - pkg/gvk + - pkg/ifc + - pkg/ifc/transformer + - pkg/image + - pkg/internal/error + - pkg/loader + - pkg/patch + - pkg/patch/transformer + - pkg/resid + - pkg/resmap + - pkg/resource + - pkg/target + - pkg/transformers + - pkg/transformers/config + - pkg/transformers/config/defaultconfig + - pkg/types - name: sigs.k8s.io/yaml version: fd68e9863619f6ec2fdd8625fe1f02e7c877e480 - name: vbom.ml/util @@ -745,7 +805,7 @@ imports: - sortorder testImports: - name: github.com/pmezard/go-difflib - version: d8ed2627bdf02c080bf22230dbb337003b7aba2d + version: 5d4384ee4fb2527b0a1256a821ebfc92f91efefc subpackages: - difflib - name: github.com/stretchr/testify diff --git a/glide.yaml b/glide.yaml index 23a3cdaf4..8600ed0ac 100644 --- a/glide.yaml +++ b/glide.yaml @@ -51,19 +51,19 @@ import: version: 0.8.0 - package: github.com/grpc-ecosystem/go-grpc-prometheus - package: k8s.io/kubernetes - version: release-1.13 + version: release-1.14 - package: k8s.io/client-go - version: kubernetes-1.13.4 + version: kubernetes-1.14.0 - package: k8s.io/api - version: kubernetes-1.13.4 + version: kubernetes-1.14.0 - package: k8s.io/apimachinery - version: kubernetes-1.13.4 + version: kubernetes-1.14.0 - package: k8s.io/apiserver - version: kubernetes-1.13.4 + version: kubernetes-1.14.0 - package: k8s.io/cli-runtime - version: kubernetes-1.13.4 + version: kubernetes-1.14.0 - package: k8s.io/apiextensions-apiserver - version: kubernetes-1.13.4 + version: kubernetes-1.14.0 - package: github.com/cyphar/filepath-securejoin version: ^0.2.1 diff --git a/pkg/kube/client.go b/pkg/kube/client.go index 37c1d53e4..66c822ebd 100644 --- a/pkg/kube/client.go +++ b/pkg/kube/client.go @@ -47,7 +47,7 @@ import ( "k8s.io/apimachinery/pkg/util/strategicpatch" "k8s.io/apimachinery/pkg/watch" "k8s.io/cli-runtime/pkg/genericclioptions" - "k8s.io/cli-runtime/pkg/genericclioptions/resource" + "k8s.io/cli-runtime/pkg/resource" "k8s.io/client-go/kubernetes/scheme" watchtools "k8s.io/client-go/tools/watch" "k8s.io/kubernetes/pkg/api/legacyscheme" @@ -74,7 +74,7 @@ type Client struct { // New creates a new Client. func New(getter genericclioptions.RESTClientGetter) *Client { if getter == nil { - getter = genericclioptions.NewConfigFlags() + getter = genericclioptions.NewConfigFlags(true) } return &Client{ Factory: cmdutil.NewFactory(getter), diff --git a/pkg/kube/client_test.go b/pkg/kube/client_test.go index 401ac7e58..a41490f9b 100644 --- a/pkg/kube/client_test.go +++ b/pkg/kube/client_test.go @@ -25,11 +25,11 @@ import ( "strings" "testing" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/cli-runtime/pkg/genericclioptions/resource" + "k8s.io/cli-runtime/pkg/resource" "k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/rest/fake" cmdtesting "k8s.io/kubernetes/pkg/kubectl/cmd/testing" diff --git a/pkg/kube/result.go b/pkg/kube/result.go index cc222a66f..cf4a4195e 100644 --- a/pkg/kube/result.go +++ b/pkg/kube/result.go @@ -16,7 +16,7 @@ limitations under the License. package kube // import "k8s.io/helm/pkg/kube" -import "k8s.io/cli-runtime/pkg/genericclioptions/resource" +import "k8s.io/cli-runtime/pkg/resource" // Result provides convenience methods for comparing collections of Infos. type Result []*resource.Info diff --git a/pkg/kube/result_test.go b/pkg/kube/result_test.go index c4cf989b8..d4c18ee6a 100644 --- a/pkg/kube/result_test.go +++ b/pkg/kube/result_test.go @@ -21,7 +21,7 @@ import ( "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/cli-runtime/pkg/genericclioptions/resource" + "k8s.io/cli-runtime/pkg/resource" ) func TestResult(t *testing.T) { diff --git a/pkg/tiller/environment/environment.go b/pkg/tiller/environment/environment.go index 290337d7b..dca7c0756 100644 --- a/pkg/tiller/environment/environment.go +++ b/pkg/tiller/environment/environment.go @@ -26,8 +26,8 @@ import ( "io" "time" - "k8s.io/api/core/v1" - "k8s.io/cli-runtime/pkg/genericclioptions/resource" + v1 "k8s.io/api/core/v1" + "k8s.io/cli-runtime/pkg/resource" "k8s.io/helm/pkg/chartutil" "k8s.io/helm/pkg/engine" diff --git a/pkg/tiller/environment/environment_test.go b/pkg/tiller/environment/environment_test.go index 5c19a9b21..9e9b549d4 100644 --- a/pkg/tiller/environment/environment_test.go +++ b/pkg/tiller/environment/environment_test.go @@ -22,8 +22,8 @@ import ( "testing" "time" - "k8s.io/api/core/v1" - "k8s.io/cli-runtime/pkg/genericclioptions/resource" + v1 "k8s.io/api/core/v1" + "k8s.io/cli-runtime/pkg/resource" "k8s.io/helm/pkg/chartutil" "k8s.io/helm/pkg/kube" diff --git a/pkg/tiller/release_server_test.go b/pkg/tiller/release_server_test.go index 4e29e4413..ecf5ffd17 100644 --- a/pkg/tiller/release_server_test.go +++ b/pkg/tiller/release_server_test.go @@ -31,8 +31,8 @@ import ( "github.com/technosophos/moniker" "golang.org/x/net/context" "google.golang.org/grpc/metadata" - "k8s.io/api/core/v1" - "k8s.io/cli-runtime/pkg/genericclioptions/resource" + v1 "k8s.io/api/core/v1" + "k8s.io/cli-runtime/pkg/resource" "k8s.io/client-go/kubernetes/fake" "k8s.io/helm/pkg/helm" From b8e40a7c31faf094c950be40a0d08ce554bdc7dd Mon Sep 17 00:00:00 2001 From: Morten Torkildsen Date: Thu, 27 Dec 2018 01:56:00 -0800 Subject: [PATCH 141/327] fix(helm): Wait for CRDs to reach established state for crd_install hook Makes sure CRDs installed through the crd_install hook reaches the `established` state before the hook is considered complete. Signed-off-by: Morten Torkildsen --- pkg/kube/client.go | 57 ++++++++ pkg/kube/client_test.go | 150 ++++++++++++++++++++- pkg/tiller/environment/environment.go | 7 + pkg/tiller/environment/environment_test.go | 4 + pkg/tiller/release_server.go | 8 +- pkg/tiller/release_server_test.go | 4 + 6 files changed, 225 insertions(+), 5 deletions(-) diff --git a/pkg/kube/client.go b/pkg/kube/client.go index 66c822ebd..ee643fade 100644 --- a/pkg/kube/client.go +++ b/pkg/kube/client.go @@ -37,6 +37,7 @@ import ( batch "k8s.io/api/batch/v1" "k8s.io/api/core/v1" extv1beta1 "k8s.io/api/extensions/v1beta1" + apiextv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" apiequality "k8s.io/apimachinery/pkg/api/equality" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -45,6 +46,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/strategicpatch" + "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" "k8s.io/cli-runtime/pkg/genericclioptions" "k8s.io/cli-runtime/pkg/resource" @@ -76,6 +78,12 @@ func New(getter genericclioptions.RESTClientGetter) *Client { if getter == nil { getter = genericclioptions.NewConfigFlags(true) } + + err := apiextv1beta1.AddToScheme(scheme.Scheme) + if err != nil { + panic(err) + } + return &Client{ Factory: cmdutil.NewFactory(getter), Log: nopLogger, @@ -439,6 +447,55 @@ func (c *Client) WatchUntilReady(namespace string, reader io.Reader, timeout int return perform(infos, c.watchTimeout(time.Duration(timeout)*time.Second)) } +// WatchUntilCRDEstablished polls the given CRD until it reaches the established +// state. A CRD needs to reach the established state before CRs can be created. +// +// If a naming conflict condition is found, this function will return an error. +func (c *Client) WaitUntilCRDEstablished(reader io.Reader, timeout time.Duration) error { + infos, err := c.BuildUnstructured(metav1.NamespaceAll, reader) + if err != nil { + return err + } + + return perform(infos, c.pollCRDEstablished(timeout)) +} + +func (c *Client) pollCRDEstablished(t time.Duration) ResourceActorFunc { + return func(info *resource.Info) error { + return c.pollCRDUntilEstablished(t, info) + } +} + +func (c *Client) pollCRDUntilEstablished(timeout time.Duration, info *resource.Info) error { + return wait.PollImmediate(time.Second, timeout, func() (bool, error) { + err := info.Get() + if err != nil { + return false, fmt.Errorf("unable to get CRD: %v", err) + } + + crd := &apiextv1beta1.CustomResourceDefinition{} + err = scheme.Scheme.Convert(info.Object, crd, nil) + if err != nil { + return false, fmt.Errorf("unable to convert to CRD type: %v", err) + } + + for _, cond := range crd.Status.Conditions { + switch cond.Type { + case apiextv1beta1.Established: + if cond.Status == apiextv1beta1.ConditionTrue { + return true, nil + } + case apiextv1beta1.NamesAccepted: + if cond.Status == apiextv1beta1.ConditionFalse { + return false, fmt.Errorf("naming conflict detected for CRD %s", crd.GetName()) + } + } + } + + return false, nil + }) +} + func perform(infos Result, fn ResourceActorFunc) error { if len(infos) == 0 { return ErrNoObjectsVisited diff --git a/pkg/kube/client_test.go b/pkg/kube/client_test.go index a41490f9b..810abdf17 100644 --- a/pkg/kube/client_test.go +++ b/pkg/kube/client_test.go @@ -24,8 +24,10 @@ import ( "sort" "strings" "testing" + "time" - v1 "k8s.io/api/core/v1" + "k8s.io/api/core/v1" + apiextv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" @@ -33,15 +35,35 @@ import ( "k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/rest/fake" cmdtesting "k8s.io/kubernetes/pkg/kubectl/cmd/testing" + kubectlscheme "k8s.io/kubernetes/pkg/kubectl/scheme" ) +func init() { + err := apiextv1beta1.AddToScheme(scheme.Scheme) + if err != nil { + panic(err) + } + + // Tiller use the scheme from go-client, but the cmdtesting + // package used here is hardcoded to use the scheme from + // kubectl. So for testing, we need to add the CustomResourceDefinition + // type to both schemes. + err = apiextv1beta1.AddToScheme(kubectlscheme.Scheme) + if err != nil { + panic(err) + } +} + var ( - codec = scheme.Codecs.LegacyCodec(scheme.Scheme.PrioritizedVersionsAllGroups()...) unstructuredSerializer = resource.UnstructuredPlusDefaultContentConfig().NegotiatedSerializer ) +func getCodec() runtime.Codec { + return scheme.Codecs.LegacyCodec(scheme.Scheme.PrioritizedVersionsAllGroups()...) +} + func objBody(obj runtime.Object) io.ReadCloser { - return ioutil.NopCloser(bytes.NewReader([]byte(runtime.EncodeOrDie(codec, obj)))) + return ioutil.NopCloser(bytes.NewReader([]byte(runtime.EncodeOrDie(getCodec(), obj)))) } func newPod(name string) v1.Pod { @@ -103,7 +125,7 @@ func notFoundBody() *metav1.Status { func newResponse(code int, obj runtime.Object) (*http.Response, error) { header := http.Header{} header.Set("Content-Type", runtime.ContentTypeJSON) - body := ioutil.NopCloser(bytes.NewReader([]byte(runtime.EncodeOrDie(codec, obj)))) + body := ioutil.NopCloser(bytes.NewReader([]byte(runtime.EncodeOrDie(getCodec(), obj)))) return &http.Response{StatusCode: code, Header: header, Body: body}, nil } @@ -434,6 +456,88 @@ func TestResourceSortOrder(t *testing.T) { } } +func TestWaitUntilCRDEstablished(t *testing.T) { + testCases := map[string]struct { + conditions []apiextv1beta1.CustomResourceDefinitionCondition + returnConditionsAfter int + success bool + }{ + "crd reaches established state after 2 requests": { + conditions: []apiextv1beta1.CustomResourceDefinitionCondition{ + { + Type: apiextv1beta1.Established, + Status: apiextv1beta1.ConditionTrue, + }, + }, + returnConditionsAfter: 2, + success: true, + }, + "crd does not reach established state before timeout": { + conditions: []apiextv1beta1.CustomResourceDefinitionCondition{}, + returnConditionsAfter: 100, + success: false, + }, + "crd name is not accepted": { + conditions: []apiextv1beta1.CustomResourceDefinitionCondition{ + { + Type: apiextv1beta1.NamesAccepted, + Status: apiextv1beta1.ConditionFalse, + }, + }, + returnConditionsAfter: 1, + success: false, + }, + } + + for tn, tc := range testCases { + func(name string) { + c := newTestClient() + defer c.Cleanup() + + crdWithoutConditions := newCrdWithStatus("name", apiextv1beta1.CustomResourceDefinitionStatus{}) + crdWithConditions := newCrdWithStatus("name", apiextv1beta1.CustomResourceDefinitionStatus{ + Conditions: tc.conditions, + }) + + requestCount := 0 + c.TestFactory.UnstructuredClient = &fake.RESTClient{ + GroupVersion: schema.GroupVersion{Version: "v1"}, + NegotiatedSerializer: unstructuredSerializer, + Client: fake.CreateHTTPClient(func(req *http.Request) (*http.Response, error) { + var crd apiextv1beta1.CustomResourceDefinition + if requestCount < tc.returnConditionsAfter { + crd = crdWithoutConditions + } else { + crd = crdWithConditions + } + requestCount += 1 + return newResponse(200, &crd) + }), + } + + err := c.WaitUntilCRDEstablished(strings.NewReader(crdManifest), 5*time.Second) + if err != nil && tc.success { + t.Errorf("%s: expected no error, but got %v", name, err) + } + if err == nil && !tc.success { + t.Errorf("%s: expected error, but didn't get one", name) + } + }(tn) + } +} + +func newCrdWithStatus(name string, status apiextv1beta1.CustomResourceDefinitionStatus) apiextv1beta1.CustomResourceDefinition { + crd := apiextv1beta1.CustomResourceDefinition{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: metav1.NamespaceDefault, + }, + Spec: apiextv1beta1.CustomResourceDefinitionSpec{}, + Status: status, + } + return crd +} + func TestPerform(t *testing.T) { tests := []struct { name string @@ -701,3 +805,41 @@ spec: ports: - containerPort: 80 ` + +const crdManifest = ` +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + creationTimestamp: null + labels: + controller-tools.k8s.io: "1.0" + name: applications.app.k8s.io +spec: + group: app.k8s.io + names: + kind: Application + plural: applications + scope: Namespaced + validation: + openAPIV3Schema: + properties: + apiVersion: + description: 'Description' + type: string + kind: + description: 'Kind' + type: string + metadata: + type: object + spec: + type: object + status: + type: object + version: v1beta1 +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] +` diff --git a/pkg/tiller/environment/environment.go b/pkg/tiller/environment/environment.go index dca7c0756..6063e9c5f 100644 --- a/pkg/tiller/environment/environment.go +++ b/pkg/tiller/environment/environment.go @@ -141,6 +141,8 @@ type KubeClient interface { // WaitAndGetCompletedPodPhase waits up to a timeout until a pod enters a completed phase // and returns said phase (PodSucceeded or PodFailed qualify). WaitAndGetCompletedPodPhase(namespace string, reader io.Reader, timeout time.Duration) (v1.PodPhase, error) + + WaitUntilCRDEstablished(reader io.Reader, timeout time.Duration) error } // PrintingKubeClient implements KubeClient, but simply prints the reader to @@ -197,6 +199,11 @@ func (p *PrintingKubeClient) WaitAndGetCompletedPodPhase(namespace string, reade return v1.PodUnknown, err } +func (p *PrintingKubeClient) WaitUntilCRDEstablished(reader io.Reader, timeout time.Duration) error { + _, err := io.Copy(p.Out, reader) + return err +} + // Environment provides the context for executing a client request. // // All services in a context are concurrency safe. diff --git a/pkg/tiller/environment/environment_test.go b/pkg/tiller/environment/environment_test.go index 9e9b549d4..464cee191 100644 --- a/pkg/tiller/environment/environment_test.go +++ b/pkg/tiller/environment/environment_test.go @@ -69,6 +69,10 @@ func (k *mockKubeClient) WaitAndGetCompletedPodStatus(namespace string, reader i return "", nil } +func (k *mockKubeClient) WaitUntilCRDEstablished(reader io.Reader, timeout time.Duration) error { + return nil +} + var _ Engine = &mockEngine{} var _ KubeClient = &mockKubeClient{} var _ KubeClient = &PrintingKubeClient{} diff --git a/pkg/tiller/release_server.go b/pkg/tiller/release_server.go index d32fd82f6..c95b31477 100644 --- a/pkg/tiller/release_server.go +++ b/pkg/tiller/release_server.go @@ -23,6 +23,7 @@ import ( "path" "regexp" "strings" + "time" "github.com/technosophos/moniker" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -399,7 +400,7 @@ func (s *ReleaseServer) execHook(hs []*release.Hook, name, namespace, hook strin b.Reset() b.WriteString(h.Manifest) - // We can't watch CRDs + // We can't watch CRDs, but need to wait until they reach the established state before continuing if hook != hooks.CRDInstall { if err := kubeCli.WatchUntilReady(namespace, b, timeout, false); err != nil { s.Log("warning: Release %s %s %s could not complete: %s", name, hook, h.Path, err) @@ -410,6 +411,11 @@ func (s *ReleaseServer) execHook(hs []*release.Hook, name, namespace, hook strin } return err } + } else { + if err := kubeCli.WaitUntilCRDEstablished(b, time.Duration(timeout)*time.Second); err != nil { + s.Log("warning: Release %s %s %s could not complete: %s", name, hook, h.Path, err) + return err + } } } diff --git a/pkg/tiller/release_server_test.go b/pkg/tiller/release_server_test.go index ecf5ffd17..4087b2f76 100644 --- a/pkg/tiller/release_server_test.go +++ b/pkg/tiller/release_server_test.go @@ -642,6 +642,10 @@ func (kc *mockHooksKubeClient) WaitAndGetCompletedPodPhase(namespace string, rea return v1.PodUnknown, nil } +func (kc *mockHooksKubeClient) WaitUntilCRDEstablished(reader io.Reader, timeout time.Duration) error { + return nil +} + func deletePolicyStub(kubeClient *mockHooksKubeClient) *ReleaseServer { e := environment.New() e.Releases = storage.Init(driver.NewMemory()) From 6cf4b8703fab9f77bb9d37a9bf4fac09f09d9e0d Mon Sep 17 00:00:00 2001 From: Joschka Tillmanns Date: Wed, 3 Apr 2019 13:52:12 +0200 Subject: [PATCH 142/327] don't do multiple chart reads on upgrade Signed-off-by: Joschka Tillmanns --- cmd/helm/upgrade.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cmd/helm/upgrade.go b/cmd/helm/upgrade.go index 044ec045d..bc4ec5ad9 100644 --- a/cmd/helm/upgrade.go +++ b/cmd/helm/upgrade.go @@ -248,7 +248,8 @@ func (u *upgradeCmd) run() error { } // Check chart requirements to make sure all dependencies are present in /charts - if ch, err := chartutil.Load(chartPath); err == nil { + ch, err := chartutil.Load(chartPath) + if err == nil { if req, err := chartutil.LoadRequirements(ch); err == nil { if err := renderutil.CheckDependencies(ch, req); err != nil { return err @@ -260,9 +261,9 @@ func (u *upgradeCmd) run() error { return prettyError(err) } - resp, err := u.client.UpdateRelease( + resp, err := u.client.UpdateReleaseFromChart( u.release, - chartPath, + ch, helm.UpdateValueOverrides(rawVals), helm.UpgradeDryRun(u.dryRun), helm.UpgradeRecreate(u.recreate), From 6cf433d719acbe165cf96000c935e11ad0147750 Mon Sep 17 00:00:00 2001 From: Sergey Kozlov Date: Wed, 3 Apr 2019 18:41:00 +0700 Subject: [PATCH 143/327] Fixed a typo in docs Replaced `chart` command by `helm`. Signed-off-by: Sergey Kozlov --- docs/chart_template_guide/notes_files.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/chart_template_guide/notes_files.md b/docs/chart_template_guide/notes_files.md index 5a8b78ca4..670f78fc2 100644 --- a/docs/chart_template_guide/notes_files.md +++ b/docs/chart_template_guide/notes_files.md @@ -1,6 +1,6 @@ # Creating a NOTES.txt File -In this section we are going to look at Helm's tool for providing instructions to your chart users. At the end of a `chart install` or `chart upgrade`, Helm can print out a block of helpful information for users. This information is highly customizable using templates. +In this section we are going to look at Helm's tool for providing instructions to your chart users. At the end of a `helm install` or `helm upgrade`, Helm can print out a block of helpful information for users. This information is highly customizable using templates. To add installation notes to your chart, simply create a `templates/NOTES.txt` file. This file is plain text, but it is processed like as a template, and has all the normal template functions and objects available. From ff686d59671d32ea18c682cfa2e886e7b404243e Mon Sep 17 00:00:00 2001 From: Arvind Kumar <10303369+aku163@users.noreply.github.com> Date: Thu, 4 Apr 2019 01:10:46 +0100 Subject: [PATCH 144/327] Document update | variable representation change Signed-off-by: Arvind Kumar <10303369+aku163@users.noreply.github.com> --- docs/chart_template_guide/values_files.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/chart_template_guide/values_files.md b/docs/chart_template_guide/values_files.md index 218da19dc..0a72b6bc2 100644 --- a/docs/chart_template_guide/values_files.md +++ b/docs/chart_template_guide/values_files.md @@ -29,7 +29,7 @@ data: drink: {{ .Values.favoriteDrink }} ``` -Notice on the last line we access `favoriteDrink` as an attribute of `Values`: `{{ .Values.favoriteDrink}}`. +Notice on the last line we access `favoriteDrink` as an attribute of `Values`: `{{ .Values.favoriteDrink }}`. Let's see how this renders. From 87e495c57d4585e6570cf2635644b97992ea5cd9 Mon Sep 17 00:00:00 2001 From: Sergey Kozlov Date: Thu, 4 Apr 2019 11:46:23 +0700 Subject: [PATCH 145/327] Fixed typos in docs/chart_best_practices Signed-off-by: Sergey Kozlov --- docs/chart_best_practices/values.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/chart_best_practices/values.md b/docs/chart_best_practices/values.md index 28e3a3eac..bdc53e338 100644 --- a/docs/chart_best_practices/values.md +++ b/docs/chart_best_practices/values.md @@ -88,7 +88,7 @@ data is lost after one parse. ## Consider How Users Will Use Your Values -There are three potential sources of values: +There are four potential sources of values: - A chart's `values.yaml` file - A values file supplied by `helm install -f` or `helm upgrade -f` From e2a9bf29134297cacacf441c10ee6b1b2107ce5d Mon Sep 17 00:00:00 2001 From: Sergey Kozlov Date: Thu, 4 Apr 2019 13:06:49 +0700 Subject: [PATCH 146/327] Fixed default value for `helm.sh/chart` label Signed-off-by: Sergey Kozlov --- docs/chart_best_practices/labels.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/chart_best_practices/labels.md b/docs/chart_best_practices/labels.md index 6b7d24c49..5a41ed1cc 100644 --- a/docs/chart_best_practices/labels.md +++ b/docs/chart_best_practices/labels.md @@ -26,7 +26,7 @@ are recommended, and _should_ be placed onto a chart for global consistency. Tho Name|Status|Description -----|------|---------- `app.kubernetes.io/name` | REC | This should be the app name, reflecting the entire app. Usually `{{ template "name" . }}` is used for this. This is used by many Kubernetes manifests, and is not Helm-specific. -`helm.sh/chart` | REC | This should be the chart name and version: `{{ .Chart.Name }}-{{ .Chart.Version \| replace "+" "_" }}`. +`helm.sh/chart` | REC | This should be the chart name and version: `{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}`. `app.kubernetes.io/managed-by` | REC | This should always be set to `{{ .Release.Service }}`. It is for finding all things managed by Tiller. `app.kubernetes.io/instance` | REC | This should be the `{{ .Release.Name }}`. It aids in differentiating between different instances of the same application. `app.kubernetes.io/version` | OPT | The version of the app and can be set to `{{ .Chart.AppVersion }}`. From faa5fd0b5e312333c6a579b904794b27fc136807 Mon Sep 17 00:00:00 2001 From: Timofey Kirillov Date: Thu, 4 Apr 2019 21:34:26 +0300 Subject: [PATCH 147/327] Add clarification log messages before calling cleanup-on-fail during update Signed-off-by: Timofey Kirillov --- pkg/kube/client.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/kube/client.go b/pkg/kube/client.go index d5666fedf..6e51729cd 100644 --- a/pkg/kube/client.go +++ b/pkg/kube/client.go @@ -371,6 +371,7 @@ func (c *Client) UpdateWithOptions(namespace string, originalReader, targetReade cleanupErrors := []string{} if opts.CleanupOnFail && (err != nil || len(updateErrors) != 0) { + c.Log("Cleanup on fail enabled: cleaning up newly created resources due to update manifests failures") cleanupErrors = c.cleanup(newlyCreatedResources) } @@ -405,6 +406,7 @@ func (c *Client) UpdateWithOptions(namespace string, originalReader, targetReade err := c.waitForResources(time.Duration(opts.Timeout)*time.Second, target) if opts.CleanupOnFail && err != nil { + c.Log("Cleanup on fail enabled: cleaning up newly created resources due to wait failure during update") cleanupErrors = c.cleanup(newlyCreatedResources) return fmt.Errorf(strings.Join(append([]string{err.Error()}, cleanupErrors...), " && ")) } From a8145d6f17a7c0fbe9c7b4d16d287cfc5901c232 Mon Sep 17 00:00:00 2001 From: Timofey Kirillov Date: Fri, 22 Mar 2019 21:17:33 +0300 Subject: [PATCH 148/327] Regenerate proto files for `--cleanup-on-fail` option Signed-off-by: Timofey Kirillov --- pkg/proto/hapi/release/status.pb.go | 2 +- pkg/proto/hapi/rudder/rudder.pb.go | 119 +++++++++-------- pkg/proto/hapi/services/tiller.pb.go | 186 +++++++++++++++------------ 3 files changed, 172 insertions(+), 135 deletions(-) diff --git a/pkg/proto/hapi/release/status.pb.go b/pkg/proto/hapi/release/status.pb.go index 284892642..bc75e64b2 100644 --- a/pkg/proto/hapi/release/status.pb.go +++ b/pkg/proto/hapi/release/status.pb.go @@ -20,7 +20,7 @@ const ( Status_UNKNOWN Status_Code = 0 // Status_DEPLOYED indicates that the release has been pushed to Kubernetes. Status_DEPLOYED Status_Code = 1 - // Status_DELETED indicates that a release has been deleted from Kubermetes. + // Status_DELETED indicates that a release has been deleted from Kubernetes. Status_DELETED Status_Code = 2 // Status_SUPERSEDED indicates that this release object is outdated and a newer one exists. Status_SUPERSEDED Status_Code = 3 diff --git a/pkg/proto/hapi/rudder/rudder.pb.go b/pkg/proto/hapi/rudder/rudder.pb.go index 6e26d71eb..3a0de7746 100644 --- a/pkg/proto/hapi/rudder/rudder.pb.go +++ b/pkg/proto/hapi/rudder/rudder.pb.go @@ -214,12 +214,13 @@ func (m *DeleteReleaseResponse) GetResult() *Result { } type UpgradeReleaseRequest struct { - Current *hapi_release5.Release `protobuf:"bytes,1,opt,name=current" json:"current,omitempty"` - Target *hapi_release5.Release `protobuf:"bytes,2,opt,name=target" json:"target,omitempty"` - Timeout int64 `protobuf:"varint,3,opt,name=Timeout" json:"Timeout,omitempty"` - Wait bool `protobuf:"varint,4,opt,name=Wait" json:"Wait,omitempty"` - Recreate bool `protobuf:"varint,5,opt,name=Recreate" json:"Recreate,omitempty"` - Force bool `protobuf:"varint,6,opt,name=Force" json:"Force,omitempty"` + Current *hapi_release5.Release `protobuf:"bytes,1,opt,name=current" json:"current,omitempty"` + Target *hapi_release5.Release `protobuf:"bytes,2,opt,name=target" json:"target,omitempty"` + Timeout int64 `protobuf:"varint,3,opt,name=Timeout" json:"Timeout,omitempty"` + Wait bool `protobuf:"varint,4,opt,name=Wait" json:"Wait,omitempty"` + Recreate bool `protobuf:"varint,5,opt,name=Recreate" json:"Recreate,omitempty"` + Force bool `protobuf:"varint,6,opt,name=Force" json:"Force,omitempty"` + CleanupOnFail bool `protobuf:"varint,7,opt,name=CleanupOnFail" json:"CleanupOnFail,omitempty"` } func (m *UpgradeReleaseRequest) Reset() { *m = UpgradeReleaseRequest{} } @@ -269,6 +270,13 @@ func (m *UpgradeReleaseRequest) GetForce() bool { return false } +func (m *UpgradeReleaseRequest) GetCleanupOnFail() bool { + if m != nil { + return m.CleanupOnFail + } + return false +} + type UpgradeReleaseResponse struct { Release *hapi_release5.Release `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` Result *Result `protobuf:"bytes,2,opt,name=result" json:"result,omitempty"` @@ -294,12 +302,13 @@ func (m *UpgradeReleaseResponse) GetResult() *Result { } type RollbackReleaseRequest struct { - Current *hapi_release5.Release `protobuf:"bytes,1,opt,name=current" json:"current,omitempty"` - Target *hapi_release5.Release `protobuf:"bytes,2,opt,name=target" json:"target,omitempty"` - Timeout int64 `protobuf:"varint,3,opt,name=Timeout" json:"Timeout,omitempty"` - Wait bool `protobuf:"varint,4,opt,name=Wait" json:"Wait,omitempty"` - Recreate bool `protobuf:"varint,5,opt,name=Recreate" json:"Recreate,omitempty"` - Force bool `protobuf:"varint,6,opt,name=Force" json:"Force,omitempty"` + Current *hapi_release5.Release `protobuf:"bytes,1,opt,name=current" json:"current,omitempty"` + Target *hapi_release5.Release `protobuf:"bytes,2,opt,name=target" json:"target,omitempty"` + Timeout int64 `protobuf:"varint,3,opt,name=Timeout" json:"Timeout,omitempty"` + Wait bool `protobuf:"varint,4,opt,name=Wait" json:"Wait,omitempty"` + Recreate bool `protobuf:"varint,5,opt,name=Recreate" json:"Recreate,omitempty"` + Force bool `protobuf:"varint,6,opt,name=Force" json:"Force,omitempty"` + CleanupOnFail bool `protobuf:"varint,7,opt,name=CleanupOnFail" json:"CleanupOnFail,omitempty"` } func (m *RollbackReleaseRequest) Reset() { *m = RollbackReleaseRequest{} } @@ -349,6 +358,13 @@ func (m *RollbackReleaseRequest) GetForce() bool { return false } +func (m *RollbackReleaseRequest) GetCleanupOnFail() bool { + if m != nil { + return m.CleanupOnFail + } + return false +} + type RollbackReleaseResponse struct { Release *hapi_release5.Release `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` Result *Result `protobuf:"bytes,2,opt,name=result" json:"result,omitempty"` @@ -680,43 +696,44 @@ var _ReleaseModuleService_serviceDesc = grpc.ServiceDesc{ func init() { proto.RegisterFile("hapi/rudder/rudder.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 597 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x56, 0x5f, 0x8f, 0xd2, 0x4e, - 0x14, 0xa5, 0xb0, 0x14, 0xb8, 0x64, 0x7f, 0x3f, 0x32, 0xa1, 0xd0, 0x34, 0x3e, 0x90, 0x3e, 0x18, - 0xe2, 0xba, 0x25, 0x41, 0x1f, 0x7d, 0x51, 0x96, 0xfd, 0x13, 0x23, 0x9b, 0x0c, 0xe2, 0x26, 0xbe, - 0x75, 0xe1, 0x82, 0xd5, 0xd2, 0xd6, 0xe9, 0x74, 0x1f, 0xd5, 0x4f, 0xe3, 0x57, 0xd2, 0x8f, 0x63, - 0xda, 0x69, 0x89, 0xad, 0xd3, 0x88, 0x6b, 0xc2, 0x83, 0x4f, 0x9d, 0xe9, 0x3d, 0xdc, 0x39, 0xe7, - 0xf4, 0xce, 0x09, 0xa0, 0xbf, 0xb3, 0x03, 0x67, 0xc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98, 0x86, 0xb4, 0x90, 0x41, 0xf2, 0xe8, 0x2b, 0x6f, 0xed, 0x8b, 0xe0, 0x1e, - 0x7f, 0xad, 0xef, 0xb8, 0xbf, 0xf2, 0x57, 0x91, 0x8b, 0x73, 0x21, 0x95, 0xac, 0xa1, 0x91, 0x06, - 0x2d, 0x39, 0x91, 0x9b, 0x20, 0x0d, 0x68, 0xe3, 0xf1, 0x7e, 0x60, 0xa1, 0xcb, 0xac, 0x90, 0x2d, - 0xfc, 0x97, 0x8f, 0xcf, 0xb2, 0xe3, 0xa4, 0x71, 0x5d, 0x76, 0x9c, 0x3c, 0x91, 0xcd, 0x0a, 0x79, - 0x0f, 0xc7, 0xb9, 0x8c, 0x23, 0x8f, 0xe4, 0x0d, 0x64, 0x89, 0x6a, 0x9c, 0xec, 0x85, 0xdd, 0x9d, - 0x15, 0xc0, 0xff, 0x85, 0xc1, 0x24, 0x25, 0x74, 0xe5, 0x57, 0xd3, 0x38, 0xdd, 0x13, 0xfd, 0xb3, - 0x99, 0xf9, 0x9c, 0x29, 0x33, 0x53, 0x1a, 0xb3, 0x65, 0x66, 0xca, 0xa3, 0x4b, 0x98, 0x99, 0x1b, - 0xd7, 0x32, 0x33, 0x65, 0x97, 0xa3, 0xcc, 0x4c, 0xe9, 0xfc, 0x9b, 0x95, 0x17, 0xcd, 0xb7, 0xaa, - 0x40, 0xdc, 0xaa, 0xc9, 0x1f, 0x92, 0x27, 0x3f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xb6, 0xa5, 0x37, - 0x75, 0xf7, 0x08, 0x00, 0x00, + // 615 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x56, 0x4d, 0x6f, 0xd3, 0x40, + 0x10, 0x8d, 0x9b, 0xc6, 0x69, 0xa6, 0x2a, 0x44, 0xab, 0xba, 0xb5, 0x2c, 0x0e, 0x91, 0x85, 0x50, + 0x44, 0xa9,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xba, 0xc7, 0x51, 0x27, 0xa6, 0x76, 0xfe, 0xdd, 0xc6, 0xcb, 0xad, + 0x77, 0xa6, 0x42, 0xdc, 0x98, 0xd9, 0x8f, 0x9b, 0xa7, 0x3f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xe2, + 0x9e, 0x21, 0x0d, 0x43, 0x09, 0x00, 0x00, } diff --git a/pkg/proto/hapi/services/tiller.pb.go b/pkg/proto/hapi/services/tiller.pb.go index ce76cad12..ab6e573e5 100644 --- a/pkg/proto/hapi/services/tiller.pb.go +++ b/pkg/proto/hapi/services/tiller.pb.go @@ -383,6 +383,8 @@ type UpdateReleaseRequest struct { Description string `protobuf:"bytes,12,opt,name=description" json:"description,omitempty"` // Render subchart notes if enabled SubNotes bool `protobuf:"varint,13,opt,name=subNotes" json:"subNotes,omitempty"` + // Allow deletion of new resources created in this update when update failed + CleanupOnFail bool `protobuf:"varint,14,opt,name=cleanup_on_fail,json=cleanupOnFail" json:"cleanup_on_fail,omitempty"` } func (m *UpdateReleaseRequest) Reset() { *m = UpdateReleaseRequest{} } @@ -481,6 +483,13 @@ func (m *UpdateReleaseRequest) GetSubNotes() bool { return false } +func (m *UpdateReleaseRequest) GetCleanupOnFail() bool { + if m != nil { + return m.CleanupOnFail + } + return false +} + // UpdateReleaseResponse is the response to an update request. type UpdateReleaseResponse struct { Release *hapi_release5.Release `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` @@ -518,6 +527,8 @@ type RollbackReleaseRequest struct { Force bool `protobuf:"varint,8,opt,name=force" json:"force,omitempty"` // Description, if set, will set the description for the rollback Description string `protobuf:"bytes,9,opt,name=description" json:"description,omitempty"` + // Allow deletion of new resources created in this rollback when rollback failed + CleanupOnFail bool `protobuf:"varint,10,opt,name=cleanup_on_fail,json=cleanupOnFail" json:"cleanup_on_fail,omitempty"` } func (m *RollbackReleaseRequest) Reset() { *m = RollbackReleaseRequest{} } @@ -588,6 +599,13 @@ func (m *RollbackReleaseRequest) GetDescription() string { return "" } +func (m *RollbackReleaseRequest) GetCleanupOnFail() bool { + if m != nil { + return m.CleanupOnFail + } + return false +} + // RollbackReleaseResponse is the response to an update request. type RollbackReleaseResponse struct { Release *hapi_release5.Release `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` @@ -1441,87 +1459,89 @@ var _ReleaseService_serviceDesc = grpc.ServiceDesc{ func init() { proto.RegisterFile("hapi/services/tiller.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 1308 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xed, 0x6e, 0x1b, 0x45, - 0x17, 0x8e, 0xbd, 0xfe, 0x3c, 0x4e, 0xfc, 0xba, 0xd3, 0x34, 0xd9, 0xee, 0x5b, 0x50, 0x58, 0x04, - 0x75, 0x0b, 0x75, 0xc0, 0xf0, 0x07, 0x09, 0x21, 0xa5, 0xae, 0x95, 0x14, 0x82, 0x2b, 0xad, 0xdb, - 0x22, 0x21, 0x21, 0x6b, 0x63, 0x8f, 0xdb, 0xa5, 0xeb, 0x5d, 0xb3, 0x33, 0x1b, 0x9a, 0x1b, 0x40, - 0xe2, 0x27, 0x97, 0x80, 0xc4, 0x85, 0x70, 0x1f, 0xdc, 0x0c, 0x9a, 0xaf, 0xcd, 0xce, 0x7a, 0xd7, - 0x5d, 0xf2, 0x27, 0xde, 0x99, 0x73, 0xe6, 0x7c, 0x3c, 0xcf, 0x9c, 0x33, 0x27, 0x60, 0xbd, 0x76, - 0xd7, 0xde, 0x31, 0xc1, 0xd1, 0xa5, 0x37, 0xc7, 0xe4, 0x98, 0x7a, 0xbe, 0x8f, 0xa3, 0xc1, 0x3a, - 0x0a, 0x69, 0x88, 0xf6, 0x99, 0x6c, 0xa0, 0x64, 0x03, 0x21, 0xb3, 0x0e, 0xf8, 0x89, 0xf9, 0x6b, - 0x37, 0xa2, 0xe2, 0xaf, 0xd0, 0xb6, 0x0e, 0xd3, 0xfb, 0x61, 0xb0, 0xf4, 0x5e, 0x49, 0x81, 0x70, - 0x11, 0x61, 0x1f, 0xbb, 0x04, 0xab, 0x5f, 0xed, 0x90, 0x92, 0x79, 0xc1, 0x32, 0x94, 0x82, 0xff, - 0x6b, 0x02, 0x8a, 0x09, 0x9d, 0x45, 0x71, 0x20, 0x85, 0x77, 0x35, 0x21, 0xa1, 0x2e, 0x8d, 0x89, - 0xe6, 0xec, 0x12, 0x47, 0xc4, 0x0b, 0x03, 0xf5, 0x2b, 0x64, 0xf6, 0xdf, 0x55, 0xb8, 0x7d, 0xee, - 0x11, 0xea, 0x88, 0x83, 0xc4, 0xc1, 0xbf, 0xc4, 0x98, 0x50, 0xb4, 0x0f, 0x75, 0xdf, 0x5b, 0x79, - 0xd4, 0xac, 0x1c, 0x55, 0xfa, 0x86, 0x23, 0x16, 0xe8, 0x00, 0x1a, 0xe1, 0x72, 0x49, 0x30, 0x35, - 0xab, 0x47, 0x95, 0x7e, 0xdb, 0x91, 0x2b, 0xf4, 0x0d, 0x34, 0x49, 0x18, 0xd1, 0xd9, 0xc5, 0x95, - 0x69, 0x1c, 0x55, 0xfa, 0xdd, 0xe1, 0x47, 0x83, 0x3c, 0x9c, 0x06, 0xcc, 0xd3, 0x34, 0x8c, 0xe8, - 0x80, 0xfd, 0x79, 0x7c, 0xe5, 0x34, 0x08, 0xff, 0x65, 0x76, 0x97, 0x9e, 0x4f, 0x71, 0x64, 0xd6, - 0x84, 0x5d, 0xb1, 0x42, 0xa7, 0x00, 0xdc, 0x6e, 0x18, 0x2d, 0x70, 0x64, 0xd6, 0xb9, 0xe9, 0x7e, - 0x09, 0xd3, 0xcf, 0x98, 0xbe, 0xd3, 0x26, 0xea, 0x13, 0x7d, 0x0d, 0xbb, 0x02, 0x92, 0xd9, 0x3c, - 0x5c, 0x60, 0x62, 0x36, 0x8e, 0x8c, 0x7e, 0x77, 0x78, 0x57, 0x98, 0x52, 0xf0, 0x4f, 0x05, 0x68, - 0x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 0x8b, 0x35, - 0xfc, 0x2f, 0x33, 0x09, 0xa0, 0x02, 0x68, 0xf2, 0x07, 0x27, 0xeb, 0x51, 0x49, 0xed, 0x4c, 0x52, - 0xb2, 0x63, 0x6d, 0x49, 0x4a, 0x6f, 0x87, 0x5b, 0x92, 0xca, 0x34, 0x3f, 0x7b, 0x07, 0x79, 0xd0, - 0x75, 0xe2, 0x40, 0xba, 0x66, 0x6d, 0x01, 0x15, 0x9c, 0xde, 0xec, 0x78, 0xd6, 0x83, 0x12, 0x9a, - 0xd7, 0xf5, 0xfd, 0x18, 0x7e, 0x6c, 0x29, 0xd5, 0x8b, 0x06, 0xff, 0x4f, 0xff, 0x8b, 0x7f, 0x03, - 0x00, 0x00, 0xff, 0xff, 0x30, 0x18, 0x95, 0x9c, 0xd7, 0x10, 0x00, 0x00, + // 1337 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x58, 0xdd, 0x72, 0xdb, 0x44, + 0x14, 0x8e, 0x2d, 0xff, 0x1e, 0x27, 0xae, 0xbb, 0x4d, 0x13, 0xd5, 0x14, 0x26, 0x88, 0xa1, 0x75, + 0x0b, 0x75, 0x20, 0x70, 0xc3, 0x0c, 0xc3, 0x4c, 0xea, 0x86, 0xa4, 0x10, 0xd2, 0x19, 0xb9, 0x2d, + 0x33, 0xcc, 0x30, 0x1e, 0xc5, 0x5e, 0xb7, 0xa2, 0xb2, 0xd6, 0x68, 0x57, 0xa1, 0x79, 0x04, 0x2e, + 0x79, 0x07, 0xae, 0x79, 0x06, 0x6e, 0x79, 0x06, 0x5e, 0x86, 0xd9, 0x3f, 0x45, 0x2b, 0x4b, 0xae, + 0xc8, 0x4d, 0xac, 0xdd, 0x73, 0xf6, 0xfc, 0x7c, 0xdf, 0x9e, 0xb3, 0x67, 0x02, 0xfd, 0xd7, 0xde, + 0xd2, 0xdf, 0xa7, 0x38, 0xba, 0xf0, 0xa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 0x51, 0x01, + 0x5a, 0x79, 0x13, 0x5c, 0xff, 0x93, 0x52, 0xba, 0x89, 0xaf, 0x05, 0x74, 0xcd, 0x16, 0x87, 0x0a, + 0x0c, 0xe4, 0xbe, 0x4d, 0xfd, 0x4f, 0xcb, 0x29, 0x27, 0xee, 0x28, 0xf4, 0xb2, 0xfd, 0xa5, 0x88, + 0xc7, 0x82, 0x6e, 0x59, 0xc4, 0x63, 0x51, 0xdb, 0x72, 0x36, 0x90, 0x07, 0x70, 0xd5, 0x5e, 0xd0, + 0xfd, 0x42, 0x42, 0xcc, 0xae, 0xd4, 0x1f, 0xbc, 0x5b, 0x31, 0x71, 0xb1, 0x84, 0x1b, 0x99, 0x49, + 0x00, 0x15, 0x40, 0x93, 0x3f, 0x60, 0xf5, 0x1f, 0x95, 0xd4, 0xce, 0x24, 0xa5, 0x3a, 0xd6, 0x9a, + 0xa4, 0xcc, 0x76, 0xb8, 0x26, 0xa9, 0x4c, 0xf3, 0x73, 0x36, 0x90, 0x0f, 0x5d, 0x37, 0x0e, 0x95, + 0x6b, 0xde, 0x16, 0x50, 0xc1, 0xe9, 0xd5, 0x8e, 0xd7, 0x7f, 0x50, 0x42, 0xf3, 0xaa, 0xbe, 0x1f, + 0xc3, 0x4f, 0x2d, 0xad, 0x7a, 0xde, 0x10, 0xff, 0x39, 0xf8, 0xe2, 0xbf, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x20, 0xcd, 0x9e, 0x3a, 0x27, 0x11, 0x00, 0x00, } From 293fd7882112e414cf7cae02810aca516c7febb7 Mon Sep 17 00:00:00 2001 From: Yusuke KUOKA Date: Fri, 5 Apr 2019 20:50:27 +0900 Subject: [PATCH 149/327] feat: make tiller probeAddr configurable As many people have requested and discussed in #3159. The variable name are kept the same as before. Corresponding command-line flag is named, and description are written, after the existing flag for gRPC. The scope of this change is intentionally limited to the minimum. That is, I have not yet added `--probe=false`, because it shouldn't be a blocker if we can change the port number. Signed-off-by: Yusuke KUOKA --- cmd/tiller/tiller.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/tiller/tiller.go b/cmd/tiller/tiller.go index a1141b591..f3ba197b5 100644 --- a/cmd/tiller/tiller.go +++ b/cmd/tiller/tiller.go @@ -67,7 +67,6 @@ const ( storageConfigMap = "configmap" storageSecret = "secret" - probeAddr = ":44135" traceAddr = ":44136" // defaultMaxHistory sets the maximum number of releases to 0: unlimited @@ -76,6 +75,7 @@ const ( var ( grpcAddr = flag.String("listen", ":44134", "address:port to listen on") + probeAddr = flag.String("probe-listen", ":44135", "address:port to listen on for probes") enableTracing = flag.Bool("trace", false, "enable rpc tracing") store = flag.String("storage", storageConfigMap, "storage driver to use. One of 'configmap', 'memory', or 'secret'") remoteReleaseModules = flag.Bool("experimental-release", false, "enable experimental release modules") @@ -187,7 +187,7 @@ func start() { logger.Printf("Starting Tiller %s (tls=%t)", version.GetVersion(), *tlsEnable || *tlsVerify) logger.Printf("GRPC listening on %s", *grpcAddr) - logger.Printf("Probes listening on %s", probeAddr) + logger.Printf("Probes listening on %s", *probeAddr) logger.Printf("Storage driver is %s", env.Releases.Name()) logger.Printf("Max history per release is %d", *maxHistory) @@ -213,7 +213,7 @@ func start() { goprom.Register(rootServer) addPrometheusHandler(mux) - if err := http.ListenAndServe(probeAddr, mux); err != nil { + if err := http.ListenAndServe(*probeAddr, mux); err != nil { probeErrCh <- err } }() From a7d6820d53e057023846dc44a21ed3f20949e9f8 Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Sat, 9 Mar 2019 15:54:18 -0500 Subject: [PATCH 150/327] Add completion for helm status Signed-off-by: Marc Khouzam --- cmd/helm/helm.go | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/cmd/helm/helm.go b/cmd/helm/helm.go index b815568cb..656308d6d 100644 --- a/cmd/helm/helm.go +++ b/cmd/helm/helm.go @@ -39,6 +39,30 @@ import ( "k8s.io/helm/pkg/tlsutil" ) +const ( + bashCompletionFunc = ` +__helm_status_list() +{ + local out + if out=$(helm list -q 2>/dev/null); then + COMPREPLY=( $( compgen -W "${out[*]}" -- "$cur" ) ) + fi +} + +__helm_custom_func() +{ + case ${last_command} in + helm_status) + __helm_status_list + return + ;; + *) + ;; + esac +} +` +) + var ( tillerTunnel *kube.Tunnel settings helm_env.EnvSettings @@ -103,6 +127,7 @@ func newRootCmd(args []string) *cobra.Command { PersistentPostRun: func(*cobra.Command, []string) { teardown() }, + BashCompletionFunction: bashCompletionFunc, } flags := cmd.PersistentFlags() From 288fb869a2f41df2a74f69ef6e778e3ae379c29c Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Sat, 9 Mar 2019 17:31:43 -0500 Subject: [PATCH 151/327] Add completion for helm delete Signed-off-by: Marc Khouzam --- cmd/helm/helm.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/helm/helm.go b/cmd/helm/helm.go index 656308d6d..160fa8141 100644 --- a/cmd/helm/helm.go +++ b/cmd/helm/helm.go @@ -41,7 +41,7 @@ import ( const ( bashCompletionFunc = ` -__helm_status_list() +__helm_list_releases() { local out if out=$(helm list -q 2>/dev/null); then @@ -52,8 +52,8 @@ __helm_status_list() __helm_custom_func() { case ${last_command} in - helm_status) - __helm_status_list + helm_status | helm_delete) + __helm_list_releases return ;; *) From f25729f234ea3e7ed64e2cb90daaaf7c36e7eaf0 Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Sat, 9 Mar 2019 22:19:22 -0500 Subject: [PATCH 152/327] Add support for override flags in completion Signed-off-by: Marc Khouzam --- cmd/helm/helm.go | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/cmd/helm/helm.go b/cmd/helm/helm.go index 160fa8141..627f9c5dd 100644 --- a/cmd/helm/helm.go +++ b/cmd/helm/helm.go @@ -41,10 +41,38 @@ import ( const ( bashCompletionFunc = ` +__helm_override_flag_list=(--kubeconfig --kube-context --host --tiller-namespace) +__helm_override_flags() +{ + local ${__helm_override_flag_list[*]##*-} two_word_of of var + for w in "${words[@]}"; do + if [ -n "${two_word_of}" ]; then + eval "${two_word_of##*-}=\"${two_word_of}=\${w}\"" + two_word_of= + continue + fi + for of in "${__helm_override_flag_list[@]}"; do + case "${w}" in + ${of}=*) + eval "${of##*-}=\"${w}\"" + ;; + ${of}) + two_word_of="${of}" + ;; + esac + done + done + for var in "${__helm_override_flag_list[@]##*-}"; do + if eval "test -n \"\$${var}\""; then + eval "echo \${${var}}" + fi + done +} + __helm_list_releases() { local out - if out=$(helm list -q 2>/dev/null); then + if out=$(helm list $(__helm_override_flags) -q 2>/dev/null); then COMPREPLY=( $( compgen -W "${out[*]}" -- "$cur" ) ) fi } From d2ab3f5062467b66de8dc9728dd8c7509e8dcb07 Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Sat, 6 Apr 2019 12:31:37 -0400 Subject: [PATCH 153/327] Cannot have an = sign as an index Flags sometimes can be used with an = sign, such as --kube-context=prod. In this case, the variable ${flagname} retains the = sign as part of the flag name. However, in zsh completion, an = sign cannot be part of an index of the associative array 'flaghash' or else it causes an error. This commits strips the = sign out when using ${flagname} as an index. Note that this is not a big deal since flaghash is not actually used anywhere in Helm completion. I believe it is made available by the Cobra framework in case some completions choose to use it. Signed-off-by: Marc Khouzam --- cmd/helm/completion.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/helm/completion.go b/cmd/helm/completion.go index 039dcbe5f..53d1c21e5 100644 --- a/cmd/helm/completion.go +++ b/cmd/helm/completion.go @@ -213,6 +213,7 @@ __helm_convert_bash_to_zsh() { -e "s/${LWORD}declare${RWORD}/__helm_declare/g" \ -e "s/\\\$(type${RWORD}/\$(__helm_type/g" \ -e 's/aliashash\["\(.\{1,\}\)"\]/aliashash[\1]/g' \ + -e 's/flaghash\[${flagname/flaghash[${flagname%=/' \ -e 's/FUNCNAME/funcstack/g' \ <<'BASH_COMPLETION_EOF' ` From 2aa41559524f6d170a131eab251735b51fbc452c Mon Sep 17 00:00:00 2001 From: Kenta Iso Date: Sun, 7 Apr 2019 16:10:34 +0900 Subject: [PATCH 154/327] Fix 'THE INCLUDE FUNCTION' in 'Developing Templates' output Signed-off-by: Kenta Iso --- docs/chart_template_guide/named_templates.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/chart_template_guide/named_templates.md b/docs/chart_template_guide/named_templates.md index 08e41d58d..630b98c34 100644 --- a/docs/chart_template_guide/named_templates.md +++ b/docs/chart_template_guide/named_templates.md @@ -215,7 +215,7 @@ data: myvalue: "Hello World" drink: "coffee" food: "pizza" - app_name: mychart +app_name: mychart app_version: "0.1.0+1478129847" ``` From 6a33235fc8c59aa064c90f59a555ee09153506cd Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Sun, 7 Apr 2019 13:10:46 -0400 Subject: [PATCH 155/327] Also complete history and test with release name Signed-off-by: Marc Khouzam --- cmd/helm/helm.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/helm/helm.go b/cmd/helm/helm.go index 627f9c5dd..47719810d 100644 --- a/cmd/helm/helm.go +++ b/cmd/helm/helm.go @@ -80,7 +80,7 @@ __helm_list_releases() __helm_custom_func() { case ${last_command} in - helm_status | helm_delete) + helm_delete | helm_history | helm_status | helm_test) __helm_list_releases return ;; From ae48e53e29fcc4703cbe761de01dcf52ffc36a2a Mon Sep 17 00:00:00 2001 From: ialidzhikov Date: Mon, 8 Apr 2019 18:34:54 +0300 Subject: [PATCH 156/327] Update golang version Signed-off-by: ialidzhikov --- .circleci/config.yml | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7bba262a8..09d49fb89 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,7 +4,7 @@ jobs: working_directory: /go/src/k8s.io/helm parallelism: 3 docker: - - image: golang:1.12.1 + - image: golang:1.12.2 environment: PROJECT_NAME: "kubernetes-helm" steps: diff --git a/Makefile b/Makefile index 3584521a4..719fd5f03 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ DOCKER_REGISTRY ?= gcr.io IMAGE_PREFIX ?= kubernetes-helm -DEV_IMAGE ?= golang:1.12.1 +DEV_IMAGE ?= golang:1.12.2 SHORT_NAME ?= tiller SHORT_NAME_RUDDER ?= rudder TARGETS ?= darwin/amd64 linux/amd64 linux/386 linux/arm linux/arm64 linux/ppc64le linux/s390x windows/amd64 From cff2746e02a288857643aecf474faf4fd5873b72 Mon Sep 17 00:00:00 2001 From: Steven Sheehy Date: Fri, 5 Apr 2019 14:48:48 -0500 Subject: [PATCH 157/327] Add sub-command support to plugin downloader Signed-off-by: Steven Sheehy --- docs/plugins.md | 5 +++++ pkg/getter/plugingetter.go | 6 ++++-- pkg/getter/plugingetter_test.go | 27 +++++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/docs/plugins.md b/docs/plugins.md index 3087d1b39..5f5d163ce 100644 --- a/docs/plugins.md +++ b/docs/plugins.md @@ -144,6 +144,11 @@ The defined command will be invoked with the following scheme: repo definition, stored in `$HELM_HOME/repository/repositories.yaml`. Downloader plugin is expected to dump the raw content to stdout and report errors on stderr. +The downloader command also supports sub-commands or arguments, allowing you to specify +for example `bin/mydownloader subcommand -d` in the `plugin.yaml`. This is useful +if you want to use the same executable for the main plugin command and the downloader +command, but with a different sub-command for each. + ## Environment Variables When Helm executes a plugin, it passes the outer environment to the plugin, and diff --git a/pkg/getter/plugingetter.go b/pkg/getter/plugingetter.go index 8f2099de0..c918aa744 100644 --- a/pkg/getter/plugingetter.go +++ b/pkg/getter/plugingetter.go @@ -21,6 +21,7 @@ import ( "os" "os/exec" "path/filepath" + "strings" "k8s.io/helm/pkg/helm/environment" "k8s.io/helm/pkg/plugin" @@ -62,8 +63,9 @@ type pluginGetter struct { // Get runs downloader plugin command func (p *pluginGetter) Get(href string) (*bytes.Buffer, error) { - argv := []string{p.certFile, p.keyFile, p.cAFile, href} - prog := exec.Command(filepath.Join(p.base, p.command), argv...) + commands := strings.Split(p.command, " ") + argv := append(commands[1:], p.certFile, p.keyFile, p.cAFile, href) + prog := exec.Command(filepath.Join(p.base, commands[0]), argv...) plugin.SetupPluginEnv(p.settings, p.name, p.base) prog.Env = os.Environ() buf := bytes.NewBuffer(nil) diff --git a/pkg/getter/plugingetter_test.go b/pkg/getter/plugingetter_test.go index 7c0bd6c1e..c44729478 100644 --- a/pkg/getter/plugingetter_test.go +++ b/pkg/getter/plugingetter_test.go @@ -94,3 +94,30 @@ func TestPluginGetter(t *testing.T) { t.Errorf("Expected %q, got %q", expect, got) } } +func TestPluginSubCommands(t *testing.T) { + if runtime.GOOS == "windows" { + t.Skip("TODO: refactor this test to work on windows") + } + + oldhh := os.Getenv("HELM_HOME") + defer os.Setenv("HELM_HOME", oldhh) + os.Setenv("HELM_HOME", "") + + env := hh(false) + pg := newPluginGetter("echo -n", env, "test", ".") + g, err := pg("test://foo/bar", "", "", "") + if err != nil { + t.Fatal(err) + } + + data, err := g.Get("test://foo/bar") + if err != nil { + t.Fatal(err) + } + + expect := " test://foo/bar" + got := data.String() + if got != expect { + t.Errorf("Expected %q, got %q", expect, got) + } +} From b72265b4f3c539bf543eddfb7ef02c78a1fe8671 Mon Sep 17 00:00:00 2001 From: SataQiu Date: Tue, 9 Apr 2019 18:35:04 +0800 Subject: [PATCH 158/327] refactor: use const code block Signed-off-by: SataQiu --- cmd/helm/search/search.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/cmd/helm/search/search.go b/cmd/helm/search/search.go index 04acb8690..a9d0616e9 100644 --- a/cmd/helm/search/search.go +++ b/cmd/helm/search/search.go @@ -33,6 +33,12 @@ import ( "k8s.io/helm/pkg/repo" ) +const ( + sep = "\v" + // verSep is a separator for version fields in map keys. + verSep = "$$" +) + // Result is a search result. // // Score indicates how close it is to match. The higher the score, the longer @@ -49,16 +55,11 @@ type Index struct { charts map[string]*repo.ChartVersion } -const sep = "\v" - // NewIndex creats a new Index. func NewIndex() *Index { return &Index{lines: map[string]string{}, charts: map[string]*repo.ChartVersion{}} } -// verSep is a separator for version fields in map keys. -const verSep = "$$" - // AddRepo adds a repository index to the search index. func (i *Index) AddRepo(rname string, ind *repo.IndexFile, all bool) { ind.SortEntries() From 32d7f1a3fc226c1745a58b51e318b7362bc7a0bf Mon Sep 17 00:00:00 2001 From: Morten Torkildsen Date: Tue, 9 Apr 2019 17:37:51 -0700 Subject: [PATCH 159/327] fix(helm): Fix manifest validation Manifest validation is done by the builder, but it requires that the schema is set before the Stream function is called. Otherwise the StreamVisitor is created without a schema and no validation is done. Signed-off-by: Morten Torkildsen --- pkg/kube/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/kube/client.go b/pkg/kube/client.go index 4568dd34b..e1101667d 100644 --- a/pkg/kube/client.go +++ b/pkg/kube/client.go @@ -142,8 +142,8 @@ func (c *Client) BuildUnstructured(namespace string, reader io.Reader) (Result, ContinueOnError(). NamespaceParam(namespace). DefaultNamespace(). - Stream(reader, ""). Schema(c.validator()). + Stream(reader, ""). Flatten(). Do().Infos() return result, scrubValidationError(err) From f506db4b752c5901e13abab84cb431d0cb1937f4 Mon Sep 17 00:00:00 2001 From: Timofey Kirillov Date: Wed, 10 Apr 2019 17:08:14 +0300 Subject: [PATCH 160/327] Add --cleanup-on-fail support into --atomic: use CleanupOnFail param in rollback Signed-off-by: Timofey Kirillov --- cmd/helm/upgrade.go | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/cmd/helm/upgrade.go b/cmd/helm/upgrade.go index 2446f3eb5..f07a5c4a7 100644 --- a/cmd/helm/upgrade.go +++ b/cmd/helm/upgrade.go @@ -283,17 +283,18 @@ func (u *upgradeCmd) run() error { if u.atomic { fmt.Fprint(u.out, "ROLLING BACK") rollback := &rollbackCmd{ - out: u.out, - client: u.client, - name: u.release, - dryRun: u.dryRun, - recreate: u.recreate, - force: u.force, - timeout: u.timeout, - wait: u.wait, - description: "", - revision: releaseHistory.Releases[0].Version, - disableHooks: u.disableHooks, + out: u.out, + client: u.client, + name: u.release, + dryRun: u.dryRun, + recreate: u.recreate, + force: u.force, + timeout: u.timeout, + wait: u.wait, + description: "", + revision: releaseHistory.Releases[0].Version, + disableHooks: u.disableHooks, + cleanupOnFail: u.cleanupOnFail, } if err := rollback.run(); err != nil { return err From eb457460b14aa18d09ee57c4f971d93cd0352bc5 Mon Sep 17 00:00:00 2001 From: xichengliudui <1693291525@qq.com> Date: Wed, 10 Apr 2019 16:07:09 -0400 Subject: [PATCH 161/327] Using const() defines constants together Signed-off-by: xichengliudui <1693291525@qq.com> --- cmd/helm/inspect.go | 13 ++++++------- pkg/hooks/hooks.go | 16 ++++++++-------- pkg/lint/lint_test.go | 15 ++++++++------- pkg/lint/rules/template_test.go | 9 +++++---- 4 files changed, 27 insertions(+), 26 deletions(-) diff --git a/cmd/helm/inspect.go b/cmd/helm/inspect.go index 52e681e48..9330b900f 100644 --- a/cmd/helm/inspect.go +++ b/cmd/helm/inspect.go @@ -27,27 +27,26 @@ import ( "k8s.io/helm/pkg/chartutil" ) -const inspectDesc = ` +const ( + inspectDesc = ` This command inspects a chart and displays information. It takes a chart reference ('stable/drupal'), a full path to a directory or packaged chart, or a URL. Inspect prints the contents of the Chart.yaml file and the values.yaml file. ` - -const inspectValuesDesc = ` + inspectValuesDesc = ` This command inspects a chart (directory, file, or URL) and displays the contents of the values.yaml file ` - -const inspectChartDesc = ` + inspectChartDesc = ` This command inspects a chart (directory, file, or URL) and displays the contents of the Charts.yaml file ` - -const readmeChartDesc = ` + readmeChartDesc = ` This command inspects a chart (directory, file, or URL) and displays the contents of the README file ` +) type inspectCmd struct { chartpath string diff --git a/pkg/hooks/hooks.go b/pkg/hooks/hooks.go index 5083672cd..13a09b08b 100644 --- a/pkg/hooks/hooks.go +++ b/pkg/hooks/hooks.go @@ -20,14 +20,14 @@ import ( "k8s.io/helm/pkg/proto/hapi/release" ) -// HookAnno is the label name for a hook -const HookAnno = "helm.sh/hook" - -// HookWeightAnno is the label name for a hook weight -const HookWeightAnno = "helm.sh/hook-weight" - -// HookDeleteAnno is the label name for the delete policy for a hook -const HookDeleteAnno = "helm.sh/hook-delete-policy" +const ( + // HookAnno is the label name for a hook + HookAnno = "helm.sh/hook" + // HookWeightAnno is the label name for a hook weight + HookWeightAnno = "helm.sh/hook-weight" + // HookDeleteAnno is the label name for the delete policy for a hook + HookDeleteAnno = "helm.sh/hook-delete-policy" +) // Types of hooks const ( diff --git a/pkg/lint/lint_test.go b/pkg/lint/lint_test.go index 84dfbf508..8bf5a0927 100644 --- a/pkg/lint/lint_test.go +++ b/pkg/lint/lint_test.go @@ -26,13 +26,14 @@ import ( var values = []byte{} -const namespace = "testNamespace" -const strict = false - -const badChartDir = "rules/testdata/badchartfile" -const badValuesFileDir = "rules/testdata/badvaluesfile" -const badYamlFileDir = "rules/testdata/albatross" -const goodChartDir = "rules/testdata/goodone" +const ( + namespace = "testNamespace" + strict = false + badChartDir = "rules/testdata/badchartfile" + badValuesFileDir = "rules/testdata/badvaluesfile" + badYamlFileDir = "rules/testdata/albatross" + goodChartDir = "rules/testdata/goodone" +) func TestBadChart(t *testing.T) { m := All(badChartDir, values, namespace, strict).Messages diff --git a/pkg/lint/rules/template_test.go b/pkg/lint/rules/template_test.go index 41a7384e7..a294d3c57 100644 --- a/pkg/lint/rules/template_test.go +++ b/pkg/lint/rules/template_test.go @@ -25,7 +25,11 @@ import ( "k8s.io/helm/pkg/lint/support" ) -const templateTestBasedir = "./testdata/albatross" +const ( + strict = false + namespace = "testNamespace" + templateTestBasedir = "./testdata/albatross" +) func TestValidateAllowedExtension(t *testing.T) { var failTest = []string{"/foo", "/test.toml"} @@ -46,9 +50,6 @@ func TestValidateAllowedExtension(t *testing.T) { var values = []byte("nameOverride: ''\nhttpPort: 80") -const namespace = "testNamespace" -const strict = false - func TestTemplateParsing(t *testing.T) { linter := support.Linter{ChartDir: templateTestBasedir} Templates(&linter, values, namespace, strict) From 165e071d4a299f4dc4b84319b16eff057210ebd4 Mon Sep 17 00:00:00 2001 From: xichengliudui <1693291525@qq.com> Date: Thu, 11 Apr 2019 06:45:45 -0400 Subject: [PATCH 162/327] Using const() defines constants together (part:2) Signed-off-by: xichengliudui <1693291525@qq.com> update pull request Signed-off-by: xichengliudui <1693291525@qq.com> --- pkg/helm/fake_test.go | 6 ++++-- pkg/releasetesting/test_suite_test.go | 8 +++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/pkg/helm/fake_test.go b/pkg/helm/fake_test.go index ecb0a2855..4376742d7 100644 --- a/pkg/helm/fake_test.go +++ b/pkg/helm/fake_test.go @@ -26,7 +26,8 @@ import ( rls "k8s.io/helm/pkg/proto/hapi/services" ) -const cmInputTemplate = `kind: ConfigMap +const ( + cmInputTemplate = `kind: ConfigMap apiVersion: v1 metadata: name: example @@ -34,7 +35,7 @@ data: Release: {{.Release | toYaml | indent 4}} ` -const cmOutputTemplate = ` + cmOutputTemplate = ` --- # Source: installChart/templates/cm.yaml kind: ConfigMap @@ -53,6 +54,7 @@ data: seconds: 242085845 ` +) var installChart *chart.Chart diff --git a/pkg/releasetesting/test_suite_test.go b/pkg/releasetesting/test_suite_test.go index 59f122953..7b856ac39 100644 --- a/pkg/releasetesting/test_suite_test.go +++ b/pkg/releasetesting/test_suite_test.go @@ -37,7 +37,8 @@ import ( tillerEnv "k8s.io/helm/pkg/tiller/environment" ) -const manifestWithTestSuccessHook = ` +const ( + manifestWithTestSuccessHook = ` apiVersion: v1 kind: Pod metadata: @@ -51,7 +52,7 @@ spec: cmd: fake-command ` -const manifestWithTestFailureHook = ` + manifestWithTestFailureHook = ` apiVersion: v1 kind: Pod metadata: @@ -64,7 +65,7 @@ spec: image: fake-gold-finding-image cmd: fake-gold-finding-command ` -const manifestWithInstallHooks = `apiVersion: v1 + manifestWithInstallHooks = `apiVersion: v1 kind: ConfigMap metadata: name: test-cm @@ -73,6 +74,7 @@ metadata: data: name: value ` +) func TestNewTestSuite(t *testing.T) { rel := releaseStub() From 5edb79df4ce8ff2c59bc0b9ee7885c8fcb1a5a86 Mon Sep 17 00:00:00 2001 From: xichengliudui <1693291525@qq.com> Date: Thu, 11 Apr 2019 06:39:52 -0400 Subject: [PATCH 163/327] Using const() defines constants together (part:1) Signed-off-by: xichengliudui <1693291525@qq.com> update pull request Signed-off-by: xichengliudui <1693291525@qq.com> update pull request Signed-off-by: xichengliudui <1693291525@qq.com> --- pkg/kube/resource_policy.go | 20 +++++++++++--------- pkg/lint/rules/template_test.go | 9 +++++---- pkg/tiller/environment/environment.go | 10 ++++++---- pkg/tiller/release_server.go | 26 ++++++++++++++------------ 4 files changed, 36 insertions(+), 29 deletions(-) diff --git a/pkg/kube/resource_policy.go b/pkg/kube/resource_policy.go index 9bce63a7c..3029a22a5 100644 --- a/pkg/kube/resource_policy.go +++ b/pkg/kube/resource_policy.go @@ -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 diff --git a/pkg/lint/rules/template_test.go b/pkg/lint/rules/template_test.go index 41a7384e7..a294d3c57 100644 --- a/pkg/lint/rules/template_test.go +++ b/pkg/lint/rules/template_test.go @@ -25,7 +25,11 @@ import ( "k8s.io/helm/pkg/lint/support" ) -const templateTestBasedir = "./testdata/albatross" +const ( + strict = false + namespace = "testNamespace" + templateTestBasedir = "./testdata/albatross" +) func TestValidateAllowedExtension(t *testing.T) { var failTest = []string{"/foo", "/test.toml"} @@ -46,9 +50,6 @@ func TestValidateAllowedExtension(t *testing.T) { var values = []byte("nameOverride: ''\nhttpPort: 80") -const namespace = "testNamespace" -const strict = false - func TestTemplateParsing(t *testing.T) { linter := support.Linter{ChartDir: templateTestBasedir} Templates(&linter, values, namespace, strict) diff --git a/pkg/tiller/environment/environment.go b/pkg/tiller/environment/environment.go index 1325130ee..11860a249 100644 --- a/pkg/tiller/environment/environment.go +++ b/pkg/tiller/environment/environment.go @@ -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 diff --git a/pkg/tiller/release_server.go b/pkg/tiller/release_server.go index d32fd82f6..d3f69012f 100644 --- a/pkg/tiller/release_server.go +++ b/pkg/tiller/release_server.go @@ -40,18 +40,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. From 43c4378444995b45b1b6d5a8c6024e7cc652096f Mon Sep 17 00:00:00 2001 From: SataQiu Date: Fri, 12 Apr 2019 16:34:17 +0800 Subject: [PATCH 164/327] cleanup: using const block Signed-off-by: SataQiu --- cmd/helm/installer/options.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/helm/installer/options.go b/cmd/helm/installer/options.go index 186286ec2..00cadac07 100644 --- a/cmd/helm/installer/options.go +++ b/cmd/helm/installer/options.go @@ -24,7 +24,12 @@ import ( "k8s.io/helm/pkg/version" ) -const defaultImage = "gcr.io/kubernetes-helm/tiller" +const ( + defaultImage = "gcr.io/kubernetes-helm/tiller" + + fmtJSON OutputFormat = "json" + fmtYAML OutputFormat = "yaml" +) // Options control how to install Tiller into a cluster, upgrade, and uninstall Tiller from a cluster. type Options struct { @@ -154,11 +159,6 @@ func (f *OutputFormat) Type() string { return "OutputFormat" } -const ( - fmtJSON OutputFormat = "json" - fmtYAML OutputFormat = "yaml" -) - // Set validates and sets the value of the OutputFormat func (f *OutputFormat) Set(s string) error { for _, of := range []OutputFormat{fmtJSON, fmtYAML} { From 3b3406a20dafb3d151b49341cd993942bffa6386 Mon Sep 17 00:00:00 2001 From: dieutth Date: Tue, 16 Apr 2019 13:32:24 +0200 Subject: [PATCH 165/327] Update install.md *From Script* should be in the same level as other *Installing the Helm Client* options. Signed-off-by: Dieu Tran --- docs/install.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/install.md b/docs/install.md index b9626a43a..ab8268bcd 100755 --- a/docs/install.md +++ b/docs/install.md @@ -60,7 +60,7 @@ The binary can also be installed via [`scoop`](https://scoop.sh) command-line in scoop install helm ``` -## From Script +### From Script Helm now has an installer script that will automatically grab the latest version of the Helm client and [install it locally](https://raw.githubusercontent.com/helm/helm/master/scripts/get). From 9bc1f1c16e27f6bdc2d57ab66b7a6877d3137478 Mon Sep 17 00:00:00 2001 From: Adam Reese Date: Tue, 16 Apr 2019 12:59:49 -0700 Subject: [PATCH 166/327] chore(OWNERS): Add hickeyma to OWNERS Signed-off-by: Adam Reese --- OWNERS | 1 + 1 file changed, 1 insertion(+) diff --git a/OWNERS b/OWNERS index 39f8c8448..d1c2b4259 100644 --- a/OWNERS +++ b/OWNERS @@ -1,6 +1,7 @@ maintainers: - adamreese - bacongobbler + - hickeyma - jascott1 - mattfarina - michelleN From 26bce22e3bab0aef0c6ed4bbd94d0496628a7944 Mon Sep 17 00:00:00 2001 From: Tariq Ibrahim Date: Tue, 16 Apr 2019 15:42:16 -0700 Subject: [PATCH 167/327] chore: bump up the dependencies of kubernetes and prometheus client Signed-off-by: Tariq Ibrahim --- glide.lock | 23 +++++++++++++---------- glide.yaml | 14 +++++++------- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/glide.lock b/glide.lock index eedbd9381..5d4a6a9f8 100644 --- a/glide.lock +++ b/glide.lock @@ -1,5 +1,5 @@ -hash: 9a8f0b6c906f605bb879fbcdf0c122096f7698fe6a975ec4e6648f2ee85fce3e -updated: 2019-03-26T10:33:38.977361532-07:00 +hash: d92d7faee5c7ecbb241dadcd993e5dd8dfba226739d20d97fabf23168613f3ac +updated: 2019-04-16T15:32:58.609105-07:00 imports: - name: cloud.google.com/go version: 3b1ae45394a234c385be014e9a488f2bb6eef821 @@ -212,9 +212,10 @@ imports: - name: github.com/pkg/errors version: 645ef00459ed84a119197bfb8d8205042c6df63d - name: github.com/prometheus/client_golang - version: c5b7fccd204277076155f10851dad72b76a49317 + version: 505eaef017263e299324067d40ca2c48f6a2cf50 subpackages: - prometheus + - prometheus/internal - prometheus/promhttp - name: github.com/prometheus/client_model version: fa8ad6fec33561be4280a8f0514318c79d7f6cb6 @@ -376,7 +377,7 @@ imports: - name: gopkg.in/yaml.v2 version: 5420a8b6744d3b0345ab293f6fcba19c978f1183 - name: k8s.io/api - version: 40a48860b5abbba9aa891b02b32da429b08d96a0 + version: 6e4e0e4f393bf5e8bbff570acd13217aa5a770cd subpackages: - admission/v1beta1 - admissionregistration/v1beta1 @@ -417,11 +418,13 @@ imports: - storage/v1alpha1 - storage/v1beta1 - name: k8s.io/apiextensions-apiserver - version: 53c4693659ed354d76121458fb819202dd1635fa + version: 727a075fdec8319bf095330e344b3ccc668abc73 subpackages: + - pkg/apis/apiextensions + - pkg/apis/apiextensions/v1beta1 - pkg/features - name: k8s.io/apimachinery - version: d7deff9243b165ee192f5551710ea4285dcfd615 + version: 6a84e37a896db9780c75367af8d2ed2bb944022e subpackages: - pkg/api/equality - pkg/api/errors @@ -477,7 +480,7 @@ imports: - third_party/forked/golang/netutil - third_party/forked/golang/reflect - name: k8s.io/apiserver - version: 8b27c41bdbb11ff103caa673315e097bf0289171 + version: 1ec86e4da56ce0573788fc12bb3a5530600c0e5d subpackages: - pkg/authentication/authenticator - pkg/authentication/serviceaccount @@ -485,7 +488,7 @@ imports: - pkg/features - pkg/util/feature - name: k8s.io/cli-runtime - version: 2899ed30580fdbc8286718edb4382b529463099d + version: d644b00f3b79346b7627329269bb25f2135f941c subpackages: - pkg/genericclioptions - pkg/kustomize @@ -500,7 +503,7 @@ imports: - pkg/printers - pkg/resource - name: k8s.io/client-go - version: 6ee68ca5fd8355d024d02f9db0b3b667e8357a0f + version: 1a26190bd76a9017e289958b9fba936430aa3704 subpackages: - discovery - discovery/cached/disk @@ -644,7 +647,7 @@ imports: - pkg/util/proto/testing - pkg/util/proto/validation - name: k8s.io/kubernetes - version: b805719a99126e54bcbc0a3d9ee8a45cd7e85632 + version: 3c949c7d419670cd99fe92f60e6f4d251898bdf2 subpackages: - pkg/api/legacyscheme - pkg/api/service diff --git a/glide.yaml b/glide.yaml index 8600ed0ac..19024aecf 100644 --- a/glide.yaml +++ b/glide.yaml @@ -48,22 +48,22 @@ import: - package: github.com/BurntSushi/toml version: ~0.3.0 - package: github.com/prometheus/client_golang - version: 0.8.0 + version: 0.9.2 - package: github.com/grpc-ecosystem/go-grpc-prometheus - package: k8s.io/kubernetes version: release-1.14 - package: k8s.io/client-go - version: kubernetes-1.14.0 + version: kubernetes-1.14.1 - package: k8s.io/api - version: kubernetes-1.14.0 + version: kubernetes-1.14.1 - package: k8s.io/apimachinery - version: kubernetes-1.14.0 + version: kubernetes-1.14.1 - package: k8s.io/apiserver - version: kubernetes-1.14.0 + version: kubernetes-1.14.1 - package: k8s.io/cli-runtime - version: kubernetes-1.14.0 + version: kubernetes-1.14.1 - package: k8s.io/apiextensions-apiserver - version: kubernetes-1.14.0 + version: kubernetes-1.14.1 - package: github.com/cyphar/filepath-securejoin version: ^0.2.1 From bb4f1ebea1077a2572a65d942c5d40339b46aabb Mon Sep 17 00:00:00 2001 From: Matt Farina Date: Wed, 17 Apr 2019 09:48:11 -0400 Subject: [PATCH 168/327] Moving nebril to emeritus status due to inactivity Note, he has been emailed regarding the move including an offer to re-engage. He has not taken this up. The governance has a 3 months of inactivity clause that causes maintainers to fall off. This period has been long exceeded per metrics measured in devstats. Signed-off-by: Matt Farina --- OWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OWNERS b/OWNERS index d1c2b4259..df847ab37 100644 --- a/OWNERS +++ b/OWNERS @@ -5,7 +5,6 @@ maintainers: - jascott1 - mattfarina - michelleN - - nebril - prydonius - SlickNik - technosophos @@ -27,6 +26,7 @@ reviewers: - viglesiasce emeritus: - migmartri + - nebril - seh - vaikas-google - rimusz From e48a3be64af498c2a8891ca9244741f5ea1d26cc Mon Sep 17 00:00:00 2001 From: SataQiu Date: Thu, 18 Apr 2019 10:51:34 +0800 Subject: [PATCH 169/327] define port 44134 as a constant Signed-off-by: SataQiu --- cmd/helm/installer/install.go | 5 +++-- cmd/tiller/tiller.go | 2 +- pkg/helm/portforwarder/portforwarder.go | 4 ++-- pkg/tiller/environment/environment.go | 3 +++ 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/cmd/helm/installer/install.go b/cmd/helm/installer/install.go index d6d24eec4..04f9f9b19 100644 --- a/cmd/helm/installer/install.go +++ b/cmd/helm/installer/install.go @@ -36,6 +36,7 @@ import ( "k8s.io/helm/pkg/version" "k8s.io/helm/pkg/chartutil" + "k8s.io/helm/pkg/tiller/environment" ) // Install uses Kubernetes client to install Tiller. @@ -226,7 +227,7 @@ func generateDeployment(opts *Options) (*v1beta1.Deployment, error) { Image: opts.SelectImage(), ImagePullPolicy: opts.pullPolicy(), Ports: []v1.ContainerPort{ - {ContainerPort: 44134, Name: "tiller"}, + {ContainerPort: environment.DefaultTillerPort, Name: "tiller"}, {ContainerPort: 44135, Name: "http"}, }, Env: []v1.EnvVar{ @@ -341,7 +342,7 @@ func generateService(namespace string) *v1.Service { Ports: []v1.ServicePort{ { Name: "tiller", - Port: 44134, + Port: environment.DefaultTillerPort, TargetPort: intstr.FromString("tiller"), }, }, diff --git a/cmd/tiller/tiller.go b/cmd/tiller/tiller.go index f3ba197b5..f961d6871 100644 --- a/cmd/tiller/tiller.go +++ b/cmd/tiller/tiller.go @@ -74,7 +74,7 @@ const ( ) var ( - grpcAddr = flag.String("listen", ":44134", "address:port to listen on") + grpcAddr = flag.String("listen", fmt.Sprintf(":%v", environment.DefaultTillerPort), "address:port to listen on") probeAddr = flag.String("probe-listen", ":44135", "address:port to listen on for probes") enableTracing = flag.Bool("trace", false, "enable rpc tracing") store = flag.String("storage", storageConfigMap, "storage driver to use. One of 'configmap', 'memory', or 'secret'") diff --git a/pkg/helm/portforwarder/portforwarder.go b/pkg/helm/portforwarder/portforwarder.go index e962eef7f..0b04478f5 100644 --- a/pkg/helm/portforwarder/portforwarder.go +++ b/pkg/helm/portforwarder/portforwarder.go @@ -27,6 +27,7 @@ import ( "k8s.io/client-go/rest" "k8s.io/helm/pkg/kube" + "k8s.io/helm/pkg/tiller/environment" ) var ( @@ -39,8 +40,7 @@ func New(namespace string, client kubernetes.Interface, config *rest.Config) (*k if err != nil { return nil, err } - const tillerPort = 44134 - t := kube.NewTunnel(client.CoreV1().RESTClient(), config, namespace, podName, tillerPort) + t := kube.NewTunnel(client.CoreV1().RESTClient(), config, namespace, podName, environment.DefaultTillerPort) return t, t.ForwardPort() } diff --git a/pkg/tiller/environment/environment.go b/pkg/tiller/environment/environment.go index 28d4843a3..b237c53cc 100644 --- a/pkg/tiller/environment/environment.go +++ b/pkg/tiller/environment/environment.go @@ -41,6 +41,9 @@ const ( // DefaultTillerNamespace is the default namespace for Tiller. DefaultTillerNamespace = "kube-system" + // DefaultTillerPort defines the default port tiller listen on for client traffic + DefaultTillerPort = 44134 + // GoTplEngine is the name of the Go template engine, as registered in the EngineYard. GoTplEngine = "gotpl" ) From 06fbc720e775b1ec4fe8db47d98fc404fdbaad52 Mon Sep 17 00:00:00 2001 From: SataQiu Date: Thu, 18 Apr 2019 14:14:32 +0800 Subject: [PATCH 170/327] refactor: using tiller probe port constant Signed-off-by: SataQiu --- cmd/helm/installer/install.go | 6 +++--- cmd/tiller/tiller.go | 2 +- pkg/tiller/environment/environment.go | 3 +++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/cmd/helm/installer/install.go b/cmd/helm/installer/install.go index 04f9f9b19..5c3369c7d 100644 --- a/cmd/helm/installer/install.go +++ b/cmd/helm/installer/install.go @@ -228,7 +228,7 @@ func generateDeployment(opts *Options) (*v1beta1.Deployment, error) { ImagePullPolicy: opts.pullPolicy(), Ports: []v1.ContainerPort{ {ContainerPort: environment.DefaultTillerPort, Name: "tiller"}, - {ContainerPort: 44135, Name: "http"}, + {ContainerPort: environment.DefaultTillerProbePort, Name: "http"}, }, Env: []v1.EnvVar{ {Name: "TILLER_NAMESPACE", Value: opts.Namespace}, @@ -238,7 +238,7 @@ func generateDeployment(opts *Options) (*v1beta1.Deployment, error) { Handler: v1.Handler{ HTTPGet: &v1.HTTPGetAction{ Path: "/liveness", - Port: intstr.FromInt(44135), + Port: intstr.FromInt(environment.DefaultTillerProbePort), }, }, InitialDelaySeconds: 1, @@ -248,7 +248,7 @@ func generateDeployment(opts *Options) (*v1beta1.Deployment, error) { Handler: v1.Handler{ HTTPGet: &v1.HTTPGetAction{ Path: "/readiness", - Port: intstr.FromInt(44135), + Port: intstr.FromInt(environment.DefaultTillerProbePort), }, }, InitialDelaySeconds: 1, diff --git a/cmd/tiller/tiller.go b/cmd/tiller/tiller.go index f961d6871..ba26cc238 100644 --- a/cmd/tiller/tiller.go +++ b/cmd/tiller/tiller.go @@ -75,7 +75,7 @@ const ( var ( grpcAddr = flag.String("listen", fmt.Sprintf(":%v", environment.DefaultTillerPort), "address:port to listen on") - probeAddr = flag.String("probe-listen", ":44135", "address:port to listen on for probes") + probeAddr = flag.String("probe-listen", fmt.Sprintf(":%v", environment.DefaultTillerProbePort), "address:port to listen on for probes") enableTracing = flag.Bool("trace", false, "enable rpc tracing") store = flag.String("storage", storageConfigMap, "storage driver to use. One of 'configmap', 'memory', or 'secret'") remoteReleaseModules = flag.Bool("experimental-release", false, "enable experimental release modules") diff --git a/pkg/tiller/environment/environment.go b/pkg/tiller/environment/environment.go index b237c53cc..21c23d421 100644 --- a/pkg/tiller/environment/environment.go +++ b/pkg/tiller/environment/environment.go @@ -44,6 +44,9 @@ const ( // DefaultTillerPort defines the default port tiller listen on for client traffic DefaultTillerPort = 44134 + // DefaultTillerProbePort defines the default port to listen on for probes + DefaultTillerProbePort = 44135 + // GoTplEngine is the name of the Go template engine, as registered in the EngineYard. GoTplEngine = "gotpl" ) From d0f12eae210d20bd18723f88455fd44eb3fa2ffa Mon Sep 17 00:00:00 2001 From: Alan Carson Date: Fri, 19 Apr 2019 12:50:41 +0100 Subject: [PATCH 171/327] Added Cloudsmith to Additional Tools Hi! This PR adds a link to [Cloudsmith](https://cloudsmith.io), which is a package management service SaaS. It's commercial, but it's completely free for open-source and it has generous free tiers otherwise. It has first-class support for Helm (and many other package formats, such as npm, Docker etc), plus org/teams management, granular access controls, private repositories, repository-specific entitlements, a worldwide content distribution network, webhooks, access logs, etc. Thank you. :) Full disclosure: I work at Cloudsmith. \o/ Signed-off-by: Alan Carson --- docs/related.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/related.md b/docs/related.md index a8e494172..3f8c73d4a 100644 --- a/docs/related.md +++ b/docs/related.md @@ -68,6 +68,7 @@ Tools layered on top of Helm or Tiller. - [Armada](https://github.com/att-comdev/armada) - Manage prefixed releases throughout various Kubernetes namespaces, and removes completed jobs for complex deployments. Used by the [Openstack-Helm](https://github.com/openstack/openstack-helm) team. - [ChartMuseum](https://github.com/chartmuseum/chartmuseum) - Helm Chart Repository with support for Amazon S3 and Google Cloud Storage - [Chartify](https://github.com/appscode/chartify) - Generate Helm charts from existing Kubernetes resources. +- [Cloudsmith](https://cloudsmith.io/l/helm-repository/) - Fully managed SaaS offering private Helm Chart Repositories - [Codefresh](https://codefresh.io) - Kubernetes native CI/CD and management platform with UI dashboards for managing Helm charts and releases - [Cog](https://github.com/ohaiwalt/cog-helm) - Helm chart to deploy Cog on Kubernetes - [Drone.io Helm Plugin](http://plugins.drone.io/ipedrazas/drone-helm/) - Run Helm inside of the Drone CI/CD system From f602c2328d8de5b2f466f56a95d1b371ab2de3bf Mon Sep 17 00:00:00 2001 From: Evan Vetere Date: Fri, 19 Apr 2019 18:35:28 -0400 Subject: [PATCH 172/327] tone down the enthusiasm fix for unit tests Signed-off-by: Evan Vetere --- cmd/helm/init.go | 1 - cmd/helm/repo_update.go | 2 +- cmd/helm/rollback.go | 2 +- cmd/helm/rollback_test.go | 8 ++++---- cmd/helm/upgrade.go | 2 +- cmd/helm/upgrade_test.go | 20 ++++++++++---------- docs/charts.md | 2 +- docs/rbac.md | 1 - docs/using_helm.md | 2 +- pkg/downloader/manager.go | 2 +- 10 files changed, 20 insertions(+), 22 deletions(-) diff --git a/cmd/helm/init.go b/cmd/helm/init.go index 682189f84..145abdc87 100644 --- a/cmd/helm/init.go +++ b/cmd/helm/init.go @@ -310,7 +310,6 @@ func (i *initCmd) run() error { "$ helm init --tiller-image gcr.io/kubernetes-helm/tiller:v2.8.2\n\n") } - fmt.Fprintln(i.out, "Happy Helming!") return nil } diff --git a/cmd/helm/repo_update.go b/cmd/helm/repo_update.go index 2628b7f2f..592ad4b7d 100644 --- a/cmd/helm/repo_update.go +++ b/cmd/helm/repo_update.go @@ -125,6 +125,6 @@ func updateCharts(repos []*repo.ChartRepository, out io.Writer, home helmpath.Ho return errors.New("Update Failed. Check log for details") } - fmt.Fprintln(out, "Update Complete. ⎈ Happy Helming! ⎈") + fmt.Fprintln(out, "Update Complete.") return nil } diff --git a/cmd/helm/rollback.go b/cmd/helm/rollback.go index 4cffd43d5..95a2b2c8c 100644 --- a/cmd/helm/rollback.go +++ b/cmd/helm/rollback.go @@ -112,7 +112,7 @@ func (r *rollbackCmd) run() error { return prettyError(err) } - fmt.Fprintf(r.out, "Rollback was a success! Happy Helming!\n") + fmt.Fprintf(r.out, "Rollback was a success.\n") return nil } diff --git a/cmd/helm/rollback_test.go b/cmd/helm/rollback_test.go index a98a4096a..5d97dca4b 100644 --- a/cmd/helm/rollback_test.go +++ b/cmd/helm/rollback_test.go @@ -31,25 +31,25 @@ func TestRollbackCmd(t *testing.T) { { name: "rollback a release", args: []string{"funny-honey", "1"}, - expected: "Rollback was a success! Happy Helming!", + expected: "Rollback was a success.", }, { name: "rollback a release with timeout", args: []string{"funny-honey", "1"}, flags: []string{"--timeout", "120"}, - expected: "Rollback was a success! Happy Helming!", + expected: "Rollback was a success.", }, { name: "rollback a release with wait", args: []string{"funny-honey", "1"}, flags: []string{"--wait"}, - expected: "Rollback was a success! Happy Helming!", + expected: "Rollback was a success.", }, { name: "rollback a release with description", args: []string{"funny-honey", "1"}, flags: []string{"--description", "foo"}, - expected: "Rollback was a success! Happy Helming!", + expected: "Rollback was a success.", }, { name: "rollback a release without revision", diff --git a/cmd/helm/upgrade.go b/cmd/helm/upgrade.go index f07a5c4a7..683b1f54d 100644 --- a/cmd/helm/upgrade.go +++ b/cmd/helm/upgrade.go @@ -307,7 +307,7 @@ func (u *upgradeCmd) run() error { printRelease(u.out, resp.Release) } - fmt.Fprintf(u.out, "Release %q has been upgraded. Happy Helming!\n", u.release) + fmt.Fprintf(u.out, "Release %q has been upgraded.\n", u.release) // Print the status like status command does status, err := u.client.ReleaseStatus(u.release) diff --git a/cmd/helm/upgrade_test.go b/cmd/helm/upgrade_test.go index c2b1b4ea6..433f3bd2c 100644 --- a/cmd/helm/upgrade_test.go +++ b/cmd/helm/upgrade_test.go @@ -96,7 +96,7 @@ func TestUpgradeCmd(t *testing.T) { name: "upgrade a release", args: []string{"funny-bunny", chartPath}, resp: helm.ReleaseMock(&helm.MockReleaseOptions{Name: "funny-bunny", Version: 2, Chart: ch}), - expected: "Release \"funny-bunny\" has been upgraded. Happy Helming!\n", + expected: "Release \"funny-bunny\" has been upgraded.\n", rels: []*release.Release{helm.ReleaseMock(&helm.MockReleaseOptions{Name: "funny-bunny", Version: 2, Chart: ch})}, }, { @@ -104,7 +104,7 @@ func TestUpgradeCmd(t *testing.T) { args: []string{"funny-bunny", chartPath}, flags: []string{"--timeout", "120"}, resp: helm.ReleaseMock(&helm.MockReleaseOptions{Name: "funny-bunny", Version: 3, Chart: ch2}), - expected: "Release \"funny-bunny\" has been upgraded. Happy Helming!\n", + expected: "Release \"funny-bunny\" has been upgraded.\n", rels: []*release.Release{helm.ReleaseMock(&helm.MockReleaseOptions{Name: "funny-bunny", Version: 3, Chart: ch2})}, }, { @@ -112,7 +112,7 @@ func TestUpgradeCmd(t *testing.T) { args: []string{"funny-bunny", chartPath}, flags: []string{"--reset-values", "true"}, resp: helm.ReleaseMock(&helm.MockReleaseOptions{Name: "funny-bunny", Version: 4, Chart: ch2}), - expected: "Release \"funny-bunny\" has been upgraded. Happy Helming!\n", + expected: "Release \"funny-bunny\" has been upgraded.\n", rels: []*release.Release{helm.ReleaseMock(&helm.MockReleaseOptions{Name: "funny-bunny", Version: 4, Chart: ch2})}, }, { @@ -120,7 +120,7 @@ func TestUpgradeCmd(t *testing.T) { args: []string{"funny-bunny", chartPath}, flags: []string{"--reuse-values", "true"}, resp: helm.ReleaseMock(&helm.MockReleaseOptions{Name: "funny-bunny", Version: 5, Chart: ch2}), - expected: "Release \"funny-bunny\" has been upgraded. Happy Helming!\n", + expected: "Release \"funny-bunny\" has been upgraded.\n", rels: []*release.Release{helm.ReleaseMock(&helm.MockReleaseOptions{Name: "funny-bunny", Version: 5, Chart: ch2})}, }, { @@ -128,7 +128,7 @@ func TestUpgradeCmd(t *testing.T) { args: []string{"funny-bunny", chartPath}, flags: []string{"--atomic"}, resp: helm.ReleaseMock(&helm.MockReleaseOptions{Name: "funny-bunny", Version: 6, Chart: ch}), - expected: "Release \"funny-bunny\" has been upgraded. Happy Helming!\n", + expected: "Release \"funny-bunny\" has been upgraded.\n", rels: []*release.Release{helm.ReleaseMock(&helm.MockReleaseOptions{Name: "funny-bunny", Version: 6, Chart: ch})}, }, { @@ -136,7 +136,7 @@ func TestUpgradeCmd(t *testing.T) { args: []string{"zany-bunny", chartPath}, flags: []string{"-i"}, resp: helm.ReleaseMock(&helm.MockReleaseOptions{Name: "zany-bunny", Version: 1, Chart: ch}), - expected: "Release \"zany-bunny\" has been upgraded. Happy Helming!\n", + expected: "Release \"zany-bunny\" has been upgraded.\n", rels: []*release.Release{helm.ReleaseMock(&helm.MockReleaseOptions{Name: "zany-bunny", Version: 1, Chart: ch})}, }, { @@ -144,7 +144,7 @@ func TestUpgradeCmd(t *testing.T) { args: []string{"crazy-bunny", chartPath}, flags: []string{"-i", "--timeout", "120"}, resp: helm.ReleaseMock(&helm.MockReleaseOptions{Name: "crazy-bunny", Version: 1, Chart: ch}), - expected: "Release \"crazy-bunny\" has been upgraded. Happy Helming!\n", + expected: "Release \"crazy-bunny\" has been upgraded.\n", rels: []*release.Release{helm.ReleaseMock(&helm.MockReleaseOptions{Name: "crazy-bunny", Version: 1, Chart: ch})}, }, { @@ -152,7 +152,7 @@ func TestUpgradeCmd(t *testing.T) { args: []string{"crazy-bunny", chartPath}, flags: []string{"-i", "--description", "foo"}, resp: helm.ReleaseMock(&helm.MockReleaseOptions{Name: "crazy-bunny", Version: 1, Chart: ch, Description: "foo"}), - expected: "Release \"crazy-bunny\" has been upgraded. Happy Helming!\n", + expected: "Release \"crazy-bunny\" has been upgraded.\n", rels: []*release.Release{helm.ReleaseMock(&helm.MockReleaseOptions{Name: "crazy-bunny", Version: 1, Chart: ch, Description: "foo"})}, }, { @@ -160,7 +160,7 @@ func TestUpgradeCmd(t *testing.T) { args: []string{"crazy-bunny", chartPath}, flags: []string{"--wait"}, resp: helm.ReleaseMock(&helm.MockReleaseOptions{Name: "crazy-bunny", Version: 2, Chart: ch2}), - expected: "Release \"crazy-bunny\" has been upgraded. Happy Helming!\n", + expected: "Release \"crazy-bunny\" has been upgraded.\n", rels: []*release.Release{helm.ReleaseMock(&helm.MockReleaseOptions{Name: "crazy-bunny", Version: 2, Chart: ch2})}, }, { @@ -168,7 +168,7 @@ func TestUpgradeCmd(t *testing.T) { args: []string{"crazy-bunny", chartPath}, flags: []string{"--description", "foo"}, resp: helm.ReleaseMock(&helm.MockReleaseOptions{Name: "crazy-bunny", Version: 2, Chart: ch2}), - expected: "Release \"crazy-bunny\" has been upgraded. Happy Helming!\n", + expected: "Release \"crazy-bunny\" has been upgraded.\n", rels: []*release.Release{helm.ReleaseMock(&helm.MockReleaseOptions{Name: "crazy-bunny", Version: 2, Chart: ch2, Description: "foo"})}, }, { diff --git a/docs/charts.md b/docs/charts.md index 6137898c2..ed2e2f9eb 100644 --- a/docs/charts.md +++ b/docs/charts.md @@ -191,7 +191,7 @@ Hang tight while we grab the latest from your chart repositories... ...Successfully got an update from the "stable" chart repository ...Successfully got an update from the "example" chart repository ...Successfully got an update from the "another" chart repository -Update Complete. Happy Helming! +Update Complete. Saving 2 charts Downloading apache from repo http://example.com/charts Downloading mysql from repo http://another.example.com/charts diff --git a/docs/rbac.md b/docs/rbac.md index d53edda49..9d4531ffe 100644 --- a/docs/rbac.md +++ b/docs/rbac.md @@ -106,7 +106,6 @@ $ helm init --service-account tiller --tiller-namespace tiller-world $HELM_HOME has been configured at /Users/awesome-user/.helm. Tiller (the Helm server side component) has been installed into your Kubernetes Cluster. -Happy Helming! $ helm install nginx --tiller-namespace tiller-world --namespace tiller-world NAME: wayfaring-yak diff --git a/docs/using_helm.md b/docs/using_helm.md index faf3cc20f..ad693472e 100755 --- a/docs/using_helm.md +++ b/docs/using_helm.md @@ -359,7 +359,7 @@ update things that have changed since the last release. ```console $ helm upgrade -f panda.yaml happy-panda stable/mariadb Fetched stable/mariadb-0.3.0.tgz to /Users/mattbutcher/Code/Go/src/k8s.io/helm/mariadb-0.3.0.tgz -happy-panda has been upgraded. Happy Helming! +happy-panda has been upgraded. Last Deployed: Wed Sep 28 12:47:54 2016 Namespace: default Status: DEPLOYED diff --git a/pkg/downloader/manager.go b/pkg/downloader/manager.go index 372940880..970bd9546 100644 --- a/pkg/downloader/manager.go +++ b/pkg/downloader/manager.go @@ -465,7 +465,7 @@ func (m *Manager) parallelRepoUpdate(repos []*repo.Entry) error { }(r) } wg.Wait() - fmt.Fprintln(out, "Update Complete. ⎈Happy Helming!⎈") + fmt.Fprintln(out, "Update Complete.") return nil } From 3df75ec1d908f3c36da1b0e0c2c825eba6ffadac Mon Sep 17 00:00:00 2001 From: Scott Rigby Date: Fri, 19 Apr 2019 19:33:05 -0400 Subject: [PATCH 173/327] Improve getting LoadBalancer address in NOTES.txt See https://github.com/helm/charts/issues/84 Signed-off-by: Scott Rigby --- pkg/chartutil/create.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/chartutil/create.go b/pkg/chartutil/create.go index 9af4b8f45..736dc31b3 100644 --- a/pkg/chartutil/create.go +++ b/pkg/chartutil/create.go @@ -256,7 +256,7 @@ const defaultNotes = `1. Get the application URL by running these commands: {{- else if contains "LoadBalancer" .Values.service.type }} NOTE: It may take a few minutes for the LoadBalancer IP to be available. You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include ".fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include ".fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include ".fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") echo http://$SERVICE_IP:{{ .Values.service.port }} {{- else if contains "ClusterIP" .Values.service.type }} export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include ".name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") From 290a9fca18de9defeb3bff9e728bb1f603a8269a Mon Sep 17 00:00:00 2001 From: Panic Stevenson Date: Sat, 20 Apr 2019 18:22:21 -0500 Subject: [PATCH 174/327] Update hapi.version Description in Protobuf README Signed-off-by: Panic Stevenson --- _proto/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_proto/README.md b/_proto/README.md index 7704572eb..f43c1e11e 100644 --- a/_proto/README.md +++ b/_proto/README.md @@ -7,4 +7,4 @@ Packages - `hapi.release` Information about installed charts (Releases) such as metadata about when they were installed, their status, and how they were configured. - `hapi.services.rudder` Definition for the ReleaseModuleService used by Tiller to manipulate releases on a given node - `hapi.services.tiller` Definition of the ReleaseService provided by Tiller and used by Helm clients to manipulate releases cluster wide. - - `hapi.version` Version meta-data used by tiller to express it's version + - `hapi.version` Version metadata used by Tiller to express its version From a602d70842e63f761e13777095b89edb163367e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Lafarge?= Date: Wed, 27 Feb 2019 14:30:12 +0100 Subject: [PATCH 175/327] [storage] Add an SQL storage driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commits adds the possibility to back Tiller (or the future Tiller-less Helm CLI) with any SQL database (only postgres has been tested so far) to store release information. The main motivation for this commit was to use a storage backend that would allow releases larger that 1MB in size (ConfigMap or Secret drivers don't, because of limits on value size in the underlying etcd key-value store). Signed-off-by: Étienne Lafarge Co-authored-by: Elliot Maincourt (@emaincourt) Co-authored-by: Paul Borensztein (@commit-master) --- cmd/tiller/tiller.go | 40 +++- docs/install.md | 34 +++- docs/sql-storage.md | 89 +++++++++ glide.lock | 16 ++ glide.yaml | 19 +- pkg/storage/driver/mock_test.go | 16 ++ pkg/storage/driver/sql.go | 322 ++++++++++++++++++++++++++++++ pkg/storage/driver/sql_test.go | 344 ++++++++++++++++++++++++++++++++ 8 files changed, 858 insertions(+), 22 deletions(-) create mode 100644 docs/sql-storage.md create mode 100644 pkg/storage/driver/sql.go create mode 100644 pkg/storage/driver/sql_test.go diff --git a/cmd/tiller/tiller.go b/cmd/tiller/tiller.go index ba26cc238..a2ef2764b 100644 --- a/cmd/tiller/tiller.go +++ b/cmd/tiller/tiller.go @@ -66,6 +66,7 @@ const ( storageMemory = "memory" storageConfigMap = "configmap" storageSecret = "secret" + storageSQL = "sql" traceAddr = ":44136" @@ -74,18 +75,23 @@ const ( ) var ( - grpcAddr = flag.String("listen", fmt.Sprintf(":%v", environment.DefaultTillerPort), "address:port to listen on") - probeAddr = flag.String("probe-listen", fmt.Sprintf(":%v", environment.DefaultTillerProbePort), "address:port to listen on for probes") - enableTracing = flag.Bool("trace", false, "enable rpc tracing") - store = flag.String("storage", storageConfigMap, "storage driver to use. One of 'configmap', 'memory', or 'secret'") + grpcAddr = flag.String("listen", fmt.Sprintf(":%v", environment.DefaultTillerPort), "address:port to listen on") + probeAddr = flag.String("probe-listen", fmt.Sprintf(":%v", environment.DefaultTillerProbePort), "address:port to listen on for probes") + enableTracing = flag.Bool("trace", false, "enable rpc tracing") + store = flag.String("storage", storageConfigMap, "storage driver to use. One of 'configmap', 'memory', 'sql' or 'secret'") + + sqlDialect = flag.String("sql-dialect", "postgres", "SQL dialect to use (only postgres is supported for now") + sqlConnectionString = flag.String("sql-connection-string", "", "SQL connection string to use") + remoteReleaseModules = flag.Bool("experimental-release", false, "enable experimental release modules") - tlsEnable = flag.Bool("tls", tlsEnableEnvVarDefault(), "enable TLS") - tlsVerify = flag.Bool("tls-verify", tlsVerifyEnvVarDefault(), "enable TLS and verify remote certificate") - keyFile = flag.String("tls-key", tlsDefaultsFromEnv("tls-key"), "path to TLS private key file") - certFile = flag.String("tls-cert", tlsDefaultsFromEnv("tls-cert"), "path to TLS certificate file") - caCertFile = flag.String("tls-ca-cert", tlsDefaultsFromEnv("tls-ca-cert"), "trust certificates signed by this CA") - maxHistory = flag.Int("history-max", historyMaxFromEnv(), "maximum number of releases kept in release history, with 0 meaning no limit") - printVersion = flag.Bool("version", false, "print the version number") + + tlsEnable = flag.Bool("tls", tlsEnableEnvVarDefault(), "enable TLS") + tlsVerify = flag.Bool("tls-verify", tlsVerifyEnvVarDefault(), "enable TLS and verify remote certificate") + keyFile = flag.String("tls-key", tlsDefaultsFromEnv("tls-key"), "path to TLS private key file") + certFile = flag.String("tls-cert", tlsDefaultsFromEnv("tls-cert"), "path to TLS certificate file") + caCertFile = flag.String("tls-ca-cert", tlsDefaultsFromEnv("tls-ca-cert"), "trust certificates signed by this CA") + maxHistory = flag.Int("history-max", historyMaxFromEnv(), "maximum number of releases kept in release history, with 0 meaning no limit") + printVersion = flag.Bool("version", false, "print the version number") // rootServer is the root gRPC server. // @@ -143,6 +149,18 @@ func start() { env.Releases = storage.Init(secrets) env.Releases.Log = newLogger("storage").Printf + case storageSQL: + sqlDriver, err := driver.NewSQL( + *sqlDialect, + *sqlConnectionString, + newLogger("storage/driver").Printf, + ) + if err != nil { + logger.Fatalf("Cannot initialize SQL storage driver: %v", err) + } + + env.Releases = storage.Init(sqlDriver) + env.Releases.Log = newLogger("storage").Printf } if *maxHistory > 0 { diff --git a/docs/install.md b/docs/install.md index ab8268bcd..9a3bc33f0 100755 --- a/docs/install.md +++ b/docs/install.md @@ -353,10 +353,13 @@ in JSON format. ### Storage backends By default, `tiller` stores release information in `ConfigMaps` in the namespace -where it is running. As of Helm 2.7.0, there is now a beta storage backend that +where it is running. + +#### Secret storage backend +As of Helm 2.7.0, there is now a beta storage backend that uses `Secrets` for storing release information. This was added for additional -security in protecting charts in conjunction with the release of `Secret` -encryption in Kubernetes. +security in protecting charts in conjunction with the release of `Secret` +encryption in Kubernetes. To enable the secrets backend, you'll need to init Tiller with the following options: @@ -369,6 +372,31 @@ Currently, if you want to switch from the default backend to the secrets backend, you'll have to do the migration for this on your own. When this backend graduates from beta, there will be a more official path of migration +#### SQL storage backend +As of Helm 2.14.0 there is now a beta SQL storage backend that stores release +information in an SQL database (only postgres has been tested so far). + +Using such a storage backend is particularly useful if your release information +weighs more than 1MB (in which case, it can't be stored in ConfigMaps/Secrets +because of internal limits in Kubernetes' underlying etcd key-value store). + +To enable the SQL backend, you'll need to [deploy an SQL +database](./sql-storage.md) and init Tiller with the following options: + +```shell +helm init \ + --override \ + 'spec.template.spec.containers[0].args'='{--storage=sql,--sql-dialect=postgres,--sql-connection-string=postgresql://tiller-postgres:5432/helm?user=helm&password=changemeforgodssake&sslmode=disable}' +``` + +**PRODUCTION NOTES**: it's recommended to change the username and password of +the SQL database in production deployments. Enabling SSL is also a good idea. +Last, but not least, perform regular backups/snapshots of your SQL database. + +Currently, if you want to switch from the default backend to the SQL backend, +you'll have to do the migration for this on your own. When this backend +graduates from beta, there will be a more official migration path. + ## Conclusion In most cases, installation is as simple as getting a pre-built `helm` binary diff --git a/docs/sql-storage.md b/docs/sql-storage.md new file mode 100644 index 000000000..19f7a5eb1 --- /dev/null +++ b/docs/sql-storage.md @@ -0,0 +1,89 @@ +# Store release information in an SQL database + +You may be willing to store release information in an SQL database - in +particular, if your releases weigh more than 1MB and therefore [can't be stored in ConfigMaps or Secrets](https://github.com/helm/helm/issues/1413). + +We recommend using [PostgreSQL](https://www.postgresql.org/). + +This document describes how to deploy `postgres` atop Kubernetes. This being +said, using an out-of-cluster (managed or not) PostreSQL instance is totally +possible as well. + +Here's a Kubernetes manifest you can apply to get a minimal PostreSQL pod +running on your Kubernetes cluster. **Don't forget to change the credentials +and, optionally, enable TLS in production deployments**. + +```yaml +apiVersion: v1 +kind: Service +metadata: + name: tiller-postgres + namespace: kube-system +spec: + ports: + - port: 5432 + selector: + app: helm + name: postgres +--- +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: tiller-postgres + namespace: kube-system +spec: + serviceName: tiller-postgres + selector: + matchLabels: + app: helm + name: postgres + replicas: 1 + template: + metadata: + labels: + app: helm + name: postgres + spec: + containers: + - name: postgres + image: postgres:11-alpine + imagePullPolicy: Always + ports: + - containerPort: 5432 + env: + - name: POSTGRES_DB + value: helm + - name: POSTGRES_USER + value: helm + - name: POSTGRES_PASSWORD + value: changemeforgodssake + - name: PGDATA + value: /var/lib/postgresql/data/pgdata + resources: + limits: + memory: 128Mi + requests: + cpu: 50m + memory: 128Mi + volumeMounts: + - mountPath: /var/lib/postgresql/data + name: tiller-postgres-data + volumeClaimTemplates: + - metadata: + name: tiller-postgres-data + spec: + accessModes: ["ReadWriteOnce"] + storageClassName: default + resources: + requests: + storage: 5Gi +``` + +Once postgres is deployed, you'll need to install Tiller using `helm init`, with +a few custom CLI flags: + +```shell +helm init \ + --override \ + 'spec.template.spec.containers[0].args'='{--storage=sql,--sql-dialect=postgres,--sql-connection-string=postgresql://tiller-postgres:5432/helm?user=helm&password=changemeforgodssake&sslmode=disable}' +``` diff --git a/glide.lock b/glide.lock index 5d4a6a9f8..1a1649e80 100644 --- a/glide.lock +++ b/glide.lock @@ -173,10 +173,18 @@ imports: version: 9316a62528ac99aaecb4e47eadd6dc8aa6533d58 - name: github.com/inconshreveable/mousetrap version: 76626ae9c91c4f2a10f34cad8ce83ea42c93bb75 +- name: github.com/jmoiron/sqlx + version: d161d7a76b5661016ad0b085869f77fd410f3e6a + subpackages: + - reflectx - name: github.com/json-iterator/go version: ab8a2e0c74be9d3be70b3184d9acc634935ded82 - name: github.com/liggitt/tabwriter version: 89fcab3d43de07060e4fd4c1547430ed57e87f24 +- name: github.com/lib/pq + version: 88edab0803230a3898347e77b474f8c1820a1f20 + subpackages: + - oid - name: github.com/mailru/easyjson version: 2f5df55504ebc322e4d52d34df6a1f5b503bf26d subpackages: @@ -235,6 +243,10 @@ imports: version: 8a290539e2e8629dbc4e6bad948158f790ec31f4 - name: github.com/PuerkitoBio/urlesc version: 5bd2802263f21d8788851d5305584c82a5c75d7e +- name: github.com/rubenv/sql-migrate + version: 1007f53448d75fe14190968f5de4d95ed63ebb83 + subpackages: + - sqlparse - name: github.com/russross/blackfriday version: 300106c228d52c8941d4b3de6054a6062a86dda3 - name: github.com/shurcooL/sanitized_anchor_name @@ -366,6 +378,8 @@ imports: - stats - status - tap +- name: gopkg.in/gorp.v1 + version: 6a667da9c028871f98598d85413e3fc4c6daa52e - name: gopkg.in/inf.v0 version: 3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4 - name: gopkg.in/square/go-jose.v2 @@ -807,6 +821,8 @@ imports: subpackages: - sortorder testImports: +- name: github.com/DATA-DOG/go-sqlmock + version: 472e287dbafe67e526a3797165b64cb14f34705a - name: github.com/pmezard/go-difflib version: 5d4384ee4fb2527b0a1256a821ebfc92f91efefc subpackages: diff --git a/glide.yaml b/glide.yaml index 19024aecf..5e6026077 100644 --- a/glide.yaml +++ b/glide.yaml @@ -2,11 +2,10 @@ package: k8s.io/helm import: - package: golang.org/x/net subpackages: - - context + - context - package: golang.org/x/sync subpackages: - semaphore - # This is temporary and can probably be removed the next time gRPC is updated - package: golang.org/x/sys version: b90733256f2e882e81d52f9126de08df5615afd9 subpackages: @@ -17,7 +16,6 @@ import: - package: github.com/spf13/pflag version: ~1.0.1 - package: github.com/Masterminds/vcs - # Pin version of mergo that is compatible with both sprig and Kubernetes - package: github.com/imdario/mergo version: v0.3.5 - package: github.com/Masterminds/sprig @@ -30,9 +28,9 @@ import: - package: github.com/golang/protobuf version: 1.2.0 subpackages: - - proto - - ptypes/any - - ptypes/timestamp + - proto + - ptypes/any + - ptypes/timestamp - package: google.golang.org/grpc version: 1.18.0 - package: github.com/gosuri/uitable @@ -40,8 +38,8 @@ import: version: ^4.0.0 - package: golang.org/x/crypto subpackages: - - openpgp - - ssh/terminal + - openpgp + - ssh/terminal - package: github.com/gobwas/glob version: ^0.2.1 - package: github.com/evanphx/json-patch @@ -66,9 +64,14 @@ import: version: kubernetes-1.14.1 - package: github.com/cyphar/filepath-securejoin version: ^0.2.1 + - package: github.com/jmoiron/sqlx + version: ^1.2.0 + - package: github.com/rubenv/sql-migrate testImports: - package: github.com/stretchr/testify version: ^1.1.4 subpackages: - assert + - package: github.com/DATA-DOG/go-sqlmock + version: ^1.3.2 diff --git a/pkg/storage/driver/mock_test.go b/pkg/storage/driver/mock_test.go index 363d9dd5d..d012aaafe 100644 --- a/pkg/storage/driver/mock_test.go +++ b/pkg/storage/driver/mock_test.go @@ -20,6 +20,8 @@ import ( "fmt" "testing" + sqlmock "github.com/DATA-DOG/go-sqlmock" + "github.com/jmoiron/sqlx" "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -221,3 +223,17 @@ func (mock *MockSecretsInterface) Delete(name string, opts *metav1.DeleteOptions delete(mock.objects, name) return nil } + +// newTestFixtureSQL mocks the SQL database (for testing purposes) +func newTestFixtureSQL(t *testing.T, releases ...*rspb.Release) (*SQL, sqlmock.Sqlmock) { + sqlDB, mock, err := sqlmock.New() + if err != nil { + t.Fatalf("error when opening stub database connection: %v", err) + } + + sqlxDB := sqlx.NewDb(sqlDB, "sqlmock") + return &SQL{ + db: sqlxDB, + Log: func(_ string, _ ...interface{}) {}, + }, mock +} diff --git a/pkg/storage/driver/sql.go b/pkg/storage/driver/sql.go new file mode 100644 index 000000000..3b3438577 --- /dev/null +++ b/pkg/storage/driver/sql.go @@ -0,0 +1,322 @@ +/* +Copyright The Helm Authors. + +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 driver + +import ( + "fmt" + "sort" + "strings" + "time" + + "github.com/jmoiron/sqlx" + migrate "github.com/rubenv/sql-migrate" + + // Import pq for potgres dialect + _ "github.com/lib/pq" + + rspb "k8s.io/helm/pkg/proto/hapi/release" + storageerrors "k8s.io/helm/pkg/storage/errors" +) + +var _ Driver = (*SQL)(nil) + +var labelMap = map[string]string{ + "MODIFIED_AT": "modified_at", + "CREATED_AT": "created_at", + "VERSION": "version", + "STATUS": "status", + "OWNER": "owner", + "NAME": "name", +} + +// SQLDriverName is the string name of this driver. +const SQLDriverName = "SQL" + +// SQL is the sql storage driver implementation. +type SQL struct { + db *sqlx.DB + Log func(string, ...interface{}) +} + +// Name returns the name of the driver. +func (s *SQL) Name() string { + return SQLDriverName +} + +func (s *SQL) ensureDBSetup() error { + // Populate the database with the relations we need if they don't exist yet + migrations := &migrate.MemoryMigrationSource{ + Migrations: []*migrate.Migration{ + { + Id: "init", + Up: []string{ + ` + CREATE TABLE releases ( + key VARCHAR(67) PRIMARY KEY, + body TEXT NOT NULL, + + name VARCHAR(64) NOT NULL, + version INTEGER NOT NULL, + status TEXT NOT NULL, + owner TEXT NOT NULL, + created_at INTEGER NOT NULL, + modified_at INTEGER NOT NULL DEFAULT 0 + ); + + CREATE INDEX ON releases (key); + CREATE INDEX ON releases (version); + CREATE INDEX ON releases (status); + CREATE INDEX ON releases (owner); + CREATE INDEX ON releases (created_at); + CREATE INDEX ON releases (modified_at); + `, + }, + Down: []string{ + ` + DROP TABLE releases; + `, + }, + }, + }, + } + + _, err := migrate.Exec(s.db.DB, "postgres", migrations, migrate.Up) + return err +} + +// Release describes a Helm release +type Release struct { + Key string `db:"key"` + Body string `db:"body"` + + Name string `db:"name"` + Version int `db:"version"` + Status string `db:"status"` + Owner string `db:"owner"` + CreatedAt int `db:"created_at"` + ModifiedAt int `db:"modified_at"` +} + +// NewSQL initializes a new memory driver. +func NewSQL(dialect, connectionString string, logger func(string, ...interface{})) (*SQL, error) { + db, err := sqlx.Connect(dialect, connectionString) + if err != nil { + return nil, err + } + + driver := &SQL{ + db: db, + Log: logger, + } + + if err := driver.ensureDBSetup(); err != nil { + return nil, err + } + + return driver, nil +} + +// Get returns the release named by key. +func (s *SQL) Get(key string) (*rspb.Release, error) { + var record Release + // Get will return an error if the result is empty + err := s.db.Get(&record, "SELECT body FROM releases WHERE key = $1", key) + if err != nil { + s.Log("got SQL error when getting release %s: %v", key, err) + return nil, storageerrors.ErrReleaseNotFound(key) + } + + release, err := decodeRelease(record.Body) + if err != nil { + s.Log("get: failed to decode data %q: %v", key, err) + return nil, err + } + + return release, nil +} + +// List returns the list of all releases such that filter(release) == true +func (s *SQL) List(filter func(*rspb.Release) bool) ([]*rspb.Release, error) { + var records = []Release{} + if err := s.db.Select(&records, "SELECT body FROM releases WHERE owner = 'TILLER'"); err != nil { + s.Log("list: failed to list: %v", err) + return nil, err + } + + var releases []*rspb.Release + for _, record := range records { + release, err := decodeRelease(record.Body) + if err != nil { + s.Log("list: failed to decode release: %v: %v", record, err) + continue + } + if filter(release) { + releases = append(releases, release) + } + } + + return releases, nil +} + +// Query returns the set of releases that match the provided set of labels. +func (s *SQL) Query(labels map[string]string) ([]*rspb.Release, error) { + var sqlFilterKeys []string + sqlFilter := map[string]interface{}{} + for key, val := range labels { + // Build a slice of where filters e.g + // labels = map[string]string{ "foo": "foo", "bar": "bar" } + // []string{ "foo=?", "bar=?" } + if dbField, ok := labelMap[key]; ok { + sqlFilterKeys = append(sqlFilterKeys, strings.Join([]string{dbField, "=:", dbField}, "")) + sqlFilter[dbField] = val + } else { + s.Log("unknown label %s", key) + return nil, fmt.Errorf("unknow label %s", key) + } + } + sort.Strings(sqlFilterKeys) + + // Build our query + query := strings.Join([]string{ + "SELECT body FROM releases", + "WHERE", + strings.Join(sqlFilterKeys, " AND "), + }, " ") + + rows, err := s.db.NamedQuery(query, sqlFilter) + if err != nil { + s.Log("failed to query with labels: %v", err) + return nil, err + } + + var releases []*rspb.Release + for rows.Next() { + var record Release + if err = rows.StructScan(&record); err != nil { + s.Log("failed to scan record %q: %v", record, err) + return nil, err + } + + release, err := decodeRelease(record.Body) + if err != nil { + s.Log("failed to decode release: %v", err) + continue + } + releases = append(releases, release) + } + + if len(releases) == 0 { + return nil, storageerrors.ErrReleaseNotFound(labels["NAME"]) + } + + return releases, nil +} + +// Create creates a new release. +func (s *SQL) Create(key string, rls *rspb.Release) error { + body, err := encodeRelease(rls) + if err != nil { + s.Log("failed to encode release: %v", err) + return err + } + + transaction, err := s.db.Beginx() + if err != nil { + s.Log("failed to start SQL transaction: %v", err) + return fmt.Errorf("error beginning transaction: %v", err) + } + + if _, err := transaction.NamedExec("INSERT INTO releases (key, body, name, version, status, owner, created_at) VALUES (:key, :body, :name, :version, :status, :owner, :created_at)", + &Release{ + Key: key, + Body: body, + + Name: rls.Name, + Version: int(rls.Version), + Status: rspb.Status_Code_name[int32(rls.Info.Status.Code)], + Owner: "TILLER", + CreatedAt: int(time.Now().Unix()), + }, + ); err != nil { + defer transaction.Rollback() + var record Release + if err := transaction.Get(&record, "SELECT key FROM releases WHERE key = ?", key); err == nil { + s.Log("release %s already exists", key) + return storageerrors.ErrReleaseExists(key) + } + + s.Log("failed to store release %s in SQL database: %v", key, err) + return err + } + defer transaction.Commit() + + return nil +} + +// Update updates a release. +func (s *SQL) Update(key string, rls *rspb.Release) error { + body, err := encodeRelease(rls) + if err != nil { + s.Log("failed to encode release: %v", err) + return err + } + + if _, err := s.db.NamedExec("UPDATE releases SET body=:body, name=:name, version=:version, status=:status, owner=:owner, modified_at=:modified_at WHERE key=:key", + &Release{ + Key: key, + Body: body, + + Name: rls.Name, + Version: int(rls.Version), + Status: rspb.Status_Code_name[int32(rls.Info.Status.Code)], + Owner: "TILLER", + ModifiedAt: int(time.Now().Unix()), + }, + ); err != nil { + s.Log("failed to update release %s in SQL database: %v", key, err) + return err + } + + return nil +} + +// Delete deletes a release or returns ErrReleaseNotFound. +func (s *SQL) Delete(key string) (*rspb.Release, error) { + transaction, err := s.db.Beginx() + if err != nil { + s.Log("failed to start SQL transaction: %v", err) + return nil, fmt.Errorf("error beginning transaction: %v", err) + } + + var record Release + err = transaction.Get(&record, "SELECT body FROM releases WHERE key = $1", key) + if err != nil { + s.Log("release %s not found: %v", key, err) + return nil, storageerrors.ErrReleaseNotFound(key) + } + + release, err := decodeRelease(record.Body) + if err != nil { + s.Log("failed to decode release %s: %v", key, err) + transaction.Rollback() + return nil, err + } + defer transaction.Commit() + + _, err = transaction.Exec("DELETE FROM releases WHERE key = $1", key) + return release, err +} diff --git a/pkg/storage/driver/sql_test.go b/pkg/storage/driver/sql_test.go new file mode 100644 index 000000000..4d669c1b5 --- /dev/null +++ b/pkg/storage/driver/sql_test.go @@ -0,0 +1,344 @@ +/* +Copyright The Helm Authors. + +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 driver + +import ( + "fmt" + "reflect" + "regexp" + "testing" + "time" + + sqlmock "github.com/DATA-DOG/go-sqlmock" + rspb "k8s.io/helm/pkg/proto/hapi/release" +) + +func TestSQLName(t *testing.T) { + sqlDriver, _ := newTestFixtureSQL(t) + if sqlDriver.Name() != SQLDriverName { + t.Errorf("Expected name to be %q, got %q", SQLDriverName, sqlDriver.Name()) + } +} + +func TestSQLGet(t *testing.T) { + vers := int32(1) + name := "smug-pigeon" + namespace := "default" + key := testKey(name, vers) + rel := releaseStub(name, vers, namespace, rspb.Status_DEPLOYED) + + body, _ := encodeRelease(rel) + + sqlDriver, mock := newTestFixtureSQL(t) + mock. + ExpectQuery("SELECT body FROM releases WHERE key = ?"). + WithArgs(key). + WillReturnRows( + mock.NewRows([]string{ + "body", + }).AddRow( + body, + ), + ).RowsWillBeClosed() + + got, err := sqlDriver.Get(key) + if err != nil { + t.Fatalf("Failed to get release: %v", err) + } + + if !reflect.DeepEqual(rel, got) { + t.Errorf("Expected release {%q}, got {%q}", rel, got) + } + + if err := mock.ExpectationsWereMet(); err != nil { + t.Errorf("sql expectations weren't met: %v", err) + } +} + +func TestSQLList(t *testing.T) { + body1, _ := encodeRelease(releaseStub("key-1", 1, "default", rspb.Status_DELETED)) + body2, _ := encodeRelease(releaseStub("key-2", 1, "default", rspb.Status_DELETED)) + body3, _ := encodeRelease(releaseStub("key-3", 1, "default", rspb.Status_DEPLOYED)) + body4, _ := encodeRelease(releaseStub("key-4", 1, "default", rspb.Status_DEPLOYED)) + body5, _ := encodeRelease(releaseStub("key-5", 1, "default", rspb.Status_SUPERSEDED)) + body6, _ := encodeRelease(releaseStub("key-6", 1, "default", rspb.Status_SUPERSEDED)) + + sqlDriver, mock := newTestFixtureSQL(t) + + for i := 0; i < 3; i++ { + mock. + ExpectQuery("SELECT body FROM releases WHERE owner = 'TILLER'"). + WillReturnRows( + mock.NewRows([]string{ + "body", + }). + AddRow(body1). + AddRow(body2). + AddRow(body3). + AddRow(body4). + AddRow(body5). + AddRow(body6), + ).RowsWillBeClosed() + } + + // list all deleted releases + del, err := sqlDriver.List(func(rel *rspb.Release) bool { + return rel.Info.Status.Code == rspb.Status_DELETED + }) + // check + if err != nil { + t.Errorf("Failed to list deleted: %v", err) + } + if len(del) != 2 { + t.Errorf("Expected 2 deleted, got %d:\n%v\n", len(del), del) + } + + // list all deployed releases + dpl, err := sqlDriver.List(func(rel *rspb.Release) bool { + return rel.Info.Status.Code == rspb.Status_DEPLOYED + }) + // check + if err != nil { + t.Errorf("Failed to list deployed: %v", err) + } + if len(dpl) != 2 { + t.Errorf("Expected 2 deployed, got %d:\n%v\n", len(dpl), dpl) + } + + // list all superseded releases + ssd, err := sqlDriver.List(func(rel *rspb.Release) bool { + return rel.Info.Status.Code == rspb.Status_SUPERSEDED + }) + // check + if err != nil { + t.Errorf("Failed to list superseded: %v", err) + } + if len(ssd) != 2 { + t.Errorf("Expected 2 superseded, got %d:\n%v\n", len(ssd), ssd) + } + + if err := mock.ExpectationsWereMet(); err != nil { + t.Errorf("sql expectations weren't met: %v", err) + } +} + +func TestSqlCreate(t *testing.T) { + vers := int32(1) + name := "smug-pigeon" + namespace := "default" + key := testKey(name, vers) + rel := releaseStub(name, vers, namespace, rspb.Status_DEPLOYED) + + sqlDriver, mock := newTestFixtureSQL(t) + body, _ := encodeRelease(rel) + + mock.ExpectBegin() + mock. + ExpectExec(regexp.QuoteMeta("INSERT INTO releases (key, body, name, version, status, owner, created_at) VALUES (?, ?, ?, ?, ?, ?, ?)")). + WithArgs(key, body, rel.Name, int(rel.Version), rspb.Status_Code_name[int32(rel.Info.Status.Code)], "TILLER", int(time.Now().Unix())). + WillReturnResult(sqlmock.NewResult(1, 1)) + mock.ExpectCommit() + + if err := sqlDriver.Create(key, rel); err != nil { + t.Fatalf("failed to create release with key %q: %v", key, err) + } + + if err := mock.ExpectationsWereMet(); err != nil { + t.Errorf("sql expectations weren't met: %v", err) + } +} + +func TestSqlCreateAlreadyExists(t *testing.T) { + vers := int32(1) + name := "smug-pigeon" + namespace := "default" + key := testKey(name, vers) + rel := releaseStub(name, vers, namespace, rspb.Status_DEPLOYED) + + sqlDriver, mock := newTestFixtureSQL(t) + body, _ := encodeRelease(rel) + + // Insert fails (primary key already exists) + mock.ExpectBegin() + mock. + ExpectExec(regexp.QuoteMeta("INSERT INTO releases (key, body, name, version, status, owner, created_at) VALUES (?, ?, ?, ?, ?, ?, ?)")). + WithArgs(key, body, rel.Name, int(rel.Version), rspb.Status_Code_name[int32(rel.Info.Status.Code)], "TILLER", int(time.Now().Unix())). + WillReturnError(fmt.Errorf("dialect dependent SQL error")) + + // Let's check that we do make sure the error is due to a release already existing + mock. + ExpectQuery(regexp.QuoteMeta("SELECT key FROM releases WHERE key = ?")). + WithArgs(key). + WillReturnRows( + mock.NewRows([]string{ + "body", + }).AddRow( + body, + ), + ).RowsWillBeClosed() + mock.ExpectRollback() + + if err := sqlDriver.Create(key, rel); err == nil { + t.Fatalf("failed to create release with key %q: %v", key, err) + } + + if err := mock.ExpectationsWereMet(); err != nil { + t.Errorf("sql expectations weren't met: %v", err) + } +} + +func TestSqlUpdate(t *testing.T) { + vers := int32(1) + name := "smug-pigeon" + namespace := "default" + key := testKey(name, vers) + rel := releaseStub(name, vers, namespace, rspb.Status_DEPLOYED) + + sqlDriver, mock := newTestFixtureSQL(t) + body, _ := encodeRelease(rel) + + mock. + ExpectExec(regexp.QuoteMeta("UPDATE releases SET body=?, name=?, version=?, status=?, owner=?, modified_at=? WHERE key=?")). + WithArgs(body, rel.Name, int(rel.Version), rspb.Status_Code_name[int32(rel.Info.Status.Code)], "TILLER", int(time.Now().Unix()), key). + WillReturnResult(sqlmock.NewResult(0, 1)) + + if err := sqlDriver.Update(key, rel); err != nil { + t.Fatalf("failed to update release with key %q: %v", key, err) + } + + if err := mock.ExpectationsWereMet(); err != nil { + t.Errorf("sql expectations weren't met: %v", err) + } +} + +func TestSqlQuery(t *testing.T) { + // Reflect actual use cases in ../storage.go + labelSetDeployed := map[string]string{ + "NAME": "smug-pigeon", + "OWNER": "TILLER", + "STATUS": "DEPLOYED", + } + labelSetAll := map[string]string{ + "NAME": "smug-pigeon", + "OWNER": "TILLER", + } + + supersededRelease := releaseStub("smug-pigeon", 1, "default", rspb.Status_SUPERSEDED) + supersededReleaseBody, _ := encodeRelease(supersededRelease) + deployedRelease := releaseStub("smug-pigeon", 2, "default", rspb.Status_DEPLOYED) + deployedReleaseBody, _ := encodeRelease(deployedRelease) + + // Let's actually start our test + sqlDriver, mock := newTestFixtureSQL(t) + + mock. + ExpectQuery(regexp.QuoteMeta("SELECT body FROM releases WHERE name=? AND owner=? AND status=?")). + WithArgs("smug-pigeon", "TILLER", "DEPLOYED"). + WillReturnRows( + mock.NewRows([]string{ + "body", + }).AddRow( + deployedReleaseBody, + ), + ).RowsWillBeClosed() + + mock. + ExpectQuery(regexp.QuoteMeta("SELECT body FROM releases WHERE name=? AND owner=?")). + WithArgs("smug-pigeon", "TILLER"). + WillReturnRows( + mock.NewRows([]string{ + "body", + }).AddRow( + supersededReleaseBody, + ).AddRow( + deployedReleaseBody, + ), + ).RowsWillBeClosed() + + results, err := sqlDriver.Query(labelSetDeployed) + if err != nil { + t.Fatalf("failed to query for deployed smug-pigeon release: %v", err) + } + + for _, res := range results { + if !reflect.DeepEqual(res, deployedRelease) { + t.Errorf("Expected release {%q}, got {%q}", deployedRelease, res) + } + } + + results, err = sqlDriver.Query(labelSetAll) + if err != nil { + t.Fatalf("failed to query release history for smug-pigeon: %v", err) + } + + if len(results) != 2 { + t.Errorf("expected a resultset of size 2, got %d", len(results)) + } + + for _, res := range results { + if !reflect.DeepEqual(res, deployedRelease) && !reflect.DeepEqual(res, supersededRelease) { + t.Errorf("Expected release {%q} or {%q}, got {%q}", deployedRelease, supersededRelease, res) + } + } + + if err := mock.ExpectationsWereMet(); err != nil { + t.Errorf("sql expectations weren't met: %v", err) + } +} + +func TestSqlDelete(t *testing.T) { + vers := int32(1) + name := "smug-pigeon" + namespace := "default" + key := testKey(name, vers) + rel := releaseStub(name, vers, namespace, rspb.Status_DEPLOYED) + + body, _ := encodeRelease(rel) + + sqlDriver, mock := newTestFixtureSQL(t) + + mock.ExpectBegin() + mock. + ExpectQuery("SELECT body FROM releases WHERE key = ?"). + WithArgs(key). + WillReturnRows( + mock.NewRows([]string{ + "body", + }).AddRow( + body, + ), + ).RowsWillBeClosed() + + mock. + ExpectExec(regexp.QuoteMeta("DELETE FROM releases WHERE key = $1")). + WithArgs(key). + WillReturnResult(sqlmock.NewResult(0, 1)) + mock.ExpectCommit() + + deletedRelease, err := sqlDriver.Delete(key) + if err != nil { + t.Fatalf("failed to delete release with key %q: %v", key, err) + } + + if !reflect.DeepEqual(rel, deletedRelease) { + t.Errorf("Expected release {%q}, got {%q}", rel, deletedRelease) + } + + if err := mock.ExpectationsWereMet(); err != nil { + t.Errorf("sql expectations weren't met: %v", err) + } +} From 6c396880ade35ac6c47149bf2159e929de737423 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Lafarge?= Date: Sat, 2 Mar 2019 11:56:40 +0100 Subject: [PATCH 176/327] [pr-review] Lighten docs & validate SQL dialect MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Étienne Lafarge --- docs/install.md | 6 +-- docs/sql-storage.md | 89 --------------------------------------- pkg/storage/driver/sql.go | 8 ++++ 3 files changed, 11 insertions(+), 92 deletions(-) delete mode 100644 docs/sql-storage.md diff --git a/docs/install.md b/docs/install.md index 9a3bc33f0..db6539995 100755 --- a/docs/install.md +++ b/docs/install.md @@ -380,13 +380,13 @@ Using such a storage backend is particularly useful if your release information weighs more than 1MB (in which case, it can't be stored in ConfigMaps/Secrets because of internal limits in Kubernetes' underlying etcd key-value store). -To enable the SQL backend, you'll need to [deploy an SQL -database](./sql-storage.md) and init Tiller with the following options: +To enable the SQL backend, you'll need to deploy a SQL database and init Tiller +with the following options: ```shell helm init \ --override \ - 'spec.template.spec.containers[0].args'='{--storage=sql,--sql-dialect=postgres,--sql-connection-string=postgresql://tiller-postgres:5432/helm?user=helm&password=changemeforgodssake&sslmode=disable}' + 'spec.template.spec.containers[0].args'='{--storage=sql,--sql-dialect=postgres,--sql-connection-string=postgresql://tiller-postgres:5432/helm?user=helm&password=changeme}' ``` **PRODUCTION NOTES**: it's recommended to change the username and password of diff --git a/docs/sql-storage.md b/docs/sql-storage.md deleted file mode 100644 index 19f7a5eb1..000000000 --- a/docs/sql-storage.md +++ /dev/null @@ -1,89 +0,0 @@ -# Store release information in an SQL database - -You may be willing to store release information in an SQL database - in -particular, if your releases weigh more than 1MB and therefore [can't be stored in ConfigMaps or Secrets](https://github.com/helm/helm/issues/1413). - -We recommend using [PostgreSQL](https://www.postgresql.org/). - -This document describes how to deploy `postgres` atop Kubernetes. This being -said, using an out-of-cluster (managed or not) PostreSQL instance is totally -possible as well. - -Here's a Kubernetes manifest you can apply to get a minimal PostreSQL pod -running on your Kubernetes cluster. **Don't forget to change the credentials -and, optionally, enable TLS in production deployments**. - -```yaml -apiVersion: v1 -kind: Service -metadata: - name: tiller-postgres - namespace: kube-system -spec: - ports: - - port: 5432 - selector: - app: helm - name: postgres ---- -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: tiller-postgres - namespace: kube-system -spec: - serviceName: tiller-postgres - selector: - matchLabels: - app: helm - name: postgres - replicas: 1 - template: - metadata: - labels: - app: helm - name: postgres - spec: - containers: - - name: postgres - image: postgres:11-alpine - imagePullPolicy: Always - ports: - - containerPort: 5432 - env: - - name: POSTGRES_DB - value: helm - - name: POSTGRES_USER - value: helm - - name: POSTGRES_PASSWORD - value: changemeforgodssake - - name: PGDATA - value: /var/lib/postgresql/data/pgdata - resources: - limits: - memory: 128Mi - requests: - cpu: 50m - memory: 128Mi - volumeMounts: - - mountPath: /var/lib/postgresql/data - name: tiller-postgres-data - volumeClaimTemplates: - - metadata: - name: tiller-postgres-data - spec: - accessModes: ["ReadWriteOnce"] - storageClassName: default - resources: - requests: - storage: 5Gi -``` - -Once postgres is deployed, you'll need to install Tiller using `helm init`, with -a few custom CLI flags: - -```shell -helm init \ - --override \ - 'spec.template.spec.containers[0].args'='{--storage=sql,--sql-dialect=postgres,--sql-connection-string=postgresql://tiller-postgres:5432/helm?user=helm&password=changemeforgodssake&sslmode=disable}' -``` diff --git a/pkg/storage/driver/sql.go b/pkg/storage/driver/sql.go index 3b3438577..7849f84b4 100644 --- a/pkg/storage/driver/sql.go +++ b/pkg/storage/driver/sql.go @@ -43,6 +43,10 @@ var labelMap = map[string]string{ "NAME": "name", } +var supportedSQLDialects = map[string]struct{}{ + "postgres": struct{}{}, +} + // SQLDriverName is the string name of this driver. const SQLDriverName = "SQL" @@ -113,6 +117,10 @@ type Release struct { // NewSQL initializes a new memory driver. func NewSQL(dialect, connectionString string, logger func(string, ...interface{})) (*SQL, error) { + if _, ok := supportedSQLDialects[dialect]; !ok { + return nil, fmt.Errorf("%s dialect isn't supported, only \"postgres\" is available for now", dialect) + } + db, err := sqlx.Connect(dialect, connectionString) if err != nil { return nil, err From 13e82d2039a9d69978fa80135e3c76ae734a821a Mon Sep 17 00:00:00 2001 From: Elliot Maincourt Date: Mon, 4 Mar 2019 18:14:41 +0100 Subject: [PATCH 177/327] Clarify our SQL Release binding struct naming and purpose Signed-off-by: Elliot Maincourt --- pkg/storage/driver/sql.go | 68 +++++++++++++++++++++------------------ 1 file changed, 37 insertions(+), 31 deletions(-) diff --git a/pkg/storage/driver/sql.go b/pkg/storage/driver/sql.go index 7849f84b4..d3d49ee22 100644 --- a/pkg/storage/driver/sql.go +++ b/pkg/storage/driver/sql.go @@ -69,30 +69,30 @@ func (s *SQL) ensureDBSetup() error { Id: "init", Up: []string{ ` - CREATE TABLE releases ( - key VARCHAR(67) PRIMARY KEY, - body TEXT NOT NULL, - - name VARCHAR(64) NOT NULL, - version INTEGER NOT NULL, - status TEXT NOT NULL, - owner TEXT NOT NULL, - created_at INTEGER NOT NULL, - modified_at INTEGER NOT NULL DEFAULT 0 - ); - - CREATE INDEX ON releases (key); - CREATE INDEX ON releases (version); - CREATE INDEX ON releases (status); - CREATE INDEX ON releases (owner); - CREATE INDEX ON releases (created_at); - CREATE INDEX ON releases (modified_at); - `, + CREATE TABLE releases ( + key VARCHAR(67) PRIMARY KEY, + body TEXT NOT NULL, + + name VARCHAR(64) NOT NULL, + version INTEGER NOT NULL, + status TEXT NOT NULL, + owner TEXT NOT NULL, + created_at INTEGER NOT NULL, + modified_at INTEGER NOT NULL DEFAULT 0 + ); + + CREATE INDEX ON releases (key); + CREATE INDEX ON releases (version); + CREATE INDEX ON releases (status); + CREATE INDEX ON releases (owner); + CREATE INDEX ON releases (created_at); + CREATE INDEX ON releases (modified_at); + `, }, Down: []string{ ` - DROP TABLE releases; - `, + DROP TABLE releases; + `, }, }, }, @@ -102,11 +102,17 @@ func (s *SQL) ensureDBSetup() error { return err } -// Release describes a Helm release -type Release struct { - Key string `db:"key"` +// SQLReleaseWrapper describes how Helm releases are stored in an SQL database +type SQLReleaseWrapper struct { + // The primary key, made of {release-name}.{release-version} + Key string `db:"key"` + + // The rspb.Release body, as a base64-encoded string Body string `db:"body"` + // Release "labels" that can be used as filters in the storage.Query(labels map[string]string) + // we implemented. Note that allowing Helm users to filter against new dimensions will require a + // new migration to be added, and the Create and/or update functions to be updated accordingly. Name string `db:"name"` Version int `db:"version"` Status string `db:"status"` @@ -140,7 +146,7 @@ func NewSQL(dialect, connectionString string, logger func(string, ...interface{} // Get returns the release named by key. func (s *SQL) Get(key string) (*rspb.Release, error) { - var record Release + var record SQLReleaseWrapper // Get will return an error if the result is empty err := s.db.Get(&record, "SELECT body FROM releases WHERE key = $1", key) if err != nil { @@ -159,7 +165,7 @@ func (s *SQL) Get(key string) (*rspb.Release, error) { // List returns the list of all releases such that filter(release) == true func (s *SQL) List(filter func(*rspb.Release) bool) ([]*rspb.Release, error) { - var records = []Release{} + var records = []SQLReleaseWrapper{} if err := s.db.Select(&records, "SELECT body FROM releases WHERE owner = 'TILLER'"); err != nil { s.Log("list: failed to list: %v", err) return nil, err @@ -213,7 +219,7 @@ func (s *SQL) Query(labels map[string]string) ([]*rspb.Release, error) { var releases []*rspb.Release for rows.Next() { - var record Release + var record SQLReleaseWrapper if err = rows.StructScan(&record); err != nil { s.Log("failed to scan record %q: %v", record, err) return nil, err @@ -249,7 +255,7 @@ func (s *SQL) Create(key string, rls *rspb.Release) error { } if _, err := transaction.NamedExec("INSERT INTO releases (key, body, name, version, status, owner, created_at) VALUES (:key, :body, :name, :version, :status, :owner, :created_at)", - &Release{ + &SQLReleaseWrapper{ Key: key, Body: body, @@ -261,7 +267,7 @@ func (s *SQL) Create(key string, rls *rspb.Release) error { }, ); err != nil { defer transaction.Rollback() - var record Release + var record SQLReleaseWrapper if err := transaction.Get(&record, "SELECT key FROM releases WHERE key = ?", key); err == nil { s.Log("release %s already exists", key) return storageerrors.ErrReleaseExists(key) @@ -284,7 +290,7 @@ func (s *SQL) Update(key string, rls *rspb.Release) error { } if _, err := s.db.NamedExec("UPDATE releases SET body=:body, name=:name, version=:version, status=:status, owner=:owner, modified_at=:modified_at WHERE key=:key", - &Release{ + &SQLReleaseWrapper{ Key: key, Body: body, @@ -310,7 +316,7 @@ func (s *SQL) Delete(key string) (*rspb.Release, error) { return nil, fmt.Errorf("error beginning transaction: %v", err) } - var record Release + var record SQLReleaseWrapper err = transaction.Get(&record, "SELECT body FROM releases WHERE key = $1", key) if err != nil { s.Log("release %s not found: %v", key, err) From f4052821c9b89eac9412f1f77b0242879d0400d8 Mon Sep 17 00:00:00 2001 From: Elliot Maincourt Date: Tue, 5 Mar 2019 12:17:32 +0100 Subject: [PATCH 178/327] Fix formatting issue Signed-off-by: Elliot Maincourt --- pkg/storage/driver/sql.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/storage/driver/sql.go b/pkg/storage/driver/sql.go index d3d49ee22..46bcccc32 100644 --- a/pkg/storage/driver/sql.go +++ b/pkg/storage/driver/sql.go @@ -44,7 +44,7 @@ var labelMap = map[string]string{ } var supportedSQLDialects = map[string]struct{}{ - "postgres": struct{}{}, + "postgres": {}, } // SQLDriverName is the string name of this driver. From 8bc521fd545fc2d43742ba1e602e8ee9165517e2 Mon Sep 17 00:00:00 2001 From: Duffie Cooley Date: Fri, 19 Apr 2019 16:27:34 -0700 Subject: [PATCH 179/327] Updating to use git.io short url I've added an alias to git.io the github url shortening service from git.io/get_helm.sh -> https://raw.githubusercontent.com/helm/helm/master/scripts/get Like this: ``` $ curl -i https://git.io/ -F url=https://raw.githubusercontent.com/helm/helm/master/scripts/get -F code=get_helm.sh HTTP/1.1 201 Created Server: Cowboy Connection: keep-alive Date: Fri, 19 Apr 2019 23:20:39 GMT Status: 201 Created Content-Type: text/html;charset=utf-8 Location: https://git.io/get_helm.sh Content-Length: 62 X-Xss-Protection: 1; mode=block X-Content-Type-Options: nosniff X-Frame-Options: SAMEORIGIN X-Runtime: 0.008310 X-Node: f065811c-e0e8-4384-bf09-9d9d28586c4d X-Revision: 392798d237fc1aa5cd55cada10d2945773e741a8 Strict-Transport-Security: max-age=31536000; includeSubDomains Via: 1.1 vegur ``` I think it's a little easier to remember and use. There is also no way to overwrite or modify alias. Once it's there it's there in perpetuity. Thanks! Signed-off-by: Duffie Cooley --- docs/install.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/install.md b/docs/install.md index ab8268bcd..985189b85 100755 --- a/docs/install.md +++ b/docs/install.md @@ -63,18 +63,18 @@ scoop install helm ### From Script Helm now has an installer script that will automatically grab the latest version -of the Helm client and [install it locally](https://raw.githubusercontent.com/helm/helm/master/scripts/get). +of the Helm client and [install it locally](https://git.io/get_helm.sh). You can fetch that script, and then execute it locally. It's well documented so that you can read through it and understand what it is doing before you run it. ``` -$ curl https://raw.githubusercontent.com/helm/helm/master/scripts/get > get_helm.sh +$ curl -LO https://git.io/get_helm.sh $ chmod 700 get_helm.sh $ ./get_helm.sh ``` -Yes, you can `curl https://raw.githubusercontent.com/helm/helm/master/scripts/get | bash` that if you want to live on the edge. +Yes, you can `curl -L https://git.io/get_helm.sh | bash` that if you want to live on the edge. ### From Canary Builds From 792af434e6f71d70a752f2fbed9e4550b69eb937 Mon Sep 17 00:00:00 2001 From: Jintao Zhang Date: Tue, 23 Apr 2019 16:49:06 +0800 Subject: [PATCH 180/327] ref(rootfs): remove useless action. Signed-off-by: Jintao Zhang --- rootfs/Dockerfile | 5 ++--- rootfs/Dockerfile.experimental | 5 ++--- rootfs/Dockerfile.rudder | 4 ++-- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/rootfs/Dockerfile b/rootfs/Dockerfile index f918c4d51..2aa775a55 100644 --- a/rootfs/Dockerfile +++ b/rootfs/Dockerfile @@ -12,9 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM alpine:3.7 +FROM alpine:3.9 -RUN apk update && apk add ca-certificates socat && rm -rf /var/cache/apk/* +RUN apk add --no-cache ca-certificates socat ENV HOME /tmp @@ -24,4 +24,3 @@ COPY tiller /tiller EXPOSE 44134 USER 65534 ENTRYPOINT ["/tiller"] - diff --git a/rootfs/Dockerfile.experimental b/rootfs/Dockerfile.experimental index 61e49ab67..9c1cab126 100644 --- a/rootfs/Dockerfile.experimental +++ b/rootfs/Dockerfile.experimental @@ -12,9 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM alpine:3.7 +FROM alpine:3.9 -RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/* +RUN apk add --no-cache ca-certificates ENV HOME /tmp @@ -23,4 +23,3 @@ COPY tiller /tiller EXPOSE 44134 USER 65534 ENTRYPOINT ["/tiller", "--experimental-release"] - diff --git a/rootfs/Dockerfile.rudder b/rootfs/Dockerfile.rudder index 61afb8af8..87efba401 100644 --- a/rootfs/Dockerfile.rudder +++ b/rootfs/Dockerfile.rudder @@ -12,9 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM alpine:3.3 +FROM alpine:3.9 -RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/* +RUN apk add --no-cache ca-certificates ENV HOME /tmp From 09801005606d470357c2f2006b0cd5ab7ff58091 Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Tue, 23 Apr 2019 22:30:23 -0400 Subject: [PATCH 181/327] List all releases when doing completion Signed-off-by: Marc Khouzam --- cmd/helm/helm.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/helm/helm.go b/cmd/helm/helm.go index 47719810d..92ff947b8 100644 --- a/cmd/helm/helm.go +++ b/cmd/helm/helm.go @@ -72,7 +72,7 @@ __helm_override_flags() __helm_list_releases() { local out - if out=$(helm list $(__helm_override_flags) -q 2>/dev/null); then + if out=$(helm list $(__helm_override_flags) -a -q 2>/dev/null); then COMPREPLY=( $( compgen -W "${out[*]}" -- "$cur" ) ) fi } From 77185d31a95e5e66bb65a082ab0ed5cbf27a6192 Mon Sep 17 00:00:00 2001 From: Martin Hickey Date: Fri, 12 Apr 2019 11:52:32 +0100 Subject: [PATCH 182/327] Fix reset force which hangs Tiller pod removed Closes #5592 Signed-off-by: Martin Hickey --- cmd/helm/reset.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmd/helm/reset.go b/cmd/helm/reset.go index 887ce34d0..8093d3e69 100644 --- a/cmd/helm/reset.go +++ b/cmd/helm/reset.go @@ -21,6 +21,7 @@ import ( "fmt" "io" "os" + "strings" "github.com/spf13/cobra" @@ -59,7 +60,11 @@ func newResetCmd(client helm.Interface, out io.Writer) *cobra.Command { Short: "uninstalls Tiller from a cluster", Long: resetDesc, PreRunE: func(cmd *cobra.Command, args []string) error { - if err := setupConnection(); !d.force && err != nil { + err := setupConnection() + if !d.force && err != nil { + return err + } + if d.force && err != nil && strings.EqualFold(err.Error(), "could not find tiller") { return err } return nil From 0270f2e2b5d75439d8c835969ec8d8d80bb55bcf Mon Sep 17 00:00:00 2001 From: Luis Davim Date: Wed, 6 Mar 2019 12:45:57 +0000 Subject: [PATCH 183/327] Reduce template code duplication. Fixes #5372 Signed-off-by: Luis Davim --- .../testdata/testcharts/alpine/Chart.yaml | 1 + .../testdata/testcharts/novals/Chart.yaml | 1 + .../prerelease/templates/alpine-pod.yaml | 1 - docs/chart_template_guide/variables.md | 3 +- .../examples/alpine/templates/alpine-pod.yaml | 2 +- docs/examples/nginx/templates/configmap.yaml | 1 - docs/examples/nginx/templates/deployment.yaml | 1 - .../nginx/templates/post-install-job.yaml | 1 - .../nginx/templates/pre-install-secret.yaml | 1 - .../nginx/templates/service-test.yaml | 1 - docs/examples/nginx/templates/service.yaml | 1 - pkg/chartutil/create.go | 37 +++++++++---------- .../testdata/albatross/templates/svc.yaml | 1 - 13 files changed, 22 insertions(+), 30 deletions(-) diff --git a/cmd/helm/testdata/testcharts/alpine/Chart.yaml b/cmd/helm/testdata/testcharts/alpine/Chart.yaml index fea865aa5..feaa1d78f 100644 --- a/cmd/helm/testdata/testcharts/alpine/Chart.yaml +++ b/cmd/helm/testdata/testcharts/alpine/Chart.yaml @@ -1,3 +1,4 @@ +appVersion: "3.3" description: Deploy a basic Alpine Linux pod home: https://k8s.io/helm name: alpine diff --git a/cmd/helm/testdata/testcharts/novals/Chart.yaml b/cmd/helm/testdata/testcharts/novals/Chart.yaml index 85f7a5d83..a1b1a0d59 100644 --- a/cmd/helm/testdata/testcharts/novals/Chart.yaml +++ b/cmd/helm/testdata/testcharts/novals/Chart.yaml @@ -4,3 +4,4 @@ name: novals sources: - https://github.com/helm/helm version: 0.2.0 +appVersion: 3.3 diff --git a/cmd/helm/testdata/testcharts/prerelease/templates/alpine-pod.yaml b/cmd/helm/testdata/testcharts/prerelease/templates/alpine-pod.yaml index 564429dea..f569d556c 100644 --- a/cmd/helm/testdata/testcharts/prerelease/templates/alpine-pod.yaml +++ b/cmd/helm/testdata/testcharts/prerelease/templates/alpine-pod.yaml @@ -10,7 +10,6 @@ metadata: # The "release" convention makes it easy to tie a release to all of the # Kubernetes resources that were created as part of that release. app.kubernetes.io/instance: {{.Release.Name | quote }} - app.kubernetes.io/version: {{ .Chart.AppVersion }} # This makes it easy to audit chart usage. helm.sh/chart: "{{.Chart.Name}}-{{.Chart.Version}}" annotations: diff --git a/docs/chart_template_guide/variables.md b/docs/chart_template_guide/variables.md index 984b9b4e5..65f754faf 100644 --- a/docs/chart_template_guide/variables.md +++ b/docs/chart_template_guide/variables.md @@ -114,7 +114,8 @@ metadata: # I cannot reference .Chart.Name, but I can do $.Chart.Name helm.sh/chart: "{{ $.Chart.Name }}-{{ $.Chart.Version }}" app.kubernetes.io/instance: "{{ $.Release.Name }}" - app.kubernetes.io/version: {{ .Chart.AppVersion }} + # Value from appVersion in Chart.yaml + app.kubernetes.io/version: "{{ $.Chart.AppVersion }}" app.kubernetes.io/managed-by: "{{ $.Release.Service }}" type: kubernetes.io/tls data: diff --git a/docs/examples/alpine/templates/alpine-pod.yaml b/docs/examples/alpine/templates/alpine-pod.yaml index 2b54811fd..0f48e4059 100644 --- a/docs/examples/alpine/templates/alpine-pod.yaml +++ b/docs/examples/alpine/templates/alpine-pod.yaml @@ -10,7 +10,7 @@ metadata: # The "app.kubernetes.io/instance" convention makes it easy to tie a release to all of the # Kubernetes resources that were created as part of that release. app.kubernetes.io/instance: {{ .Release.Name | quote }} - app.kubernetes.io/version: {{ .Chart.AppVersion }} + app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} # This makes it easy to audit chart usage. helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }} app.kubernetes.io/name: {{ template "alpine.name" . }} diff --git a/docs/examples/nginx/templates/configmap.yaml b/docs/examples/nginx/templates/configmap.yaml index d47992024..0141cbc69 100644 --- a/docs/examples/nginx/templates/configmap.yaml +++ b/docs/examples/nginx/templates/configmap.yaml @@ -6,7 +6,6 @@ metadata: labels: app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/version: {{ .Chart.AppVersion }} helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }} app.kubernetes.io/name: {{ template "nginx.name" . }} data: diff --git a/docs/examples/nginx/templates/deployment.yaml b/docs/examples/nginx/templates/deployment.yaml index cc4d4ea85..5bb30f9af 100644 --- a/docs/examples/nginx/templates/deployment.yaml +++ b/docs/examples/nginx/templates/deployment.yaml @@ -14,7 +14,6 @@ metadata: # to all of the Kubernetes resources that were created as part of that # release. app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/version: {{ .Chart.AppVersion }} # This makes it easy to audit chart usage. helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }} app.kubernetes.io/name: {{ template "nginx.name" . }} diff --git a/docs/examples/nginx/templates/post-install-job.yaml b/docs/examples/nginx/templates/post-install-job.yaml index 856782a4d..3562e6cf5 100644 --- a/docs/examples/nginx/templates/post-install-job.yaml +++ b/docs/examples/nginx/templates/post-install-job.yaml @@ -10,7 +10,6 @@ metadata: # The "app.kubernetes.io/instance" convention makes it easy to tie a release to all of the # Kubernetes resources that were created as part of that release. app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/version: {{ .Chart.AppVersion }} # This makes it easy to audit chart usage. helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }} app.kubernetes.io/name: {{ template "nginx.name" . }} diff --git a/docs/examples/nginx/templates/pre-install-secret.yaml b/docs/examples/nginx/templates/pre-install-secret.yaml index 40451800d..07a9504b5 100644 --- a/docs/examples/nginx/templates/pre-install-secret.yaml +++ b/docs/examples/nginx/templates/pre-install-secret.yaml @@ -7,7 +7,6 @@ metadata: labels: app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/version: {{ .Chart.AppVersion }} helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }} app.kubernetes.io/name: {{ template "nginx.name" . }} # This declares the resource to be a hook. By convention, we also name the diff --git a/docs/examples/nginx/templates/service-test.yaml b/docs/examples/nginx/templates/service-test.yaml index 867f077ee..ffb37e9f4 100644 --- a/docs/examples/nginx/templates/service-test.yaml +++ b/docs/examples/nginx/templates/service-test.yaml @@ -5,7 +5,6 @@ metadata: labels: app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/version: {{ .Chart.AppVersion }} helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }} app.kubernetes.io/name: {{ template "nginx.name" . }} annotations: diff --git a/docs/examples/nginx/templates/service.yaml b/docs/examples/nginx/templates/service.yaml index e8eb8e51e..a12cb0982 100644 --- a/docs/examples/nginx/templates/service.yaml +++ b/docs/examples/nginx/templates/service.yaml @@ -10,7 +10,6 @@ metadata: helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }} app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/version: {{ .Chart.AppVersion }} name: {{ template "nginx.fullname" . }} spec: # Provides options for the service so chart users have the full choice diff --git a/pkg/chartutil/create.go b/pkg/chartutil/create.go index 415e6f97b..0d260627e 100644 --- a/pkg/chartutil/create.go +++ b/pkg/chartutil/create.go @@ -134,11 +134,7 @@ kind: Ingress metadata: name: {{ $fullName }} labels: - app.kubernetes.io/name: {{ include ".name" . }} - helm.sh/chart: {{ include ".chart" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/version: {{ .Chart.AppVersion }} - app.kubernetes.io/managed-by: {{ .Release.Service }} +{{ include ".labels" . | indent 4 }} {{- with .Values.ingress.annotations }} annotations: {{- toYaml . | nindent 4 }} @@ -174,11 +170,7 @@ kind: Deployment metadata: name: {{ include ".fullname" . }} labels: - app.kubernetes.io/name: {{ include ".name" . }} - helm.sh/chart: {{ include ".chart" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/version: {{ .Chart.AppVersion }} - app.kubernetes.io/managed-by: {{ .Release.Service }} +{{ include ".labels" . | indent 4 }} spec: replicas: {{ .Values.replicaCount }} selector: @@ -228,11 +220,7 @@ kind: Service metadata: name: {{ include ".fullname" . }} labels: - app.kubernetes.io/name: {{ include ".name" . }} - helm.sh/chart: {{ include ".chart" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/version: {{ .Chart.AppVersion }} - app.kubernetes.io/managed-by: {{ .Release.Service }} +{{ include ".labels" . | indent 4 }} spec: type: {{ .Values.service.type }} ports: @@ -300,6 +288,19 @@ Create chart name and version as used by the chart label. {{- define ".chart" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} {{- end -}} + +{{/* +Common labels +*/}} +{{- define ".labels" -}} +app.kubernetes.io/name: {{ include ".name" . }} +helm.sh/chart: {{ include ".chart" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- if .Chart.AppVersion -}} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end -}} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end -}} ` const defaultTestConnection = `apiVersion: v1 @@ -307,11 +308,7 @@ kind: Pod metadata: name: "{{ include ".fullname" . }}-test-connection" labels: - app.kubernetes.io/name: {{ include ".name" . }} - helm.sh/chart: {{ include ".chart" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/version: {{ .Chart.AppVersion }} - app.kubernetes.io/managed-by: {{ .Release.Service }} +{{ include ".labels" . | indent 4 }} annotations: "helm.sh/hook": test-success spec: diff --git a/pkg/lint/rules/testdata/albatross/templates/svc.yaml b/pkg/lint/rules/testdata/albatross/templates/svc.yaml index a976b4fdd..aea11d833 100644 --- a/pkg/lint/rules/testdata/albatross/templates/svc.yaml +++ b/pkg/lint/rules/testdata/albatross/templates/svc.yaml @@ -7,7 +7,6 @@ metadata: labels: app.kubernetes.io/managed-by: {{ .Release.Service | quote }} app.kubernetes.io/instance: {{ .Release.Name | quote }} - app.kubernetes.io/version: {{ .Chart.AppVersion }} helm.sh/chart: "{{.Chart.Name}}-{{.Chart.Version}}" kubeVersion: {{ .Capabilities.KubeVersion.Major }} tillerVersion: {{ .Capabilities.TillerVersion }} From 94adb5bbe01c554486630287fe722e9ee0d578f0 Mon Sep 17 00:00:00 2001 From: Morten Torkildsen Date: Wed, 24 Apr 2019 20:07:22 -0700 Subject: [PATCH 184/327] fix(helm): Only validate new manifests Signed-off-by: Morten Torkildsen --- pkg/kube/client.go | 17 +++++++++++++++-- pkg/tiller/environment/environment.go | 17 +++++++++++++++++ pkg/tiller/environment/environment_test.go | 3 +++ pkg/tiller/release_server.go | 3 +-- pkg/tiller/release_server_test.go | 3 +++ 5 files changed, 39 insertions(+), 4 deletions(-) diff --git a/pkg/kube/client.go b/pkg/kube/client.go index aa025eb0a..36467fad5 100644 --- a/pkg/kube/client.go +++ b/pkg/kube/client.go @@ -141,7 +141,7 @@ func (c *Client) validator() validation.Schema { return schema } -// BuildUnstructured validates for Kubernetes objects and returns unstructured infos. +// BuildUnstructured reads Kubernetes objects and returns unstructured infos. func (c *Client) BuildUnstructured(namespace string, reader io.Reader) (Result, error) { var result Result @@ -150,13 +150,26 @@ func (c *Client) BuildUnstructured(namespace string, reader io.Reader) (Result, ContinueOnError(). NamespaceParam(namespace). DefaultNamespace(). - Schema(c.validator()). Stream(reader, ""). Flatten(). Do().Infos() return result, scrubValidationError(err) } +// Validate reads Kubernetes manifests and validates the content. +func (c *Client) Validate(namespace string, reader io.Reader) error { + _, err := c.NewBuilder(). + Unstructured(). + ContinueOnError(). + NamespaceParam(namespace). + DefaultNamespace(). + Schema(c.validator()). + Stream(reader, ""). + Flatten(). + Do().Infos() + return scrubValidationError(err) +} + // Build validates for Kubernetes objects and returns resource Infos from a io.Reader. func (c *Client) Build(namespace string, reader io.Reader) (Result, error) { var result Result diff --git a/pkg/tiller/environment/environment.go b/pkg/tiller/environment/environment.go index 21c23d421..24b93bfb3 100644 --- a/pkg/tiller/environment/environment.go +++ b/pkg/tiller/environment/environment.go @@ -147,8 +147,20 @@ type KubeClient interface { UpdateWithOptions(namespace string, originalReader, modifiedReader io.Reader, opts kube.UpdateOptions) error Build(namespace string, reader io.Reader) (kube.Result, error) + + // BuildUnstructured reads a stream of manifests from a reader and turns them into + // info objects. Manifests are not validated against the schema, but it will fail if + // any resoures types are not known by the apiserver. + // + // reader must contain a YAML stream (one or more YAML documents separated by "\n---\n"). BuildUnstructured(namespace string, reader io.Reader) (kube.Result, error) + // Validate reads a stream of manifests from a reader and validates them against + // the schema from the apiserver. It returns an error if any of the manifests does not validate. + // + // reader must contain a YAML stream (one or more YAML documents separated by "\n---\n"). + Validate(namespace string, reader io.Reader) error + // WaitAndGetCompletedPodPhase waits up to a timeout until a pod enters a completed phase // and returns said phase (PodSucceeded or PodFailed qualify). WaitAndGetCompletedPodPhase(namespace string, reader io.Reader, timeout time.Duration) (v1.PodPhase, error) @@ -214,6 +226,11 @@ func (p *PrintingKubeClient) BuildUnstructured(ns string, reader io.Reader) (kub return []*resource.Info{}, nil } +// Validate implements KubeClient Validate +func (p *PrintingKubeClient) Validate(ns string, reader io.Reader) error { + return nil +} + // WaitAndGetCompletedPodPhase implements KubeClient WaitAndGetCompletedPodPhase. func (p *PrintingKubeClient) WaitAndGetCompletedPodPhase(namespace string, reader io.Reader, timeout time.Duration) (v1.PodPhase, error) { _, err := io.Copy(p.Out, reader) diff --git a/pkg/tiller/environment/environment_test.go b/pkg/tiller/environment/environment_test.go index 24ff8b88d..1c2d5343f 100644 --- a/pkg/tiller/environment/environment_test.go +++ b/pkg/tiller/environment/environment_test.go @@ -64,6 +64,9 @@ func (k *mockKubeClient) Build(ns string, reader io.Reader) (kube.Result, error) func (k *mockKubeClient) BuildUnstructured(ns string, reader io.Reader) (kube.Result, error) { return []*resource.Info{}, nil } +func (k *mockKubeClient) Validate(ns string, reader io.Reader) error { + return nil +} func (k *mockKubeClient) WaitAndGetCompletedPodPhase(namespace string, reader io.Reader, timeout time.Duration) (v1.PodPhase, error) { return v1.PodUnknown, nil } diff --git a/pkg/tiller/release_server.go b/pkg/tiller/release_server.go index 6733035f7..c5638d20d 100644 --- a/pkg/tiller/release_server.go +++ b/pkg/tiller/release_server.go @@ -436,8 +436,7 @@ func (s *ReleaseServer) execHook(hs []*release.Hook, name, namespace, hook strin func validateManifest(c environment.KubeClient, ns string, manifest []byte) error { r := bytes.NewReader(manifest) - _, err := c.BuildUnstructured(ns, r) - return err + return c.Validate(ns, r) } func validateReleaseName(releaseName string) error { diff --git a/pkg/tiller/release_server_test.go b/pkg/tiller/release_server_test.go index 05b41be20..d70221ed1 100644 --- a/pkg/tiller/release_server_test.go +++ b/pkg/tiller/release_server_test.go @@ -650,6 +650,9 @@ func (kc *mockHooksKubeClient) Build(ns string, reader io.Reader) (kube.Result, func (kc *mockHooksKubeClient) BuildUnstructured(ns string, reader io.Reader) (kube.Result, error) { return []*resource.Info{}, nil } +func (kc *mockHooksKubeClient) Validate(ns string, reader io.Reader) error { + return nil +} func (kc *mockHooksKubeClient) WaitAndGetCompletedPodPhase(namespace string, reader io.Reader, timeout time.Duration) (v1.PodPhase, error) { return v1.PodUnknown, nil } From d082754b1ad9b93349e572cb6cee1a0e95dc49e5 Mon Sep 17 00:00:00 2001 From: Martin Hickey Date: Thu, 25 Apr 2019 15:29:09 +0100 Subject: [PATCH 185/327] Fix environment list in helm doc Closes #5344 Signed-off-by: Martin Hickey --- cmd/helm/helm.go | 26 +++++++++++++------------- docs/helm/helm.md | 28 ++++++++++++++-------------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/cmd/helm/helm.go b/cmd/helm/helm.go index b815568cb..d3337404a 100644 --- a/cmd/helm/helm.go +++ b/cmd/helm/helm.go @@ -61,19 +61,19 @@ Common actions from this point include: - helm list: list releases of charts Environment: - $HELM_HOME set an alternative location for Helm files. By default, these are stored in ~/.helm - $HELM_HOST set an alternative Tiller host. The format is host:port - $HELM_NO_PLUGINS disable plugins. Set HELM_NO_PLUGINS=1 to disable plugins. - $TILLER_NAMESPACE set an alternative Tiller namespace (default "kube-system") - $KUBECONFIG set an alternative Kubernetes configuration file (default "~/.kube/config") - $HELM_TLS_CA_CERT path to TLS CA certificate used to verify the Helm client and Tiller server certificates (default "$HELM_HOME/ca.pem") - $HELM_TLS_CERT path to TLS client certificate file for authenticating to Tiller (default "$HELM_HOME/cert.pem") - $HELM_TLS_KEY path to TLS client key file for authenticating to Tiller (default "$HELM_HOME/key.pem") - $HELM_TLS_ENABLE enable TLS connection between Helm and Tiller (default "false") - $HELM_TLS_VERIFY enable TLS connection between Helm and Tiller and verify Tiller server certificate (default "false") - $HELM_TLS_HOSTNAME the hostname or IP address used to verify the Tiller server certificate (default "127.0.0.1") - $HELM_KEY_PASSPHRASE set HELM_KEY_PASSPHRASE to the passphrase of your PGP private key. If set, you will not be prompted for - the passphrase while signing helm charts + +- $HELM_HOME: set an alternative location for Helm files. By default, these are stored in ~/.helm +- $HELM_HOST: set an alternative Tiller host. The format is host:port +- $HELM_NO_PLUGINS: disable plugins. Set HELM_NO_PLUGINS=1 to disable plugins. +- $TILLER_NAMESPACE: set an alternative Tiller namespace (default "kube-system") +- $KUBECONFIG: set an alternative Kubernetes configuration file (default "~/.kube/config") +- $HELM_TLS_CA_CERT: path to TLS CA certificate used to verify the Helm client and Tiller server certificates (default "$HELM_HOME/ca.pem") +- $HELM_TLS_CERT: path to TLS client certificate file for authenticating to Tiller (default "$HELM_HOME/cert.pem") +- $HELM_TLS_KEY: path to TLS client key file for authenticating to Tiller (default "$HELM_HOME/key.pem") +- $HELM_TLS_ENABLE: enable TLS connection between Helm and Tiller (default "false") +- $HELM_TLS_VERIFY: enable TLS connection between Helm and Tiller and verify Tiller server certificate (default "false") +- $HELM_TLS_HOSTNAME: the hostname or IP address used to verify the Tiller server certificate (default "127.0.0.1") +- $HELM_KEY_PASSPHRASE: set HELM_KEY_PASSPHRASE to the passphrase of your PGP private key. If set, you will not be prompted for the passphrase while signing helm charts ` diff --git a/docs/helm/helm.md b/docs/helm/helm.md index b00ae91d6..b57be9f9d 100644 --- a/docs/helm/helm.md +++ b/docs/helm/helm.md @@ -21,19 +21,19 @@ Common actions from this point include: - helm list: list releases of charts Environment: - $HELM_HOME set an alternative location for Helm files. By default, these are stored in ~/.helm - $HELM_HOST set an alternative Tiller host. The format is host:port - $HELM_NO_PLUGINS disable plugins. Set HELM_NO_PLUGINS=1 to disable plugins. - $TILLER_NAMESPACE set an alternative Tiller namespace (default "kube-system") - $KUBECONFIG set an alternative Kubernetes configuration file (default "~/.kube/config") - $HELM_TLS_CA_CERT path to TLS CA certificate used to verify the Helm client and Tiller server certificates (default "$HELM_HOME/ca.pem") - $HELM_TLS_CERT path to TLS client certificate file for authenticating to Tiller (default "$HELM_HOME/cert.pem") - $HELM_TLS_KEY path to TLS client key file for authenticating to Tiller (default "$HELM_HOME/key.pem") - $HELM_TLS_ENABLE enable TLS connection between Helm and Tiller (default "false") - $HELM_TLS_VERIFY enable TLS connection between Helm and Tiller and verify Tiller server certificate (default "false") - $HELM_TLS_HOSTNAME the hostname or IP address used to verify the Tiller server certificate (default "127.0.0.1") - $HELM_KEY_PASSPHRASE set HELM_KEY_PASSPHRASE to the passphrase of your PGP private key. If set, you will not be prompted for - the passphrase while signing helm charts + +- $HELM_HOME: set an alternative location for Helm files. By default, these are stored in ~/.helm +- $HELM_HOST: set an alternative Tiller host. The format is host:port +- $HELM_NO_PLUGINS: disable plugins. Set HELM_NO_PLUGINS=1 to disable plugins. +- $TILLER_NAMESPACE: set an alternative Tiller namespace (default "kube-system") +- $KUBECONFIG: set an alternative Kubernetes configuration file (default "~/.kube/config") +- $HELM_TLS_CA_CERT: path to TLS CA certificate used to verify the Helm client and Tiller server certificates (default "$HELM_HOME/ca.pem") +- $HELM_TLS_CERT: path to TLS client certificate file for authenticating to Tiller (default "$HELM_HOME/cert.pem") +- $HELM_TLS_KEY: path to TLS client key file for authenticating to Tiller (default "$HELM_HOME/key.pem") +- $HELM_TLS_ENABLE: enable TLS connection between Helm and Tiller (default "false") +- $HELM_TLS_VERIFY: enable TLS connection between Helm and Tiller and verify Tiller server certificate (default "false") +- $HELM_TLS_HOSTNAME: the hostname or IP address used to verify the Tiller server certificate (default "127.0.0.1") +- $HELM_KEY_PASSPHRASE: set HELM_KEY_PASSPHRASE to the passphrase of your PGP private key. If set, you will not be prompted for the passphrase while signing helm charts @@ -79,4 +79,4 @@ Environment: * [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 -###### Auto generated by spf13/cobra on 4-Feb-2019 +###### Auto generated by spf13/cobra on 25-Apr-2019 From 85fe8a759fc496b6dcc50407a83802821b968308 Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Sat, 27 Apr 2019 20:50:17 -0400 Subject: [PATCH 186/327] Dynamic completion for helm upgrade, get, rollback Signed-off-by: Marc Khouzam --- cmd/helm/helm.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/helm/helm.go b/cmd/helm/helm.go index 92ff947b8..cd23f8894 100644 --- a/cmd/helm/helm.go +++ b/cmd/helm/helm.go @@ -80,7 +80,8 @@ __helm_list_releases() __helm_custom_func() { case ${last_command} in - helm_delete | helm_history | helm_status | helm_test) + helm_delete | helm_history | helm_status | helm_test |\ + helm_upgrade | helm_rollback | helm_get_*) __helm_list_releases return ;; From 5ba61df4c01f090e886619c7eba9fdd7c52680bb Mon Sep 17 00:00:00 2001 From: Patrick Carey Date: Mon, 29 Apr 2019 10:57:26 +0100 Subject: [PATCH 187/327] Update Masterminds/semver to allow >32bit version numbers Signed-off-by: Patrick Carey --- glide.lock | 8 ++++---- glide.yaml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/glide.lock b/glide.lock index 5d4a6a9f8..5c5671268 100644 --- a/glide.lock +++ b/glide.lock @@ -1,5 +1,5 @@ -hash: d92d7faee5c7ecbb241dadcd993e5dd8dfba226739d20d97fabf23168613f3ac -updated: 2019-04-16T15:32:58.609105-07:00 +hash: 8a007d8993bdffd14a1a2d674848bd085a27b09d7f177fab1dc55783059c4dce +updated: 2019-04-29T12:23:33.902435+01:00 imports: - name: cloud.google.com/go version: 3b1ae45394a234c385be014e9a488f2bb6eef821 @@ -188,7 +188,7 @@ imports: - name: github.com/Masterminds/goutils version: 41ac8693c5c10a92ea1ff5ac3a7f95646f6123b0 - name: github.com/Masterminds/semver - version: 517734cc7d6470c0d07130e40fd40bdeb9bcd3fd + version: c7af12943936e8c39859482e61f0574c2fd7fc75 - name: github.com/Masterminds/sprig version: 9f8fceff796fb9f4e992cd2bece016be0121ab74 - name: github.com/Masterminds/vcs @@ -647,7 +647,7 @@ imports: - pkg/util/proto/testing - pkg/util/proto/validation - name: k8s.io/kubernetes - version: 3c949c7d419670cd99fe92f60e6f4d251898bdf2 + version: b8f2b772e38a15165a6247256d650e8b04178318 subpackages: - pkg/api/legacyscheme - pkg/api/service diff --git a/glide.yaml b/glide.yaml index 19024aecf..aeabbc724 100644 --- a/glide.yaml +++ b/glide.yaml @@ -24,7 +24,7 @@ import: version: ^2.19.0 - package: github.com/ghodss/yaml - package: github.com/Masterminds/semver - version: ~1.3.1 + version: ~1.4.2 - package: github.com/technosophos/moniker version: ~0.2 - package: github.com/golang/protobuf From 470d92e126968478d4e7a0d96207f102d174d545 Mon Sep 17 00:00:00 2001 From: Martin Hickey Date: Tue, 30 Apr 2019 11:09:11 +0100 Subject: [PATCH 188/327] Fix scaffold chart label in helper template The 'app.kubernetes.io/version' label was not being rendered as expected. It was appending onto the label before it and also the next label label was appending onto it on the same line. Signed-off-by: Martin Hickey --- pkg/chartutil/create.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/chartutil/create.go b/pkg/chartutil/create.go index 8cb0493f3..f8e0356e4 100644 --- a/pkg/chartutil/create.go +++ b/pkg/chartutil/create.go @@ -301,9 +301,9 @@ Common labels app.kubernetes.io/name: {{ include ".name" . }} helm.sh/chart: {{ include ".chart" . }} app.kubernetes.io/instance: {{ .Release.Name }} -{{- if .Chart.AppVersion -}} +{{- if .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end -}} +{{- end }} app.kubernetes.io/managed-by: {{ .Release.Service }} {{- end -}} ` From acb759c07911491f6860619ce3037cec03d275a7 Mon Sep 17 00:00:00 2001 From: Jeff Knurek Date: Thu, 21 Mar 2019 16:19:02 +0100 Subject: [PATCH 189/327] feat(helm) add 'get version' to get the chart version Signed-off-by: Jeff Knurek --- cmd/helm/get.go | 1 + cmd/helm/get_version.go | 75 ++++++++++++++++++++++++++++++++++++ cmd/helm/get_version_test.go | 47 ++++++++++++++++++++++ 3 files changed, 123 insertions(+) create mode 100644 cmd/helm/get_version.go create mode 100644 cmd/helm/get_version_test.go diff --git a/cmd/helm/get.go b/cmd/helm/get.go index 20a4c042f..f9ed6fb91 100644 --- a/cmd/helm/get.go +++ b/cmd/helm/get.go @@ -78,6 +78,7 @@ func newGetCmd(client helm.Interface, out io.Writer) *cobra.Command { cmd.AddCommand(newGetManifestCmd(nil, out)) cmd.AddCommand(newGetHooksCmd(nil, out)) cmd.AddCommand(newGetNotesCmd(nil, out)) + cmd.AddCommand(newGetVersionCmd(nil, out)) // set defaults from environment settings.InitTLS(f) diff --git a/cmd/helm/get_version.go b/cmd/helm/get_version.go new file mode 100644 index 000000000..c76c6245d --- /dev/null +++ b/cmd/helm/get_version.go @@ -0,0 +1,75 @@ +/* +Copyright The Helm Authors. + +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 ( + "fmt" + "io" + + "github.com/spf13/cobra" + + "k8s.io/helm/pkg/helm" +) + +var getVersionHelp = "This command fetches the chart version for a given release." + +type getVersionCmd struct { + release string + out io.Writer + client helm.Interface + revision int32 +} + +func newGetVersionCmd(client helm.Interface, out io.Writer) *cobra.Command { + get := &getVersionCmd{ + out: out, + client: client, + } + cmd := &cobra.Command{ + Use: "version [flags] RELEASE_NAME", + Short: "download the chart version for a named release", + Long: getVersionHelp, + PreRunE: func(_ *cobra.Command, _ []string) error { return setupConnection() }, + RunE: func(cmd *cobra.Command, args []string) error { + if len(args) == 0 { + return errReleaseRequired + } + get.release = args[0] + get.client = ensureHelmClient(get.client) + return get.run() + }, + } + + f := cmd.Flags() + settings.AddFlagsTLS(f) + f.Int32Var(&get.revision, "revision", 0, "get the named release with revision") + + // set defaults from environment + settings.InitTLS(f) + + return cmd +} + +// getVersion implements 'helm get version' +func (g *getVersionCmd) run() error { + res, err := g.client.ReleaseContent(g.release, helm.ContentReleaseVersion(g.revision)) + if err != nil { + return prettyError(err) + } + fmt.Fprintln(g.out, res.Release.Chart.Metadata.Version) + return nil +} diff --git a/cmd/helm/get_version_test.go b/cmd/helm/get_version_test.go new file mode 100644 index 000000000..81c9cdfd9 --- /dev/null +++ b/cmd/helm/get_version_test.go @@ -0,0 +1,47 @@ +/* +Copyright The Helm Authors. + +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 ( + "io" + "testing" + + "github.com/spf13/cobra" + + "k8s.io/helm/pkg/helm" + "k8s.io/helm/pkg/proto/hapi/release" +) + +func TestGetVersion(t *testing.T) { + tests := []releaseCase{ + { + name: "get chart version of release", + args: []string{"kodiak"}, + expected: "0.1.0-beta.1", + resp: helm.ReleaseMock(&helm.MockReleaseOptions{Name: "kodiak"}), + rels: []*release.Release{helm.ReleaseMock(&helm.MockReleaseOptions{Name: "kodiak"})}, + }, + { + name: "get version without args", + args: []string{}, + err: true, + }, + } + runReleaseCases(t, tests, func(c *helm.FakeClient, out io.Writer) *cobra.Command { + return newGetVersionCmd(c, out) + }) +} From 6c760297c04aa7eac6cb47829ac6fc7b01c4b3f9 Mon Sep 17 00:00:00 2001 From: Jeff Knurek Date: Thu, 21 Mar 2019 16:40:38 +0100 Subject: [PATCH 190/327] DOCS: ci failed and taught me how the docs get autogenerated Signed-off-by: Jeff Knurek --- docs/helm/helm_get.md | 3 ++- docs/helm/helm_get_version.md | 42 +++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 docs/helm/helm_get_version.md diff --git a/docs/helm/helm_get.md b/docs/helm/helm_get.md index 3b99c93d5..e113db53f 100644 --- a/docs/helm/helm_get.md +++ b/docs/helm/helm_get.md @@ -53,5 +53,6 @@ helm get [flags] RELEASE_NAME * [helm get manifest](helm_get_manifest.md) - download the manifest for a named release * [helm get notes](helm_get_notes.md) - displays the notes of the named release * [helm get values](helm_get_values.md) - download the values file for a named release +* [helm get version](helm_get_version.md) - download the chart version for a named release -###### Auto generated by spf13/cobra on 1-Sep-2018 +###### Auto generated by spf13/cobra on 21-Mar-2019 diff --git a/docs/helm/helm_get_version.md b/docs/helm/helm_get_version.md new file mode 100644 index 000000000..36695e464 --- /dev/null +++ b/docs/helm/helm_get_version.md @@ -0,0 +1,42 @@ +## helm get version + +download the chart version for a named release + +### Synopsis + +This command fetches the chart version for a given release. + +``` +helm get version [flags] RELEASE_NAME +``` + +### Options + +``` + -h, --help help for version + --revision int32 get the named release with revision + --tls enable TLS for request + --tls-ca-cert string path to TLS CA certificate file (default "$HELM_HOME/ca.pem") + --tls-cert string path to TLS certificate file (default "$HELM_HOME/cert.pem") + --tls-hostname string the server name used to verify the hostname on the returned certificates from the server + --tls-key string path to TLS key file (default "$HELM_HOME/key.pem") + --tls-verify enable TLS for request and verify remote +``` + +### 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 + --kubeconfig string absolute path to the kubeconfig file to use + --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) + --tiller-namespace string namespace of Tiller (default "kube-system") +``` + +### SEE ALSO + +* [helm get](helm_get.md) - download a named release + +###### Auto generated by spf13/cobra on 21-Mar-2019 From 0a3ebb816b76ae2425ec2a8ceb242b0660db9c53 Mon Sep 17 00:00:00 2001 From: Jeff Knurek Date: Mon, 25 Mar 2019 14:21:55 +0100 Subject: [PATCH 191/327] feat(helm) add '--template' option to 'helm get' for custom formatting Signed-off-by: Jeff Knurek --- cmd/helm/get.go | 15 +++++--- cmd/helm/get_test.go | 7 ++++ cmd/helm/get_version.go | 75 ------------------------------------ cmd/helm/get_version_test.go | 47 ---------------------- cmd/helm/printer.go | 2 +- docs/helm/helm_get.md | 4 +- 6 files changed, 20 insertions(+), 130 deletions(-) delete mode 100644 cmd/helm/get_version.go delete mode 100644 cmd/helm/get_version_test.go diff --git a/cmd/helm/get.go b/cmd/helm/get.go index f9ed6fb91..6829122b7 100644 --- a/cmd/helm/get.go +++ b/cmd/helm/get.go @@ -41,10 +41,11 @@ chart, the supplied values, and the generated manifest file. var errReleaseRequired = errors.New("release name is required") type getCmd struct { - release string - out io.Writer - client helm.Interface - version int32 + release string + out io.Writer + client helm.Interface + version int32 + template string } func newGetCmd(client helm.Interface, out io.Writer) *cobra.Command { @@ -73,12 +74,12 @@ func newGetCmd(client helm.Interface, out io.Writer) *cobra.Command { f := cmd.Flags() settings.AddFlagsTLS(f) f.Int32Var(&get.version, "revision", 0, "get the named release with revision") + f.StringVar(&get.template, "template", "", "go template for formatting the output, eg: {{.Release.Name}}") cmd.AddCommand(newGetValuesCmd(nil, out)) cmd.AddCommand(newGetManifestCmd(nil, out)) cmd.AddCommand(newGetHooksCmd(nil, out)) cmd.AddCommand(newGetNotesCmd(nil, out)) - cmd.AddCommand(newGetVersionCmd(nil, out)) // set defaults from environment settings.InitTLS(f) @@ -92,5 +93,9 @@ func (g *getCmd) run() error { if err != nil { return prettyError(err) } + + if g.template != "" { + return tpl(g.template, res, g.out) + } return printRelease(g.out, res.Release) } diff --git a/cmd/helm/get_test.go b/cmd/helm/get_test.go index cb230a8a5..d83c85e1e 100644 --- a/cmd/helm/get_test.go +++ b/cmd/helm/get_test.go @@ -35,6 +35,13 @@ func TestGetCmd(t *testing.T) { expected: "REVISION: 1\nRELEASED: (.*)\nCHART: foo-0.1.0-beta.1\nUSER-SUPPLIED VALUES:\nname: \"value\"\nCOMPUTED VALUES:\nname: value\n\nHOOKS:\n---\n# pre-install-hook\n" + helm.MockHookTemplate + "\nMANIFEST:", rels: []*release.Release{helm.ReleaseMock(&helm.MockReleaseOptions{Name: "thomas-guide"})}, }, + { + name: "get with a formatted release", + resp: helm.ReleaseMock(&helm.MockReleaseOptions{Name: "elevated-turkey"}), + args: []string{"elevated-turkey", "--template", "{{.Release.Chart.Metadata.Version}}"}, + expected: "0.1.0-beta.1", + rels: []*release.Release{helm.ReleaseMock(&helm.MockReleaseOptions{Name: "elevated-turkey"})}, + }, { name: "get requires release name arg", err: true, diff --git a/cmd/helm/get_version.go b/cmd/helm/get_version.go deleted file mode 100644 index c76c6245d..000000000 --- a/cmd/helm/get_version.go +++ /dev/null @@ -1,75 +0,0 @@ -/* -Copyright The Helm Authors. - -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 ( - "fmt" - "io" - - "github.com/spf13/cobra" - - "k8s.io/helm/pkg/helm" -) - -var getVersionHelp = "This command fetches the chart version for a given release." - -type getVersionCmd struct { - release string - out io.Writer - client helm.Interface - revision int32 -} - -func newGetVersionCmd(client helm.Interface, out io.Writer) *cobra.Command { - get := &getVersionCmd{ - out: out, - client: client, - } - cmd := &cobra.Command{ - Use: "version [flags] RELEASE_NAME", - Short: "download the chart version for a named release", - Long: getVersionHelp, - PreRunE: func(_ *cobra.Command, _ []string) error { return setupConnection() }, - RunE: func(cmd *cobra.Command, args []string) error { - if len(args) == 0 { - return errReleaseRequired - } - get.release = args[0] - get.client = ensureHelmClient(get.client) - return get.run() - }, - } - - f := cmd.Flags() - settings.AddFlagsTLS(f) - f.Int32Var(&get.revision, "revision", 0, "get the named release with revision") - - // set defaults from environment - settings.InitTLS(f) - - return cmd -} - -// getVersion implements 'helm get version' -func (g *getVersionCmd) run() error { - res, err := g.client.ReleaseContent(g.release, helm.ContentReleaseVersion(g.revision)) - if err != nil { - return prettyError(err) - } - fmt.Fprintln(g.out, res.Release.Chart.Metadata.Version) - return nil -} diff --git a/cmd/helm/get_version_test.go b/cmd/helm/get_version_test.go deleted file mode 100644 index 81c9cdfd9..000000000 --- a/cmd/helm/get_version_test.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Copyright The Helm Authors. - -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 ( - "io" - "testing" - - "github.com/spf13/cobra" - - "k8s.io/helm/pkg/helm" - "k8s.io/helm/pkg/proto/hapi/release" -) - -func TestGetVersion(t *testing.T) { - tests := []releaseCase{ - { - name: "get chart version of release", - args: []string{"kodiak"}, - expected: "0.1.0-beta.1", - resp: helm.ReleaseMock(&helm.MockReleaseOptions{Name: "kodiak"}), - rels: []*release.Release{helm.ReleaseMock(&helm.MockReleaseOptions{Name: "kodiak"})}, - }, - { - name: "get version without args", - args: []string{}, - err: true, - }, - } - runReleaseCases(t, tests, func(c *helm.FakeClient, out io.Writer) *cobra.Command { - return newGetVersionCmd(c, out) - }) -} diff --git a/cmd/helm/printer.go b/cmd/helm/printer.go index e98b71c64..2f42bdab0 100644 --- a/cmd/helm/printer.go +++ b/cmd/helm/printer.go @@ -66,7 +66,7 @@ func printRelease(out io.Writer, rel *release.Release) error { return tpl(printReleaseTemplate, data, out) } -func tpl(t string, vals map[string]interface{}, out io.Writer) error { +func tpl(t string, vals interface{}, out io.Writer) error { tt, err := template.New("_").Parse(t) if err != nil { return err diff --git a/docs/helm/helm_get.md b/docs/helm/helm_get.md index e113db53f..3ce0ff191 100644 --- a/docs/helm/helm_get.md +++ b/docs/helm/helm_get.md @@ -26,6 +26,7 @@ helm get [flags] RELEASE_NAME ``` -h, --help help for get --revision int32 get the named release with revision + --template string go template for formatting the output, eg: {{.Release.Name}} --tls enable TLS for request --tls-ca-cert string path to TLS CA certificate file (default "$HELM_HOME/ca.pem") --tls-cert string path to TLS certificate file (default "$HELM_HOME/cert.pem") @@ -53,6 +54,5 @@ helm get [flags] RELEASE_NAME * [helm get manifest](helm_get_manifest.md) - download the manifest for a named release * [helm get notes](helm_get_notes.md) - displays the notes of the named release * [helm get values](helm_get_values.md) - download the values file for a named release -* [helm get version](helm_get_version.md) - download the chart version for a named release -###### Auto generated by spf13/cobra on 21-Mar-2019 +###### Auto generated by spf13/cobra on 25-Mar-2019 From 072cd6af37bb9856aaabebe02b7489cd18a80293 Mon Sep 17 00:00:00 2001 From: Morten Torkildsen Date: Thu, 2 May 2019 11:32:01 -0700 Subject: [PATCH 192/327] fix(helm): Regenerate go types from proto Signed-off-by: Morten Torkildsen --- cmd/helm/version.go | 2 +- pkg/proto/hapi/chart/chart.pb.go | 65 +- pkg/proto/hapi/chart/config.pb.go | 77 +- pkg/proto/hapi/chart/metadata.pb.go | 115 ++- pkg/proto/hapi/chart/template.pb.go | 44 +- pkg/proto/hapi/release/hook.pb.go | 81 ++- pkg/proto/hapi/release/info.pb.go | 58 +- pkg/proto/hapi/release/release.pb.go | 63 +- pkg/proto/hapi/release/status.pb.go | 52 +- pkg/proto/hapi/release/test_run.pb.go | 62 +- pkg/proto/hapi/release/test_suite.pb.go | 54 +- pkg/proto/hapi/rudder/rudder.pb.go | 530 ++++++++++---- pkg/proto/hapi/services/tiller.pb.go | 891 ++++++++++++++++++------ pkg/proto/hapi/version/version.pb.go | 49 +- pkg/storage/driver/cfgmaps_test.go | 7 +- pkg/storage/driver/mock_test.go | 10 + pkg/storage/driver/secrets_test.go | 7 +- pkg/version/version_test.go | 12 +- 18 files changed, 1599 insertions(+), 580 deletions(-) diff --git a/cmd/helm/version.go b/cmd/helm/version.go index a803a990b..a5360ea36 100644 --- a/cmd/helm/version.go +++ b/cmd/helm/version.go @@ -151,5 +151,5 @@ func formatVersion(v *pb.Version, short bool) string { if short && v.GitCommit != "" { return fmt.Sprintf("%s+g%s", v.SemVer, v.GitCommit[:7]) } - return fmt.Sprintf("%#v", v) + return fmt.Sprintf("&version.Version{SemVer:\"%s\", GitCommit:\"%s\", GitTreeState:\"%s\"}", v.SemVer, v.GitCommit, v.GitTreeState) } diff --git a/pkg/proto/hapi/chart/chart.pb.go b/pkg/proto/hapi/chart/chart.pb.go index a884ed552..f54c717fb 100644 --- a/pkg/proto/hapi/chart/chart.pb.go +++ b/pkg/proto/hapi/chart/chart.pb.go @@ -1,29 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: hapi/chart/chart.proto -/* -Package chart is a generated protocol buffer package. - -It is generated from these files: - hapi/chart/chart.proto - hapi/chart/config.proto - hapi/chart/metadata.proto - hapi/chart/template.proto - -It has these top-level messages: - Chart - Config - Value - Maintainer - Metadata - Template -*/ package chart import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" -import google_protobuf "github.com/golang/protobuf/ptypes/any" +import any "github.com/golang/protobuf/ptypes/any" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -40,22 +23,44 @@ const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package // optionally parameterizable templates, and zero or more charts (dependencies). type Chart struct { // Contents of the Chartfile. - Metadata *Metadata `protobuf:"bytes,1,opt,name=metadata" json:"metadata,omitempty"` + Metadata *Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` // Templates for this chart. - Templates []*Template `protobuf:"bytes,2,rep,name=templates" json:"templates,omitempty"` + Templates []*Template `protobuf:"bytes,2,rep,name=templates,proto3" json:"templates,omitempty"` // Charts that this chart depends on. - Dependencies []*Chart `protobuf:"bytes,3,rep,name=dependencies" json:"dependencies,omitempty"` + Dependencies []*Chart `protobuf:"bytes,3,rep,name=dependencies,proto3" json:"dependencies,omitempty"` // Default config for this template. - Values *Config `protobuf:"bytes,4,opt,name=values" json:"values,omitempty"` + Values *Config `protobuf:"bytes,4,opt,name=values,proto3" json:"values,omitempty"` // Miscellaneous files in a chart archive, // e.g. README, LICENSE, etc. - Files []*google_protobuf.Any `protobuf:"bytes,5,rep,name=files" json:"files,omitempty"` + Files []*any.Any `protobuf:"bytes,5,rep,name=files,proto3" json:"files,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Chart) Reset() { *m = Chart{} } +func (m *Chart) String() string { return proto.CompactTextString(m) } +func (*Chart) ProtoMessage() {} +func (*Chart) Descriptor() ([]byte, []int) { + return fileDescriptor_chart_829b474cf208a7f0, []int{0} +} +func (m *Chart) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Chart.Unmarshal(m, b) +} +func (m *Chart) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Chart.Marshal(b, m, deterministic) +} +func (dst *Chart) XXX_Merge(src proto.Message) { + xxx_messageInfo_Chart.Merge(dst, src) +} +func (m *Chart) XXX_Size() int { + return xxx_messageInfo_Chart.Size(m) +} +func (m *Chart) XXX_DiscardUnknown() { + xxx_messageInfo_Chart.DiscardUnknown(m) } -func (m *Chart) Reset() { *m = Chart{} } -func (m *Chart) String() string { return proto.CompactTextString(m) } -func (*Chart) ProtoMessage() {} -func (*Chart) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +var xxx_messageInfo_Chart proto.InternalMessageInfo func (m *Chart) GetMetadata() *Metadata { if m != nil { @@ -85,7 +90,7 @@ func (m *Chart) GetValues() *Config { return nil } -func (m *Chart) GetFiles() []*google_protobuf.Any { +func (m *Chart) GetFiles() []*any.Any { if m != nil { return m.Files } @@ -96,9 +101,9 @@ func init() { proto.RegisterType((*Chart)(nil), "hapi.chart.Chart") } -func init() { proto.RegisterFile("hapi/chart/chart.proto", fileDescriptor0) } +func init() { proto.RegisterFile("hapi/chart/chart.proto", fileDescriptor_chart_829b474cf208a7f0) } -var fileDescriptor0 = []byte{ +var fileDescriptor_chart_829b474cf208a7f0 = []byte{ // 242 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0xb1, 0x4e, 0xc3, 0x30, 0x10, 0x86, 0x15, 0x4a, 0x0a, 0x1c, 0x2c, 0x58, 0x08, 0x4c, 0xa7, 0x8a, 0x09, 0x75, 0x70, 0x50, diff --git a/pkg/proto/hapi/chart/config.pb.go b/pkg/proto/hapi/chart/config.pb.go index 30c652700..fce589b14 100644 --- a/pkg/proto/hapi/chart/config.pb.go +++ b/pkg/proto/hapi/chart/config.pb.go @@ -12,16 +12,44 @@ var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package + // Config supplies values to the parametrizable templates of a chart. type Config struct { - Raw string `protobuf:"bytes,1,opt,name=raw" json:"raw,omitempty"` - Values map[string]*Value `protobuf:"bytes,2,rep,name=values" json:"values,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Raw string `protobuf:"bytes,1,opt,name=raw,proto3" json:"raw,omitempty"` + Values map[string]*Value `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Config) Reset() { *m = Config{} } +func (m *Config) String() string { return proto.CompactTextString(m) } +func (*Config) ProtoMessage() {} +func (*Config) Descriptor() ([]byte, []int) { + return fileDescriptor_config_332ead17c4feed84, []int{0} +} +func (m *Config) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Config.Unmarshal(m, b) +} +func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Config.Marshal(b, m, deterministic) +} +func (dst *Config) XXX_Merge(src proto.Message) { + xxx_messageInfo_Config.Merge(dst, src) +} +func (m *Config) XXX_Size() int { + return xxx_messageInfo_Config.Size(m) +} +func (m *Config) XXX_DiscardUnknown() { + xxx_messageInfo_Config.DiscardUnknown(m) } -func (m *Config) Reset() { *m = Config{} } -func (m *Config) String() string { return proto.CompactTextString(m) } -func (*Config) ProtoMessage() {} -func (*Config) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} } +var xxx_messageInfo_Config proto.InternalMessageInfo func (m *Config) GetRaw() string { if m != nil { @@ -39,13 +67,35 @@ func (m *Config) GetValues() map[string]*Value { // Value describes a configuration value as a string. type Value struct { - Value string `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"` + Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Value) Reset() { *m = Value{} } +func (m *Value) String() string { return proto.CompactTextString(m) } +func (*Value) ProtoMessage() {} +func (*Value) Descriptor() ([]byte, []int) { + return fileDescriptor_config_332ead17c4feed84, []int{1} +} +func (m *Value) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Value.Unmarshal(m, b) +} +func (m *Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Value.Marshal(b, m, deterministic) +} +func (dst *Value) XXX_Merge(src proto.Message) { + xxx_messageInfo_Value.Merge(dst, src) +} +func (m *Value) XXX_Size() int { + return xxx_messageInfo_Value.Size(m) +} +func (m *Value) XXX_DiscardUnknown() { + xxx_messageInfo_Value.DiscardUnknown(m) } -func (m *Value) Reset() { *m = Value{} } -func (m *Value) String() string { return proto.CompactTextString(m) } -func (*Value) ProtoMessage() {} -func (*Value) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{1} } +var xxx_messageInfo_Value proto.InternalMessageInfo func (m *Value) GetValue() string { if m != nil { @@ -56,12 +106,13 @@ func (m *Value) GetValue() string { func init() { proto.RegisterType((*Config)(nil), "hapi.chart.Config") + proto.RegisterMapType((map[string]*Value)(nil), "hapi.chart.Config.ValuesEntry") proto.RegisterType((*Value)(nil), "hapi.chart.Value") } -func init() { proto.RegisterFile("hapi/chart/config.proto", fileDescriptor1) } +func init() { proto.RegisterFile("hapi/chart/config.proto", fileDescriptor_config_332ead17c4feed84) } -var fileDescriptor1 = []byte{ +var fileDescriptor_config_332ead17c4feed84 = []byte{ // 182 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcf, 0x48, 0x2c, 0xc8, 0xd4, 0x4f, 0xce, 0x48, 0x2c, 0x2a, 0xd1, 0x4f, 0xce, 0xcf, 0x4b, 0xcb, 0x4c, 0xd7, 0x2b, 0x28, diff --git a/pkg/proto/hapi/chart/metadata.pb.go b/pkg/proto/hapi/chart/metadata.pb.go index 9daeaa9e5..ebf59fd9f 100644 --- a/pkg/proto/hapi/chart/metadata.pb.go +++ b/pkg/proto/hapi/chart/metadata.pb.go @@ -12,6 +12,12 @@ var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package + type Metadata_Engine int32 const ( @@ -31,22 +37,46 @@ var Metadata_Engine_value = map[string]int32{ func (x Metadata_Engine) String() string { return proto.EnumName(Metadata_Engine_name, int32(x)) } -func (Metadata_Engine) EnumDescriptor() ([]byte, []int) { return fileDescriptor2, []int{1, 0} } +func (Metadata_Engine) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_metadata_d6c714c73a051dcb, []int{1, 0} +} // Maintainer describes a Chart maintainer. type Maintainer struct { // Name is a user name or organization name - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Email is an optional email address to contact the named maintainer - Email string `protobuf:"bytes,2,opt,name=email" json:"email,omitempty"` + Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` // Url is an optional URL to an address for the named maintainer - Url string `protobuf:"bytes,3,opt,name=url" json:"url,omitempty"` + Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Maintainer) Reset() { *m = Maintainer{} } +func (m *Maintainer) String() string { return proto.CompactTextString(m) } +func (*Maintainer) ProtoMessage() {} +func (*Maintainer) Descriptor() ([]byte, []int) { + return fileDescriptor_metadata_d6c714c73a051dcb, []int{0} +} +func (m *Maintainer) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Maintainer.Unmarshal(m, b) +} +func (m *Maintainer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Maintainer.Marshal(b, m, deterministic) +} +func (dst *Maintainer) XXX_Merge(src proto.Message) { + xxx_messageInfo_Maintainer.Merge(dst, src) +} +func (m *Maintainer) XXX_Size() int { + return xxx_messageInfo_Maintainer.Size(m) +} +func (m *Maintainer) XXX_DiscardUnknown() { + xxx_messageInfo_Maintainer.DiscardUnknown(m) } -func (m *Maintainer) Reset() { *m = Maintainer{} } -func (m *Maintainer) String() string { return proto.CompactTextString(m) } -func (*Maintainer) ProtoMessage() {} -func (*Maintainer) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} } +var xxx_messageInfo_Maintainer proto.InternalMessageInfo func (m *Maintainer) GetName() string { if m != nil { @@ -74,47 +104,69 @@ func (m *Maintainer) GetUrl() string { // Spec: https://k8s.io/helm/blob/master/docs/design/chart_format.md#the-chart-file type Metadata struct { // The name of the chart - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The URL to a relevant project page, git repo, or contact person - Home string `protobuf:"bytes,2,opt,name=home" json:"home,omitempty"` + Home string `protobuf:"bytes,2,opt,name=home,proto3" json:"home,omitempty"` // Source is the URL to the source code of this chart - Sources []string `protobuf:"bytes,3,rep,name=sources" json:"sources,omitempty"` + Sources []string `protobuf:"bytes,3,rep,name=sources,proto3" json:"sources,omitempty"` // A SemVer 2 conformant version string of the chart - Version string `protobuf:"bytes,4,opt,name=version" json:"version,omitempty"` + Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` // A one-sentence description of the chart - Description string `protobuf:"bytes,5,opt,name=description" json:"description,omitempty"` + Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` // A list of string keywords - Keywords []string `protobuf:"bytes,6,rep,name=keywords" json:"keywords,omitempty"` + Keywords []string `protobuf:"bytes,6,rep,name=keywords,proto3" json:"keywords,omitempty"` // A list of name and URL/email address combinations for the maintainer(s) - Maintainers []*Maintainer `protobuf:"bytes,7,rep,name=maintainers" json:"maintainers,omitempty"` + Maintainers []*Maintainer `protobuf:"bytes,7,rep,name=maintainers,proto3" json:"maintainers,omitempty"` // The name of the template engine to use. Defaults to 'gotpl'. - Engine string `protobuf:"bytes,8,opt,name=engine" json:"engine,omitempty"` + Engine string `protobuf:"bytes,8,opt,name=engine,proto3" json:"engine,omitempty"` // The URL to an icon file. - Icon string `protobuf:"bytes,9,opt,name=icon" json:"icon,omitempty"` + Icon string `protobuf:"bytes,9,opt,name=icon,proto3" json:"icon,omitempty"` // The API Version of this chart. - ApiVersion string `protobuf:"bytes,10,opt,name=apiVersion" json:"apiVersion,omitempty"` + ApiVersion string `protobuf:"bytes,10,opt,name=apiVersion,proto3" json:"apiVersion,omitempty"` // The condition to check to enable chart - Condition string `protobuf:"bytes,11,opt,name=condition" json:"condition,omitempty"` + Condition string `protobuf:"bytes,11,opt,name=condition,proto3" json:"condition,omitempty"` // The tags to check to enable chart - Tags string `protobuf:"bytes,12,opt,name=tags" json:"tags,omitempty"` + Tags string `protobuf:"bytes,12,opt,name=tags,proto3" json:"tags,omitempty"` // The version of the application enclosed inside of this chart. - AppVersion string `protobuf:"bytes,13,opt,name=appVersion" json:"appVersion,omitempty"` + AppVersion string `protobuf:"bytes,13,opt,name=appVersion,proto3" json:"appVersion,omitempty"` // Whether or not this chart is deprecated - Deprecated bool `protobuf:"varint,14,opt,name=deprecated" json:"deprecated,omitempty"` + Deprecated bool `protobuf:"varint,14,opt,name=deprecated,proto3" json:"deprecated,omitempty"` // TillerVersion is a SemVer constraints on what version of Tiller is required. // See SemVer ranges here: https://github.com/Masterminds/semver#basic-comparisons - TillerVersion string `protobuf:"bytes,15,opt,name=tillerVersion" json:"tillerVersion,omitempty"` + TillerVersion string `protobuf:"bytes,15,opt,name=tillerVersion,proto3" json:"tillerVersion,omitempty"` // Annotations are additional mappings uninterpreted by Tiller, // made available for inspection by other applications. - Annotations map[string]string `protobuf:"bytes,16,rep,name=annotations" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Annotations map[string]string `protobuf:"bytes,16,rep,name=annotations,proto3" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // KubeVersion is a SemVer constraint specifying the version of Kubernetes required. - KubeVersion string `protobuf:"bytes,17,opt,name=kubeVersion" json:"kubeVersion,omitempty"` + KubeVersion string `protobuf:"bytes,17,opt,name=kubeVersion,proto3" json:"kubeVersion,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Metadata) Reset() { *m = Metadata{} } +func (m *Metadata) String() string { return proto.CompactTextString(m) } +func (*Metadata) ProtoMessage() {} +func (*Metadata) Descriptor() ([]byte, []int) { + return fileDescriptor_metadata_d6c714c73a051dcb, []int{1} +} +func (m *Metadata) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Metadata.Unmarshal(m, b) +} +func (m *Metadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Metadata.Marshal(b, m, deterministic) +} +func (dst *Metadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_Metadata.Merge(dst, src) +} +func (m *Metadata) XXX_Size() int { + return xxx_messageInfo_Metadata.Size(m) +} +func (m *Metadata) XXX_DiscardUnknown() { + xxx_messageInfo_Metadata.DiscardUnknown(m) } -func (m *Metadata) Reset() { *m = Metadata{} } -func (m *Metadata) String() string { return proto.CompactTextString(m) } -func (*Metadata) ProtoMessage() {} -func (*Metadata) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{1} } +var xxx_messageInfo_Metadata proto.InternalMessageInfo func (m *Metadata) GetName() string { if m != nil { @@ -238,12 +290,13 @@ func (m *Metadata) GetKubeVersion() string { func init() { proto.RegisterType((*Maintainer)(nil), "hapi.chart.Maintainer") proto.RegisterType((*Metadata)(nil), "hapi.chart.Metadata") + proto.RegisterMapType((map[string]string)(nil), "hapi.chart.Metadata.AnnotationsEntry") proto.RegisterEnum("hapi.chart.Metadata_Engine", Metadata_Engine_name, Metadata_Engine_value) } -func init() { proto.RegisterFile("hapi/chart/metadata.proto", fileDescriptor2) } +func init() { proto.RegisterFile("hapi/chart/metadata.proto", fileDescriptor_metadata_d6c714c73a051dcb) } -var fileDescriptor2 = []byte{ +var fileDescriptor_metadata_d6c714c73a051dcb = []byte{ // 435 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x52, 0x5d, 0x6b, 0xd4, 0x40, 0x14, 0x35, 0xcd, 0x66, 0x77, 0x73, 0x63, 0x35, 0x0e, 0x52, 0xc6, 0x22, 0x12, 0x16, 0x85, 0x7d, diff --git a/pkg/proto/hapi/chart/template.pb.go b/pkg/proto/hapi/chart/template.pb.go index 439aec5a8..4b77dddd0 100644 --- a/pkg/proto/hapi/chart/template.pb.go +++ b/pkg/proto/hapi/chart/template.pb.go @@ -12,21 +12,49 @@ var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package + // Template represents a template as a name/value pair. // // By convention, name is a relative path within the scope of the chart's // base directory. type Template struct { // Name is the path-like name of the template. - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Data is the template as byte data. - Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Template) Reset() { *m = Template{} } +func (m *Template) String() string { return proto.CompactTextString(m) } +func (*Template) ProtoMessage() {} +func (*Template) Descriptor() ([]byte, []int) { + return fileDescriptor_template_051845a7e9227d35, []int{0} +} +func (m *Template) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Template.Unmarshal(m, b) +} +func (m *Template) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Template.Marshal(b, m, deterministic) +} +func (dst *Template) XXX_Merge(src proto.Message) { + xxx_messageInfo_Template.Merge(dst, src) +} +func (m *Template) XXX_Size() int { + return xxx_messageInfo_Template.Size(m) +} +func (m *Template) XXX_DiscardUnknown() { + xxx_messageInfo_Template.DiscardUnknown(m) } -func (m *Template) Reset() { *m = Template{} } -func (m *Template) String() string { return proto.CompactTextString(m) } -func (*Template) ProtoMessage() {} -func (*Template) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0} } +var xxx_messageInfo_Template proto.InternalMessageInfo func (m *Template) GetName() string { if m != nil { @@ -46,9 +74,9 @@ func init() { proto.RegisterType((*Template)(nil), "hapi.chart.Template") } -func init() { proto.RegisterFile("hapi/chart/template.proto", fileDescriptor3) } +func init() { proto.RegisterFile("hapi/chart/template.proto", fileDescriptor_template_051845a7e9227d35) } -var fileDescriptor3 = []byte{ +var fileDescriptor_template_051845a7e9227d35 = []byte{ // 107 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0x48, 0x2c, 0xc8, 0xd4, 0x4f, 0xce, 0x48, 0x2c, 0x2a, 0xd1, 0x2f, 0x49, 0xcd, 0x2d, 0xc8, 0x49, 0x2c, 0x49, 0xd5, diff --git a/pkg/proto/hapi/release/hook.pb.go b/pkg/proto/hapi/release/hook.pb.go index 0a44165c8..bec2049b6 100644 --- a/pkg/proto/hapi/release/hook.pb.go +++ b/pkg/proto/hapi/release/hook.pb.go @@ -1,31 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: hapi/release/hook.proto -/* -Package release is a generated protocol buffer package. - -It is generated from these files: - hapi/release/hook.proto - hapi/release/info.proto - hapi/release/release.proto - hapi/release/status.proto - hapi/release/test_run.proto - hapi/release/test_suite.proto - -It has these top-level messages: - Hook - Info - Release - Status - TestRun - TestSuite -*/ package release import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" -import google_protobuf "github.com/golang/protobuf/ptypes/timestamp" +import timestamp "github.com/golang/protobuf/ptypes/timestamp" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -87,7 +68,9 @@ var Hook_Event_value = map[string]int32{ func (x Hook_Event) String() string { return proto.EnumName(Hook_Event_name, int32(x)) } -func (Hook_Event) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 0} } +func (Hook_Event) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_hook_8076b1a80af16030, []int{0, 0} +} type Hook_DeletePolicy int32 @@ -111,31 +94,55 @@ var Hook_DeletePolicy_value = map[string]int32{ func (x Hook_DeletePolicy) String() string { return proto.EnumName(Hook_DeletePolicy_name, int32(x)) } -func (Hook_DeletePolicy) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 1} } +func (Hook_DeletePolicy) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_hook_8076b1a80af16030, []int{0, 1} +} // Hook defines a hook object. type Hook struct { - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Kind is the Kubernetes kind. - Kind string `protobuf:"bytes,2,opt,name=kind" json:"kind,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` // Path is the chart-relative path to the template. - Path string `protobuf:"bytes,3,opt,name=path" json:"path,omitempty"` + Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` // Manifest is the manifest contents. - Manifest string `protobuf:"bytes,4,opt,name=manifest" json:"manifest,omitempty"` + Manifest string `protobuf:"bytes,4,opt,name=manifest,proto3" json:"manifest,omitempty"` // Events are the events that this hook fires on. - Events []Hook_Event `protobuf:"varint,5,rep,packed,name=events,enum=hapi.release.Hook_Event" json:"events,omitempty"` + Events []Hook_Event `protobuf:"varint,5,rep,packed,name=events,proto3,enum=hapi.release.Hook_Event" json:"events,omitempty"` // LastRun indicates the date/time this was last run. - LastRun *google_protobuf.Timestamp `protobuf:"bytes,6,opt,name=last_run,json=lastRun" json:"last_run,omitempty"` + LastRun *timestamp.Timestamp `protobuf:"bytes,6,opt,name=last_run,json=lastRun,proto3" json:"last_run,omitempty"` // Weight indicates the sort order for execution among similar Hook type - Weight int32 `protobuf:"varint,7,opt,name=weight" json:"weight,omitempty"` + Weight int32 `protobuf:"varint,7,opt,name=weight,proto3" json:"weight,omitempty"` // DeletePolicies are the policies that indicate when to delete the hook - DeletePolicies []Hook_DeletePolicy `protobuf:"varint,8,rep,packed,name=delete_policies,json=deletePolicies,enum=hapi.release.Hook_DeletePolicy" json:"delete_policies,omitempty"` + DeletePolicies []Hook_DeletePolicy `protobuf:"varint,8,rep,packed,name=delete_policies,json=deletePolicies,proto3,enum=hapi.release.Hook_DeletePolicy" json:"delete_policies,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Hook) Reset() { *m = Hook{} } +func (m *Hook) String() string { return proto.CompactTextString(m) } +func (*Hook) ProtoMessage() {} +func (*Hook) Descriptor() ([]byte, []int) { + return fileDescriptor_hook_8076b1a80af16030, []int{0} +} +func (m *Hook) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Hook.Unmarshal(m, b) +} +func (m *Hook) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Hook.Marshal(b, m, deterministic) +} +func (dst *Hook) XXX_Merge(src proto.Message) { + xxx_messageInfo_Hook.Merge(dst, src) +} +func (m *Hook) XXX_Size() int { + return xxx_messageInfo_Hook.Size(m) +} +func (m *Hook) XXX_DiscardUnknown() { + xxx_messageInfo_Hook.DiscardUnknown(m) } -func (m *Hook) Reset() { *m = Hook{} } -func (m *Hook) String() string { return proto.CompactTextString(m) } -func (*Hook) ProtoMessage() {} -func (*Hook) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +var xxx_messageInfo_Hook proto.InternalMessageInfo func (m *Hook) GetName() string { if m != nil { @@ -172,7 +179,7 @@ func (m *Hook) GetEvents() []Hook_Event { return nil } -func (m *Hook) GetLastRun() *google_protobuf.Timestamp { +func (m *Hook) GetLastRun() *timestamp.Timestamp { if m != nil { return m.LastRun } @@ -199,9 +206,9 @@ func init() { proto.RegisterEnum("hapi.release.Hook_DeletePolicy", Hook_DeletePolicy_name, Hook_DeletePolicy_value) } -func init() { proto.RegisterFile("hapi/release/hook.proto", fileDescriptor0) } +func init() { proto.RegisterFile("hapi/release/hook.proto", fileDescriptor_hook_8076b1a80af16030) } -var fileDescriptor0 = []byte{ +var fileDescriptor_hook_8076b1a80af16030 = []byte{ // 453 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0x51, 0x8f, 0x9a, 0x40, 0x10, 0x80, 0x8f, 0x53, 0x41, 0x47, 0xcf, 0xdb, 0x6e, 0x9a, 0x76, 0xe3, 0xcb, 0x19, 0x9f, 0x7c, diff --git a/pkg/proto/hapi/release/info.pb.go b/pkg/proto/hapi/release/info.pb.go index 7a7ccdd74..5ce2845a6 100644 --- a/pkg/proto/hapi/release/info.pb.go +++ b/pkg/proto/hapi/release/info.pb.go @@ -6,28 +6,56 @@ package release import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" -import google_protobuf "github.com/golang/protobuf/ptypes/timestamp" +import timestamp "github.com/golang/protobuf/ptypes/timestamp" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package + // Info describes release information. type Info struct { - Status *Status `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"` - FirstDeployed *google_protobuf.Timestamp `protobuf:"bytes,2,opt,name=first_deployed,json=firstDeployed" json:"first_deployed,omitempty"` - LastDeployed *google_protobuf.Timestamp `protobuf:"bytes,3,opt,name=last_deployed,json=lastDeployed" json:"last_deployed,omitempty"` + Status *Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + FirstDeployed *timestamp.Timestamp `protobuf:"bytes,2,opt,name=first_deployed,json=firstDeployed,proto3" json:"first_deployed,omitempty"` + LastDeployed *timestamp.Timestamp `protobuf:"bytes,3,opt,name=last_deployed,json=lastDeployed,proto3" json:"last_deployed,omitempty"` // Deleted tracks when this object was deleted. - Deleted *google_protobuf.Timestamp `protobuf:"bytes,4,opt,name=deleted" json:"deleted,omitempty"` + Deleted *timestamp.Timestamp `protobuf:"bytes,4,opt,name=deleted,proto3" json:"deleted,omitempty"` // Description is human-friendly "log entry" about this release. - Description string `protobuf:"bytes,5,opt,name=Description" json:"Description,omitempty"` + Description string `protobuf:"bytes,5,opt,name=Description,proto3" json:"Description,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Info) Reset() { *m = Info{} } +func (m *Info) String() string { return proto.CompactTextString(m) } +func (*Info) ProtoMessage() {} +func (*Info) Descriptor() ([]byte, []int) { + return fileDescriptor_info_1c62b71ed76c67c1, []int{0} +} +func (m *Info) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Info.Unmarshal(m, b) +} +func (m *Info) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Info.Marshal(b, m, deterministic) +} +func (dst *Info) XXX_Merge(src proto.Message) { + xxx_messageInfo_Info.Merge(dst, src) +} +func (m *Info) XXX_Size() int { + return xxx_messageInfo_Info.Size(m) +} +func (m *Info) XXX_DiscardUnknown() { + xxx_messageInfo_Info.DiscardUnknown(m) } -func (m *Info) Reset() { *m = Info{} } -func (m *Info) String() string { return proto.CompactTextString(m) } -func (*Info) ProtoMessage() {} -func (*Info) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} } +var xxx_messageInfo_Info proto.InternalMessageInfo func (m *Info) GetStatus() *Status { if m != nil { @@ -36,21 +64,21 @@ func (m *Info) GetStatus() *Status { return nil } -func (m *Info) GetFirstDeployed() *google_protobuf.Timestamp { +func (m *Info) GetFirstDeployed() *timestamp.Timestamp { if m != nil { return m.FirstDeployed } return nil } -func (m *Info) GetLastDeployed() *google_protobuf.Timestamp { +func (m *Info) GetLastDeployed() *timestamp.Timestamp { if m != nil { return m.LastDeployed } return nil } -func (m *Info) GetDeleted() *google_protobuf.Timestamp { +func (m *Info) GetDeleted() *timestamp.Timestamp { if m != nil { return m.Deleted } @@ -68,9 +96,9 @@ func init() { proto.RegisterType((*Info)(nil), "hapi.release.Info") } -func init() { proto.RegisterFile("hapi/release/info.proto", fileDescriptor1) } +func init() { proto.RegisterFile("hapi/release/info.proto", fileDescriptor_info_1c62b71ed76c67c1) } -var fileDescriptor1 = []byte{ +var fileDescriptor_info_1c62b71ed76c67c1 = []byte{ // 235 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x8f, 0x31, 0x4f, 0xc3, 0x30, 0x10, 0x85, 0x95, 0x52, 0x5a, 0xd5, 0x6d, 0x19, 0x2c, 0x24, 0x42, 0x16, 0x22, 0xa6, 0x0e, 0xc8, diff --git a/pkg/proto/hapi/release/release.pb.go b/pkg/proto/hapi/release/release.pb.go index 511b543d7..e9578f00a 100644 --- a/pkg/proto/hapi/release/release.pb.go +++ b/pkg/proto/hapi/release/release.pb.go @@ -6,40 +6,67 @@ package release import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" -import hapi_chart "k8s.io/helm/pkg/proto/hapi/chart" -import hapi_chart3 "k8s.io/helm/pkg/proto/hapi/chart" +import chart "k8s.io/helm/pkg/proto/hapi/chart" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package + // Release describes a deployment of a chart, together with the chart // and the variables used to deploy that chart. type Release struct { // Name is the name of the release - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Info provides information about a release - Info *Info `protobuf:"bytes,2,opt,name=info" json:"info,omitempty"` + Info *Info `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"` // Chart is the chart that was released. - Chart *hapi_chart3.Chart `protobuf:"bytes,3,opt,name=chart" json:"chart,omitempty"` + Chart *chart.Chart `protobuf:"bytes,3,opt,name=chart,proto3" json:"chart,omitempty"` // Config is the set of extra Values added to the chart. // These values override the default values inside of the chart. - Config *hapi_chart.Config `protobuf:"bytes,4,opt,name=config" json:"config,omitempty"` + Config *chart.Config `protobuf:"bytes,4,opt,name=config,proto3" json:"config,omitempty"` // Manifest is the string representation of the rendered template. - Manifest string `protobuf:"bytes,5,opt,name=manifest" json:"manifest,omitempty"` + Manifest string `protobuf:"bytes,5,opt,name=manifest,proto3" json:"manifest,omitempty"` // Hooks are all of the hooks declared for this release. - Hooks []*Hook `protobuf:"bytes,6,rep,name=hooks" json:"hooks,omitempty"` + Hooks []*Hook `protobuf:"bytes,6,rep,name=hooks,proto3" json:"hooks,omitempty"` // Version is an int32 which represents the version of the release. - Version int32 `protobuf:"varint,7,opt,name=version" json:"version,omitempty"` + Version int32 `protobuf:"varint,7,opt,name=version,proto3" json:"version,omitempty"` // Namespace is the kubernetes namespace of the release. - Namespace string `protobuf:"bytes,8,opt,name=namespace" json:"namespace,omitempty"` + Namespace string `protobuf:"bytes,8,opt,name=namespace,proto3" json:"namespace,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Release) Reset() { *m = Release{} } +func (m *Release) String() string { return proto.CompactTextString(m) } +func (*Release) ProtoMessage() {} +func (*Release) Descriptor() ([]byte, []int) { + return fileDescriptor_release_4bea5d16ba219619, []int{0} +} +func (m *Release) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Release.Unmarshal(m, b) +} +func (m *Release) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Release.Marshal(b, m, deterministic) +} +func (dst *Release) XXX_Merge(src proto.Message) { + xxx_messageInfo_Release.Merge(dst, src) +} +func (m *Release) XXX_Size() int { + return xxx_messageInfo_Release.Size(m) +} +func (m *Release) XXX_DiscardUnknown() { + xxx_messageInfo_Release.DiscardUnknown(m) } -func (m *Release) Reset() { *m = Release{} } -func (m *Release) String() string { return proto.CompactTextString(m) } -func (*Release) ProtoMessage() {} -func (*Release) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} } +var xxx_messageInfo_Release proto.InternalMessageInfo func (m *Release) GetName() string { if m != nil { @@ -55,14 +82,14 @@ func (m *Release) GetInfo() *Info { return nil } -func (m *Release) GetChart() *hapi_chart3.Chart { +func (m *Release) GetChart() *chart.Chart { if m != nil { return m.Chart } return nil } -func (m *Release) GetConfig() *hapi_chart.Config { +func (m *Release) GetConfig() *chart.Config { if m != nil { return m.Config } @@ -101,9 +128,9 @@ func init() { proto.RegisterType((*Release)(nil), "hapi.release.Release") } -func init() { proto.RegisterFile("hapi/release/release.proto", fileDescriptor2) } +func init() { proto.RegisterFile("hapi/release/release.proto", fileDescriptor_release_4bea5d16ba219619) } -var fileDescriptor2 = []byte{ +var fileDescriptor_release_4bea5d16ba219619 = []byte{ // 256 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x90, 0xbf, 0x4e, 0xc3, 0x40, 0x0c, 0xc6, 0x95, 0x36, 0x7f, 0x1a, 0xc3, 0x82, 0x07, 0xb0, 0x22, 0x86, 0x88, 0x01, 0x22, 0x86, diff --git a/pkg/proto/hapi/release/status.pb.go b/pkg/proto/hapi/release/status.pb.go index bc75e64b2..c5ed59202 100644 --- a/pkg/proto/hapi/release/status.pb.go +++ b/pkg/proto/hapi/release/status.pb.go @@ -13,6 +13,12 @@ var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package + type Status_Code int32 const ( @@ -62,23 +68,47 @@ var Status_Code_value = map[string]int32{ func (x Status_Code) String() string { return proto.EnumName(Status_Code_name, int32(x)) } -func (Status_Code) EnumDescriptor() ([]byte, []int) { return fileDescriptor3, []int{0, 0} } +func (Status_Code) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_status_933517e5a50981ed, []int{0, 0} +} // Status defines the status of a release. type Status struct { - Code Status_Code `protobuf:"varint,1,opt,name=code,enum=hapi.release.Status_Code" json:"code,omitempty"` + Code Status_Code `protobuf:"varint,1,opt,name=code,proto3,enum=hapi.release.Status_Code" json:"code,omitempty"` // Cluster resources as kubectl would print them. - Resources string `protobuf:"bytes,3,opt,name=resources" json:"resources,omitempty"` + Resources string `protobuf:"bytes,3,opt,name=resources,proto3" json:"resources,omitempty"` // Contains the rendered templates/NOTES.txt if available - Notes string `protobuf:"bytes,4,opt,name=notes" json:"notes,omitempty"` + Notes string `protobuf:"bytes,4,opt,name=notes,proto3" json:"notes,omitempty"` // LastTestSuiteRun provides results on the last test run on a release - LastTestSuiteRun *TestSuite `protobuf:"bytes,5,opt,name=last_test_suite_run,json=lastTestSuiteRun" json:"last_test_suite_run,omitempty"` + LastTestSuiteRun *TestSuite `protobuf:"bytes,5,opt,name=last_test_suite_run,json=lastTestSuiteRun,proto3" json:"last_test_suite_run,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Status) Reset() { *m = Status{} } +func (m *Status) String() string { return proto.CompactTextString(m) } +func (*Status) ProtoMessage() {} +func (*Status) Descriptor() ([]byte, []int) { + return fileDescriptor_status_933517e5a50981ed, []int{0} +} +func (m *Status) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Status.Unmarshal(m, b) +} +func (m *Status) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Status.Marshal(b, m, deterministic) +} +func (dst *Status) XXX_Merge(src proto.Message) { + xxx_messageInfo_Status.Merge(dst, src) +} +func (m *Status) XXX_Size() int { + return xxx_messageInfo_Status.Size(m) +} +func (m *Status) XXX_DiscardUnknown() { + xxx_messageInfo_Status.DiscardUnknown(m) } -func (m *Status) Reset() { *m = Status{} } -func (m *Status) String() string { return proto.CompactTextString(m) } -func (*Status) ProtoMessage() {} -func (*Status) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0} } +var xxx_messageInfo_Status proto.InternalMessageInfo func (m *Status) GetCode() Status_Code { if m != nil { @@ -113,9 +143,9 @@ func init() { proto.RegisterEnum("hapi.release.Status_Code", Status_Code_name, Status_Code_value) } -func init() { proto.RegisterFile("hapi/release/status.proto", fileDescriptor3) } +func init() { proto.RegisterFile("hapi/release/status.proto", fileDescriptor_status_933517e5a50981ed) } -var fileDescriptor3 = []byte{ +var fileDescriptor_status_933517e5a50981ed = []byte{ // 333 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x90, 0xd1, 0x6e, 0xa2, 0x40, 0x14, 0x86, 0x17, 0x45, 0xd4, 0xa3, 0x71, 0x27, 0xa3, 0xc9, 0xa2, 0xd9, 0x4d, 0x8c, 0x57, 0xde, diff --git a/pkg/proto/hapi/release/test_run.pb.go b/pkg/proto/hapi/release/test_run.pb.go index 4d39d17c2..f43be231d 100644 --- a/pkg/proto/hapi/release/test_run.pb.go +++ b/pkg/proto/hapi/release/test_run.pb.go @@ -6,13 +6,19 @@ package release import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" -import google_protobuf "github.com/golang/protobuf/ptypes/timestamp" +import timestamp "github.com/golang/protobuf/ptypes/timestamp" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package + type TestRun_Status int32 const ( @@ -38,20 +44,44 @@ var TestRun_Status_value = map[string]int32{ func (x TestRun_Status) String() string { return proto.EnumName(TestRun_Status_name, int32(x)) } -func (TestRun_Status) EnumDescriptor() ([]byte, []int) { return fileDescriptor4, []int{0, 0} } +func (TestRun_Status) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_test_run_31b133e40c63664e, []int{0, 0} +} type TestRun struct { - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Status TestRun_Status `protobuf:"varint,2,opt,name=status,enum=hapi.release.TestRun_Status" json:"status,omitempty"` - Info string `protobuf:"bytes,3,opt,name=info" json:"info,omitempty"` - StartedAt *google_protobuf.Timestamp `protobuf:"bytes,4,opt,name=started_at,json=startedAt" json:"started_at,omitempty"` - CompletedAt *google_protobuf.Timestamp `protobuf:"bytes,5,opt,name=completed_at,json=completedAt" json:"completed_at,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Status TestRun_Status `protobuf:"varint,2,opt,name=status,proto3,enum=hapi.release.TestRun_Status" json:"status,omitempty"` + Info string `protobuf:"bytes,3,opt,name=info,proto3" json:"info,omitempty"` + StartedAt *timestamp.Timestamp `protobuf:"bytes,4,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` + CompletedAt *timestamp.Timestamp `protobuf:"bytes,5,opt,name=completed_at,json=completedAt,proto3" json:"completed_at,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *TestRun) Reset() { *m = TestRun{} } -func (m *TestRun) String() string { return proto.CompactTextString(m) } -func (*TestRun) ProtoMessage() {} -func (*TestRun) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{0} } +func (m *TestRun) Reset() { *m = TestRun{} } +func (m *TestRun) String() string { return proto.CompactTextString(m) } +func (*TestRun) ProtoMessage() {} +func (*TestRun) Descriptor() ([]byte, []int) { + return fileDescriptor_test_run_31b133e40c63664e, []int{0} +} +func (m *TestRun) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TestRun.Unmarshal(m, b) +} +func (m *TestRun) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TestRun.Marshal(b, m, deterministic) +} +func (dst *TestRun) XXX_Merge(src proto.Message) { + xxx_messageInfo_TestRun.Merge(dst, src) +} +func (m *TestRun) XXX_Size() int { + return xxx_messageInfo_TestRun.Size(m) +} +func (m *TestRun) XXX_DiscardUnknown() { + xxx_messageInfo_TestRun.DiscardUnknown(m) +} + +var xxx_messageInfo_TestRun proto.InternalMessageInfo func (m *TestRun) GetName() string { if m != nil { @@ -74,14 +104,14 @@ func (m *TestRun) GetInfo() string { return "" } -func (m *TestRun) GetStartedAt() *google_protobuf.Timestamp { +func (m *TestRun) GetStartedAt() *timestamp.Timestamp { if m != nil { return m.StartedAt } return nil } -func (m *TestRun) GetCompletedAt() *google_protobuf.Timestamp { +func (m *TestRun) GetCompletedAt() *timestamp.Timestamp { if m != nil { return m.CompletedAt } @@ -93,9 +123,11 @@ func init() { proto.RegisterEnum("hapi.release.TestRun_Status", TestRun_Status_name, TestRun_Status_value) } -func init() { proto.RegisterFile("hapi/release/test_run.proto", fileDescriptor4) } +func init() { + proto.RegisterFile("hapi/release/test_run.proto", fileDescriptor_test_run_31b133e40c63664e) +} -var fileDescriptor4 = []byte{ +var fileDescriptor_test_run_31b133e40c63664e = []byte{ // 274 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x8f, 0xc1, 0x4b, 0xfb, 0x30, 0x1c, 0xc5, 0x7f, 0xe9, 0xf6, 0x6b, 0x69, 0x3a, 0xa4, 0xe4, 0x54, 0xa6, 0x60, 0xd9, 0xa9, 0xa7, diff --git a/pkg/proto/hapi/release/test_suite.pb.go b/pkg/proto/hapi/release/test_suite.pb.go index b7fa26147..d2cf3a979 100644 --- a/pkg/proto/hapi/release/test_suite.pb.go +++ b/pkg/proto/hapi/release/test_suite.pb.go @@ -6,36 +6,64 @@ package release import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" -import google_protobuf "github.com/golang/protobuf/ptypes/timestamp" +import timestamp "github.com/golang/protobuf/ptypes/timestamp" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package + // TestSuite comprises of the last run of the pre-defined test suite of a release version type TestSuite struct { // StartedAt indicates the date/time this test suite was kicked off - StartedAt *google_protobuf.Timestamp `protobuf:"bytes,1,opt,name=started_at,json=startedAt" json:"started_at,omitempty"` + StartedAt *timestamp.Timestamp `protobuf:"bytes,1,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` // CompletedAt indicates the date/time this test suite was completed - CompletedAt *google_protobuf.Timestamp `protobuf:"bytes,2,opt,name=completed_at,json=completedAt" json:"completed_at,omitempty"` + CompletedAt *timestamp.Timestamp `protobuf:"bytes,2,opt,name=completed_at,json=completedAt,proto3" json:"completed_at,omitempty"` // Results are the results of each segment of the test - Results []*TestRun `protobuf:"bytes,3,rep,name=results" json:"results,omitempty"` + Results []*TestRun `protobuf:"bytes,3,rep,name=results,proto3" json:"results,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TestSuite) Reset() { *m = TestSuite{} } +func (m *TestSuite) String() string { return proto.CompactTextString(m) } +func (*TestSuite) ProtoMessage() {} +func (*TestSuite) Descriptor() ([]byte, []int) { + return fileDescriptor_test_suite_06a0016f2c6417b8, []int{0} +} +func (m *TestSuite) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TestSuite.Unmarshal(m, b) +} +func (m *TestSuite) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TestSuite.Marshal(b, m, deterministic) +} +func (dst *TestSuite) XXX_Merge(src proto.Message) { + xxx_messageInfo_TestSuite.Merge(dst, src) +} +func (m *TestSuite) XXX_Size() int { + return xxx_messageInfo_TestSuite.Size(m) +} +func (m *TestSuite) XXX_DiscardUnknown() { + xxx_messageInfo_TestSuite.DiscardUnknown(m) } -func (m *TestSuite) Reset() { *m = TestSuite{} } -func (m *TestSuite) String() string { return proto.CompactTextString(m) } -func (*TestSuite) ProtoMessage() {} -func (*TestSuite) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{0} } +var xxx_messageInfo_TestSuite proto.InternalMessageInfo -func (m *TestSuite) GetStartedAt() *google_protobuf.Timestamp { +func (m *TestSuite) GetStartedAt() *timestamp.Timestamp { if m != nil { return m.StartedAt } return nil } -func (m *TestSuite) GetCompletedAt() *google_protobuf.Timestamp { +func (m *TestSuite) GetCompletedAt() *timestamp.Timestamp { if m != nil { return m.CompletedAt } @@ -53,9 +81,11 @@ func init() { proto.RegisterType((*TestSuite)(nil), "hapi.release.TestSuite") } -func init() { proto.RegisterFile("hapi/release/test_suite.proto", fileDescriptor5) } +func init() { + proto.RegisterFile("hapi/release/test_suite.proto", fileDescriptor_test_suite_06a0016f2c6417b8) +} -var fileDescriptor5 = []byte{ +var fileDescriptor_test_suite_06a0016f2c6417b8 = []byte{ // 207 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x8f, 0xc1, 0x4a, 0x86, 0x40, 0x14, 0x85, 0x31, 0x21, 0x71, 0x74, 0x35, 0x10, 0x88, 0x11, 0x49, 0x2b, 0x57, 0x33, 0x60, 0xab, diff --git a/pkg/proto/hapi/rudder/rudder.pb.go b/pkg/proto/hapi/rudder/rudder.pb.go index 3a0de7746..d594836c4 100644 --- a/pkg/proto/hapi/rudder/rudder.pb.go +++ b/pkg/proto/hapi/rudder/rudder.pb.go @@ -1,34 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: hapi/rudder/rudder.proto -/* -Package rudder is a generated protocol buffer package. - -It is generated from these files: - hapi/rudder/rudder.proto - -It has these top-level messages: - Result - VersionReleaseRequest - VersionReleaseResponse - InstallReleaseRequest - InstallReleaseResponse - DeleteReleaseRequest - DeleteReleaseResponse - UpgradeReleaseRequest - UpgradeReleaseResponse - RollbackReleaseRequest - RollbackReleaseResponse - ReleaseStatusRequest - ReleaseStatusResponse -*/ package rudder import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" -import hapi_release3 "k8s.io/helm/pkg/proto/hapi/release" -import hapi_release5 "k8s.io/helm/pkg/proto/hapi/release" +import release "k8s.io/helm/pkg/proto/hapi/release" import ( context "golang.org/x/net/context" @@ -75,17 +53,41 @@ var Result_Status_value = map[string]int32{ func (x Result_Status) String() string { return proto.EnumName(Result_Status_name, int32(x)) } -func (Result_Status) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 0} } +func (Result_Status) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_rudder_dd8cdbe38a210d28, []int{0, 0} +} type Result struct { - Info string `protobuf:"bytes,1,opt,name=info" json:"info,omitempty"` - Log []string `protobuf:"bytes,2,rep,name=log" json:"log,omitempty"` + Info string `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` + Log []string `protobuf:"bytes,2,rep,name=log,proto3" json:"log,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Result) Reset() { *m = Result{} } +func (m *Result) String() string { return proto.CompactTextString(m) } +func (*Result) ProtoMessage() {} +func (*Result) Descriptor() ([]byte, []int) { + return fileDescriptor_rudder_dd8cdbe38a210d28, []int{0} +} +func (m *Result) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Result.Unmarshal(m, b) +} +func (m *Result) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Result.Marshal(b, m, deterministic) +} +func (dst *Result) XXX_Merge(src proto.Message) { + xxx_messageInfo_Result.Merge(dst, src) +} +func (m *Result) XXX_Size() int { + return xxx_messageInfo_Result.Size(m) +} +func (m *Result) XXX_DiscardUnknown() { + xxx_messageInfo_Result.DiscardUnknown(m) } -func (m *Result) Reset() { *m = Result{} } -func (m *Result) String() string { return proto.CompactTextString(m) } -func (*Result) ProtoMessage() {} -func (*Result) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +var xxx_messageInfo_Result proto.InternalMessageInfo func (m *Result) GetInfo() string { if m != nil { @@ -102,22 +104,66 @@ func (m *Result) GetLog() []string { } type VersionReleaseRequest struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *VersionReleaseRequest) Reset() { *m = VersionReleaseRequest{} } +func (m *VersionReleaseRequest) String() string { return proto.CompactTextString(m) } +func (*VersionReleaseRequest) ProtoMessage() {} +func (*VersionReleaseRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_rudder_dd8cdbe38a210d28, []int{1} +} +func (m *VersionReleaseRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_VersionReleaseRequest.Unmarshal(m, b) +} +func (m *VersionReleaseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_VersionReleaseRequest.Marshal(b, m, deterministic) +} +func (dst *VersionReleaseRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_VersionReleaseRequest.Merge(dst, src) +} +func (m *VersionReleaseRequest) XXX_Size() int { + return xxx_messageInfo_VersionReleaseRequest.Size(m) +} +func (m *VersionReleaseRequest) XXX_DiscardUnknown() { + xxx_messageInfo_VersionReleaseRequest.DiscardUnknown(m) } -func (m *VersionReleaseRequest) Reset() { *m = VersionReleaseRequest{} } -func (m *VersionReleaseRequest) String() string { return proto.CompactTextString(m) } -func (*VersionReleaseRequest) ProtoMessage() {} -func (*VersionReleaseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } +var xxx_messageInfo_VersionReleaseRequest proto.InternalMessageInfo type VersionReleaseResponse struct { - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Version string `protobuf:"bytes,2,opt,name=version" json:"version,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *VersionReleaseResponse) Reset() { *m = VersionReleaseResponse{} } +func (m *VersionReleaseResponse) String() string { return proto.CompactTextString(m) } +func (*VersionReleaseResponse) ProtoMessage() {} +func (*VersionReleaseResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_rudder_dd8cdbe38a210d28, []int{2} +} +func (m *VersionReleaseResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_VersionReleaseResponse.Unmarshal(m, b) +} +func (m *VersionReleaseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_VersionReleaseResponse.Marshal(b, m, deterministic) +} +func (dst *VersionReleaseResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_VersionReleaseResponse.Merge(dst, src) +} +func (m *VersionReleaseResponse) XXX_Size() int { + return xxx_messageInfo_VersionReleaseResponse.Size(m) +} +func (m *VersionReleaseResponse) XXX_DiscardUnknown() { + xxx_messageInfo_VersionReleaseResponse.DiscardUnknown(m) } -func (m *VersionReleaseResponse) Reset() { *m = VersionReleaseResponse{} } -func (m *VersionReleaseResponse) String() string { return proto.CompactTextString(m) } -func (*VersionReleaseResponse) ProtoMessage() {} -func (*VersionReleaseResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } +var xxx_messageInfo_VersionReleaseResponse proto.InternalMessageInfo func (m *VersionReleaseResponse) GetName() string { if m != nil { @@ -134,15 +180,37 @@ func (m *VersionReleaseResponse) GetVersion() string { } type InstallReleaseRequest struct { - Release *hapi_release5.Release `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` + Release *release.Release `protobuf:"bytes,1,opt,name=release,proto3" json:"release,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *InstallReleaseRequest) Reset() { *m = InstallReleaseRequest{} } -func (m *InstallReleaseRequest) String() string { return proto.CompactTextString(m) } -func (*InstallReleaseRequest) ProtoMessage() {} -func (*InstallReleaseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } +func (m *InstallReleaseRequest) Reset() { *m = InstallReleaseRequest{} } +func (m *InstallReleaseRequest) String() string { return proto.CompactTextString(m) } +func (*InstallReleaseRequest) ProtoMessage() {} +func (*InstallReleaseRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_rudder_dd8cdbe38a210d28, []int{3} +} +func (m *InstallReleaseRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_InstallReleaseRequest.Unmarshal(m, b) +} +func (m *InstallReleaseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_InstallReleaseRequest.Marshal(b, m, deterministic) +} +func (dst *InstallReleaseRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_InstallReleaseRequest.Merge(dst, src) +} +func (m *InstallReleaseRequest) XXX_Size() int { + return xxx_messageInfo_InstallReleaseRequest.Size(m) +} +func (m *InstallReleaseRequest) XXX_DiscardUnknown() { + xxx_messageInfo_InstallReleaseRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_InstallReleaseRequest proto.InternalMessageInfo -func (m *InstallReleaseRequest) GetRelease() *hapi_release5.Release { +func (m *InstallReleaseRequest) GetRelease() *release.Release { if m != nil { return m.Release } @@ -150,16 +218,38 @@ func (m *InstallReleaseRequest) GetRelease() *hapi_release5.Release { } type InstallReleaseResponse struct { - Release *hapi_release5.Release `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` - Result *Result `protobuf:"bytes,2,opt,name=result" json:"result,omitempty"` + Release *release.Release `protobuf:"bytes,1,opt,name=release,proto3" json:"release,omitempty"` + Result *Result `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *InstallReleaseResponse) Reset() { *m = InstallReleaseResponse{} } +func (m *InstallReleaseResponse) String() string { return proto.CompactTextString(m) } +func (*InstallReleaseResponse) ProtoMessage() {} +func (*InstallReleaseResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_rudder_dd8cdbe38a210d28, []int{4} +} +func (m *InstallReleaseResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_InstallReleaseResponse.Unmarshal(m, b) +} +func (m *InstallReleaseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_InstallReleaseResponse.Marshal(b, m, deterministic) +} +func (dst *InstallReleaseResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_InstallReleaseResponse.Merge(dst, src) +} +func (m *InstallReleaseResponse) XXX_Size() int { + return xxx_messageInfo_InstallReleaseResponse.Size(m) +} +func (m *InstallReleaseResponse) XXX_DiscardUnknown() { + xxx_messageInfo_InstallReleaseResponse.DiscardUnknown(m) } -func (m *InstallReleaseResponse) Reset() { *m = InstallReleaseResponse{} } -func (m *InstallReleaseResponse) String() string { return proto.CompactTextString(m) } -func (*InstallReleaseResponse) ProtoMessage() {} -func (*InstallReleaseResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } +var xxx_messageInfo_InstallReleaseResponse proto.InternalMessageInfo -func (m *InstallReleaseResponse) GetRelease() *hapi_release5.Release { +func (m *InstallReleaseResponse) GetRelease() *release.Release { if m != nil { return m.Release } @@ -174,15 +264,37 @@ func (m *InstallReleaseResponse) GetResult() *Result { } type DeleteReleaseRequest struct { - Release *hapi_release5.Release `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` + Release *release.Release `protobuf:"bytes,1,opt,name=release,proto3" json:"release,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *DeleteReleaseRequest) Reset() { *m = DeleteReleaseRequest{} } -func (m *DeleteReleaseRequest) String() string { return proto.CompactTextString(m) } -func (*DeleteReleaseRequest) ProtoMessage() {} -func (*DeleteReleaseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } +func (m *DeleteReleaseRequest) Reset() { *m = DeleteReleaseRequest{} } +func (m *DeleteReleaseRequest) String() string { return proto.CompactTextString(m) } +func (*DeleteReleaseRequest) ProtoMessage() {} +func (*DeleteReleaseRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_rudder_dd8cdbe38a210d28, []int{5} +} +func (m *DeleteReleaseRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeleteReleaseRequest.Unmarshal(m, b) +} +func (m *DeleteReleaseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeleteReleaseRequest.Marshal(b, m, deterministic) +} +func (dst *DeleteReleaseRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteReleaseRequest.Merge(dst, src) +} +func (m *DeleteReleaseRequest) XXX_Size() int { + return xxx_messageInfo_DeleteReleaseRequest.Size(m) +} +func (m *DeleteReleaseRequest) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteReleaseRequest.DiscardUnknown(m) +} -func (m *DeleteReleaseRequest) GetRelease() *hapi_release5.Release { +var xxx_messageInfo_DeleteReleaseRequest proto.InternalMessageInfo + +func (m *DeleteReleaseRequest) GetRelease() *release.Release { if m != nil { return m.Release } @@ -190,16 +302,38 @@ func (m *DeleteReleaseRequest) GetRelease() *hapi_release5.Release { } type DeleteReleaseResponse struct { - Release *hapi_release5.Release `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` - Result *Result `protobuf:"bytes,2,opt,name=result" json:"result,omitempty"` + Release *release.Release `protobuf:"bytes,1,opt,name=release,proto3" json:"release,omitempty"` + Result *Result `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeleteReleaseResponse) Reset() { *m = DeleteReleaseResponse{} } +func (m *DeleteReleaseResponse) String() string { return proto.CompactTextString(m) } +func (*DeleteReleaseResponse) ProtoMessage() {} +func (*DeleteReleaseResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_rudder_dd8cdbe38a210d28, []int{6} +} +func (m *DeleteReleaseResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeleteReleaseResponse.Unmarshal(m, b) +} +func (m *DeleteReleaseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeleteReleaseResponse.Marshal(b, m, deterministic) +} +func (dst *DeleteReleaseResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteReleaseResponse.Merge(dst, src) +} +func (m *DeleteReleaseResponse) XXX_Size() int { + return xxx_messageInfo_DeleteReleaseResponse.Size(m) +} +func (m *DeleteReleaseResponse) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteReleaseResponse.DiscardUnknown(m) } -func (m *DeleteReleaseResponse) Reset() { *m = DeleteReleaseResponse{} } -func (m *DeleteReleaseResponse) String() string { return proto.CompactTextString(m) } -func (*DeleteReleaseResponse) ProtoMessage() {} -func (*DeleteReleaseResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } +var xxx_messageInfo_DeleteReleaseResponse proto.InternalMessageInfo -func (m *DeleteReleaseResponse) GetRelease() *hapi_release5.Release { +func (m *DeleteReleaseResponse) GetRelease() *release.Release { if m != nil { return m.Release } @@ -214,28 +348,50 @@ func (m *DeleteReleaseResponse) GetResult() *Result { } type UpgradeReleaseRequest struct { - Current *hapi_release5.Release `protobuf:"bytes,1,opt,name=current" json:"current,omitempty"` - Target *hapi_release5.Release `protobuf:"bytes,2,opt,name=target" json:"target,omitempty"` - Timeout int64 `protobuf:"varint,3,opt,name=Timeout" json:"Timeout,omitempty"` - Wait bool `protobuf:"varint,4,opt,name=Wait" json:"Wait,omitempty"` - Recreate bool `protobuf:"varint,5,opt,name=Recreate" json:"Recreate,omitempty"` - Force bool `protobuf:"varint,6,opt,name=Force" json:"Force,omitempty"` - CleanupOnFail bool `protobuf:"varint,7,opt,name=CleanupOnFail" json:"CleanupOnFail,omitempty"` + Current *release.Release `protobuf:"bytes,1,opt,name=current,proto3" json:"current,omitempty"` + Target *release.Release `protobuf:"bytes,2,opt,name=target,proto3" json:"target,omitempty"` + Timeout int64 `protobuf:"varint,3,opt,name=Timeout,proto3" json:"Timeout,omitempty"` + Wait bool `protobuf:"varint,4,opt,name=Wait,proto3" json:"Wait,omitempty"` + Recreate bool `protobuf:"varint,5,opt,name=Recreate,proto3" json:"Recreate,omitempty"` + Force bool `protobuf:"varint,6,opt,name=Force,proto3" json:"Force,omitempty"` + CleanupOnFail bool `protobuf:"varint,7,opt,name=CleanupOnFail,proto3" json:"CleanupOnFail,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UpgradeReleaseRequest) Reset() { *m = UpgradeReleaseRequest{} } +func (m *UpgradeReleaseRequest) String() string { return proto.CompactTextString(m) } +func (*UpgradeReleaseRequest) ProtoMessage() {} +func (*UpgradeReleaseRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_rudder_dd8cdbe38a210d28, []int{7} +} +func (m *UpgradeReleaseRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UpgradeReleaseRequest.Unmarshal(m, b) +} +func (m *UpgradeReleaseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UpgradeReleaseRequest.Marshal(b, m, deterministic) +} +func (dst *UpgradeReleaseRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpgradeReleaseRequest.Merge(dst, src) +} +func (m *UpgradeReleaseRequest) XXX_Size() int { + return xxx_messageInfo_UpgradeReleaseRequest.Size(m) +} +func (m *UpgradeReleaseRequest) XXX_DiscardUnknown() { + xxx_messageInfo_UpgradeReleaseRequest.DiscardUnknown(m) } -func (m *UpgradeReleaseRequest) Reset() { *m = UpgradeReleaseRequest{} } -func (m *UpgradeReleaseRequest) String() string { return proto.CompactTextString(m) } -func (*UpgradeReleaseRequest) ProtoMessage() {} -func (*UpgradeReleaseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } +var xxx_messageInfo_UpgradeReleaseRequest proto.InternalMessageInfo -func (m *UpgradeReleaseRequest) GetCurrent() *hapi_release5.Release { +func (m *UpgradeReleaseRequest) GetCurrent() *release.Release { if m != nil { return m.Current } return nil } -func (m *UpgradeReleaseRequest) GetTarget() *hapi_release5.Release { +func (m *UpgradeReleaseRequest) GetTarget() *release.Release { if m != nil { return m.Target } @@ -278,16 +434,38 @@ func (m *UpgradeReleaseRequest) GetCleanupOnFail() bool { } type UpgradeReleaseResponse struct { - Release *hapi_release5.Release `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` - Result *Result `protobuf:"bytes,2,opt,name=result" json:"result,omitempty"` + Release *release.Release `protobuf:"bytes,1,opt,name=release,proto3" json:"release,omitempty"` + Result *Result `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UpgradeReleaseResponse) Reset() { *m = UpgradeReleaseResponse{} } +func (m *UpgradeReleaseResponse) String() string { return proto.CompactTextString(m) } +func (*UpgradeReleaseResponse) ProtoMessage() {} +func (*UpgradeReleaseResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_rudder_dd8cdbe38a210d28, []int{8} +} +func (m *UpgradeReleaseResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UpgradeReleaseResponse.Unmarshal(m, b) +} +func (m *UpgradeReleaseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UpgradeReleaseResponse.Marshal(b, m, deterministic) +} +func (dst *UpgradeReleaseResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpgradeReleaseResponse.Merge(dst, src) +} +func (m *UpgradeReleaseResponse) XXX_Size() int { + return xxx_messageInfo_UpgradeReleaseResponse.Size(m) +} +func (m *UpgradeReleaseResponse) XXX_DiscardUnknown() { + xxx_messageInfo_UpgradeReleaseResponse.DiscardUnknown(m) } -func (m *UpgradeReleaseResponse) Reset() { *m = UpgradeReleaseResponse{} } -func (m *UpgradeReleaseResponse) String() string { return proto.CompactTextString(m) } -func (*UpgradeReleaseResponse) ProtoMessage() {} -func (*UpgradeReleaseResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } +var xxx_messageInfo_UpgradeReleaseResponse proto.InternalMessageInfo -func (m *UpgradeReleaseResponse) GetRelease() *hapi_release5.Release { +func (m *UpgradeReleaseResponse) GetRelease() *release.Release { if m != nil { return m.Release } @@ -302,28 +480,50 @@ func (m *UpgradeReleaseResponse) GetResult() *Result { } type RollbackReleaseRequest struct { - Current *hapi_release5.Release `protobuf:"bytes,1,opt,name=current" json:"current,omitempty"` - Target *hapi_release5.Release `protobuf:"bytes,2,opt,name=target" json:"target,omitempty"` - Timeout int64 `protobuf:"varint,3,opt,name=Timeout" json:"Timeout,omitempty"` - Wait bool `protobuf:"varint,4,opt,name=Wait" json:"Wait,omitempty"` - Recreate bool `protobuf:"varint,5,opt,name=Recreate" json:"Recreate,omitempty"` - Force bool `protobuf:"varint,6,opt,name=Force" json:"Force,omitempty"` - CleanupOnFail bool `protobuf:"varint,7,opt,name=CleanupOnFail" json:"CleanupOnFail,omitempty"` + Current *release.Release `protobuf:"bytes,1,opt,name=current,proto3" json:"current,omitempty"` + Target *release.Release `protobuf:"bytes,2,opt,name=target,proto3" json:"target,omitempty"` + Timeout int64 `protobuf:"varint,3,opt,name=Timeout,proto3" json:"Timeout,omitempty"` + Wait bool `protobuf:"varint,4,opt,name=Wait,proto3" json:"Wait,omitempty"` + Recreate bool `protobuf:"varint,5,opt,name=Recreate,proto3" json:"Recreate,omitempty"` + Force bool `protobuf:"varint,6,opt,name=Force,proto3" json:"Force,omitempty"` + CleanupOnFail bool `protobuf:"varint,7,opt,name=CleanupOnFail,proto3" json:"CleanupOnFail,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RollbackReleaseRequest) Reset() { *m = RollbackReleaseRequest{} } +func (m *RollbackReleaseRequest) String() string { return proto.CompactTextString(m) } +func (*RollbackReleaseRequest) ProtoMessage() {} +func (*RollbackReleaseRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_rudder_dd8cdbe38a210d28, []int{9} +} +func (m *RollbackReleaseRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RollbackReleaseRequest.Unmarshal(m, b) +} +func (m *RollbackReleaseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RollbackReleaseRequest.Marshal(b, m, deterministic) +} +func (dst *RollbackReleaseRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_RollbackReleaseRequest.Merge(dst, src) +} +func (m *RollbackReleaseRequest) XXX_Size() int { + return xxx_messageInfo_RollbackReleaseRequest.Size(m) +} +func (m *RollbackReleaseRequest) XXX_DiscardUnknown() { + xxx_messageInfo_RollbackReleaseRequest.DiscardUnknown(m) } -func (m *RollbackReleaseRequest) Reset() { *m = RollbackReleaseRequest{} } -func (m *RollbackReleaseRequest) String() string { return proto.CompactTextString(m) } -func (*RollbackReleaseRequest) ProtoMessage() {} -func (*RollbackReleaseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } +var xxx_messageInfo_RollbackReleaseRequest proto.InternalMessageInfo -func (m *RollbackReleaseRequest) GetCurrent() *hapi_release5.Release { +func (m *RollbackReleaseRequest) GetCurrent() *release.Release { if m != nil { return m.Current } return nil } -func (m *RollbackReleaseRequest) GetTarget() *hapi_release5.Release { +func (m *RollbackReleaseRequest) GetTarget() *release.Release { if m != nil { return m.Target } @@ -366,16 +566,38 @@ func (m *RollbackReleaseRequest) GetCleanupOnFail() bool { } type RollbackReleaseResponse struct { - Release *hapi_release5.Release `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` - Result *Result `protobuf:"bytes,2,opt,name=result" json:"result,omitempty"` + Release *release.Release `protobuf:"bytes,1,opt,name=release,proto3" json:"release,omitempty"` + Result *Result `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *RollbackReleaseResponse) Reset() { *m = RollbackReleaseResponse{} } -func (m *RollbackReleaseResponse) String() string { return proto.CompactTextString(m) } -func (*RollbackReleaseResponse) ProtoMessage() {} -func (*RollbackReleaseResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } +func (m *RollbackReleaseResponse) Reset() { *m = RollbackReleaseResponse{} } +func (m *RollbackReleaseResponse) String() string { return proto.CompactTextString(m) } +func (*RollbackReleaseResponse) ProtoMessage() {} +func (*RollbackReleaseResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_rudder_dd8cdbe38a210d28, []int{10} +} +func (m *RollbackReleaseResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RollbackReleaseResponse.Unmarshal(m, b) +} +func (m *RollbackReleaseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RollbackReleaseResponse.Marshal(b, m, deterministic) +} +func (dst *RollbackReleaseResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_RollbackReleaseResponse.Merge(dst, src) +} +func (m *RollbackReleaseResponse) XXX_Size() int { + return xxx_messageInfo_RollbackReleaseResponse.Size(m) +} +func (m *RollbackReleaseResponse) XXX_DiscardUnknown() { + xxx_messageInfo_RollbackReleaseResponse.DiscardUnknown(m) +} -func (m *RollbackReleaseResponse) GetRelease() *hapi_release5.Release { +var xxx_messageInfo_RollbackReleaseResponse proto.InternalMessageInfo + +func (m *RollbackReleaseResponse) GetRelease() *release.Release { if m != nil { return m.Release } @@ -390,15 +612,37 @@ func (m *RollbackReleaseResponse) GetResult() *Result { } type ReleaseStatusRequest struct { - Release *hapi_release5.Release `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` + Release *release.Release `protobuf:"bytes,1,opt,name=release,proto3" json:"release,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *ReleaseStatusRequest) Reset() { *m = ReleaseStatusRequest{} } -func (m *ReleaseStatusRequest) String() string { return proto.CompactTextString(m) } -func (*ReleaseStatusRequest) ProtoMessage() {} -func (*ReleaseStatusRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } +func (m *ReleaseStatusRequest) Reset() { *m = ReleaseStatusRequest{} } +func (m *ReleaseStatusRequest) String() string { return proto.CompactTextString(m) } +func (*ReleaseStatusRequest) ProtoMessage() {} +func (*ReleaseStatusRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_rudder_dd8cdbe38a210d28, []int{11} +} +func (m *ReleaseStatusRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ReleaseStatusRequest.Unmarshal(m, b) +} +func (m *ReleaseStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ReleaseStatusRequest.Marshal(b, m, deterministic) +} +func (dst *ReleaseStatusRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReleaseStatusRequest.Merge(dst, src) +} +func (m *ReleaseStatusRequest) XXX_Size() int { + return xxx_messageInfo_ReleaseStatusRequest.Size(m) +} +func (m *ReleaseStatusRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ReleaseStatusRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ReleaseStatusRequest proto.InternalMessageInfo -func (m *ReleaseStatusRequest) GetRelease() *hapi_release5.Release { +func (m *ReleaseStatusRequest) GetRelease() *release.Release { if m != nil { return m.Release } @@ -406,23 +650,45 @@ func (m *ReleaseStatusRequest) GetRelease() *hapi_release5.Release { } type ReleaseStatusResponse struct { - Release *hapi_release5.Release `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` - Info *hapi_release3.Info `protobuf:"bytes,2,opt,name=info" json:"info,omitempty"` + Release *release.Release `protobuf:"bytes,1,opt,name=release,proto3" json:"release,omitempty"` + Info *release.Info `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *ReleaseStatusResponse) Reset() { *m = ReleaseStatusResponse{} } -func (m *ReleaseStatusResponse) String() string { return proto.CompactTextString(m) } -func (*ReleaseStatusResponse) ProtoMessage() {} -func (*ReleaseStatusResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} } +func (m *ReleaseStatusResponse) Reset() { *m = ReleaseStatusResponse{} } +func (m *ReleaseStatusResponse) String() string { return proto.CompactTextString(m) } +func (*ReleaseStatusResponse) ProtoMessage() {} +func (*ReleaseStatusResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_rudder_dd8cdbe38a210d28, []int{12} +} +func (m *ReleaseStatusResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ReleaseStatusResponse.Unmarshal(m, b) +} +func (m *ReleaseStatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ReleaseStatusResponse.Marshal(b, m, deterministic) +} +func (dst *ReleaseStatusResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReleaseStatusResponse.Merge(dst, src) +} +func (m *ReleaseStatusResponse) XXX_Size() int { + return xxx_messageInfo_ReleaseStatusResponse.Size(m) +} +func (m *ReleaseStatusResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ReleaseStatusResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ReleaseStatusResponse proto.InternalMessageInfo -func (m *ReleaseStatusResponse) GetRelease() *hapi_release5.Release { +func (m *ReleaseStatusResponse) GetRelease() *release.Release { if m != nil { return m.Release } return nil } -func (m *ReleaseStatusResponse) GetInfo() *hapi_release3.Info { +func (m *ReleaseStatusResponse) GetInfo() *release.Info { if m != nil { return m.Info } @@ -454,8 +720,9 @@ var _ grpc.ClientConn // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 -// Client API for ReleaseModuleService service - +// ReleaseModuleServiceClient is the client API for ReleaseModuleService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type ReleaseModuleServiceClient interface { Version(ctx context.Context, in *VersionReleaseRequest, opts ...grpc.CallOption) (*VersionReleaseResponse, error) // InstallRelease requests installation of a chart as a new release. @@ -480,7 +747,7 @@ func NewReleaseModuleServiceClient(cc *grpc.ClientConn) ReleaseModuleServiceClie func (c *releaseModuleServiceClient) Version(ctx context.Context, in *VersionReleaseRequest, opts ...grpc.CallOption) (*VersionReleaseResponse, error) { out := new(VersionReleaseResponse) - err := grpc.Invoke(ctx, "/hapi.services.rudder.ReleaseModuleService/Version", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/hapi.services.rudder.ReleaseModuleService/Version", in, out, opts...) if err != nil { return nil, err } @@ -489,7 +756,7 @@ func (c *releaseModuleServiceClient) Version(ctx context.Context, in *VersionRel func (c *releaseModuleServiceClient) InstallRelease(ctx context.Context, in *InstallReleaseRequest, opts ...grpc.CallOption) (*InstallReleaseResponse, error) { out := new(InstallReleaseResponse) - err := grpc.Invoke(ctx, "/hapi.services.rudder.ReleaseModuleService/InstallRelease", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/hapi.services.rudder.ReleaseModuleService/InstallRelease", in, out, opts...) if err != nil { return nil, err } @@ -498,7 +765,7 @@ func (c *releaseModuleServiceClient) InstallRelease(ctx context.Context, in *Ins func (c *releaseModuleServiceClient) DeleteRelease(ctx context.Context, in *DeleteReleaseRequest, opts ...grpc.CallOption) (*DeleteReleaseResponse, error) { out := new(DeleteReleaseResponse) - err := grpc.Invoke(ctx, "/hapi.services.rudder.ReleaseModuleService/DeleteRelease", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/hapi.services.rudder.ReleaseModuleService/DeleteRelease", in, out, opts...) if err != nil { return nil, err } @@ -507,7 +774,7 @@ func (c *releaseModuleServiceClient) DeleteRelease(ctx context.Context, in *Dele func (c *releaseModuleServiceClient) RollbackRelease(ctx context.Context, in *RollbackReleaseRequest, opts ...grpc.CallOption) (*RollbackReleaseResponse, error) { out := new(RollbackReleaseResponse) - err := grpc.Invoke(ctx, "/hapi.services.rudder.ReleaseModuleService/RollbackRelease", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/hapi.services.rudder.ReleaseModuleService/RollbackRelease", in, out, opts...) if err != nil { return nil, err } @@ -516,7 +783,7 @@ func (c *releaseModuleServiceClient) RollbackRelease(ctx context.Context, in *Ro func (c *releaseModuleServiceClient) UpgradeRelease(ctx context.Context, in *UpgradeReleaseRequest, opts ...grpc.CallOption) (*UpgradeReleaseResponse, error) { out := new(UpgradeReleaseResponse) - err := grpc.Invoke(ctx, "/hapi.services.rudder.ReleaseModuleService/UpgradeRelease", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/hapi.services.rudder.ReleaseModuleService/UpgradeRelease", in, out, opts...) if err != nil { return nil, err } @@ -525,15 +792,14 @@ func (c *releaseModuleServiceClient) UpgradeRelease(ctx context.Context, in *Upg func (c *releaseModuleServiceClient) ReleaseStatus(ctx context.Context, in *ReleaseStatusRequest, opts ...grpc.CallOption) (*ReleaseStatusResponse, error) { out := new(ReleaseStatusResponse) - err := grpc.Invoke(ctx, "/hapi.services.rudder.ReleaseModuleService/ReleaseStatus", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/hapi.services.rudder.ReleaseModuleService/ReleaseStatus", in, out, opts...) if err != nil { return nil, err } return out, nil } -// Server API for ReleaseModuleService service - +// ReleaseModuleServiceServer is the server API for ReleaseModuleService service. type ReleaseModuleServiceServer interface { Version(context.Context, *VersionReleaseRequest) (*VersionReleaseResponse, error) // InstallRelease requests installation of a chart as a new release. @@ -693,9 +959,9 @@ var _ReleaseModuleService_serviceDesc = grpc.ServiceDesc{ Metadata: "hapi/rudder/rudder.proto", } -func init() { proto.RegisterFile("hapi/rudder/rudder.proto", fileDescriptor0) } +func init() { proto.RegisterFile("hapi/rudder/rudder.proto", fileDescriptor_rudder_dd8cdbe38a210d28) } -var fileDescriptor0 = []byte{ +var fileDescriptor_rudder_dd8cdbe38a210d28 = []byte{ // 615 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x56, 0x4d, 0x6f, 0xd3, 0x40, 0x10, 0x8d, 0x9b, 0xc6, 0x69, 0xa6, 0x2a, 0x44, 0xab, 0xba, 0xb5, 0x2c, 0x0e, 0x91, 0x85, 0x50, diff --git a/pkg/proto/hapi/services/tiller.pb.go b/pkg/proto/hapi/services/tiller.pb.go index ab6e573e5..894d2eb03 100644 --- a/pkg/proto/hapi/services/tiller.pb.go +++ b/pkg/proto/hapi/services/tiller.pb.go @@ -1,47 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: hapi/services/tiller.proto -/* -Package services is a generated protocol buffer package. - -It is generated from these files: - hapi/services/tiller.proto - -It has these top-level messages: - ListReleasesRequest - ListSort - ListReleasesResponse - GetReleaseStatusRequest - GetReleaseStatusResponse - GetReleaseContentRequest - GetReleaseContentResponse - UpdateReleaseRequest - UpdateReleaseResponse - RollbackReleaseRequest - RollbackReleaseResponse - InstallReleaseRequest - InstallReleaseResponse - UninstallReleaseRequest - UninstallReleaseResponse - GetVersionRequest - GetVersionResponse - GetHistoryRequest - GetHistoryResponse - TestReleaseRequest - TestReleaseResponse -*/ package services import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" -import hapi_chart3 "k8s.io/helm/pkg/proto/hapi/chart" -import hapi_chart "k8s.io/helm/pkg/proto/hapi/chart" -import hapi_release5 "k8s.io/helm/pkg/proto/hapi/release" -import hapi_release4 "k8s.io/helm/pkg/proto/hapi/release" -import hapi_release1 "k8s.io/helm/pkg/proto/hapi/release" -import hapi_release3 "k8s.io/helm/pkg/proto/hapi/release" -import hapi_version "k8s.io/helm/pkg/proto/hapi/version" +import chart "k8s.io/helm/pkg/proto/hapi/chart" +import release "k8s.io/helm/pkg/proto/hapi/release" +import version "k8s.io/helm/pkg/proto/hapi/version" import ( context "golang.org/x/net/context" @@ -85,7 +52,9 @@ var ListSort_SortBy_value = map[string]int32{ func (x ListSort_SortBy) String() string { return proto.EnumName(ListSort_SortBy_name, int32(x)) } -func (ListSort_SortBy) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{1, 0} } +func (ListSort_SortBy) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_tiller_bb72ee4a42494734, []int{1, 0} +} // SortOrder defines sort orders to augment sorting operations. type ListSort_SortOrder int32 @@ -107,7 +76,9 @@ var ListSort_SortOrder_value = map[string]int32{ func (x ListSort_SortOrder) String() string { return proto.EnumName(ListSort_SortOrder_name, int32(x)) } -func (ListSort_SortOrder) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{1, 1} } +func (ListSort_SortOrder) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_tiller_bb72ee4a42494734, []int{1, 1} +} // ListReleasesRequest requests a list of releases. // @@ -116,30 +87,52 @@ func (ListSort_SortOrder) EnumDescriptor() ([]byte, []int) { return fileDescript // Releases can be sorted according to a few pre-determined sort strategies. type ListReleasesRequest struct { // Limit is the maximum number of releases to be returned. - Limit int64 `protobuf:"varint,1,opt,name=limit" json:"limit,omitempty"` + Limit int64 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` // Offset is the last release name that was seen. The next listing // operation will start with the name after this one. // Example: If list one returns albert, bernie, carl, and sets 'next: dennis'. // dennis is the offset. Supplying 'dennis' for the next request should // cause the next batch to return a set of results starting with 'dennis'. - Offset string `protobuf:"bytes,2,opt,name=offset" json:"offset,omitempty"` + Offset string `protobuf:"bytes,2,opt,name=offset,proto3" json:"offset,omitempty"` // SortBy is the sort field that the ListReleases server should sort data before returning. - SortBy ListSort_SortBy `protobuf:"varint,3,opt,name=sort_by,json=sortBy,enum=hapi.services.tiller.ListSort_SortBy" json:"sort_by,omitempty"` + SortBy ListSort_SortBy `protobuf:"varint,3,opt,name=sort_by,json=sortBy,proto3,enum=hapi.services.tiller.ListSort_SortBy" json:"sort_by,omitempty"` // Filter is a regular expression used to filter which releases should be listed. // // Anything that matches the regexp will be included in the results. - Filter string `protobuf:"bytes,4,opt,name=filter" json:"filter,omitempty"` + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` // SortOrder is the ordering directive used for sorting. - SortOrder ListSort_SortOrder `protobuf:"varint,5,opt,name=sort_order,json=sortOrder,enum=hapi.services.tiller.ListSort_SortOrder" json:"sort_order,omitempty"` - StatusCodes []hapi_release3.Status_Code `protobuf:"varint,6,rep,packed,name=status_codes,json=statusCodes,enum=hapi.release.Status_Code" json:"status_codes,omitempty"` + SortOrder ListSort_SortOrder `protobuf:"varint,5,opt,name=sort_order,json=sortOrder,proto3,enum=hapi.services.tiller.ListSort_SortOrder" json:"sort_order,omitempty"` + StatusCodes []release.Status_Code `protobuf:"varint,6,rep,packed,name=status_codes,json=statusCodes,proto3,enum=hapi.release.Status_Code" json:"status_codes,omitempty"` // Namespace is the filter to select releases only from a specific namespace. - Namespace string `protobuf:"bytes,7,opt,name=namespace" json:"namespace,omitempty"` + Namespace string `protobuf:"bytes,7,opt,name=namespace,proto3" json:"namespace,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ListReleasesRequest) Reset() { *m = ListReleasesRequest{} } +func (m *ListReleasesRequest) String() string { return proto.CompactTextString(m) } +func (*ListReleasesRequest) ProtoMessage() {} +func (*ListReleasesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_tiller_bb72ee4a42494734, []int{0} +} +func (m *ListReleasesRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ListReleasesRequest.Unmarshal(m, b) +} +func (m *ListReleasesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ListReleasesRequest.Marshal(b, m, deterministic) +} +func (dst *ListReleasesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListReleasesRequest.Merge(dst, src) +} +func (m *ListReleasesRequest) XXX_Size() int { + return xxx_messageInfo_ListReleasesRequest.Size(m) +} +func (m *ListReleasesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ListReleasesRequest.DiscardUnknown(m) } -func (m *ListReleasesRequest) Reset() { *m = ListReleasesRequest{} } -func (m *ListReleasesRequest) String() string { return proto.CompactTextString(m) } -func (*ListReleasesRequest) ProtoMessage() {} -func (*ListReleasesRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +var xxx_messageInfo_ListReleasesRequest proto.InternalMessageInfo func (m *ListReleasesRequest) GetLimit() int64 { if m != nil { @@ -176,7 +169,7 @@ func (m *ListReleasesRequest) GetSortOrder() ListSort_SortOrder { return ListSort_ASC } -func (m *ListReleasesRequest) GetStatusCodes() []hapi_release3.Status_Code { +func (m *ListReleasesRequest) GetStatusCodes() []release.Status_Code { if m != nil { return m.StatusCodes } @@ -192,30 +185,74 @@ func (m *ListReleasesRequest) GetNamespace() string { // ListSort defines sorting fields on a release list. type ListSort struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *ListSort) Reset() { *m = ListSort{} } -func (m *ListSort) String() string { return proto.CompactTextString(m) } -func (*ListSort) ProtoMessage() {} -func (*ListSort) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } +func (m *ListSort) Reset() { *m = ListSort{} } +func (m *ListSort) String() string { return proto.CompactTextString(m) } +func (*ListSort) ProtoMessage() {} +func (*ListSort) Descriptor() ([]byte, []int) { + return fileDescriptor_tiller_bb72ee4a42494734, []int{1} +} +func (m *ListSort) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ListSort.Unmarshal(m, b) +} +func (m *ListSort) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ListSort.Marshal(b, m, deterministic) +} +func (dst *ListSort) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListSort.Merge(dst, src) +} +func (m *ListSort) XXX_Size() int { + return xxx_messageInfo_ListSort.Size(m) +} +func (m *ListSort) XXX_DiscardUnknown() { + xxx_messageInfo_ListSort.DiscardUnknown(m) +} + +var xxx_messageInfo_ListSort proto.InternalMessageInfo // ListReleasesResponse is a list of releases. type ListReleasesResponse struct { // Count is the expected total number of releases to be returned. - Count int64 `protobuf:"varint,1,opt,name=count" json:"count,omitempty"` + Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` // Next is the name of the next release. If this is other than an empty // string, it means there are more results. - Next string `protobuf:"bytes,2,opt,name=next" json:"next,omitempty"` + Next string `protobuf:"bytes,2,opt,name=next,proto3" json:"next,omitempty"` // Total is the total number of queryable releases. - Total int64 `protobuf:"varint,3,opt,name=total" json:"total,omitempty"` + Total int64 `protobuf:"varint,3,opt,name=total,proto3" json:"total,omitempty"` // Releases is the list of found release objects. - Releases []*hapi_release5.Release `protobuf:"bytes,4,rep,name=releases" json:"releases,omitempty"` + Releases []*release.Release `protobuf:"bytes,4,rep,name=releases,proto3" json:"releases,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ListReleasesResponse) Reset() { *m = ListReleasesResponse{} } +func (m *ListReleasesResponse) String() string { return proto.CompactTextString(m) } +func (*ListReleasesResponse) ProtoMessage() {} +func (*ListReleasesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_tiller_bb72ee4a42494734, []int{2} +} +func (m *ListReleasesResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ListReleasesResponse.Unmarshal(m, b) +} +func (m *ListReleasesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ListReleasesResponse.Marshal(b, m, deterministic) +} +func (dst *ListReleasesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListReleasesResponse.Merge(dst, src) +} +func (m *ListReleasesResponse) XXX_Size() int { + return xxx_messageInfo_ListReleasesResponse.Size(m) +} +func (m *ListReleasesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ListReleasesResponse.DiscardUnknown(m) } -func (m *ListReleasesResponse) Reset() { *m = ListReleasesResponse{} } -func (m *ListReleasesResponse) String() string { return proto.CompactTextString(m) } -func (*ListReleasesResponse) ProtoMessage() {} -func (*ListReleasesResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } +var xxx_messageInfo_ListReleasesResponse proto.InternalMessageInfo func (m *ListReleasesResponse) GetCount() int64 { if m != nil { @@ -238,7 +275,7 @@ func (m *ListReleasesResponse) GetTotal() int64 { return 0 } -func (m *ListReleasesResponse) GetReleases() []*hapi_release5.Release { +func (m *ListReleasesResponse) GetReleases() []*release.Release { if m != nil { return m.Releases } @@ -248,15 +285,37 @@ func (m *ListReleasesResponse) GetReleases() []*hapi_release5.Release { // GetReleaseStatusRequest is a request to get the status of a release. type GetReleaseStatusRequest struct { // Name is the name of the release - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Version is the version of the release - Version int32 `protobuf:"varint,2,opt,name=version" json:"version,omitempty"` + Version int32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *GetReleaseStatusRequest) Reset() { *m = GetReleaseStatusRequest{} } -func (m *GetReleaseStatusRequest) String() string { return proto.CompactTextString(m) } -func (*GetReleaseStatusRequest) ProtoMessage() {} -func (*GetReleaseStatusRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } +func (m *GetReleaseStatusRequest) Reset() { *m = GetReleaseStatusRequest{} } +func (m *GetReleaseStatusRequest) String() string { return proto.CompactTextString(m) } +func (*GetReleaseStatusRequest) ProtoMessage() {} +func (*GetReleaseStatusRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_tiller_bb72ee4a42494734, []int{3} +} +func (m *GetReleaseStatusRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetReleaseStatusRequest.Unmarshal(m, b) +} +func (m *GetReleaseStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetReleaseStatusRequest.Marshal(b, m, deterministic) +} +func (dst *GetReleaseStatusRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetReleaseStatusRequest.Merge(dst, src) +} +func (m *GetReleaseStatusRequest) XXX_Size() int { + return xxx_messageInfo_GetReleaseStatusRequest.Size(m) +} +func (m *GetReleaseStatusRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetReleaseStatusRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetReleaseStatusRequest proto.InternalMessageInfo func (m *GetReleaseStatusRequest) GetName() string { if m != nil { @@ -275,17 +334,39 @@ func (m *GetReleaseStatusRequest) GetVersion() int32 { // GetReleaseStatusResponse is the response indicating the status of the named release. type GetReleaseStatusResponse struct { // Name is the name of the release. - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Info contains information about the release. - Info *hapi_release4.Info `protobuf:"bytes,2,opt,name=info" json:"info,omitempty"` + Info *release.Info `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"` // Namespace the release was released into - Namespace string `protobuf:"bytes,3,opt,name=namespace" json:"namespace,omitempty"` + Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *GetReleaseStatusResponse) Reset() { *m = GetReleaseStatusResponse{} } -func (m *GetReleaseStatusResponse) String() string { return proto.CompactTextString(m) } -func (*GetReleaseStatusResponse) ProtoMessage() {} -func (*GetReleaseStatusResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } +func (m *GetReleaseStatusResponse) Reset() { *m = GetReleaseStatusResponse{} } +func (m *GetReleaseStatusResponse) String() string { return proto.CompactTextString(m) } +func (*GetReleaseStatusResponse) ProtoMessage() {} +func (*GetReleaseStatusResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_tiller_bb72ee4a42494734, []int{4} +} +func (m *GetReleaseStatusResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetReleaseStatusResponse.Unmarshal(m, b) +} +func (m *GetReleaseStatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetReleaseStatusResponse.Marshal(b, m, deterministic) +} +func (dst *GetReleaseStatusResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetReleaseStatusResponse.Merge(dst, src) +} +func (m *GetReleaseStatusResponse) XXX_Size() int { + return xxx_messageInfo_GetReleaseStatusResponse.Size(m) +} +func (m *GetReleaseStatusResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetReleaseStatusResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetReleaseStatusResponse proto.InternalMessageInfo func (m *GetReleaseStatusResponse) GetName() string { if m != nil { @@ -294,7 +375,7 @@ func (m *GetReleaseStatusResponse) GetName() string { return "" } -func (m *GetReleaseStatusResponse) GetInfo() *hapi_release4.Info { +func (m *GetReleaseStatusResponse) GetInfo() *release.Info { if m != nil { return m.Info } @@ -311,15 +392,37 @@ func (m *GetReleaseStatusResponse) GetNamespace() string { // GetReleaseContentRequest is a request to get the contents of a release. type GetReleaseContentRequest struct { // The name of the release - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Version is the version of the release - Version int32 `protobuf:"varint,2,opt,name=version" json:"version,omitempty"` + Version int32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetReleaseContentRequest) Reset() { *m = GetReleaseContentRequest{} } +func (m *GetReleaseContentRequest) String() string { return proto.CompactTextString(m) } +func (*GetReleaseContentRequest) ProtoMessage() {} +func (*GetReleaseContentRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_tiller_bb72ee4a42494734, []int{5} +} +func (m *GetReleaseContentRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetReleaseContentRequest.Unmarshal(m, b) +} +func (m *GetReleaseContentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetReleaseContentRequest.Marshal(b, m, deterministic) +} +func (dst *GetReleaseContentRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetReleaseContentRequest.Merge(dst, src) +} +func (m *GetReleaseContentRequest) XXX_Size() int { + return xxx_messageInfo_GetReleaseContentRequest.Size(m) +} +func (m *GetReleaseContentRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetReleaseContentRequest.DiscardUnknown(m) } -func (m *GetReleaseContentRequest) Reset() { *m = GetReleaseContentRequest{} } -func (m *GetReleaseContentRequest) String() string { return proto.CompactTextString(m) } -func (*GetReleaseContentRequest) ProtoMessage() {} -func (*GetReleaseContentRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } +var xxx_messageInfo_GetReleaseContentRequest proto.InternalMessageInfo func (m *GetReleaseContentRequest) GetName() string { if m != nil { @@ -338,15 +441,37 @@ func (m *GetReleaseContentRequest) GetVersion() int32 { // GetReleaseContentResponse is a response containing the contents of a release. type GetReleaseContentResponse struct { // The release content - Release *hapi_release5.Release `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` + Release *release.Release `protobuf:"bytes,1,opt,name=release,proto3" json:"release,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *GetReleaseContentResponse) Reset() { *m = GetReleaseContentResponse{} } -func (m *GetReleaseContentResponse) String() string { return proto.CompactTextString(m) } -func (*GetReleaseContentResponse) ProtoMessage() {} -func (*GetReleaseContentResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } +func (m *GetReleaseContentResponse) Reset() { *m = GetReleaseContentResponse{} } +func (m *GetReleaseContentResponse) String() string { return proto.CompactTextString(m) } +func (*GetReleaseContentResponse) ProtoMessage() {} +func (*GetReleaseContentResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_tiller_bb72ee4a42494734, []int{6} +} +func (m *GetReleaseContentResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetReleaseContentResponse.Unmarshal(m, b) +} +func (m *GetReleaseContentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetReleaseContentResponse.Marshal(b, m, deterministic) +} +func (dst *GetReleaseContentResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetReleaseContentResponse.Merge(dst, src) +} +func (m *GetReleaseContentResponse) XXX_Size() int { + return xxx_messageInfo_GetReleaseContentResponse.Size(m) +} +func (m *GetReleaseContentResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetReleaseContentResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetReleaseContentResponse proto.InternalMessageInfo -func (m *GetReleaseContentResponse) GetRelease() *hapi_release5.Release { +func (m *GetReleaseContentResponse) GetRelease() *release.Release { if m != nil { return m.Release } @@ -356,41 +481,63 @@ func (m *GetReleaseContentResponse) GetRelease() *hapi_release5.Release { // UpdateReleaseRequest updates a release. type UpdateReleaseRequest struct { // The name of the release - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Chart is the protobuf representation of a chart. - Chart *hapi_chart3.Chart `protobuf:"bytes,2,opt,name=chart" json:"chart,omitempty"` + Chart *chart.Chart `protobuf:"bytes,2,opt,name=chart,proto3" json:"chart,omitempty"` // Values is a string containing (unparsed) YAML values. - Values *hapi_chart.Config `protobuf:"bytes,3,opt,name=values" json:"values,omitempty"` + Values *chart.Config `protobuf:"bytes,3,opt,name=values,proto3" json:"values,omitempty"` // dry_run, if true, will run through the release logic, but neither create - DryRun bool `protobuf:"varint,4,opt,name=dry_run,json=dryRun" json:"dry_run,omitempty"` + DryRun bool `protobuf:"varint,4,opt,name=dry_run,json=dryRun,proto3" json:"dry_run,omitempty"` // DisableHooks causes the server to skip running any hooks for the upgrade. - DisableHooks bool `protobuf:"varint,5,opt,name=disable_hooks,json=disableHooks" json:"disable_hooks,omitempty"` + DisableHooks bool `protobuf:"varint,5,opt,name=disable_hooks,json=disableHooks,proto3" json:"disable_hooks,omitempty"` // Performs pods restart for resources if applicable - Recreate bool `protobuf:"varint,6,opt,name=recreate" json:"recreate,omitempty"` + Recreate bool `protobuf:"varint,6,opt,name=recreate,proto3" json:"recreate,omitempty"` // timeout specifies the max amount of time any kubernetes client command can run. - Timeout int64 `protobuf:"varint,7,opt,name=timeout" json:"timeout,omitempty"` + Timeout int64 `protobuf:"varint,7,opt,name=timeout,proto3" json:"timeout,omitempty"` // ResetValues will cause Tiller to ignore stored values, resetting to default values. - ResetValues bool `protobuf:"varint,8,opt,name=reset_values,json=resetValues" json:"reset_values,omitempty"` + ResetValues bool `protobuf:"varint,8,opt,name=reset_values,json=resetValues,proto3" json:"reset_values,omitempty"` // 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 - Wait bool `protobuf:"varint,9,opt,name=wait" json:"wait,omitempty"` + Wait bool `protobuf:"varint,9,opt,name=wait,proto3" json:"wait,omitempty"` // ReuseValues will cause Tiller to reuse the values from the last release. // This is ignored if reset_values is set. - ReuseValues bool `protobuf:"varint,10,opt,name=reuse_values,json=reuseValues" json:"reuse_values,omitempty"` + ReuseValues bool `protobuf:"varint,10,opt,name=reuse_values,json=reuseValues,proto3" json:"reuse_values,omitempty"` // Force resource update through delete/recreate if needed. - Force bool `protobuf:"varint,11,opt,name=force" json:"force,omitempty"` + Force bool `protobuf:"varint,11,opt,name=force,proto3" json:"force,omitempty"` // Description, if set, will set the description for the updated release - Description string `protobuf:"bytes,12,opt,name=description" json:"description,omitempty"` + Description string `protobuf:"bytes,12,opt,name=description,proto3" json:"description,omitempty"` // Render subchart notes if enabled - SubNotes bool `protobuf:"varint,13,opt,name=subNotes" json:"subNotes,omitempty"` + SubNotes bool `protobuf:"varint,13,opt,name=subNotes,proto3" json:"subNotes,omitempty"` // Allow deletion of new resources created in this update when update failed - CleanupOnFail bool `protobuf:"varint,14,opt,name=cleanup_on_fail,json=cleanupOnFail" json:"cleanup_on_fail,omitempty"` + CleanupOnFail bool `protobuf:"varint,14,opt,name=cleanup_on_fail,json=cleanupOnFail,proto3" json:"cleanup_on_fail,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UpdateReleaseRequest) Reset() { *m = UpdateReleaseRequest{} } +func (m *UpdateReleaseRequest) String() string { return proto.CompactTextString(m) } +func (*UpdateReleaseRequest) ProtoMessage() {} +func (*UpdateReleaseRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_tiller_bb72ee4a42494734, []int{7} +} +func (m *UpdateReleaseRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UpdateReleaseRequest.Unmarshal(m, b) +} +func (m *UpdateReleaseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UpdateReleaseRequest.Marshal(b, m, deterministic) +} +func (dst *UpdateReleaseRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateReleaseRequest.Merge(dst, src) +} +func (m *UpdateReleaseRequest) XXX_Size() int { + return xxx_messageInfo_UpdateReleaseRequest.Size(m) +} +func (m *UpdateReleaseRequest) XXX_DiscardUnknown() { + xxx_messageInfo_UpdateReleaseRequest.DiscardUnknown(m) } -func (m *UpdateReleaseRequest) Reset() { *m = UpdateReleaseRequest{} } -func (m *UpdateReleaseRequest) String() string { return proto.CompactTextString(m) } -func (*UpdateReleaseRequest) ProtoMessage() {} -func (*UpdateReleaseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } +var xxx_messageInfo_UpdateReleaseRequest proto.InternalMessageInfo func (m *UpdateReleaseRequest) GetName() string { if m != nil { @@ -399,14 +546,14 @@ func (m *UpdateReleaseRequest) GetName() string { return "" } -func (m *UpdateReleaseRequest) GetChart() *hapi_chart3.Chart { +func (m *UpdateReleaseRequest) GetChart() *chart.Chart { if m != nil { return m.Chart } return nil } -func (m *UpdateReleaseRequest) GetValues() *hapi_chart.Config { +func (m *UpdateReleaseRequest) GetValues() *chart.Config { if m != nil { return m.Values } @@ -492,15 +639,37 @@ func (m *UpdateReleaseRequest) GetCleanupOnFail() bool { // UpdateReleaseResponse is the response to an update request. type UpdateReleaseResponse struct { - Release *hapi_release5.Release `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` + Release *release.Release `protobuf:"bytes,1,opt,name=release,proto3" json:"release,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UpdateReleaseResponse) Reset() { *m = UpdateReleaseResponse{} } +func (m *UpdateReleaseResponse) String() string { return proto.CompactTextString(m) } +func (*UpdateReleaseResponse) ProtoMessage() {} +func (*UpdateReleaseResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_tiller_bb72ee4a42494734, []int{8} +} +func (m *UpdateReleaseResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UpdateReleaseResponse.Unmarshal(m, b) +} +func (m *UpdateReleaseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UpdateReleaseResponse.Marshal(b, m, deterministic) +} +func (dst *UpdateReleaseResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateReleaseResponse.Merge(dst, src) +} +func (m *UpdateReleaseResponse) XXX_Size() int { + return xxx_messageInfo_UpdateReleaseResponse.Size(m) +} +func (m *UpdateReleaseResponse) XXX_DiscardUnknown() { + xxx_messageInfo_UpdateReleaseResponse.DiscardUnknown(m) } -func (m *UpdateReleaseResponse) Reset() { *m = UpdateReleaseResponse{} } -func (m *UpdateReleaseResponse) String() string { return proto.CompactTextString(m) } -func (*UpdateReleaseResponse) ProtoMessage() {} -func (*UpdateReleaseResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } +var xxx_messageInfo_UpdateReleaseResponse proto.InternalMessageInfo -func (m *UpdateReleaseResponse) GetRelease() *hapi_release5.Release { +func (m *UpdateReleaseResponse) GetRelease() *release.Release { if m != nil { return m.Release } @@ -509,32 +678,54 @@ func (m *UpdateReleaseResponse) GetRelease() *hapi_release5.Release { type RollbackReleaseRequest struct { // The name of the release - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // dry_run, if true, will run through the release logic but no create - DryRun bool `protobuf:"varint,2,opt,name=dry_run,json=dryRun" json:"dry_run,omitempty"` + DryRun bool `protobuf:"varint,2,opt,name=dry_run,json=dryRun,proto3" json:"dry_run,omitempty"` // DisableHooks causes the server to skip running any hooks for the rollback - DisableHooks bool `protobuf:"varint,3,opt,name=disable_hooks,json=disableHooks" json:"disable_hooks,omitempty"` + DisableHooks bool `protobuf:"varint,3,opt,name=disable_hooks,json=disableHooks,proto3" json:"disable_hooks,omitempty"` // Version is the version of the release to deploy. - Version int32 `protobuf:"varint,4,opt,name=version" json:"version,omitempty"` + Version int32 `protobuf:"varint,4,opt,name=version,proto3" json:"version,omitempty"` // Performs pods restart for resources if applicable - Recreate bool `protobuf:"varint,5,opt,name=recreate" json:"recreate,omitempty"` + Recreate bool `protobuf:"varint,5,opt,name=recreate,proto3" json:"recreate,omitempty"` // timeout specifies the max amount of time any kubernetes client command can run. - Timeout int64 `protobuf:"varint,6,opt,name=timeout" json:"timeout,omitempty"` + Timeout int64 `protobuf:"varint,6,opt,name=timeout,proto3" json:"timeout,omitempty"` // 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 - Wait bool `protobuf:"varint,7,opt,name=wait" json:"wait,omitempty"` + Wait bool `protobuf:"varint,7,opt,name=wait,proto3" json:"wait,omitempty"` // Force resource update through delete/recreate if needed. - Force bool `protobuf:"varint,8,opt,name=force" json:"force,omitempty"` + Force bool `protobuf:"varint,8,opt,name=force,proto3" json:"force,omitempty"` // Description, if set, will set the description for the rollback - Description string `protobuf:"bytes,9,opt,name=description" json:"description,omitempty"` + Description string `protobuf:"bytes,9,opt,name=description,proto3" json:"description,omitempty"` // Allow deletion of new resources created in this rollback when rollback failed - CleanupOnFail bool `protobuf:"varint,10,opt,name=cleanup_on_fail,json=cleanupOnFail" json:"cleanup_on_fail,omitempty"` + CleanupOnFail bool `protobuf:"varint,10,opt,name=cleanup_on_fail,json=cleanupOnFail,proto3" json:"cleanup_on_fail,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *RollbackReleaseRequest) Reset() { *m = RollbackReleaseRequest{} } -func (m *RollbackReleaseRequest) String() string { return proto.CompactTextString(m) } -func (*RollbackReleaseRequest) ProtoMessage() {} -func (*RollbackReleaseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } +func (m *RollbackReleaseRequest) Reset() { *m = RollbackReleaseRequest{} } +func (m *RollbackReleaseRequest) String() string { return proto.CompactTextString(m) } +func (*RollbackReleaseRequest) ProtoMessage() {} +func (*RollbackReleaseRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_tiller_bb72ee4a42494734, []int{9} +} +func (m *RollbackReleaseRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RollbackReleaseRequest.Unmarshal(m, b) +} +func (m *RollbackReleaseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RollbackReleaseRequest.Marshal(b, m, deterministic) +} +func (dst *RollbackReleaseRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_RollbackReleaseRequest.Merge(dst, src) +} +func (m *RollbackReleaseRequest) XXX_Size() int { + return xxx_messageInfo_RollbackReleaseRequest.Size(m) +} +func (m *RollbackReleaseRequest) XXX_DiscardUnknown() { + xxx_messageInfo_RollbackReleaseRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_RollbackReleaseRequest proto.InternalMessageInfo func (m *RollbackReleaseRequest) GetName() string { if m != nil { @@ -608,15 +799,37 @@ func (m *RollbackReleaseRequest) GetCleanupOnFail() bool { // RollbackReleaseResponse is the response to an update request. type RollbackReleaseResponse struct { - Release *hapi_release5.Release `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` + Release *release.Release `protobuf:"bytes,1,opt,name=release,proto3" json:"release,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RollbackReleaseResponse) Reset() { *m = RollbackReleaseResponse{} } +func (m *RollbackReleaseResponse) String() string { return proto.CompactTextString(m) } +func (*RollbackReleaseResponse) ProtoMessage() {} +func (*RollbackReleaseResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_tiller_bb72ee4a42494734, []int{10} +} +func (m *RollbackReleaseResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RollbackReleaseResponse.Unmarshal(m, b) +} +func (m *RollbackReleaseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RollbackReleaseResponse.Marshal(b, m, deterministic) +} +func (dst *RollbackReleaseResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_RollbackReleaseResponse.Merge(dst, src) +} +func (m *RollbackReleaseResponse) XXX_Size() int { + return xxx_messageInfo_RollbackReleaseResponse.Size(m) +} +func (m *RollbackReleaseResponse) XXX_DiscardUnknown() { + xxx_messageInfo_RollbackReleaseResponse.DiscardUnknown(m) } -func (m *RollbackReleaseResponse) Reset() { *m = RollbackReleaseResponse{} } -func (m *RollbackReleaseResponse) String() string { return proto.CompactTextString(m) } -func (*RollbackReleaseResponse) ProtoMessage() {} -func (*RollbackReleaseResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } +var xxx_messageInfo_RollbackReleaseResponse proto.InternalMessageInfo -func (m *RollbackReleaseResponse) GetRelease() *hapi_release5.Release { +func (m *RollbackReleaseResponse) GetRelease() *release.Release { if m != nil { return m.Release } @@ -626,47 +839,69 @@ func (m *RollbackReleaseResponse) GetRelease() *hapi_release5.Release { // InstallReleaseRequest is the request for an installation of a chart. type InstallReleaseRequest struct { // Chart is the protobuf representation of a chart. - Chart *hapi_chart3.Chart `protobuf:"bytes,1,opt,name=chart" json:"chart,omitempty"` + Chart *chart.Chart `protobuf:"bytes,1,opt,name=chart,proto3" json:"chart,omitempty"` // Values is a string containing (unparsed) YAML values. - Values *hapi_chart.Config `protobuf:"bytes,2,opt,name=values" json:"values,omitempty"` + Values *chart.Config `protobuf:"bytes,2,opt,name=values,proto3" json:"values,omitempty"` // DryRun, if true, will run through the release logic, but neither create // a release object nor deploy to Kubernetes. The release object returned // in the response will be fake. - DryRun bool `protobuf:"varint,3,opt,name=dry_run,json=dryRun" json:"dry_run,omitempty"` + DryRun bool `protobuf:"varint,3,opt,name=dry_run,json=dryRun,proto3" json:"dry_run,omitempty"` // Name is the candidate release name. This must be unique to the // namespace, otherwise the server will return an error. If it is not // supplied, the server will autogenerate one. - Name string `protobuf:"bytes,4,opt,name=name" json:"name,omitempty"` + Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` // DisableHooks causes the server to skip running any hooks for the install. - DisableHooks bool `protobuf:"varint,5,opt,name=disable_hooks,json=disableHooks" json:"disable_hooks,omitempty"` + DisableHooks bool `protobuf:"varint,5,opt,name=disable_hooks,json=disableHooks,proto3" json:"disable_hooks,omitempty"` // Namespace is the kubernetes namespace of the release. - Namespace string `protobuf:"bytes,6,opt,name=namespace" json:"namespace,omitempty"` + Namespace string `protobuf:"bytes,6,opt,name=namespace,proto3" json:"namespace,omitempty"` // Reuse_name requests that Tiller re-uses a name, instead of erroring out. - ReuseName bool `protobuf:"varint,7,opt,name=reuse_name,json=reuseName" json:"reuse_name,omitempty"` + ReuseName bool `protobuf:"varint,7,opt,name=reuse_name,json=reuseName,proto3" json:"reuse_name,omitempty"` // timeout specifies the max amount of time any kubernetes client command can run. - Timeout int64 `protobuf:"varint,8,opt,name=timeout" json:"timeout,omitempty"` + Timeout int64 `protobuf:"varint,8,opt,name=timeout,proto3" json:"timeout,omitempty"` // 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 - Wait bool `protobuf:"varint,9,opt,name=wait" json:"wait,omitempty"` - DisableCrdHook bool `protobuf:"varint,10,opt,name=disable_crd_hook,json=disableCrdHook" json:"disable_crd_hook,omitempty"` + Wait bool `protobuf:"varint,9,opt,name=wait,proto3" json:"wait,omitempty"` + DisableCrdHook bool `protobuf:"varint,10,opt,name=disable_crd_hook,json=disableCrdHook,proto3" json:"disable_crd_hook,omitempty"` // Description, if set, will set the description for the installed release - Description string `protobuf:"bytes,11,opt,name=description" json:"description,omitempty"` - SubNotes bool `protobuf:"varint,12,opt,name=subNotes" json:"subNotes,omitempty"` + Description string `protobuf:"bytes,11,opt,name=description,proto3" json:"description,omitempty"` + SubNotes bool `protobuf:"varint,12,opt,name=subNotes,proto3" json:"subNotes,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *InstallReleaseRequest) Reset() { *m = InstallReleaseRequest{} } +func (m *InstallReleaseRequest) String() string { return proto.CompactTextString(m) } +func (*InstallReleaseRequest) ProtoMessage() {} +func (*InstallReleaseRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_tiller_bb72ee4a42494734, []int{11} +} +func (m *InstallReleaseRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_InstallReleaseRequest.Unmarshal(m, b) +} +func (m *InstallReleaseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_InstallReleaseRequest.Marshal(b, m, deterministic) +} +func (dst *InstallReleaseRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_InstallReleaseRequest.Merge(dst, src) +} +func (m *InstallReleaseRequest) XXX_Size() int { + return xxx_messageInfo_InstallReleaseRequest.Size(m) +} +func (m *InstallReleaseRequest) XXX_DiscardUnknown() { + xxx_messageInfo_InstallReleaseRequest.DiscardUnknown(m) } -func (m *InstallReleaseRequest) Reset() { *m = InstallReleaseRequest{} } -func (m *InstallReleaseRequest) String() string { return proto.CompactTextString(m) } -func (*InstallReleaseRequest) ProtoMessage() {} -func (*InstallReleaseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } +var xxx_messageInfo_InstallReleaseRequest proto.InternalMessageInfo -func (m *InstallReleaseRequest) GetChart() *hapi_chart3.Chart { +func (m *InstallReleaseRequest) GetChart() *chart.Chart { if m != nil { return m.Chart } return nil } -func (m *InstallReleaseRequest) GetValues() *hapi_chart.Config { +func (m *InstallReleaseRequest) GetValues() *chart.Config { if m != nil { return m.Values } @@ -745,15 +980,37 @@ func (m *InstallReleaseRequest) GetSubNotes() bool { // InstallReleaseResponse is the response from a release installation. type InstallReleaseResponse struct { - Release *hapi_release5.Release `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` + Release *release.Release `protobuf:"bytes,1,opt,name=release,proto3" json:"release,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *InstallReleaseResponse) Reset() { *m = InstallReleaseResponse{} } -func (m *InstallReleaseResponse) String() string { return proto.CompactTextString(m) } -func (*InstallReleaseResponse) ProtoMessage() {} -func (*InstallReleaseResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} } +func (m *InstallReleaseResponse) Reset() { *m = InstallReleaseResponse{} } +func (m *InstallReleaseResponse) String() string { return proto.CompactTextString(m) } +func (*InstallReleaseResponse) ProtoMessage() {} +func (*InstallReleaseResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_tiller_bb72ee4a42494734, []int{12} +} +func (m *InstallReleaseResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_InstallReleaseResponse.Unmarshal(m, b) +} +func (m *InstallReleaseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_InstallReleaseResponse.Marshal(b, m, deterministic) +} +func (dst *InstallReleaseResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_InstallReleaseResponse.Merge(dst, src) +} +func (m *InstallReleaseResponse) XXX_Size() int { + return xxx_messageInfo_InstallReleaseResponse.Size(m) +} +func (m *InstallReleaseResponse) XXX_DiscardUnknown() { + xxx_messageInfo_InstallReleaseResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_InstallReleaseResponse proto.InternalMessageInfo -func (m *InstallReleaseResponse) GetRelease() *hapi_release5.Release { +func (m *InstallReleaseResponse) GetRelease() *release.Release { if m != nil { return m.Release } @@ -763,21 +1020,43 @@ func (m *InstallReleaseResponse) GetRelease() *hapi_release5.Release { // UninstallReleaseRequest represents a request to uninstall a named release. type UninstallReleaseRequest struct { // Name is the name of the release to delete. - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // DisableHooks causes the server to skip running any hooks for the uninstall. - DisableHooks bool `protobuf:"varint,2,opt,name=disable_hooks,json=disableHooks" json:"disable_hooks,omitempty"` + DisableHooks bool `protobuf:"varint,2,opt,name=disable_hooks,json=disableHooks,proto3" json:"disable_hooks,omitempty"` // Purge removes the release from the store and make its name free for later use. - Purge bool `protobuf:"varint,3,opt,name=purge" json:"purge,omitempty"` + Purge bool `protobuf:"varint,3,opt,name=purge,proto3" json:"purge,omitempty"` // timeout specifies the max amount of time any kubernetes client command can run. - Timeout int64 `protobuf:"varint,4,opt,name=timeout" json:"timeout,omitempty"` + Timeout int64 `protobuf:"varint,4,opt,name=timeout,proto3" json:"timeout,omitempty"` // Description, if set, will set the description for the uninstalled release - Description string `protobuf:"bytes,5,opt,name=description" json:"description,omitempty"` + Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UninstallReleaseRequest) Reset() { *m = UninstallReleaseRequest{} } +func (m *UninstallReleaseRequest) String() string { return proto.CompactTextString(m) } +func (*UninstallReleaseRequest) ProtoMessage() {} +func (*UninstallReleaseRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_tiller_bb72ee4a42494734, []int{13} +} +func (m *UninstallReleaseRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UninstallReleaseRequest.Unmarshal(m, b) +} +func (m *UninstallReleaseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UninstallReleaseRequest.Marshal(b, m, deterministic) +} +func (dst *UninstallReleaseRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_UninstallReleaseRequest.Merge(dst, src) +} +func (m *UninstallReleaseRequest) XXX_Size() int { + return xxx_messageInfo_UninstallReleaseRequest.Size(m) +} +func (m *UninstallReleaseRequest) XXX_DiscardUnknown() { + xxx_messageInfo_UninstallReleaseRequest.DiscardUnknown(m) } -func (m *UninstallReleaseRequest) Reset() { *m = UninstallReleaseRequest{} } -func (m *UninstallReleaseRequest) String() string { return proto.CompactTextString(m) } -func (*UninstallReleaseRequest) ProtoMessage() {} -func (*UninstallReleaseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} } +var xxx_messageInfo_UninstallReleaseRequest proto.InternalMessageInfo func (m *UninstallReleaseRequest) GetName() string { if m != nil { @@ -817,17 +1096,39 @@ func (m *UninstallReleaseRequest) GetDescription() string { // UninstallReleaseResponse represents a successful response to an uninstall request. type UninstallReleaseResponse struct { // Release is the release that was marked deleted. - Release *hapi_release5.Release `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` + Release *release.Release `protobuf:"bytes,1,opt,name=release,proto3" json:"release,omitempty"` // Info is an uninstall message - Info string `protobuf:"bytes,2,opt,name=info" json:"info,omitempty"` + Info string `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *UninstallReleaseResponse) Reset() { *m = UninstallReleaseResponse{} } -func (m *UninstallReleaseResponse) String() string { return proto.CompactTextString(m) } -func (*UninstallReleaseResponse) ProtoMessage() {} -func (*UninstallReleaseResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} } +func (m *UninstallReleaseResponse) Reset() { *m = UninstallReleaseResponse{} } +func (m *UninstallReleaseResponse) String() string { return proto.CompactTextString(m) } +func (*UninstallReleaseResponse) ProtoMessage() {} +func (*UninstallReleaseResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_tiller_bb72ee4a42494734, []int{14} +} +func (m *UninstallReleaseResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UninstallReleaseResponse.Unmarshal(m, b) +} +func (m *UninstallReleaseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UninstallReleaseResponse.Marshal(b, m, deterministic) +} +func (dst *UninstallReleaseResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_UninstallReleaseResponse.Merge(dst, src) +} +func (m *UninstallReleaseResponse) XXX_Size() int { + return xxx_messageInfo_UninstallReleaseResponse.Size(m) +} +func (m *UninstallReleaseResponse) XXX_DiscardUnknown() { + xxx_messageInfo_UninstallReleaseResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_UninstallReleaseResponse proto.InternalMessageInfo -func (m *UninstallReleaseResponse) GetRelease() *hapi_release5.Release { +func (m *UninstallReleaseResponse) GetRelease() *release.Release { if m != nil { return m.Release } @@ -843,23 +1144,67 @@ func (m *UninstallReleaseResponse) GetInfo() string { // GetVersionRequest requests for version information. type GetVersionRequest struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetVersionRequest) Reset() { *m = GetVersionRequest{} } +func (m *GetVersionRequest) String() string { return proto.CompactTextString(m) } +func (*GetVersionRequest) ProtoMessage() {} +func (*GetVersionRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_tiller_bb72ee4a42494734, []int{15} +} +func (m *GetVersionRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetVersionRequest.Unmarshal(m, b) +} +func (m *GetVersionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetVersionRequest.Marshal(b, m, deterministic) +} +func (dst *GetVersionRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetVersionRequest.Merge(dst, src) +} +func (m *GetVersionRequest) XXX_Size() int { + return xxx_messageInfo_GetVersionRequest.Size(m) +} +func (m *GetVersionRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetVersionRequest.DiscardUnknown(m) } -func (m *GetVersionRequest) Reset() { *m = GetVersionRequest{} } -func (m *GetVersionRequest) String() string { return proto.CompactTextString(m) } -func (*GetVersionRequest) ProtoMessage() {} -func (*GetVersionRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} } +var xxx_messageInfo_GetVersionRequest proto.InternalMessageInfo type GetVersionResponse struct { - Version *hapi_version.Version `protobuf:"bytes,1,opt,name=Version" json:"Version,omitempty"` + Version *version.Version `protobuf:"bytes,1,opt,name=Version,proto3" json:"Version,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *GetVersionResponse) Reset() { *m = GetVersionResponse{} } -func (m *GetVersionResponse) String() string { return proto.CompactTextString(m) } -func (*GetVersionResponse) ProtoMessage() {} -func (*GetVersionResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} } +func (m *GetVersionResponse) Reset() { *m = GetVersionResponse{} } +func (m *GetVersionResponse) String() string { return proto.CompactTextString(m) } +func (*GetVersionResponse) ProtoMessage() {} +func (*GetVersionResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_tiller_bb72ee4a42494734, []int{16} +} +func (m *GetVersionResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetVersionResponse.Unmarshal(m, b) +} +func (m *GetVersionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetVersionResponse.Marshal(b, m, deterministic) +} +func (dst *GetVersionResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetVersionResponse.Merge(dst, src) +} +func (m *GetVersionResponse) XXX_Size() int { + return xxx_messageInfo_GetVersionResponse.Size(m) +} +func (m *GetVersionResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetVersionResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetVersionResponse proto.InternalMessageInfo -func (m *GetVersionResponse) GetVersion() *hapi_version.Version { +func (m *GetVersionResponse) GetVersion() *version.Version { if m != nil { return m.Version } @@ -869,15 +1214,37 @@ func (m *GetVersionResponse) GetVersion() *hapi_version.Version { // GetHistoryRequest requests a release's history. type GetHistoryRequest struct { // The name of the release. - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The maximum number of releases to include. - Max int32 `protobuf:"varint,2,opt,name=max" json:"max,omitempty"` + Max int32 `protobuf:"varint,2,opt,name=max,proto3" json:"max,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *GetHistoryRequest) Reset() { *m = GetHistoryRequest{} } -func (m *GetHistoryRequest) String() string { return proto.CompactTextString(m) } -func (*GetHistoryRequest) ProtoMessage() {} -func (*GetHistoryRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} } +func (m *GetHistoryRequest) Reset() { *m = GetHistoryRequest{} } +func (m *GetHistoryRequest) String() string { return proto.CompactTextString(m) } +func (*GetHistoryRequest) ProtoMessage() {} +func (*GetHistoryRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_tiller_bb72ee4a42494734, []int{17} +} +func (m *GetHistoryRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetHistoryRequest.Unmarshal(m, b) +} +func (m *GetHistoryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetHistoryRequest.Marshal(b, m, deterministic) +} +func (dst *GetHistoryRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetHistoryRequest.Merge(dst, src) +} +func (m *GetHistoryRequest) XXX_Size() int { + return xxx_messageInfo_GetHistoryRequest.Size(m) +} +func (m *GetHistoryRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetHistoryRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetHistoryRequest proto.InternalMessageInfo func (m *GetHistoryRequest) GetName() string { if m != nil { @@ -895,15 +1262,37 @@ func (m *GetHistoryRequest) GetMax() int32 { // GetHistoryResponse is received in response to a GetHistory rpc. type GetHistoryResponse struct { - Releases []*hapi_release5.Release `protobuf:"bytes,1,rep,name=releases" json:"releases,omitempty"` + Releases []*release.Release `protobuf:"bytes,1,rep,name=releases,proto3" json:"releases,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetHistoryResponse) Reset() { *m = GetHistoryResponse{} } +func (m *GetHistoryResponse) String() string { return proto.CompactTextString(m) } +func (*GetHistoryResponse) ProtoMessage() {} +func (*GetHistoryResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_tiller_bb72ee4a42494734, []int{18} +} +func (m *GetHistoryResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetHistoryResponse.Unmarshal(m, b) +} +func (m *GetHistoryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetHistoryResponse.Marshal(b, m, deterministic) +} +func (dst *GetHistoryResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetHistoryResponse.Merge(dst, src) +} +func (m *GetHistoryResponse) XXX_Size() int { + return xxx_messageInfo_GetHistoryResponse.Size(m) +} +func (m *GetHistoryResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetHistoryResponse.DiscardUnknown(m) } -func (m *GetHistoryResponse) Reset() { *m = GetHistoryResponse{} } -func (m *GetHistoryResponse) String() string { return proto.CompactTextString(m) } -func (*GetHistoryResponse) ProtoMessage() {} -func (*GetHistoryResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} } +var xxx_messageInfo_GetHistoryResponse proto.InternalMessageInfo -func (m *GetHistoryResponse) GetReleases() []*hapi_release5.Release { +func (m *GetHistoryResponse) GetReleases() []*release.Release { if m != nil { return m.Releases } @@ -913,19 +1302,41 @@ func (m *GetHistoryResponse) GetReleases() []*hapi_release5.Release { // TestReleaseRequest is a request to get the status of a release. type TestReleaseRequest struct { // Name is the name of the release - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // timeout specifies the max amount of time any kubernetes client command can run. - Timeout int64 `protobuf:"varint,2,opt,name=timeout" json:"timeout,omitempty"` + Timeout int64 `protobuf:"varint,2,opt,name=timeout,proto3" json:"timeout,omitempty"` // cleanup specifies whether or not to attempt pod deletion after test completes - Cleanup bool `protobuf:"varint,3,opt,name=cleanup" json:"cleanup,omitempty"` + Cleanup bool `protobuf:"varint,3,opt,name=cleanup,proto3" json:"cleanup,omitempty"` // parallel specifies whether or not to run test pods in parallel - Parallel bool `protobuf:"varint,4,opt,name=parallel" json:"parallel,omitempty"` + Parallel bool `protobuf:"varint,4,opt,name=parallel,proto3" json:"parallel,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TestReleaseRequest) Reset() { *m = TestReleaseRequest{} } +func (m *TestReleaseRequest) String() string { return proto.CompactTextString(m) } +func (*TestReleaseRequest) ProtoMessage() {} +func (*TestReleaseRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_tiller_bb72ee4a42494734, []int{19} +} +func (m *TestReleaseRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TestReleaseRequest.Unmarshal(m, b) +} +func (m *TestReleaseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TestReleaseRequest.Marshal(b, m, deterministic) +} +func (dst *TestReleaseRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_TestReleaseRequest.Merge(dst, src) +} +func (m *TestReleaseRequest) XXX_Size() int { + return xxx_messageInfo_TestReleaseRequest.Size(m) +} +func (m *TestReleaseRequest) XXX_DiscardUnknown() { + xxx_messageInfo_TestReleaseRequest.DiscardUnknown(m) } -func (m *TestReleaseRequest) Reset() { *m = TestReleaseRequest{} } -func (m *TestReleaseRequest) String() string { return proto.CompactTextString(m) } -func (*TestReleaseRequest) ProtoMessage() {} -func (*TestReleaseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19} } +var xxx_messageInfo_TestReleaseRequest proto.InternalMessageInfo func (m *TestReleaseRequest) GetName() string { if m != nil { @@ -957,14 +1368,36 @@ func (m *TestReleaseRequest) GetParallel() bool { // TestReleaseResponse represents a message from executing a test type TestReleaseResponse struct { - Msg string `protobuf:"bytes,1,opt,name=msg" json:"msg,omitempty"` - Status hapi_release1.TestRun_Status `protobuf:"varint,2,opt,name=status,enum=hapi.release.TestRun_Status" json:"status,omitempty"` + Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` + Status release.TestRun_Status `protobuf:"varint,2,opt,name=status,proto3,enum=hapi.release.TestRun_Status" json:"status,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *TestReleaseResponse) Reset() { *m = TestReleaseResponse{} } -func (m *TestReleaseResponse) String() string { return proto.CompactTextString(m) } -func (*TestReleaseResponse) ProtoMessage() {} -func (*TestReleaseResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{20} } +func (m *TestReleaseResponse) Reset() { *m = TestReleaseResponse{} } +func (m *TestReleaseResponse) String() string { return proto.CompactTextString(m) } +func (*TestReleaseResponse) ProtoMessage() {} +func (*TestReleaseResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_tiller_bb72ee4a42494734, []int{20} +} +func (m *TestReleaseResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TestReleaseResponse.Unmarshal(m, b) +} +func (m *TestReleaseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TestReleaseResponse.Marshal(b, m, deterministic) +} +func (dst *TestReleaseResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_TestReleaseResponse.Merge(dst, src) +} +func (m *TestReleaseResponse) XXX_Size() int { + return xxx_messageInfo_TestReleaseResponse.Size(m) +} +func (m *TestReleaseResponse) XXX_DiscardUnknown() { + xxx_messageInfo_TestReleaseResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_TestReleaseResponse proto.InternalMessageInfo func (m *TestReleaseResponse) GetMsg() string { if m != nil { @@ -973,11 +1406,11 @@ func (m *TestReleaseResponse) GetMsg() string { return "" } -func (m *TestReleaseResponse) GetStatus() hapi_release1.TestRun_Status { +func (m *TestReleaseResponse) GetStatus() release.TestRun_Status { if m != nil { return m.Status } - return hapi_release1.TestRun_UNKNOWN + return release.TestRun_UNKNOWN } func init() { @@ -1014,8 +1447,9 @@ var _ grpc.ClientConn // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 -// Client API for ReleaseService service - +// ReleaseServiceClient is the client API for ReleaseService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type ReleaseServiceClient interface { // ListReleases retrieves release history. // TODO: Allow filtering the set of releases by @@ -1051,7 +1485,7 @@ func NewReleaseServiceClient(cc *grpc.ClientConn) ReleaseServiceClient { } func (c *releaseServiceClient) ListReleases(ctx context.Context, in *ListReleasesRequest, opts ...grpc.CallOption) (ReleaseService_ListReleasesClient, error) { - stream, err := grpc.NewClientStream(ctx, &_ReleaseService_serviceDesc.Streams[0], c.cc, "/hapi.services.tiller.ReleaseService/ListReleases", opts...) + stream, err := c.cc.NewStream(ctx, &_ReleaseService_serviceDesc.Streams[0], "/hapi.services.tiller.ReleaseService/ListReleases", opts...) if err != nil { return nil, err } @@ -1084,7 +1518,7 @@ func (x *releaseServiceListReleasesClient) Recv() (*ListReleasesResponse, error) func (c *releaseServiceClient) GetReleaseStatus(ctx context.Context, in *GetReleaseStatusRequest, opts ...grpc.CallOption) (*GetReleaseStatusResponse, error) { out := new(GetReleaseStatusResponse) - err := grpc.Invoke(ctx, "/hapi.services.tiller.ReleaseService/GetReleaseStatus", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/hapi.services.tiller.ReleaseService/GetReleaseStatus", in, out, opts...) if err != nil { return nil, err } @@ -1093,7 +1527,7 @@ func (c *releaseServiceClient) GetReleaseStatus(ctx context.Context, in *GetRele func (c *releaseServiceClient) GetReleaseContent(ctx context.Context, in *GetReleaseContentRequest, opts ...grpc.CallOption) (*GetReleaseContentResponse, error) { out := new(GetReleaseContentResponse) - err := grpc.Invoke(ctx, "/hapi.services.tiller.ReleaseService/GetReleaseContent", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/hapi.services.tiller.ReleaseService/GetReleaseContent", in, out, opts...) if err != nil { return nil, err } @@ -1102,7 +1536,7 @@ func (c *releaseServiceClient) GetReleaseContent(ctx context.Context, in *GetRel func (c *releaseServiceClient) UpdateRelease(ctx context.Context, in *UpdateReleaseRequest, opts ...grpc.CallOption) (*UpdateReleaseResponse, error) { out := new(UpdateReleaseResponse) - err := grpc.Invoke(ctx, "/hapi.services.tiller.ReleaseService/UpdateRelease", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/hapi.services.tiller.ReleaseService/UpdateRelease", in, out, opts...) if err != nil { return nil, err } @@ -1111,7 +1545,7 @@ func (c *releaseServiceClient) UpdateRelease(ctx context.Context, in *UpdateRele func (c *releaseServiceClient) InstallRelease(ctx context.Context, in *InstallReleaseRequest, opts ...grpc.CallOption) (*InstallReleaseResponse, error) { out := new(InstallReleaseResponse) - err := grpc.Invoke(ctx, "/hapi.services.tiller.ReleaseService/InstallRelease", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/hapi.services.tiller.ReleaseService/InstallRelease", in, out, opts...) if err != nil { return nil, err } @@ -1120,7 +1554,7 @@ func (c *releaseServiceClient) InstallRelease(ctx context.Context, in *InstallRe func (c *releaseServiceClient) UninstallRelease(ctx context.Context, in *UninstallReleaseRequest, opts ...grpc.CallOption) (*UninstallReleaseResponse, error) { out := new(UninstallReleaseResponse) - err := grpc.Invoke(ctx, "/hapi.services.tiller.ReleaseService/UninstallRelease", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/hapi.services.tiller.ReleaseService/UninstallRelease", in, out, opts...) if err != nil { return nil, err } @@ -1129,7 +1563,7 @@ func (c *releaseServiceClient) UninstallRelease(ctx context.Context, in *Uninsta func (c *releaseServiceClient) GetVersion(ctx context.Context, in *GetVersionRequest, opts ...grpc.CallOption) (*GetVersionResponse, error) { out := new(GetVersionResponse) - err := grpc.Invoke(ctx, "/hapi.services.tiller.ReleaseService/GetVersion", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/hapi.services.tiller.ReleaseService/GetVersion", in, out, opts...) if err != nil { return nil, err } @@ -1138,7 +1572,7 @@ func (c *releaseServiceClient) GetVersion(ctx context.Context, in *GetVersionReq func (c *releaseServiceClient) RollbackRelease(ctx context.Context, in *RollbackReleaseRequest, opts ...grpc.CallOption) (*RollbackReleaseResponse, error) { out := new(RollbackReleaseResponse) - err := grpc.Invoke(ctx, "/hapi.services.tiller.ReleaseService/RollbackRelease", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/hapi.services.tiller.ReleaseService/RollbackRelease", in, out, opts...) if err != nil { return nil, err } @@ -1147,7 +1581,7 @@ func (c *releaseServiceClient) RollbackRelease(ctx context.Context, in *Rollback func (c *releaseServiceClient) GetHistory(ctx context.Context, in *GetHistoryRequest, opts ...grpc.CallOption) (*GetHistoryResponse, error) { out := new(GetHistoryResponse) - err := grpc.Invoke(ctx, "/hapi.services.tiller.ReleaseService/GetHistory", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/hapi.services.tiller.ReleaseService/GetHistory", in, out, opts...) if err != nil { return nil, err } @@ -1155,7 +1589,7 @@ func (c *releaseServiceClient) GetHistory(ctx context.Context, in *GetHistoryReq } func (c *releaseServiceClient) RunReleaseTest(ctx context.Context, in *TestReleaseRequest, opts ...grpc.CallOption) (ReleaseService_RunReleaseTestClient, error) { - stream, err := grpc.NewClientStream(ctx, &_ReleaseService_serviceDesc.Streams[1], c.cc, "/hapi.services.tiller.ReleaseService/RunReleaseTest", opts...) + stream, err := c.cc.NewStream(ctx, &_ReleaseService_serviceDesc.Streams[1], "/hapi.services.tiller.ReleaseService/RunReleaseTest", opts...) if err != nil { return nil, err } @@ -1186,8 +1620,7 @@ func (x *releaseServiceRunReleaseTestClient) Recv() (*TestReleaseResponse, error return m, nil } -// Server API for ReleaseService service - +// ReleaseServiceServer is the server API for ReleaseService service. type ReleaseServiceServer interface { // ListReleases retrieves release history. // TODO: Allow filtering the set of releases by @@ -1456,9 +1889,9 @@ var _ReleaseService_serviceDesc = grpc.ServiceDesc{ Metadata: "hapi/services/tiller.proto", } -func init() { proto.RegisterFile("hapi/services/tiller.proto", fileDescriptor0) } +func init() { proto.RegisterFile("hapi/services/tiller.proto", fileDescriptor_tiller_bb72ee4a42494734) } -var fileDescriptor0 = []byte{ +var fileDescriptor_tiller_bb72ee4a42494734 = []byte{ // 1337 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x58, 0xdd, 0x72, 0xdb, 0x44, 0x14, 0x8e, 0x2d, 0xff, 0x1e, 0x27, 0xae, 0xbb, 0x4d, 0x13, 0xd5, 0x14, 0x26, 0x88, 0xa1, 0x75, diff --git a/pkg/proto/hapi/version/version.pb.go b/pkg/proto/hapi/version/version.pb.go index 13c8568f0..869bb3a5f 100644 --- a/pkg/proto/hapi/version/version.pb.go +++ b/pkg/proto/hapi/version/version.pb.go @@ -1,15 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: hapi/version/version.proto -/* -Package version is a generated protocol buffer package. - -It is generated from these files: - hapi/version/version.proto - -It has these top-level messages: - Version -*/ package version import proto "github.com/golang/protobuf/proto" @@ -29,15 +20,37 @@ const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type Version struct { // Sem ver string for the version - SemVer string `protobuf:"bytes,1,opt,name=sem_ver,json=semVer" json:"sem_ver,omitempty"` - GitCommit string `protobuf:"bytes,2,opt,name=git_commit,json=gitCommit" json:"git_commit,omitempty"` - GitTreeState string `protobuf:"bytes,3,opt,name=git_tree_state,json=gitTreeState" json:"git_tree_state,omitempty"` + SemVer string `protobuf:"bytes,1,opt,name=sem_ver,json=semVer,proto3" json:"sem_ver,omitempty"` + GitCommit string `protobuf:"bytes,2,opt,name=git_commit,json=gitCommit,proto3" json:"git_commit,omitempty"` + GitTreeState string `protobuf:"bytes,3,opt,name=git_tree_state,json=gitTreeState,proto3" json:"git_tree_state,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Version) Reset() { *m = Version{} } +func (m *Version) String() string { return proto.CompactTextString(m) } +func (*Version) ProtoMessage() {} +func (*Version) Descriptor() ([]byte, []int) { + return fileDescriptor_version_227db6d1d83f2c17, []int{0} +} +func (m *Version) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Version.Unmarshal(m, b) +} +func (m *Version) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Version.Marshal(b, m, deterministic) +} +func (dst *Version) XXX_Merge(src proto.Message) { + xxx_messageInfo_Version.Merge(dst, src) +} +func (m *Version) XXX_Size() int { + return xxx_messageInfo_Version.Size(m) +} +func (m *Version) XXX_DiscardUnknown() { + xxx_messageInfo_Version.DiscardUnknown(m) } -func (m *Version) Reset() { *m = Version{} } -func (m *Version) String() string { return proto.CompactTextString(m) } -func (*Version) ProtoMessage() {} -func (*Version) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +var xxx_messageInfo_Version proto.InternalMessageInfo func (m *Version) GetSemVer() string { if m != nil { @@ -64,9 +77,9 @@ func init() { proto.RegisterType((*Version)(nil), "hapi.version.Version") } -func init() { proto.RegisterFile("hapi/version/version.proto", fileDescriptor0) } +func init() { proto.RegisterFile("hapi/version/version.proto", fileDescriptor_version_227db6d1d83f2c17) } -var fileDescriptor0 = []byte{ +var fileDescriptor_version_227db6d1d83f2c17 = []byte{ // 151 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xca, 0x48, 0x2c, 0xc8, 0xd4, 0x2f, 0x4b, 0x2d, 0x2a, 0xce, 0xcc, 0xcf, 0x83, 0xd1, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, diff --git a/pkg/storage/driver/cfgmaps_test.go b/pkg/storage/driver/cfgmaps_test.go index d2e5e942e..1c8ed6652 100644 --- a/pkg/storage/driver/cfgmaps_test.go +++ b/pkg/storage/driver/cfgmaps_test.go @@ -15,7 +15,6 @@ package driver import ( "encoding/base64" - "reflect" "testing" "github.com/gogo/protobuf/proto" @@ -46,7 +45,7 @@ func TestConfigMapGet(t *testing.T) { t.Fatalf("Failed to get release: %s", err) } // compare fetched release with original - if !reflect.DeepEqual(rel, got) { + if !shallowReleaseEqual(rel, got) { t.Errorf("Expected {%q}, got {%q}", rel, got) } } @@ -78,7 +77,7 @@ func TestUNcompressedConfigMapGet(t *testing.T) { t.Fatalf("Failed to get release: %s", err) } // compare fetched release with original - if !reflect.DeepEqual(rel, got) { + if !shallowReleaseEqual(rel, got) { t.Errorf("Expected {%q}, got {%q}", rel, got) } } @@ -151,7 +150,7 @@ func TestConfigMapCreate(t *testing.T) { } // compare created release with original - if !reflect.DeepEqual(rel, got) { + if !shallowReleaseEqual(rel, got) { t.Errorf("Expected {%q}, got {%q}", rel, got) } } diff --git a/pkg/storage/driver/mock_test.go b/pkg/storage/driver/mock_test.go index 363d9dd5d..0d55497e7 100644 --- a/pkg/storage/driver/mock_test.go +++ b/pkg/storage/driver/mock_test.go @@ -38,6 +38,16 @@ func releaseStub(name string, vers int32, namespace string, code rspb.Status_Cod } } +func shallowReleaseEqual(r1 *rspb.Release, r2 *rspb.Release) bool { + if r1.Name != r2.Name || + r1.Namespace != r2.Namespace || + r1.Version != r2.Version || + r1.Manifest != r2.Manifest { + return false + } + return true +} + func testKey(name string, vers int32) string { return fmt.Sprintf("%s.v%d", name, vers) } diff --git a/pkg/storage/driver/secrets_test.go b/pkg/storage/driver/secrets_test.go index 0d7d1ad83..3c6c1675d 100644 --- a/pkg/storage/driver/secrets_test.go +++ b/pkg/storage/driver/secrets_test.go @@ -15,7 +15,6 @@ package driver import ( "encoding/base64" - "reflect" "testing" "github.com/gogo/protobuf/proto" @@ -46,7 +45,7 @@ func TestSecretGet(t *testing.T) { t.Fatalf("Failed to get release: %s", err) } // compare fetched release with original - if !reflect.DeepEqual(rel, got) { + if !shallowReleaseEqual(rel, got) { t.Errorf("Expected {%q}, got {%q}", rel, got) } } @@ -78,7 +77,7 @@ func TestUNcompressedSecretGet(t *testing.T) { t.Fatalf("Failed to get release: %s", err) } // compare fetched release with original - if !reflect.DeepEqual(rel, got) { + if !shallowReleaseEqual(rel, got) { t.Errorf("Expected {%q}, got {%q}", rel, got) } } @@ -151,7 +150,7 @@ func TestSecretCreate(t *testing.T) { } // compare created release with original - if !reflect.DeepEqual(rel, got) { + if !shallowReleaseEqual(rel, got) { t.Errorf("Expected {%q}, got {%q}", rel, got) } } diff --git a/pkg/version/version_test.go b/pkg/version/version_test.go index eba573533..315e3c9fe 100644 --- a/pkg/version/version_test.go +++ b/pkg/version/version_test.go @@ -39,9 +39,17 @@ func TestGetVersionProto(t *testing.T) { BuildMetadata = tt.buildMetadata GitCommit = tt.gitCommit GitTreeState = tt.gitTreeState - if versionProto := GetVersionProto(); *versionProto != tt.expected { - t.Errorf("expected Semver(%s), GitCommit(%s) and GitTreeState(%s) to be %v", tt.expected, tt.gitCommit, tt.gitTreeState, *versionProto) + if versionProto := GetVersionProto(); !versionEqual(*versionProto, tt.expected) { + t.Errorf("expected Semver(%s+%s), GitCommit(%s) and GitTreeState(%s) to be %v", tt.version, tt.buildMetadata, tt.gitCommit, tt.gitTreeState, *versionProto) } } +} +func versionEqual(v1 version.Version, v2 version.Version) bool { + if v1.SemVer != v2.SemVer || + v1.GitCommit != v2.GitCommit || + v1.GitTreeState != v2.GitTreeState { + return false + } + return true } From d45095263e47221d0f28c9dc49da18073fcc5b5f Mon Sep 17 00:00:00 2001 From: Jeff Knurek Date: Fri, 3 May 2019 09:31:53 +0200 Subject: [PATCH 193/327] remove obsolete doc file Signed-off-by: Jeff Knurek --- docs/helm/helm_get_version.md | 42 ----------------------------------- 1 file changed, 42 deletions(-) delete mode 100644 docs/helm/helm_get_version.md diff --git a/docs/helm/helm_get_version.md b/docs/helm/helm_get_version.md deleted file mode 100644 index 36695e464..000000000 --- a/docs/helm/helm_get_version.md +++ /dev/null @@ -1,42 +0,0 @@ -## helm get version - -download the chart version for a named release - -### Synopsis - -This command fetches the chart version for a given release. - -``` -helm get version [flags] RELEASE_NAME -``` - -### Options - -``` - -h, --help help for version - --revision int32 get the named release with revision - --tls enable TLS for request - --tls-ca-cert string path to TLS CA certificate file (default "$HELM_HOME/ca.pem") - --tls-cert string path to TLS certificate file (default "$HELM_HOME/cert.pem") - --tls-hostname string the server name used to verify the hostname on the returned certificates from the server - --tls-key string path to TLS key file (default "$HELM_HOME/key.pem") - --tls-verify enable TLS for request and verify remote -``` - -### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") -``` - -### SEE ALSO - -* [helm get](helm_get.md) - download a named release - -###### Auto generated by spf13/cobra on 21-Mar-2019 From 86b970600be20d80039ea79380b894442f2bde31 Mon Sep 17 00:00:00 2001 From: Tariq Ibrahim Date: Fri, 3 May 2019 14:23:09 -0700 Subject: [PATCH 194/327] add errcheck for Digest method in sign.go Signed-off-by: Tariq Ibrahim --- pkg/provenance/sign.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/provenance/sign.go b/pkg/provenance/sign.go index 5e23c2dda..5a7626424 100644 --- a/pkg/provenance/sign.go +++ b/pkg/provenance/sign.go @@ -404,6 +404,8 @@ func DigestFile(filename string) (string, error) { // Helm uses SHA256 as its default hash for all non-cryptographic applications. func Digest(in io.Reader) (string, error) { hash := crypto.SHA256.New() - io.Copy(hash, in) + if _, err := io.Copy(hash, in); err != nil { + return "", nil + } return hex.EncodeToString(hash.Sum(nil)), nil } From 2ed42013c41e0ed192fa8f0095550097bacda63a Mon Sep 17 00:00:00 2001 From: Joshua Bussdieker Date: Fri, 26 Apr 2019 14:27:41 -0700 Subject: [PATCH 195/327] Add docs for configuring SSL using Terraform. Signed-off-by: Joshua Bussdieker --- docs/tiller_ssl.md | 2 + docs/tiller_ssl_terraform.md | 311 +++++++++++++++++++++++++++++++++++ 2 files changed, 313 insertions(+) create mode 100644 docs/tiller_ssl_terraform.md diff --git a/docs/tiller_ssl.md b/docs/tiller_ssl.md index 3d64635ae..5bb7a55c6 100644 --- a/docs/tiller_ssl.md +++ b/docs/tiller_ssl.md @@ -42,6 +42,8 @@ on getting ready within a small amount of time. For production configurations, we urge readers to read [the official documentation](https://www.openssl.org) and consult other resources. +Alternatively you can use Terraform to quickly create all the necessary certificates: [Generating Certificate Authorities and Certificates using Terraform](tiller_ssl_terraform.md). + ### Generate a Certificate Authority The simplest way to generate a certificate authority is to run two commands: diff --git a/docs/tiller_ssl_terraform.md b/docs/tiller_ssl_terraform.md new file mode 100644 index 000000000..40591e36f --- /dev/null +++ b/docs/tiller_ssl_terraform.md @@ -0,0 +1,311 @@ +# Generating Certificate Authorities and Certificates using Terraform + +It's possible to create all the necessary keys and certificates to secure Helm using +Terraform. Simply create the following file and apply it using `terraform`. + +## tiller_certs.tf + +```terraform +# Generate the Tiller CA key +resource "tls_private_key" "ca" { + algorithm = "RSA" + rsa_bits = 4096 +} + +# Generate a self signed CA certificate +resource "tls_self_signed_cert" "ca" { + key_algorithm = "${tls_private_key.ca.algorithm}" + private_key_pem = "${tls_private_key.ca.private_key_pem}" + is_ca_certificate = true + validity_period_hours = 87600 + early_renewal_hours = 8760 + + allowed_uses = [ + "v3_ca", + ] + + subject { + organization = "Tiller CA" + } +} + +# Write the CA key to file +resource "local_file" "ca_key" { + content = "${tls_private_key.ca.private_key_pem}" + filename = "${path.module}/ca.key.pem" +} + +# Write the CA cert to file +resource "local_file" "ca_cert" { + content = "${tls_self_signed_cert.ca.cert_pem}" + filename = "${path.module}/ca.cert.pem" +} + +# Generate the Tiller Server key +resource "tls_private_key" "tiller" { + algorithm = "RSA" + rsa_bits = 4096 +} + +# Generate a signing request for the Tiller Server certificate +resource "tls_cert_request" "tiller" { + key_algorithm = "${tls_private_key.tiller.algorithm}" + private_key_pem = "${tls_private_key.tiller.private_key_pem}" + + ip_addresses = [ + "127.0.0.1", + ] + + subject { + organization = "Tiller Server" + } +} + +# Write the Tiller Server key to file +resource "local_file" "tiller_key" { + content = "${tls_private_key.tiller.private_key_pem}" + filename = "${path.module}/tiller.key.pem" +} + +# Write the Tiller Server cert to file +resource "local_file" "tiller_cert" { + content = "${tls_locally_signed_cert.tiller.cert_pem}" + filename = "${path.module}/tiller.cert.pem" +} + +# Sign the Tiller Server certificate signing request +resource "tls_locally_signed_cert" "tiller" { + cert_request_pem = "${tls_cert_request.tiller.cert_request_pem}" + ca_key_algorithm = "${tls_private_key.ca.algorithm}" + ca_private_key_pem = "${tls_private_key.ca.private_key_pem}" + ca_cert_pem = "${tls_self_signed_cert.ca.cert_pem}" + validity_period_hours = 87600 + allowed_uses = [] +} + +# Generate a key for the Helm Client +resource "tls_private_key" "helm" { + algorithm = "RSA" + rsa_bits = 4096 +} + +# Generate a signing request for the Helm Client certificate +resource "tls_cert_request" "helm" { + key_algorithm = "${tls_private_key.helm.algorithm}" + private_key_pem = "${tls_private_key.helm.private_key_pem}" + + subject { + organization = "Helm Client" + } +} + +# Sign the Helm Client certificate signing request +resource "tls_locally_signed_cert" "helm" { + cert_request_pem = "${tls_cert_request.helm.cert_request_pem}" + ca_key_algorithm = "${tls_private_key.ca.algorithm}" + ca_private_key_pem = "${tls_private_key.ca.private_key_pem}" + ca_cert_pem = "${tls_self_signed_cert.ca.cert_pem}" + validity_period_hours = 87600 + allowed_uses = [] +} + +# Write the Helm Client key to file +resource "local_file" "helm_key" { + content = "${tls_private_key.helm.private_key_pem}" + filename = "${path.module}/helm.key.pem" +} + +# Write the Helm Client cert to file +resource "local_file" "helm_cert" { + content = "${tls_locally_signed_cert.helm.cert_pem}" + filename = "${path.module}/helm.cert.pem" +} +``` + +Now simply run Terraform init and apply: + +```console +$ terraform init + +Initializing provider plugins... +- Checking for available provider plugins on https://releases.hashicorp.com... +- Downloading plugin for provider "tls" (2.0.0)... +- Downloading plugin for provider "local" (1.2.1)... + +The following providers do not have any version constraints in configuration, +so the latest version was installed. + +To prevent automatic upgrades to new major versions that may contain breaking +changes, it is recommended to add version = "..." constraints to the +corresponding provider blocks in configuration, with the constraint strings +suggested below. + +* provider.local: version = "~> 1.2" +* provider.tls: version = "~> 2.0" + +Terraform has been successfully initialized! + +You may now begin working with Terraform. Try running "terraform plan" to see +any changes that are required for your infrastructure. All Terraform commands +should now work. + +If you ever set or change modules or backend configuration for Terraform, +rerun this command to reinitialize your working directory. If you forget, other +commands will detect it and remind you to do so if necessary. +``` + +```console +$ terraform apply + +An execution plan has been generated and is shown below. +Resource actions are indicated with the following symbols: + + create + +Terraform will perform the following actions: + + + local_file.ca_cert + id: + content: "${tls_self_signed_cert.ca.cert_pem}" + filename: "/home/user/ca.cert.pem" + + + local_file.ca_key + id: + content: "${tls_private_key.ca.private_key_pem}" + filename: "/home/user/ca.key.pem" + + + local_file.helm_cert + id: + content: "${tls_locally_signed_cert.helm.cert_pem}" + filename: "/home/user/helm.cert.pem" + + + local_file.helm_key + id: + content: "${tls_private_key.helm.private_key_pem}" + filename: "/home/user/helm.key.pem" + + + local_file.tiller_cert + id: + content: "${tls_locally_signed_cert.tiller.cert_pem}" + filename: "/home/user/tiller.cert.pem" + + + local_file.tiller_key + id: + content: "${tls_private_key.tiller.private_key_pem}" + filename: "/home/user/tiller.key.pem" + + + tls_cert_request.helm + id: + cert_request_pem: + key_algorithm: "RSA" + private_key_pem: "088d7282d5fd07c60edbb06a0391bbfef9ed0752" + subject.#: "1" + subject.0.organization: "Helm Client" + + + tls_cert_request.tiller + id: + cert_request_pem: + ip_addresses.#: "1" + ip_addresses.0: "127.0.0.1" + key_algorithm: "RSA" + private_key_pem: "ce4d1f657394357cb9df6394e1749953ede611c0" + subject.#: "1" + subject.0.organization: "Tiller Server" + + + tls_locally_signed_cert.helm + id: + ca_cert_pem: "67c5245fc6ca7f0c9c84221a0286253194dbb985" + ca_key_algorithm: "RSA" + ca_private_key_pem: "6c435a4a25d847452106d0271104a386d269ae6b" + cert_pem: + cert_request_pem: "e9cbcf1529e9b4532c56ae91defc2c387fbdef94" + early_renewal_hours: "0" + validity_end_time: + validity_period_hours: "87600" + validity_start_time: + + + tls_locally_signed_cert.tiller + id: + ca_cert_pem: "67c5245fc6ca7f0c9c84221a0286253194dbb985" + ca_key_algorithm: "RSA" + ca_private_key_pem: "6c435a4a25d847452106d0271104a386d269ae6b" + cert_pem: + cert_request_pem: "c7444562da59395a93599d2b6693dee3d39a6469" + early_renewal_hours: "0" + validity_end_time: + validity_period_hours: "87600" + validity_start_time: + + + tls_private_key.ca + id: + algorithm: "RSA" + ecdsa_curve: "P224" + private_key_pem: + public_key_fingerprint_md5: + public_key_openssh: + public_key_pem: + rsa_bits: "4096" + + + tls_private_key.helm + id: + algorithm: "RSA" + ecdsa_curve: "P224" + private_key_pem: + public_key_fingerprint_md5: + public_key_openssh: + public_key_pem: + rsa_bits: "4096" + + + tls_private_key.tiller + id: + algorithm: "RSA" + ecdsa_curve: "P224" + private_key_pem: + public_key_fingerprint_md5: + public_key_openssh: + public_key_pem: + rsa_bits: "4096" + + + tls_self_signed_cert.ca + id: + allowed_uses.#: "1" + allowed_uses.0: "v3_ca" + cert_pem: + early_renewal_hours: "8760" + is_ca_certificate: "true" + key_algorithm: "RSA" + private_key_pem: "6c435a4a25d847452106d0271104a386d269ae6b" + subject.#: "1" + subject.0.organization: "Tiller CA" + validity_end_time: + validity_period_hours: "87600" + validity_start_time: + + +Plan: 14 to add, 0 to change, 0 to destroy. + +Do you want to perform these actions? + Terraform will perform the actions described above. + Only 'yes' will be accepted to approve. + + Enter a value: yes + +... + +Apply complete! Resources: 14 added, 0 changed, 0 destroyed. +``` + +At this point, the important files for us are these: + +``` +# The CA. Make sure the key is kept secret. +ca.cert.pem +ca.key.pem +# The Helm client files +helm.cert.pem +helm.key.pem +# The Tiller server files. +tiller.cert.pem +tiller.key.pem +``` + +Now we're ready to move on to the next steps here: [TLS/SSL for Helm and Tiller - Creating a Custom Tiller Installation](tiller_ssl.md#creating-a-custom-tiller-installation) From aff106f97f075854c66995f597799c374df50c29 Mon Sep 17 00:00:00 2001 From: Joshua Bussdieker Date: Sun, 5 May 2019 17:53:55 -0700 Subject: [PATCH 196/327] Update to reflect location of docs Signed-off-by: Joshua Bussdieker --- docs/tiller_ssl.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tiller_ssl.md b/docs/tiller_ssl.md index 5bb7a55c6..d6f207f1b 100644 --- a/docs/tiller_ssl.md +++ b/docs/tiller_ssl.md @@ -42,7 +42,7 @@ on getting ready within a small amount of time. For production configurations, we urge readers to read [the official documentation](https://www.openssl.org) and consult other resources. -Alternatively you can use Terraform to quickly create all the necessary certificates: [Generating Certificate Authorities and Certificates using Terraform](tiller_ssl_terraform.md). +There are other alternative ways to generating SSL CAs in addition to `openssl`, for example Terraform. They are not documented here but you can find links to these alternative means in Related Projects and Documentation. ### Generate a Certificate Authority From 422f0929b404a4587f396895c589992b9860ff27 Mon Sep 17 00:00:00 2001 From: Joshua Bussdieker Date: Sun, 5 May 2019 18:02:32 -0700 Subject: [PATCH 197/327] Move actual docs to another repo and update related docs list Signed-off-by: Joshua Bussdieker --- docs/related.md | 1 + docs/tiller_ssl_terraform.md | 311 ----------------------------------- 2 files changed, 1 insertion(+), 311 deletions(-) delete mode 100644 docs/tiller_ssl_terraform.md diff --git a/docs/related.md b/docs/related.md index 3f8c73d4a..4a38e68f1 100644 --- a/docs/related.md +++ b/docs/related.md @@ -19,6 +19,7 @@ or [pull request](https://github.com/helm/helm/pulls). - [Writing a Helm Chart](https://www.influxdata.com/packaged-kubernetes-deployments-writing-helm-chart/) - [A basic walk through Kubernetes Helm](https://github.com/muffin87/helm-tutorial) - [Tillerless Helm v2](https://rimusz.net/tillerless-helm/) +- [Generating Certificate Authorities and Certificates using Terraform](https://github.com/jbussdieker/tiller-ssl-terraform) ## Video, Audio, and Podcast diff --git a/docs/tiller_ssl_terraform.md b/docs/tiller_ssl_terraform.md deleted file mode 100644 index 40591e36f..000000000 --- a/docs/tiller_ssl_terraform.md +++ /dev/null @@ -1,311 +0,0 @@ -# Generating Certificate Authorities and Certificates using Terraform - -It's possible to create all the necessary keys and certificates to secure Helm using -Terraform. Simply create the following file and apply it using `terraform`. - -## tiller_certs.tf - -```terraform -# Generate the Tiller CA key -resource "tls_private_key" "ca" { - algorithm = "RSA" - rsa_bits = 4096 -} - -# Generate a self signed CA certificate -resource "tls_self_signed_cert" "ca" { - key_algorithm = "${tls_private_key.ca.algorithm}" - private_key_pem = "${tls_private_key.ca.private_key_pem}" - is_ca_certificate = true - validity_period_hours = 87600 - early_renewal_hours = 8760 - - allowed_uses = [ - "v3_ca", - ] - - subject { - organization = "Tiller CA" - } -} - -# Write the CA key to file -resource "local_file" "ca_key" { - content = "${tls_private_key.ca.private_key_pem}" - filename = "${path.module}/ca.key.pem" -} - -# Write the CA cert to file -resource "local_file" "ca_cert" { - content = "${tls_self_signed_cert.ca.cert_pem}" - filename = "${path.module}/ca.cert.pem" -} - -# Generate the Tiller Server key -resource "tls_private_key" "tiller" { - algorithm = "RSA" - rsa_bits = 4096 -} - -# Generate a signing request for the Tiller Server certificate -resource "tls_cert_request" "tiller" { - key_algorithm = "${tls_private_key.tiller.algorithm}" - private_key_pem = "${tls_private_key.tiller.private_key_pem}" - - ip_addresses = [ - "127.0.0.1", - ] - - subject { - organization = "Tiller Server" - } -} - -# Write the Tiller Server key to file -resource "local_file" "tiller_key" { - content = "${tls_private_key.tiller.private_key_pem}" - filename = "${path.module}/tiller.key.pem" -} - -# Write the Tiller Server cert to file -resource "local_file" "tiller_cert" { - content = "${tls_locally_signed_cert.tiller.cert_pem}" - filename = "${path.module}/tiller.cert.pem" -} - -# Sign the Tiller Server certificate signing request -resource "tls_locally_signed_cert" "tiller" { - cert_request_pem = "${tls_cert_request.tiller.cert_request_pem}" - ca_key_algorithm = "${tls_private_key.ca.algorithm}" - ca_private_key_pem = "${tls_private_key.ca.private_key_pem}" - ca_cert_pem = "${tls_self_signed_cert.ca.cert_pem}" - validity_period_hours = 87600 - allowed_uses = [] -} - -# Generate a key for the Helm Client -resource "tls_private_key" "helm" { - algorithm = "RSA" - rsa_bits = 4096 -} - -# Generate a signing request for the Helm Client certificate -resource "tls_cert_request" "helm" { - key_algorithm = "${tls_private_key.helm.algorithm}" - private_key_pem = "${tls_private_key.helm.private_key_pem}" - - subject { - organization = "Helm Client" - } -} - -# Sign the Helm Client certificate signing request -resource "tls_locally_signed_cert" "helm" { - cert_request_pem = "${tls_cert_request.helm.cert_request_pem}" - ca_key_algorithm = "${tls_private_key.ca.algorithm}" - ca_private_key_pem = "${tls_private_key.ca.private_key_pem}" - ca_cert_pem = "${tls_self_signed_cert.ca.cert_pem}" - validity_period_hours = 87600 - allowed_uses = [] -} - -# Write the Helm Client key to file -resource "local_file" "helm_key" { - content = "${tls_private_key.helm.private_key_pem}" - filename = "${path.module}/helm.key.pem" -} - -# Write the Helm Client cert to file -resource "local_file" "helm_cert" { - content = "${tls_locally_signed_cert.helm.cert_pem}" - filename = "${path.module}/helm.cert.pem" -} -``` - -Now simply run Terraform init and apply: - -```console -$ terraform init - -Initializing provider plugins... -- Checking for available provider plugins on https://releases.hashicorp.com... -- Downloading plugin for provider "tls" (2.0.0)... -- Downloading plugin for provider "local" (1.2.1)... - -The following providers do not have any version constraints in configuration, -so the latest version was installed. - -To prevent automatic upgrades to new major versions that may contain breaking -changes, it is recommended to add version = "..." constraints to the -corresponding provider blocks in configuration, with the constraint strings -suggested below. - -* provider.local: version = "~> 1.2" -* provider.tls: version = "~> 2.0" - -Terraform has been successfully initialized! - -You may now begin working with Terraform. Try running "terraform plan" to see -any changes that are required for your infrastructure. All Terraform commands -should now work. - -If you ever set or change modules or backend configuration for Terraform, -rerun this command to reinitialize your working directory. If you forget, other -commands will detect it and remind you to do so if necessary. -``` - -```console -$ terraform apply - -An execution plan has been generated and is shown below. -Resource actions are indicated with the following symbols: - + create - -Terraform will perform the following actions: - - + local_file.ca_cert - id: - content: "${tls_self_signed_cert.ca.cert_pem}" - filename: "/home/user/ca.cert.pem" - - + local_file.ca_key - id: - content: "${tls_private_key.ca.private_key_pem}" - filename: "/home/user/ca.key.pem" - - + local_file.helm_cert - id: - content: "${tls_locally_signed_cert.helm.cert_pem}" - filename: "/home/user/helm.cert.pem" - - + local_file.helm_key - id: - content: "${tls_private_key.helm.private_key_pem}" - filename: "/home/user/helm.key.pem" - - + local_file.tiller_cert - id: - content: "${tls_locally_signed_cert.tiller.cert_pem}" - filename: "/home/user/tiller.cert.pem" - - + local_file.tiller_key - id: - content: "${tls_private_key.tiller.private_key_pem}" - filename: "/home/user/tiller.key.pem" - - + tls_cert_request.helm - id: - cert_request_pem: - key_algorithm: "RSA" - private_key_pem: "088d7282d5fd07c60edbb06a0391bbfef9ed0752" - subject.#: "1" - subject.0.organization: "Helm Client" - - + tls_cert_request.tiller - id: - cert_request_pem: - ip_addresses.#: "1" - ip_addresses.0: "127.0.0.1" - key_algorithm: "RSA" - private_key_pem: "ce4d1f657394357cb9df6394e1749953ede611c0" - subject.#: "1" - subject.0.organization: "Tiller Server" - - + tls_locally_signed_cert.helm - id: - ca_cert_pem: "67c5245fc6ca7f0c9c84221a0286253194dbb985" - ca_key_algorithm: "RSA" - ca_private_key_pem: "6c435a4a25d847452106d0271104a386d269ae6b" - cert_pem: - cert_request_pem: "e9cbcf1529e9b4532c56ae91defc2c387fbdef94" - early_renewal_hours: "0" - validity_end_time: - validity_period_hours: "87600" - validity_start_time: - - + tls_locally_signed_cert.tiller - id: - ca_cert_pem: "67c5245fc6ca7f0c9c84221a0286253194dbb985" - ca_key_algorithm: "RSA" - ca_private_key_pem: "6c435a4a25d847452106d0271104a386d269ae6b" - cert_pem: - cert_request_pem: "c7444562da59395a93599d2b6693dee3d39a6469" - early_renewal_hours: "0" - validity_end_time: - validity_period_hours: "87600" - validity_start_time: - - + tls_private_key.ca - id: - algorithm: "RSA" - ecdsa_curve: "P224" - private_key_pem: - public_key_fingerprint_md5: - public_key_openssh: - public_key_pem: - rsa_bits: "4096" - - + tls_private_key.helm - id: - algorithm: "RSA" - ecdsa_curve: "P224" - private_key_pem: - public_key_fingerprint_md5: - public_key_openssh: - public_key_pem: - rsa_bits: "4096" - - + tls_private_key.tiller - id: - algorithm: "RSA" - ecdsa_curve: "P224" - private_key_pem: - public_key_fingerprint_md5: - public_key_openssh: - public_key_pem: - rsa_bits: "4096" - - + tls_self_signed_cert.ca - id: - allowed_uses.#: "1" - allowed_uses.0: "v3_ca" - cert_pem: - early_renewal_hours: "8760" - is_ca_certificate: "true" - key_algorithm: "RSA" - private_key_pem: "6c435a4a25d847452106d0271104a386d269ae6b" - subject.#: "1" - subject.0.organization: "Tiller CA" - validity_end_time: - validity_period_hours: "87600" - validity_start_time: - - -Plan: 14 to add, 0 to change, 0 to destroy. - -Do you want to perform these actions? - Terraform will perform the actions described above. - Only 'yes' will be accepted to approve. - - Enter a value: yes - -... - -Apply complete! Resources: 14 added, 0 changed, 0 destroyed. -``` - -At this point, the important files for us are these: - -``` -# The CA. Make sure the key is kept secret. -ca.cert.pem -ca.key.pem -# The Helm client files -helm.cert.pem -helm.key.pem -# The Tiller server files. -tiller.cert.pem -tiller.key.pem -``` - -Now we're ready to move on to the next steps here: [TLS/SSL for Helm and Tiller - Creating a Custom Tiller Installation](tiller_ssl.md#creating-a-custom-tiller-installation) From 3e1ca6fe6e3e2add0518925c5273b650fcb64280 Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Mon, 6 May 2019 21:14:01 -0400 Subject: [PATCH 198/327] fix(completion): --flag=val breaks zsh completion This is a bug I ran into when working on Helm completion. I was surprised that it didn't happen when I was using kubectl, so I investigated and found a PR that fixed this bug in kubectl: https://github.com/kubernetes/kubernetes/pull/48553 I duplicated the code in this commit which: Removes __helm_declare, which is safe to do since `declare -F` is already replaced to `whence -w` by __helm_convert_bash_to_zsh(). The problem was that calling "declare" from inside a function scopes the declaration to that function only. So "declare" should not be called through __helm_declare() but instead directly. To reproduce: 1- setup helm completion in zsh 2- helm --kubeconfig=$HOME/.kube/config statu you will get the error: __helm_handle_flag:27: bad math expression: operand expected at end of string Co-authored-by: Kazuki Suda Signed-off-by: Marc Khouzam --- cmd/helm/completion.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/cmd/helm/completion.go b/cmd/helm/completion.go index 039dcbe5f..051f946fd 100644 --- a/cmd/helm/completion.go +++ b/cmd/helm/completion.go @@ -126,13 +126,6 @@ __helm_compgen() { __helm_compopt() { true # don't do anything. Not supported by bashcompinit in zsh } -__helm_declare() { - if [ "$1" == "-F" ]; then - whence -w "$@" - else - builtin declare "$@" - fi -} __helm_ltrim_colon_completions() { if [[ "$1" == *:* && "$COMP_WORDBREAKS" == *:* ]]; then @@ -210,7 +203,7 @@ __helm_convert_bash_to_zsh() { -e "s/${LWORD}__ltrim_colon_completions${RWORD}/__helm_ltrim_colon_completions/g" \ -e "s/${LWORD}compgen${RWORD}/__helm_compgen/g" \ -e "s/${LWORD}compopt${RWORD}/__helm_compopt/g" \ - -e "s/${LWORD}declare${RWORD}/__helm_declare/g" \ + -e "s/${LWORD}declare${RWORD}/builtin declare/g" \ -e "s/\\\$(type${RWORD}/\$(__helm_type/g" \ -e 's/aliashash\["\(.\{1,\}\)"\]/aliashash[\1]/g' \ -e 's/FUNCNAME/funcstack/g' \ From 51c99b125224093802def010a48d763ffab5b6df Mon Sep 17 00:00:00 2001 From: Joshua Bussdieker Date: Tue, 7 May 2019 03:36:56 -0700 Subject: [PATCH 199/327] Fix missing link Signed-off-by: Joshua Bussdieker --- docs/tiller_ssl.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tiller_ssl.md b/docs/tiller_ssl.md index d6f207f1b..3705723fa 100644 --- a/docs/tiller_ssl.md +++ b/docs/tiller_ssl.md @@ -42,7 +42,7 @@ on getting ready within a small amount of time. For production configurations, we urge readers to read [the official documentation](https://www.openssl.org) and consult other resources. -There are other alternative ways to generating SSL CAs in addition to `openssl`, for example Terraform. They are not documented here but you can find links to these alternative means in Related Projects and Documentation. +There are other alternative ways to generating SSL CAs in addition to `openssl`, for example Terraform. They are not documented here but you can find links to these alternative means in [Related Projects and Documentation](https://helm.sh/docs/related/). ### Generate a Certificate Authority From b5582f03e6a0332f8b8957198345280f37481600 Mon Sep 17 00:00:00 2001 From: Matt Farina Date: Tue, 7 May 2019 10:43:42 -0400 Subject: [PATCH 200/327] Pinning k8s to a specific release The other Kubernetes dependencies, such as client-go and apimachinery, are pinned to 1.14.1 but Kubernetes itself was tracking the tip of the 1.14 release branch and picking up changes between releases. This change pins Kubernetes to the same version as the other parts of it. Signed-off-by: Matt Farina --- glide.lock | 6 +++--- glide.yaml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/glide.lock b/glide.lock index 5c5671268..f485ddc12 100644 --- a/glide.lock +++ b/glide.lock @@ -1,5 +1,5 @@ -hash: 8a007d8993bdffd14a1a2d674848bd085a27b09d7f177fab1dc55783059c4dce -updated: 2019-04-29T12:23:33.902435+01:00 +hash: 7571b58bbda7d85993d2b737b50d0c52f5fadce0c63e7fac064bc0a99faaefab +updated: 2019-05-07T10:43:27.329085-04:00 imports: - name: cloud.google.com/go version: 3b1ae45394a234c385be014e9a488f2bb6eef821 @@ -647,7 +647,7 @@ imports: - pkg/util/proto/testing - pkg/util/proto/validation - name: k8s.io/kubernetes - version: b8f2b772e38a15165a6247256d650e8b04178318 + version: b7394102d6ef778017f2ca4046abbaa23b88c290 subpackages: - pkg/api/legacyscheme - pkg/api/service diff --git a/glide.yaml b/glide.yaml index aeabbc724..488030fa7 100644 --- a/glide.yaml +++ b/glide.yaml @@ -51,7 +51,7 @@ import: version: 0.9.2 - package: github.com/grpc-ecosystem/go-grpc-prometheus - package: k8s.io/kubernetes - version: release-1.14 + version: v1.14.1 - package: k8s.io/client-go version: kubernetes-1.14.1 - package: k8s.io/api From 965b78433b2f8967d12c59d12745088219a688aa Mon Sep 17 00:00:00 2001 From: Matt Farina Date: Wed, 8 May 2019 10:10:34 -0400 Subject: [PATCH 201/327] Updating OWERS to remove outdated reviewers and to reflect current case Two changes in this: 1. Remove the reviewers. These are from when Helm was under Kubernetes and used its tools. That is no longer the case so this section has no use. 2. List fibonacci1729 with the maintainers. He has been a maintainer a long time. The original listing had to do with department locations within Deis rather than his work. He has been a maintainer since before Helm was a CNCF project. Fixes #5685 Signed-off-by: Matt Farina --- OWNERS | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/OWNERS b/OWNERS index df847ab37..fcc3606c2 100644 --- a/OWNERS +++ b/OWNERS @@ -1,24 +1,11 @@ maintainers: - - adamreese - - bacongobbler - - hickeyma - - jascott1 - - mattfarina - - michelleN - - prydonius - - SlickNik - - technosophos - - thomastaylor312 - - viglesiasce -reviewers: - adamreese - bacongobbler - fibonacci1729 + - hickeyma - jascott1 - mattfarina - michelleN - - migmartri - - nebril - prydonius - SlickNik - technosophos From 4bd361746cd7c7bf9644571a903e96ad2f14f1b0 Mon Sep 17 00:00:00 2001 From: Tariq Ibrahim Date: Fri, 3 May 2019 10:08:34 -0700 Subject: [PATCH 202/327] use the latest patch release version of golang Signed-off-by: Tariq Ibrahim --- .circleci/config.yml | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 09d49fb89..14c050746 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,7 +4,7 @@ jobs: working_directory: /go/src/k8s.io/helm parallelism: 3 docker: - - image: golang:1.12.2 + - image: golang:1.12.5 environment: PROJECT_NAME: "kubernetes-helm" steps: diff --git a/Makefile b/Makefile index 719fd5f03..1b5932db8 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ DOCKER_REGISTRY ?= gcr.io IMAGE_PREFIX ?= kubernetes-helm -DEV_IMAGE ?= golang:1.12.2 +DEV_IMAGE ?= golang:1.12.5 SHORT_NAME ?= tiller SHORT_NAME_RUDDER ?= rudder TARGETS ?= darwin/amd64 linux/amd64 linux/386 linux/arm linux/arm64 linux/ppc64le linux/s390x windows/amd64 From 85b5dcad31c6af0b4916909bdb4c7b92035badb6 Mon Sep 17 00:00:00 2001 From: Ben Lubar Date: Thu, 9 May 2019 11:15:01 -0500 Subject: [PATCH 203/327] Add ProGet as a Helm chart repository host. Signed-off-by: Ben Lubar --- docs/chart_repository.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/chart_repository.md b/docs/chart_repository.md index e3bbe3c7d..c0b3d0609 100644 --- a/docs/chart_repository.md +++ b/docs/chart_repository.md @@ -182,6 +182,10 @@ Charts repository hosts its charts, so you may want to take a You can also set up chart repositories using JFrog Artifactory. Read more about chart repositories with JFrog Artifactory [here](https://www.jfrog.com/confluence/display/RTF/Helm+Chart+Repositories) +### ProGet + +Helm chart repositories are supported by ProGet. For more information, visit the [Helm repository documentation](https://inedo.com/support/documentation/proget/feeds/helm) on the Inedo website. + ### Github Pages example In a similar way you can create charts repository using GitHub Pages. From e6d5fc933b81093050459397f011673ca83c508c Mon Sep 17 00:00:00 2001 From: Jon Huhn Date: Thu, 9 May 2019 11:19:51 -0500 Subject: [PATCH 204/327] Fix typo Signed-off-by: Jon Huhn --- cmd/helm/lint.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/helm/lint.go b/cmd/helm/lint.go index d0159d34b..746f946f2 100644 --- a/cmd/helm/lint.go +++ b/cmd/helm/lint.go @@ -166,7 +166,7 @@ func lintChart(path string, vals []byte, namespace string, strict bool) (support chartPath = path } - // Guard: Error out of this is not a chart. + // Guard: Error out if this is not a chart. if _, err := os.Stat(filepath.Join(chartPath, "Chart.yaml")); err != nil { return linter, errLintNoChart } From 5be3af65a2a90a2fee07cfcc1d619c2dcc9ba37b Mon Sep 17 00:00:00 2001 From: Matthew Fisher Date: Thu, 9 May 2019 10:15:05 -0700 Subject: [PATCH 205/327] bump version to v2.14 (cherry picked from commit 2420009a75c56bba5cf77e8975f26fceb736e68a) Signed-off-by: Matthew Fisher --- pkg/version/version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/version/version.go b/pkg/version/version.go index 692167b83..d32f09c4a 100644 --- a/pkg/version/version.go +++ b/pkg/version/version.go @@ -26,7 +26,7 @@ var ( // Increment major number for new feature additions and behavioral changes. // Increment minor number for bug fixes and performance enhancements. // Increment patch number for critical fixes to existing releases. - Version = "v2.12" + Version = "v2.14" // BuildMetadata is extra build time data BuildMetadata = "unreleased" From ae0d4b151b621a2f12a9b89e75a868349a6fc80f Mon Sep 17 00:00:00 2001 From: Matthew Fisher Date: Thu, 9 May 2019 14:55:17 -0700 Subject: [PATCH 206/327] fix(pkg/storage/driver): use shallowReleaseEqual() Signed-off-by: Matthew Fisher --- pkg/storage/driver/sql_test.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pkg/storage/driver/sql_test.go b/pkg/storage/driver/sql_test.go index 4d669c1b5..b6aa08588 100644 --- a/pkg/storage/driver/sql_test.go +++ b/pkg/storage/driver/sql_test.go @@ -18,7 +18,6 @@ package driver import ( "fmt" - "reflect" "regexp" "testing" "time" @@ -41,7 +40,10 @@ func TestSQLGet(t *testing.T) { key := testKey(name, vers) rel := releaseStub(name, vers, namespace, rspb.Status_DEPLOYED) - body, _ := encodeRelease(rel) + body, err := encodeRelease(rel) + if err != nil { + t.Fatal(err) + } sqlDriver, mock := newTestFixtureSQL(t) mock. @@ -60,7 +62,7 @@ func TestSQLGet(t *testing.T) { t.Fatalf("Failed to get release: %v", err) } - if !reflect.DeepEqual(rel, got) { + if !shallowReleaseEqual(rel, got) { t.Errorf("Expected release {%q}, got {%q}", rel, got) } @@ -275,7 +277,7 @@ func TestSqlQuery(t *testing.T) { } for _, res := range results { - if !reflect.DeepEqual(res, deployedRelease) { + if !shallowReleaseEqual(res, deployedRelease) { t.Errorf("Expected release {%q}, got {%q}", deployedRelease, res) } } @@ -290,7 +292,7 @@ func TestSqlQuery(t *testing.T) { } for _, res := range results { - if !reflect.DeepEqual(res, deployedRelease) && !reflect.DeepEqual(res, supersededRelease) { + if !shallowReleaseEqual(res, deployedRelease) && !shallowReleaseEqual(res, supersededRelease) { t.Errorf("Expected release {%q} or {%q}, got {%q}", deployedRelease, supersededRelease, res) } } @@ -334,7 +336,7 @@ func TestSqlDelete(t *testing.T) { t.Fatalf("failed to delete release with key %q: %v", key, err) } - if !reflect.DeepEqual(rel, deletedRelease) { + if !shallowReleaseEqual(rel, deletedRelease) { t.Errorf("Expected release {%q}, got {%q}", rel, deletedRelease) } From e1b993bae8444ca73b48e7a2fd51cae1f5ace2a3 Mon Sep 17 00:00:00 2001 From: Jon Huhn Date: Thu, 9 May 2019 19:07:32 -0500 Subject: [PATCH 207/327] Fix typo Signed-off-by: Jon Huhn --- cmd/helm/lint.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/helm/lint.go b/cmd/helm/lint.go index 746f946f2..79fd7a219 100644 --- a/cmd/helm/lint.go +++ b/cmd/helm/lint.go @@ -177,7 +177,7 @@ func lintChart(path string, vals []byte, namespace string, strict bool) (support // vals merges values from files specified via -f/--values and // directly via --set or --set-string or --set-file, marshaling them to YAML // -// This func is implemented intentionally and separately from the `vals` func for the `install` and `upgrade` comammdsn. +// This func is implemented intentionally and separately from the `vals` func for the `install` and `upgrade` commands. // Compared to the alternative func, this func lacks the parameters for tls opts - ca key, cert, and ca cert. // That's because this command, `lint`, is explicitly forbidden from making server connections. func (l *lintCmd) vals() ([]byte, error) { From c4ac3833c592bddf66fccd6b475f4f690b5206c9 Mon Sep 17 00:00:00 2001 From: Martin Hickey Date: Fri, 10 May 2019 12:49:15 +0100 Subject: [PATCH 208/327] Update release checklist with bumping release version Signed-off-by: Martin Hickey --- docs/release_checklist.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/release_checklist.md b/docs/release_checklist.md index bddb50ffb..4847d83fe 100644 --- a/docs/release_checklist.md +++ b/docs/release_checklist.md @@ -147,6 +147,24 @@ git add . git commit -m "bump version to $RELEASE_CANDIDATE_NAME" ``` +This will update it for the $RELEASE_BRANCH_NAME only. You will also need to pull +this change into the master branch for when the next release is being created. + +```shell +# get the last commit id i.e. commit to bump the version +git log --format="%H" -n 1 + +# create new branch off master +git checkout master +git checkout -b bump-version- + +# cherry pick the commit using id from first command +git cherry-pick -x + +# commit the change +git push upstream bump-version- +``` + ## 3. Commit and Push the Release Branch In order for others to start testing, we can now push the release branch From 3b3c8c4ab62ac6411ecffb9b7f63f4b733246b37 Mon Sep 17 00:00:00 2001 From: Martin Hickey Date: Fri, 10 May 2019 15:47:37 +0100 Subject: [PATCH 209/327] Change command to push to origin remote Update review comment: - https://github.com/helm/helm/pull/5712#pullrequestreview-236124918 Signed-off-by: Martin Hickey --- docs/release_checklist.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/release_checklist.md b/docs/release_checklist.md index 4847d83fe..867457830 100644 --- a/docs/release_checklist.md +++ b/docs/release_checklist.md @@ -162,7 +162,7 @@ git checkout -b bump-version- git cherry-pick -x # commit the change -git push upstream bump-version- +git push origin bump-version- ``` ## 3. Commit and Push the Release Branch From 08fe2a6209bf2f3673f7568e2df6ecce7a9009cc Mon Sep 17 00:00:00 2001 From: Paulo Martins Date: Tue, 14 May 2019 16:35:31 +0100 Subject: [PATCH 210/327] Add helm-ssm plugin Signed-off-by: Paulo Martins --- docs/related.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/related.md b/docs/related.md index 4a38e68f1..be16ea22f 100644 --- a/docs/related.md +++ b/docs/related.md @@ -51,6 +51,7 @@ or [pull request](https://github.com/helm/helm/pulls). - [helm-plugin-utils](https://github.com/maorfr/helm-plugin-utils) - Utility functions to be used within Helm plugins - [helm-restore](https://github.com/maorfr/helm-restore) - Plugin to restore a deployed release to its original state - [helm-secrets](https://github.com/futuresimple/helm-secrets) - Plugin to manage and store secrets safely +- [helm-ssm](https://github.com/codacy/helm-ssm) - Plugin to inject values coming from AWS SSM parameters on the `values.yaml` file - [helm-stop](https://github.com/IBM/helm-stop) - Plugin for stopping a release pods - [helm-template](https://github.com/technosophos/helm-template) - Debug/render templates client-side - [helm-tiller](https://github.com/adamreese/helm-tiller) - Additional commands to work with Tiller From d4053b38cde3f103b088c802c40a0437bbb21002 Mon Sep 17 00:00:00 2001 From: Matt Farina Date: Tue, 14 May 2019 14:12:47 -0400 Subject: [PATCH 211/327] Adding lint check for apiVersion which is a required field Fixes #5727 Signed-off-by: Matt Farina --- pkg/lint/lint_test.go | 10 +++++++--- pkg/lint/rules/chartfile.go | 13 +++++++++++++ pkg/lint/rules/chartfile_test.go | 14 +++++++++----- pkg/lint/rules/testdata/albatross/Chart.yaml | 1 + pkg/lint/rules/testdata/badvaluesfile/Chart.yaml | 1 + pkg/lint/rules/testdata/goodone/Chart.yaml | 1 + 6 files changed, 32 insertions(+), 8 deletions(-) diff --git a/pkg/lint/lint_test.go b/pkg/lint/lint_test.go index 8bf5a0927..7204f36b9 100644 --- a/pkg/lint/lint_test.go +++ b/pkg/lint/lint_test.go @@ -37,12 +37,12 @@ const ( func TestBadChart(t *testing.T) { m := All(badChartDir, values, namespace, strict).Messages - if len(m) != 5 { + if len(m) != 6 { t.Errorf("Number of errors %v", len(m)) t.Errorf("All didn't fail with expected errors, got %#v", m) } // There should be one INFO, 2 WARNINGs and one ERROR messages, check for them - var i, w, e, e2, e3 bool + var i, w, e, e2, e3, e4 bool for _, msg := range m { if msg.Severity == support.InfoSev { if strings.Contains(msg.Err.Error(), "icon is recommended") { @@ -64,9 +64,13 @@ func TestBadChart(t *testing.T) { if strings.Contains(msg.Err.Error(), "directory name (badchartfile) and chart name () must be the same") { e3 = true } + + if strings.Contains(msg.Err.Error(), "apiVersion is required") { + e4 = true + } } } - if !e || !e2 || !e3 || !w || !i { + if !e || !e2 || !e3 || !e4 || !w || !i { t.Errorf("Didn't find all the expected errors, got %#v", m) } } diff --git a/pkg/lint/rules/chartfile.go b/pkg/lint/rules/chartfile.go index 95ee38f0b..8ef33d0c5 100644 --- a/pkg/lint/rules/chartfile.go +++ b/pkg/lint/rules/chartfile.go @@ -51,6 +51,7 @@ func Chartfile(linter *support.Linter) { linter.RunLinterRule(support.ErrorSev, chartFileName, validateChartNameDirMatch(linter.ChartDir, chartFile)) // Chart metadata + linter.RunLinterRule(support.ErrorSev, chartFileName, validateChartApiVersion(chartFile)) linter.RunLinterRule(support.ErrorSev, chartFileName, validateChartVersion(chartFile)) linter.RunLinterRule(support.ErrorSev, chartFileName, validateChartEngine(chartFile)) linter.RunLinterRule(support.ErrorSev, chartFileName, validateChartMaintainer(chartFile)) @@ -96,6 +97,18 @@ func validateChartNameDirMatch(chartDir string, cf *chart.Metadata) error { return nil } +func validateChartApiVersion(cf *chart.Metadata) error { + if cf.ApiVersion == "" { + return errors.New("apiVersion is required") + } + + if cf.ApiVersion != "v1" { + return fmt.Errorf("apiVersion '%s' is not valid. The value must be \"v1\"", cf.ApiVersion) + } + + return nil +} + func validateChartVersion(cf *chart.Metadata) error { if cf.Version == "" { return errors.New("version is required") diff --git a/pkg/lint/rules/chartfile_test.go b/pkg/lint/rules/chartfile_test.go index 2422a2d10..a44129acf 100644 --- a/pkg/lint/rules/chartfile_test.go +++ b/pkg/lint/rules/chartfile_test.go @@ -236,8 +236,8 @@ func TestChartfile(t *testing.T) { Chartfile(&linter) msgs := linter.Messages - if len(msgs) != 4 { - t.Errorf("Expected 3 errors, got %d", len(msgs)) + if len(msgs) != 5 { + t.Errorf("Expected 4 errors, got %d", len(msgs)) } if !strings.Contains(msgs[0].Err.Error(), "name is required") { @@ -248,12 +248,16 @@ func TestChartfile(t *testing.T) { t.Errorf("Unexpected message 1: %s", msgs[1].Err) } - if !strings.Contains(msgs[2].Err.Error(), "version 0.0.0 is less than or equal to 0") { + if !strings.Contains(msgs[2].Err.Error(), "apiVersion is required") { t.Errorf("Unexpected message 2: %s", msgs[2].Err) } - if !strings.Contains(msgs[3].Err.Error(), "icon is recommended") { - t.Errorf("Unexpected message 3: %s", msgs[3].Err) + if !strings.Contains(msgs[3].Err.Error(), "version 0.0.0 is less than or equal to 0") { + t.Errorf("Unexpected message 3: %s", msgs[2].Err) + } + + if !strings.Contains(msgs[4].Err.Error(), "icon is recommended") { + t.Errorf("Unexpected message 4: %s", msgs[3].Err) } } diff --git a/pkg/lint/rules/testdata/albatross/Chart.yaml b/pkg/lint/rules/testdata/albatross/Chart.yaml index c108fa5e5..21124acfc 100644 --- a/pkg/lint/rules/testdata/albatross/Chart.yaml +++ b/pkg/lint/rules/testdata/albatross/Chart.yaml @@ -1,3 +1,4 @@ +apiVersion: v1 name: albatross description: testing chart version: 199.44.12345-Alpha.1+cafe009 diff --git a/pkg/lint/rules/testdata/badvaluesfile/Chart.yaml b/pkg/lint/rules/testdata/badvaluesfile/Chart.yaml index bed845249..632919d03 100644 --- a/pkg/lint/rules/testdata/badvaluesfile/Chart.yaml +++ b/pkg/lint/rules/testdata/badvaluesfile/Chart.yaml @@ -1,3 +1,4 @@ +apiVersion: v1 name: badvaluesfile description: A Helm chart for Kubernetes version: 0.0.1 diff --git a/pkg/lint/rules/testdata/goodone/Chart.yaml b/pkg/lint/rules/testdata/goodone/Chart.yaml index de05463ca..cb7a4bf20 100644 --- a/pkg/lint/rules/testdata/goodone/Chart.yaml +++ b/pkg/lint/rules/testdata/goodone/Chart.yaml @@ -1,3 +1,4 @@ +apiVersion: v1 name: goodone description: good testing chart version: 199.44.12345-Alpha.1+cafe009 From ed9934adfaa8d6af770058004cb14e3682fd52a8 Mon Sep 17 00:00:00 2001 From: Patrick Decat Date: Tue, 7 May 2019 01:24:17 +0200 Subject: [PATCH 212/327] Add test cases to reproduce issues with concurrent `helm repo add` commands Signed-off-by: Patrick Decat --- cmd/helm/repo_add_test.go | 113 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) diff --git a/cmd/helm/repo_add_test.go b/cmd/helm/repo_add_test.go index 5a458cef7..0b7650fb2 100644 --- a/cmd/helm/repo_add_test.go +++ b/cmd/helm/repo_add_test.go @@ -17,13 +17,18 @@ limitations under the License. package main import ( + "fmt" "io" "os" + "os/exec" + "strings" + "sync" "testing" "github.com/spf13/cobra" "k8s.io/helm/pkg/helm" + "k8s.io/helm/pkg/helm/helmpath" "k8s.io/helm/pkg/repo" "k8s.io/helm/pkg/repo/repotest" ) @@ -101,3 +106,111 @@ func TestRepoAdd(t *testing.T) { t.Errorf("Duplicate repository name was added") } } +func TestRepoAddConcurrentGoRoutines(t *testing.T) { + ts, thome, err := repotest.NewTempServer("testdata/testserver/*.*") + if err != nil { + t.Fatal(err) + } + + cleanup := resetEnv() + defer func() { + ts.Stop() + os.RemoveAll(thome.String()) + cleanup() + }() + + settings.Home = thome + if err := ensureTestHome(settings.Home, t); err != nil { + t.Fatal(err) + } + + var wg sync.WaitGroup + wg.Add(3) + for i := 0; i < 3; i++ { + go func(name string) { + defer wg.Done() + if err := addRepository(name, ts.URL(), "", "", settings.Home, "", "", "", true); err != nil { + t.Error(err) + } + }(fmt.Sprintf("%s-%d", testName, i)) + } + wg.Wait() + + f, err := repo.LoadRepositoriesFile(settings.Home.RepositoryFile()) + if err != nil { + t.Error(err) + } + + var name string + for i := 0; i < 3; i++ { + name = fmt.Sprintf("%s-%d", testName, i) + if !f.Has(name) { + t.Errorf("%s was not successfully inserted into %s", name, settings.Home.RepositoryFile()) + } + } +} + +// Same as TestRepoAddConcurrentGoRoutines but with repository additions in sub-processes +func TestRepoAddConcurrentSubProcesses(t *testing.T) { + goWantHelperProcess := os.Getenv("GO_WANT_HELPER_PROCESS") + if goWantHelperProcess == "" { + // parent + + ts, thome, err := repotest.NewTempServer("testdata/testserver/*.*") + if err != nil { + t.Fatal(err) + } + + settings.Home = thome + + cleanup := resetEnv() + defer func() { + ts.Stop() + os.RemoveAll(thome.String()) + cleanup() + }() + if err := ensureTestHome(settings.Home, t); err != nil { + t.Fatal(err) + } + + var wg sync.WaitGroup + wg.Add(3) + for i := 0; i < 3; i++ { + go func(name string) { + defer wg.Done() + + cmd := exec.Command(os.Args[0], "-test.run=^TestRepoAddConcurrentSubProcesses$") + cmd.Env = append(os.Environ(), fmt.Sprintf("GO_WANT_HELPER_PROCESS=%s,%s", name, ts.URL()), fmt.Sprintf("HELM_HOME=%s", settings.Home)) + out, err := cmd.CombinedOutput() + if len(out) > 0 || err != nil { + t.Fatalf("child process: %q, %v", out, err) + } + }(fmt.Sprintf("%s-%d", testName, i)) + } + wg.Wait() + + f, err := repo.LoadRepositoriesFile(settings.Home.RepositoryFile()) + if err != nil { + t.Error(err) + } + + var name string + for i := 0; i < 3; i++ { + name = fmt.Sprintf("%s-%d", testName, i) + if !f.Has(name) { + t.Errorf("%s was not successfully inserted into %s", name, settings.Home.RepositoryFile()) + } + } + } else { + // child + s := strings.Split(goWantHelperProcess, ",") + settings.Home = helmpath.Home(os.Getenv("HELM_HOME")) + repoName := s[0] + tsURL := s[1] + if err := addRepository(repoName, tsURL, "", "", settings.Home, "", "", "", true); err != nil { + t.Fatal(err) + } + + os.Exit(0) + } +} From e07dfcbc00f910bcf0ee0357b1af8c3ab7cd39c9 Mon Sep 17 00:00:00 2001 From: Patrick Decat Date: Tue, 7 May 2019 11:32:23 +0200 Subject: [PATCH 213/327] Lock the repository file for concurrent processes synchronization and re-read its content before updating it Signed-off-by: Patrick Decat --- cmd/helm/repo_add.go | 27 ++++++++++++++++++++++++++- cmd/helm/repo_add_test.go | 1 + 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/cmd/helm/repo_add.go b/cmd/helm/repo_add.go index bfb3f0174..b93222f4a 100644 --- a/cmd/helm/repo_add.go +++ b/cmd/helm/repo_add.go @@ -22,11 +22,12 @@ import ( "github.com/spf13/cobra" + "syscall" + "golang.org/x/crypto/ssh/terminal" "k8s.io/helm/pkg/getter" "k8s.io/helm/pkg/helm/helmpath" "k8s.io/helm/pkg/repo" - "syscall" ) type repoAddCmd struct { @@ -131,6 +132,30 @@ func addRepository(name, url, username, password string, home helmpath.Home, cer return fmt.Errorf("Looks like %q is not a valid chart repository or cannot be reached: %s", url, err.Error()) } + // Lock the repository file for concurrent processes synchronization and re-read its content before updating it + fd, err := syscall.Open(home.RepositoryFile(), syscall.O_CREAT|syscall.O_RDWR|syscall.O_CLOEXEC, 0) + if err != nil { + return err + } + defer syscall.Close(fd) + + flock := syscall.Flock_t{ + Type: syscall.F_WRLCK, + Start: 0, + Len: 0, + Whence: io.SeekStart, + } + + syscall.FcntlFlock(uintptr(fd), syscall.F_SETLK, &flock) + if err != nil { + return err + } + + f, err = repo.LoadRepositoriesFile(home.RepositoryFile()) + if err != nil { + return err + } + f.Update(&c) return f.WriteFile(home.RepositoryFile(), 0644) diff --git a/cmd/helm/repo_add_test.go b/cmd/helm/repo_add_test.go index 0b7650fb2..e8ad35086 100644 --- a/cmd/helm/repo_add_test.go +++ b/cmd/helm/repo_add_test.go @@ -128,6 +128,7 @@ func TestRepoAddConcurrentGoRoutines(t *testing.T) { wg.Add(3) for i := 0; i < 3; i++ { go func(name string) { + // TODO: launch repository additions in sub-processes as file locks are bound to processes, not file descriptors defer wg.Done() if err := addRepository(name, ts.URL(), "", "", settings.Home, "", "", "", true); err != nil { t.Error(err) From 7a470252a934020ca9720ba35dcc901a2a6359c6 Mon Sep 17 00:00:00 2001 From: Patrick Decat Date: Tue, 7 May 2019 12:19:05 +0200 Subject: [PATCH 214/327] Use github.com/gofrs/flock for cross platform file locking Signed-off-by: Patrick Decat --- cmd/helm/repo_add.go | 28 ++++++++++++---------------- glide.lock | 2 ++ glide.yaml | 2 ++ 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/cmd/helm/repo_add.go b/cmd/helm/repo_add.go index b93222f4a..ef9ddf223 100644 --- a/cmd/helm/repo_add.go +++ b/cmd/helm/repo_add.go @@ -17,14 +17,17 @@ limitations under the License. package main import ( + "context" "fmt" "io" - - "github.com/spf13/cobra" - "syscall" + "time" "golang.org/x/crypto/ssh/terminal" + + "github.com/gofrs/flock" + "github.com/spf13/cobra" + "k8s.io/helm/pkg/getter" "k8s.io/helm/pkg/helm/helmpath" "k8s.io/helm/pkg/repo" @@ -133,20 +136,13 @@ func addRepository(name, url, username, password string, home helmpath.Home, cer } // Lock the repository file for concurrent processes synchronization and re-read its content before updating it - fd, err := syscall.Open(home.RepositoryFile(), syscall.O_CREAT|syscall.O_RDWR|syscall.O_CLOEXEC, 0) - if err != nil { - return err + fileLock := flock.New(home.RepositoryFile()) + lockCtx, cancel := context.WithTimeout(context.Background(), 5*time.Minute) + defer cancel() + locked, err := fileLock.TryLockContext(lockCtx, time.Second) + if err == nil && locked { + defer fileLock.Unlock() } - defer syscall.Close(fd) - - flock := syscall.Flock_t{ - Type: syscall.F_WRLCK, - Start: 0, - Len: 0, - Whence: io.SeekStart, - } - - syscall.FcntlFlock(uintptr(fd), syscall.F_SETLK, &flock) if err != nil { return err } diff --git a/glide.lock b/glide.lock index 4f031a502..f05bd18f1 100644 --- a/glide.lock +++ b/glide.lock @@ -114,6 +114,8 @@ imports: - syntax/lexer - util/runes - util/strings +- name: github.com/gofrs/flock + version: 392e7fae8f1b0bdbd67dad7237d23f618feb6dbb - name: github.com/gogo/protobuf version: 342cbe0a04158f6dcb03ca0079991a51a4248c02 subpackages: diff --git a/glide.yaml b/glide.yaml index c9ac54b98..fd6613b71 100644 --- a/glide.yaml +++ b/glide.yaml @@ -67,6 +67,8 @@ import: - package: github.com/jmoiron/sqlx version: ^1.2.0 - package: github.com/rubenv/sql-migrate + - package: github.com/gofrs/flock + version: v0.7.1 testImports: - package: github.com/stretchr/testify From 848d54f451fba67596adc138e1b57daca4744e7d Mon Sep 17 00:00:00 2001 From: Patrick Decat Date: Tue, 7 May 2019 17:14:42 +0200 Subject: [PATCH 215/327] Remove obsolete comment from early file locking implementation Signed-off-by: Patrick Decat --- cmd/helm/repo_add_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/cmd/helm/repo_add_test.go b/cmd/helm/repo_add_test.go index e8ad35086..0b7650fb2 100644 --- a/cmd/helm/repo_add_test.go +++ b/cmd/helm/repo_add_test.go @@ -128,7 +128,6 @@ func TestRepoAddConcurrentGoRoutines(t *testing.T) { wg.Add(3) for i := 0; i < 3; i++ { go func(name string) { - // TODO: launch repository additions in sub-processes as file locks are bound to processes, not file descriptors defer wg.Done() if err := addRepository(name, ts.URL(), "", "", settings.Home, "", "", "", true); err != nil { t.Error(err) From 3f3b5b42f80538f2814e6a00016d0a968c76c860 Mon Sep 17 00:00:00 2001 From: Patrick Decat Date: Tue, 7 May 2019 18:01:44 +0200 Subject: [PATCH 216/327] Lower repository file rewriting timeout from 5 minutes to 30 seconds Signed-off-by: Patrick Decat --- cmd/helm/repo_add.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/helm/repo_add.go b/cmd/helm/repo_add.go index ef9ddf223..0257367d6 100644 --- a/cmd/helm/repo_add.go +++ b/cmd/helm/repo_add.go @@ -137,7 +137,7 @@ func addRepository(name, url, username, password string, home helmpath.Home, cer // Lock the repository file for concurrent processes synchronization and re-read its content before updating it fileLock := flock.New(home.RepositoryFile()) - lockCtx, cancel := context.WithTimeout(context.Background(), 5*time.Minute) + lockCtx, cancel := context.WithTimeout(context.Background(), 30*time.Second) defer cancel() locked, err := fileLock.TryLockContext(lockCtx, time.Second) if err == nil && locked { From 6b800509d0a4166c83192789ea4b679fba76387a Mon Sep 17 00:00:00 2001 From: Patrick Decat Date: Tue, 7 May 2019 18:05:18 +0200 Subject: [PATCH 217/327] Add comment to explain why the repositories file is read a second time Signed-off-by: Patrick Decat --- cmd/helm/repo_add.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/helm/repo_add.go b/cmd/helm/repo_add.go index 0257367d6..ebb27e684 100644 --- a/cmd/helm/repo_add.go +++ b/cmd/helm/repo_add.go @@ -135,7 +135,7 @@ func addRepository(name, url, username, password string, home helmpath.Home, cer return fmt.Errorf("Looks like %q is not a valid chart repository or cannot be reached: %s", url, err.Error()) } - // Lock the repository file for concurrent processes synchronization and re-read its content before updating it + // Lock the repository file for concurrent goroutines or processes synchronization fileLock := flock.New(home.RepositoryFile()) lockCtx, cancel := context.WithTimeout(context.Background(), 30*time.Second) defer cancel() @@ -147,6 +147,8 @@ func addRepository(name, url, username, password string, home helmpath.Home, cer return err } + // Re-read the repositories file before updating it as its content may have been changed + // by a concurrent execution after the first read and before being locked f, err = repo.LoadRepositoriesFile(home.RepositoryFile()) if err != nil { return err From 79a190a6d0a0014a24213a84e281efef6c786705 Mon Sep 17 00:00:00 2001 From: Patrick Decat Date: Thu, 9 May 2019 09:35:54 +0200 Subject: [PATCH 218/327] Decrease number of concurrent subprocesses for helm repo add test case to fit within CircleCI's pipeline memory limit Signed-off-by: Patrick Decat --- cmd/helm/repo_add_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/helm/repo_add_test.go b/cmd/helm/repo_add_test.go index 0b7650fb2..7443a476a 100644 --- a/cmd/helm/repo_add_test.go +++ b/cmd/helm/repo_add_test.go @@ -174,8 +174,8 @@ func TestRepoAddConcurrentSubProcesses(t *testing.T) { } var wg sync.WaitGroup - wg.Add(3) - for i := 0; i < 3; i++ { + wg.Add(2) + for i := 0; i < 2; i++ { go func(name string) { defer wg.Done() @@ -195,7 +195,7 @@ func TestRepoAddConcurrentSubProcesses(t *testing.T) { } var name string - for i := 0; i < 3; i++ { + for i := 0; i < 2; i++ { name = fmt.Sprintf("%s-%d", testName, i) if !f.Has(name) { t.Errorf("%s was not successfully inserted into %s", name, settings.Home.RepositoryFile()) From 7e05489792f59b5ed674161c1a378b41450b1e3d Mon Sep 17 00:00:00 2001 From: Pierre Gaxatte <30696904+pgaxatte@users.noreply.github.com> Date: Thu, 16 May 2019 11:06:06 +0200 Subject: [PATCH 219/327] Add missing test hooks in the list of annotations Adds `test-success` and `test-failure` hooks to the list of annotations. Signed-off-by: Pierre Gaxatte <30696904+pgaxatte@users.noreply.github.com> --- docs/charts_hooks.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/charts_hooks.md b/docs/charts_hooks.md index 3044414c3..9fb08d676 100644 --- a/docs/charts_hooks.md +++ b/docs/charts_hooks.md @@ -49,6 +49,10 @@ The following hooks are defined: have been modified. - crd-install: Adds CRD resources before any other checks are run. This is used only on CRD definitions that are used by other manifests in the chart. +- test-success: Executes when running `helm test` and expects the pod to + return successfully (return code == 0). +- test-failure: Executes when running `helm test` and expects the pod to + fail (return code != 0). ## Hooks and the Release Lifecycle From 8fcc438b67de564a3dd9255ec9c1634229b764c0 Mon Sep 17 00:00:00 2001 From: Tariq Ibrahim Date: Wed, 1 May 2019 11:06:43 -0700 Subject: [PATCH 220/327] fix the short descriptions of all helm commands Signed-off-by: Tariq Ibrahim fix typo in search.go --- cmd/helm/create.go | 4 +- cmd/helm/delete.go | 12 ++-- cmd/helm/dependency.go | 4 +- cmd/helm/dependency_build.go | 6 +- cmd/helm/dependency_update.go | 8 +-- cmd/helm/docs.go | 4 +- cmd/helm/fetch.go | 30 ++++----- cmd/helm/get.go | 6 +- cmd/helm/get_hooks.go | 4 +- cmd/helm/get_manifest.go | 4 +- cmd/helm/get_notes.go | 4 +- cmd/helm/get_values.go | 8 +-- cmd/helm/helm.go | 34 +++++----- cmd/helm/history.go | 8 +-- cmd/helm/home.go | 2 +- cmd/helm/init.go | 46 ++++++------- cmd/helm/inspect.go | 22 +++--- cmd/helm/install.go | 56 ++++++++-------- cmd/helm/lint.go | 14 ++-- cmd/helm/list.go | 32 ++++----- cmd/helm/package.go | 18 ++--- cmd/helm/plugin.go | 2 +- cmd/helm/plugin_install.go | 4 +- cmd/helm/plugin_list.go | 2 +- cmd/helm/plugin_remove.go | 2 +- cmd/helm/plugin_update.go | 2 +- cmd/helm/release_testing.go | 8 +-- cmd/helm/repo.go | 2 +- cmd/helm/repo_add.go | 14 ++-- cmd/helm/repo_index.go | 6 +- cmd/helm/repo_list.go | 2 +- cmd/helm/repo_remove.go | 2 +- cmd/helm/repo_update.go | 4 +- cmd/helm/reset.go | 6 +- cmd/helm/rollback.go | 18 ++--- cmd/helm/search.go | 10 +-- cmd/helm/serve.go | 8 +-- cmd/helm/status.go | 6 +- cmd/helm/template.go | 26 ++++---- cmd/helm/upgrade.go | 64 +++++++++--------- cmd/helm/verify.go | 4 +- cmd/helm/version.go | 10 +-- docs/helm/helm.md | 100 ++++++++++++++-------------- docs/helm/helm_completion.md | 16 ++--- docs/helm/helm_create.md | 20 +++--- docs/helm/helm_delete.md | 40 +++++------ docs/helm/helm_dependency.md | 24 +++---- docs/helm/helm_dependency_build.md | 25 +++---- docs/helm/helm_dependency_list.md | 20 +++--- docs/helm/helm_dependency_update.md | 26 ++++---- docs/helm/helm_fetch.md | 46 ++++++------- docs/helm/helm_get.md | 42 ++++++------ docs/helm/helm_get_hooks.md | 34 +++++----- docs/helm/helm_get_manifest.md | 34 +++++----- docs/helm/helm_get_notes.md | 34 +++++----- docs/helm/helm_get_values.md | 38 +++++------ docs/helm/helm_history.md | 36 +++++----- docs/helm/helm_home.md | 18 ++--- docs/helm/helm_init.md | 62 ++++++++--------- docs/helm/helm_inspect.md | 38 +++++------ docs/helm/helm_inspect_chart.md | 38 +++++------ docs/helm/helm_inspect_readme.md | 34 +++++----- docs/helm/helm_inspect_values.md | 38 +++++------ docs/helm/helm_install.md | 84 +++++++++++------------ docs/helm/helm_lint.md | 30 ++++----- docs/helm/helm_list.md | 60 ++++++++--------- docs/helm/helm_package.md | 34 +++++----- docs/helm/helm_plugin.md | 26 ++++---- docs/helm/helm_plugin_install.md | 22 +++--- docs/helm/helm_plugin_list.md | 22 +++--- docs/helm/helm_plugin_remove.md | 22 +++--- docs/helm/helm_plugin_update.md | 22 +++--- docs/helm/helm_repo.md | 28 ++++---- docs/helm/helm_repo_add.md | 34 +++++----- docs/helm/helm_repo_index.md | 24 +++---- docs/helm/helm_repo_list.md | 22 +++--- docs/helm/helm_repo_remove.md | 22 +++--- docs/helm/helm_repo_update.md | 22 +++--- docs/helm/helm_reset.md | 34 +++++----- docs/helm/helm_rollback.md | 46 ++++++------- docs/helm/helm_search.md | 26 ++++---- docs/helm/helm_serve.md | 24 +++---- docs/helm/helm_status.md | 34 +++++----- docs/helm/helm_template.md | 42 ++++++------ docs/helm/helm_test.md | 36 +++++----- docs/helm/helm_upgrade.md | 86 ++++++++++++------------ docs/helm/helm_verify.md | 20 +++--- docs/helm/helm_version.md | 38 +++++------ pkg/helm/environment/environment.go | 26 ++++---- 89 files changed, 1089 insertions(+), 1088 deletions(-) diff --git a/cmd/helm/create.go b/cmd/helm/create.go index 0d278c8b5..0c4b4b1cb 100644 --- a/cmd/helm/create.go +++ b/cmd/helm/create.go @@ -68,7 +68,7 @@ func newCreateCmd(out io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "create NAME", - Short: "create a new chart with the given name", + Short: "Create a new chart with the given name", Long: createDesc, RunE: func(cmd *cobra.Command, args []string) error { cc.home = settings.Home @@ -83,7 +83,7 @@ func newCreateCmd(out io.Writer) *cobra.Command { }, } - cmd.Flags().StringVarP(&cc.starter, "starter", "p", "", "the named Helm starter scaffold") + cmd.Flags().StringVarP(&cc.starter, "starter", "p", "", "The named Helm starter scaffold") return cmd } diff --git a/cmd/helm/delete.go b/cmd/helm/delete.go index 4f52ffdd9..6aa1c2a4e 100644 --- a/cmd/helm/delete.go +++ b/cmd/helm/delete.go @@ -56,7 +56,7 @@ func newDeleteCmd(c helm.Interface, out io.Writer) *cobra.Command { Use: "delete [flags] RELEASE_NAME [...]", Aliases: []string{"del"}, SuggestFor: []string{"remove", "rm"}, - Short: "given a release name, delete the release from Kubernetes", + Short: "Given a release name, delete the release from Kubernetes", Long: deleteDesc, PreRunE: func(_ *cobra.Command, _ []string) error { return setupConnection() }, RunE: func(cmd *cobra.Command, args []string) error { @@ -79,11 +79,11 @@ func newDeleteCmd(c helm.Interface, out io.Writer) *cobra.Command { f := cmd.Flags() settings.AddFlagsTLS(f) - f.BoolVar(&del.dryRun, "dry-run", false, "simulate a delete") - f.BoolVar(&del.disableHooks, "no-hooks", false, "prevent hooks from running during deletion") - f.BoolVar(&del.purge, "purge", false, "remove the release from the store and make its name free for later use") - f.Int64Var(&del.timeout, "timeout", 300, "time in seconds to wait for any individual Kubernetes operation (like Jobs for hooks)") - f.StringVar(&del.description, "description", "", "specify a description for the release") + f.BoolVar(&del.dryRun, "dry-run", false, "Simulate a delete") + f.BoolVar(&del.disableHooks, "no-hooks", false, "Prevent hooks from running during deletion") + f.BoolVar(&del.purge, "purge", false, "Remove the release from the store and make its name free for later use") + f.Int64Var(&del.timeout, "timeout", 300, "Time in seconds to wait for any individual Kubernetes operation (like Jobs for hooks)") + f.StringVar(&del.description, "description", "", "Specify a description for the release") // set defaults from environment settings.InitTLS(f) diff --git a/cmd/helm/dependency.go b/cmd/helm/dependency.go index f8fe4cf8f..58686950e 100644 --- a/cmd/helm/dependency.go +++ b/cmd/helm/dependency.go @@ -91,7 +91,7 @@ func newDependencyCmd(out io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "dependency update|build|list", Aliases: []string{"dep", "dependencies"}, - Short: "manage a chart's dependencies", + Short: "Manage a chart's dependencies", Long: dependencyDesc, } @@ -113,7 +113,7 @@ func newDependencyListCmd(out io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "list [flags] CHART", Aliases: []string{"ls"}, - Short: "list the dependencies for the given chart", + Short: "List the dependencies for the given chart", Long: dependencyListDesc, RunE: func(cmd *cobra.Command, args []string) error { cp := "." diff --git a/cmd/helm/dependency_build.go b/cmd/helm/dependency_build.go index 64a80f3bd..6b4fd58e6 100644 --- a/cmd/helm/dependency_build.go +++ b/cmd/helm/dependency_build.go @@ -49,7 +49,7 @@ func newDependencyBuildCmd(out io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "build [flags] CHART", - Short: "rebuild the charts/ directory based on the requirements.lock file", + Short: "Rebuild the charts/ directory based on the requirements.lock file", Long: dependencyBuildDesc, RunE: func(cmd *cobra.Command, args []string) error { dbc.helmhome = settings.Home @@ -63,8 +63,8 @@ func newDependencyBuildCmd(out io.Writer) *cobra.Command { } f := cmd.Flags() - f.BoolVar(&dbc.verify, "verify", false, "verify the packages against signatures") - f.StringVar(&dbc.keyring, "keyring", defaultKeyring(), "keyring containing public keys") + f.BoolVar(&dbc.verify, "verify", false, "Verify the packages against signatures") + f.StringVar(&dbc.keyring, "keyring", defaultKeyring(), "Keyring containing public keys") return cmd } diff --git a/cmd/helm/dependency_update.go b/cmd/helm/dependency_update.go index a8e54137b..1be29ea93 100644 --- a/cmd/helm/dependency_update.go +++ b/cmd/helm/dependency_update.go @@ -57,7 +57,7 @@ func newDependencyUpdateCmd(out io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "update [flags] CHART", Aliases: []string{"up"}, - Short: "update charts/ based on the contents of requirements.yaml", + Short: "Update charts/ based on the contents of requirements.yaml", Long: dependencyUpDesc, RunE: func(cmd *cobra.Command, args []string) error { cp := "." @@ -78,9 +78,9 @@ func newDependencyUpdateCmd(out io.Writer) *cobra.Command { } f := cmd.Flags() - f.BoolVar(&duc.verify, "verify", false, "verify the packages against signatures") - f.StringVar(&duc.keyring, "keyring", defaultKeyring(), "keyring containing public keys") - f.BoolVar(&duc.skipRefresh, "skip-refresh", false, "do not refresh the local repository cache") + f.BoolVar(&duc.verify, "verify", false, "Verify the packages against signatures") + f.StringVar(&duc.keyring, "keyring", defaultKeyring(), "Keyring containing public keys") + f.BoolVar(&duc.skipRefresh, "skip-refresh", false, "Do not refresh the local repository cache") return cmd } diff --git a/cmd/helm/docs.go b/cmd/helm/docs.go index 56e3beaf5..80c10b95a 100644 --- a/cmd/helm/docs.go +++ b/cmd/helm/docs.go @@ -59,8 +59,8 @@ func newDocsCmd(out io.Writer) *cobra.Command { } f := cmd.Flags() - f.StringVar(&dc.dest, "dir", "./", "directory to which documentation is written") - f.StringVar(&dc.docTypeString, "type", "markdown", "the type of documentation to generate (markdown, man, bash)") + f.StringVar(&dc.dest, "dir", "./", "Directory to which documentation is written") + f.StringVar(&dc.docTypeString, "type", "markdown", "The type of documentation to generate (markdown, man, bash)") return cmd } diff --git a/cmd/helm/fetch.go b/cmd/helm/fetch.go index d6f622bb6..bc1c07cb7 100644 --- a/cmd/helm/fetch.go +++ b/cmd/helm/fetch.go @@ -73,7 +73,7 @@ func newFetchCmd(out io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "fetch [flags] [chart URL | repo/chartname] [...]", - Short: "download a chart from a repository and (optionally) unpack it in local directory", + Short: "Download a chart from a repository and (optionally) unpack it in local directory", Long: fetchDesc, RunE: func(cmd *cobra.Command, args []string) error { if len(args) == 0 { @@ -96,20 +96,20 @@ func newFetchCmd(out io.Writer) *cobra.Command { } f := cmd.Flags() - f.BoolVar(&fch.untar, "untar", false, "if set to true, will untar the chart after downloading it") - f.StringVar(&fch.untardir, "untardir", ".", "if untar is specified, this flag specifies the name of the directory into which the chart is expanded") - f.BoolVar(&fch.verify, "verify", false, "verify the package against its signature") - f.BoolVar(&fch.verifyLater, "prov", false, "fetch the provenance file, but don't perform verification") - f.StringVar(&fch.version, "version", "", "specific version of a chart. Without this, the latest version is fetched") - f.StringVar(&fch.keyring, "keyring", defaultKeyring(), "keyring containing public keys") - f.StringVarP(&fch.destdir, "destination", "d", ".", "location to write the chart. If this and tardir are specified, tardir is appended to this") - f.StringVar(&fch.repoURL, "repo", "", "chart repository url where to locate the requested chart") - 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.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-0'. If --version is set, this is ignored.") - f.StringVar(&fch.username, "username", "", "chart repository username") - f.StringVar(&fch.password, "password", "", "chart repository password") + f.BoolVar(&fch.untar, "untar", false, "If set to true, will untar the chart after downloading it") + f.StringVar(&fch.untardir, "untardir", ".", "If untar is specified, this flag specifies the name of the directory into which the chart is expanded") + f.BoolVar(&fch.verify, "verify", false, "Verify the package against its signature") + f.BoolVar(&fch.verifyLater, "prov", false, "Fetch the provenance file, but don't perform verification") + f.StringVar(&fch.version, "version", "", "Specific version of a chart. Without this, the latest version is fetched") + f.StringVar(&fch.keyring, "keyring", defaultKeyring(), "Keyring containing public keys") + f.StringVarP(&fch.destdir, "destination", "d", ".", "Location to write the chart. If this and tardir are specified, tardir is appended to this") + f.StringVar(&fch.repoURL, "repo", "", "Chart repository url where to locate the requested chart") + 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.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-0'. If --version is set, this is ignored.") + f.StringVar(&fch.username, "username", "", "Chart repository username") + f.StringVar(&fch.password, "password", "", "Chart repository password") return cmd } diff --git a/cmd/helm/get.go b/cmd/helm/get.go index 6829122b7..5cd0acdd0 100644 --- a/cmd/helm/get.go +++ b/cmd/helm/get.go @@ -56,7 +56,7 @@ func newGetCmd(client helm.Interface, out io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "get [flags] RELEASE_NAME", - Short: "download a named release", + Short: "Download a named release", Long: getHelp, PreRunE: func(_ *cobra.Command, _ []string) error { return setupConnection() }, RunE: func(cmd *cobra.Command, args []string) error { @@ -73,8 +73,8 @@ func newGetCmd(client helm.Interface, out io.Writer) *cobra.Command { f := cmd.Flags() settings.AddFlagsTLS(f) - f.Int32Var(&get.version, "revision", 0, "get the named release with revision") - f.StringVar(&get.template, "template", "", "go template for formatting the output, eg: {{.Release.Name}}") + f.Int32Var(&get.version, "revision", 0, "Get the named release with revision") + f.StringVar(&get.template, "template", "", "Go template for formatting the output, eg: {{.Release.Name}}") cmd.AddCommand(newGetValuesCmd(nil, out)) cmd.AddCommand(newGetManifestCmd(nil, out)) diff --git a/cmd/helm/get_hooks.go b/cmd/helm/get_hooks.go index 2706f381c..76592e0c2 100644 --- a/cmd/helm/get_hooks.go +++ b/cmd/helm/get_hooks.go @@ -45,7 +45,7 @@ func newGetHooksCmd(client helm.Interface, out io.Writer) *cobra.Command { } cmd := &cobra.Command{ Use: "hooks [flags] RELEASE_NAME", - Short: "download all hooks for a named release", + Short: "Download all hooks for a named release", Long: getHooksHelp, PreRunE: func(_ *cobra.Command, _ []string) error { return setupConnection() }, RunE: func(cmd *cobra.Command, args []string) error { @@ -59,7 +59,7 @@ func newGetHooksCmd(client helm.Interface, out io.Writer) *cobra.Command { } f := cmd.Flags() settings.AddFlagsTLS(f) - f.Int32Var(&ghc.version, "revision", 0, "get the named release with revision") + f.Int32Var(&ghc.version, "revision", 0, "Get the named release with revision") // set defaults from environment settings.InitTLS(f) diff --git a/cmd/helm/get_manifest.go b/cmd/helm/get_manifest.go index 1cc7e3543..24580c015 100644 --- a/cmd/helm/get_manifest.go +++ b/cmd/helm/get_manifest.go @@ -47,7 +47,7 @@ func newGetManifestCmd(client helm.Interface, out io.Writer) *cobra.Command { } cmd := &cobra.Command{ Use: "manifest [flags] RELEASE_NAME", - Short: "download the manifest for a named release", + Short: "Download the manifest for a named release", Long: getManifestHelp, PreRunE: func(_ *cobra.Command, _ []string) error { return setupConnection() }, RunE: func(cmd *cobra.Command, args []string) error { @@ -62,7 +62,7 @@ func newGetManifestCmd(client helm.Interface, out io.Writer) *cobra.Command { f := cmd.Flags() settings.AddFlagsTLS(f) - f.Int32Var(&get.version, "revision", 0, "get the named release with revision") + f.Int32Var(&get.version, "revision", 0, "Get the named release with revision") // set defaults from environment settings.InitTLS(f) diff --git a/cmd/helm/get_notes.go b/cmd/helm/get_notes.go index c7c3d7797..04142f297 100644 --- a/cmd/helm/get_notes.go +++ b/cmd/helm/get_notes.go @@ -44,7 +44,7 @@ func newGetNotesCmd(client helm.Interface, out io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "notes [flags] RELEASE_NAME", - Short: "displays the notes of the named release", + Short: "Displays the notes of the named release", Long: getNotesHelp, PreRunE: func(_ *cobra.Command, _ []string) error { return setupConnection() }, RunE: func(cmd *cobra.Command, args []string) error { @@ -61,7 +61,7 @@ func newGetNotesCmd(client helm.Interface, out io.Writer) *cobra.Command { f := cmd.Flags() settings.AddFlagsTLS(f) - f.Int32Var(&get.version, "revision", 0, "get the notes of the named release with revision") + f.Int32Var(&get.version, "revision", 0, "Get the notes of the named release with revision") // set defaults from environment settings.InitTLS(f) diff --git a/cmd/helm/get_values.go b/cmd/helm/get_values.go index 7cdfa636f..30acc8081 100644 --- a/cmd/helm/get_values.go +++ b/cmd/helm/get_values.go @@ -47,7 +47,7 @@ func newGetValuesCmd(client helm.Interface, out io.Writer) *cobra.Command { } cmd := &cobra.Command{ Use: "values [flags] RELEASE_NAME", - Short: "download the values file for a named release", + Short: "Download the values file for a named release", Long: getValuesHelp, PreRunE: func(_ *cobra.Command, _ []string) error { return setupConnection() }, RunE: func(cmd *cobra.Command, args []string) error { @@ -62,9 +62,9 @@ func newGetValuesCmd(client helm.Interface, out io.Writer) *cobra.Command { f := cmd.Flags() settings.AddFlagsTLS(f) - f.Int32Var(&get.version, "revision", 0, "get the named release with revision") - f.BoolVarP(&get.allValues, "all", "a", false, "dump all (computed) values") - f.StringVar(&get.output, "output", "yaml", "output the specified format (json or yaml)") + f.Int32Var(&get.version, "revision", 0, "Get the named release with revision") + f.BoolVarP(&get.allValues, "all", "a", false, "Dump all (computed) values") + f.StringVar(&get.output, "output", "yaml", "Output the specified format (json or yaml)") // set defaults from environment settings.InitTLS(f) diff --git a/cmd/helm/helm.go b/cmd/helm/helm.go index d3337404a..49d0efeb8 100644 --- a/cmd/helm/helm.go +++ b/cmd/helm/helm.go @@ -55,25 +55,25 @@ It will also set up any necessary local configuration. Common actions from this point include: -- helm search: search for charts -- helm fetch: download a chart to your local directory to view -- helm install: upload the chart to Kubernetes -- helm list: list releases of charts +- helm search: Search for charts +- helm fetch: Download a chart to your local directory to view +- helm install: Upload the chart to Kubernetes +- helm list: List releases of charts Environment: -- $HELM_HOME: set an alternative location for Helm files. By default, these are stored in ~/.helm -- $HELM_HOST: set an alternative Tiller host. The format is host:port -- $HELM_NO_PLUGINS: disable plugins. Set HELM_NO_PLUGINS=1 to disable plugins. -- $TILLER_NAMESPACE: set an alternative Tiller namespace (default "kube-system") -- $KUBECONFIG: set an alternative Kubernetes configuration file (default "~/.kube/config") -- $HELM_TLS_CA_CERT: path to TLS CA certificate used to verify the Helm client and Tiller server certificates (default "$HELM_HOME/ca.pem") -- $HELM_TLS_CERT: path to TLS client certificate file for authenticating to Tiller (default "$HELM_HOME/cert.pem") -- $HELM_TLS_KEY: path to TLS client key file for authenticating to Tiller (default "$HELM_HOME/key.pem") -- $HELM_TLS_ENABLE: enable TLS connection between Helm and Tiller (default "false") -- $HELM_TLS_VERIFY: enable TLS connection between Helm and Tiller and verify Tiller server certificate (default "false") -- $HELM_TLS_HOSTNAME: the hostname or IP address used to verify the Tiller server certificate (default "127.0.0.1") -- $HELM_KEY_PASSPHRASE: set HELM_KEY_PASSPHRASE to the passphrase of your PGP private key. If set, you will not be prompted for the passphrase while signing helm charts +- $HELM_HOME: Set an alternative location for Helm files. By default, these are stored in ~/.helm +- $HELM_HOST: Set an alternative Tiller host. The format is host:port +- $HELM_NO_PLUGINS: Disable plugins. Set HELM_NO_PLUGINS=1 to disable plugins. +- $TILLER_NAMESPACE: Set an alternative Tiller namespace (default "kube-system") +- $KUBECONFIG: Set an alternative Kubernetes configuration file (default "~/.kube/config") +- $HELM_TLS_CA_CERT: Path to TLS CA certificate used to verify the Helm client and Tiller server certificates (default "$HELM_HOME/ca.pem") +- $HELM_TLS_CERT: Path to TLS client certificate file for authenticating to Tiller (default "$HELM_HOME/cert.pem") +- $HELM_TLS_KEY: Path to TLS client key file for authenticating to Tiller (default "$HELM_HOME/key.pem") +- $HELM_TLS_ENABLE: Enable TLS connection between Helm and Tiller (default "false") +- $HELM_TLS_VERIFY: Enable TLS connection between Helm and Tiller and verify Tiller server certificate (default "false") +- $HELM_TLS_HOSTNAME: The hostname or IP address used to verify the Tiller server certificate (default "127.0.0.1") +- $HELM_KEY_PASSPHRASE: Set HELM_KEY_PASSPHRASE to the passphrase of your PGP private key. If set, you will not be prompted for the passphrase while signing helm charts ` @@ -147,7 +147,7 @@ func newRootCmd(args []string) *cobra.Command { newDocsCmd(out), // Deprecated - markDeprecated(newRepoUpdateCmd(out), "use 'helm repo update'\n"), + markDeprecated(newRepoUpdateCmd(out), "Use 'helm repo update'\n"), ) flags.Parse(args) diff --git a/cmd/helm/history.go b/cmd/helm/history.go index 365346e89..b92fb81c6 100644 --- a/cmd/helm/history.go +++ b/cmd/helm/history.go @@ -72,7 +72,7 @@ func newHistoryCmd(c helm.Interface, w io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "history [flags] RELEASE_NAME", Long: historyHelp, - Short: "fetch release history", + Short: "Fetch release history", Aliases: []string{"hist"}, PreRunE: func(_ *cobra.Command, _ []string) error { return setupConnection() }, RunE: func(cmd *cobra.Command, args []string) error { @@ -89,9 +89,9 @@ func newHistoryCmd(c helm.Interface, w io.Writer) *cobra.Command { f := cmd.Flags() settings.AddFlagsTLS(f) - f.Int32Var(&his.max, "max", 256, "maximum number of revision to include in history") - f.UintVar(&his.colWidth, "col-width", 60, "specifies the max column width of output") - f.StringVarP(&his.outputFormat, "output", "o", "table", "prints the output in the specified format (json|table|yaml)") + f.Int32Var(&his.max, "max", 256, "Maximum number of revisions to include in history") + f.UintVar(&his.colWidth, "col-width", 60, "Specifies the max column width of output") + f.StringVarP(&his.outputFormat, "output", "o", "table", "Prints the output in the specified format (json|table|yaml)") // set defaults from environment settings.InitTLS(f) diff --git a/cmd/helm/home.go b/cmd/helm/home.go index ca21088a7..c2aeef995 100644 --- a/cmd/helm/home.go +++ b/cmd/helm/home.go @@ -31,7 +31,7 @@ any helm configuration files live. func newHomeCmd(out io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "home", - Short: "displays the location of HELM_HOME", + Short: "Displays the location of HELM_HOME", Long: longHomeHelp, Run: func(cmd *cobra.Command, args []string) { h := settings.Home diff --git a/cmd/helm/init.go b/cmd/helm/init.go index 145abdc87..c7617e705 100644 --- a/cmd/helm/init.go +++ b/cmd/helm/init.go @@ -96,7 +96,7 @@ func newInitCmd(out io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "init", - Short: "initialize Helm on both client and server", + Short: "Initialize Helm on both client and server", Long: initDesc, RunE: func(cmd *cobra.Command, args []string) error { if len(args) != 0 { @@ -111,38 +111,38 @@ func newInitCmd(out io.Writer) *cobra.Command { } f := cmd.Flags() - f.StringVarP(&i.image, "tiller-image", "i", "", "override Tiller image") - f.BoolVar(&i.canary, "canary-image", false, "use the canary Tiller image") - f.BoolVar(&i.upgrade, "upgrade", false, "upgrade if Tiller is already installed") - f.BoolVar(&i.forceUpgrade, "force-upgrade", false, "force upgrade of Tiller to the current helm version") - f.BoolVarP(&i.clientOnly, "client-only", "c", false, "if set does not install Tiller") - f.BoolVar(&i.dryRun, "dry-run", false, "do not install local or remote") - f.BoolVar(&i.skipRefresh, "skip-refresh", false, "do not refresh (download) the local repository cache") - f.BoolVar(&i.wait, "wait", false, "block until Tiller is running and ready to receive requests") + f.StringVarP(&i.image, "tiller-image", "i", "", "Override Tiller image") + f.BoolVar(&i.canary, "canary-image", false, "Use the canary Tiller image") + f.BoolVar(&i.upgrade, "upgrade", false, "Upgrade if Tiller is already installed") + f.BoolVar(&i.forceUpgrade, "force-upgrade", false, "Force upgrade of Tiller to the current helm version") + f.BoolVarP(&i.clientOnly, "client-only", "c", false, "If set does not install Tiller") + f.BoolVar(&i.dryRun, "dry-run", false, "Do not install local or remote") + f.BoolVar(&i.skipRefresh, "skip-refresh", false, "Do not refresh (download) the local repository cache") + f.BoolVar(&i.wait, "wait", false, "Block until Tiller is running and ready to receive requests") // TODO: replace TLS flags with pkg/helm/environment.AddFlagsTLS() in Helm 3 // // NOTE (bacongobbler): we can't do this in Helm 2 because the flag names differ, and `helm init --tls-ca-cert` // doesn't conform with the rest of the TLS flag names (should be --tiller-tls-ca-cert in Helm 3) - f.BoolVar(&tlsEnable, "tiller-tls", false, "install Tiller with TLS enabled") - f.BoolVar(&tlsVerify, "tiller-tls-verify", false, "install Tiller with TLS enabled and to verify remote certificates") - f.StringVar(&tlsKeyFile, "tiller-tls-key", "", "path to TLS key file to install with Tiller") - f.StringVar(&tlsCertFile, "tiller-tls-cert", "", "path to TLS certificate file to install with Tiller") - f.StringVar(&tlsCaCertFile, "tls-ca-cert", "", "path to CA root certificate") - f.StringVar(&tlsServerName, "tiller-tls-hostname", settings.TillerHost, "the server name used to verify the hostname on the returned certificates from Tiller") + f.BoolVar(&tlsEnable, "tiller-tls", false, "Install Tiller with TLS enabled") + f.BoolVar(&tlsVerify, "tiller-tls-verify", false, "Install Tiller with TLS enabled and to verify remote certificates") + f.StringVar(&tlsKeyFile, "tiller-tls-key", "", "Path to TLS key file to install with Tiller") + f.StringVar(&tlsCertFile, "tiller-tls-cert", "", "Path to TLS certificate file to install with Tiller") + f.StringVar(&tlsCaCertFile, "tls-ca-cert", "", "Path to CA root certificate") + f.StringVar(&tlsServerName, "tiller-tls-hostname", settings.TillerHost, "The server name used to verify the hostname on the returned certificates from Tiller") f.StringVar(&stableRepositoryURL, "stable-repo-url", stableRepositoryURL, "URL for stable repository") f.StringVar(&localRepositoryURL, "local-repo-url", localRepositoryURL, "URL for local repository") - f.BoolVar(&i.opts.EnableHostNetwork, "net-host", false, "install Tiller with net=host") - f.StringVar(&i.serviceAccount, "service-account", "", "name of service account") - f.IntVar(&i.maxHistory, "history-max", 0, "limit the maximum number of revisions saved per release. Use 0 for no limit.") - f.IntVar(&i.replicas, "replicas", 1, "amount of tiller instances to run on the cluster") + f.BoolVar(&i.opts.EnableHostNetwork, "net-host", false, "Install Tiller with net=host") + f.StringVar(&i.serviceAccount, "service-account", "", "Name of service account") + f.IntVar(&i.maxHistory, "history-max", 0, "Limit the maximum number of revisions saved per release. Use 0 for no limit.") + f.IntVar(&i.replicas, "replicas", 1, "Amount of tiller instances to run on the cluster") - f.StringVar(&i.opts.NodeSelectors, "node-selectors", "", "labels to specify the node on which Tiller is installed (app=tiller,helm=rocks)") - f.VarP(&i.opts.Output, "output", "o", "skip installation and output Tiller's manifest in specified format (json or yaml)") - f.StringArrayVar(&i.opts.Values, "override", []string{}, "override values for the Tiller Deployment manifest (can specify multiple or separate values with commas: key1=val1,key2=val2)") - f.BoolVar(&i.opts.AutoMountServiceAccountToken, "automount-service-account-token", true, "auto-mount the given service account to tiller") + f.StringVar(&i.opts.NodeSelectors, "node-selectors", "", "Labels to specify the node on which Tiller is installed (app=tiller,helm=rocks)") + f.VarP(&i.opts.Output, "output", "o", "Skip installation and output Tiller's manifest in specified format (json or yaml)") + f.StringArrayVar(&i.opts.Values, "override", []string{}, "Override values for the Tiller Deployment manifest (can specify multiple or separate values with commas: key1=val1,key2=val2)") + f.BoolVar(&i.opts.AutoMountServiceAccountToken, "automount-service-account-token", true, "Auto-mount the given service account to tiller") return cmd } diff --git a/cmd/helm/inspect.go b/cmd/helm/inspect.go index 9330b900f..d8ac6b2ef 100644 --- a/cmd/helm/inspect.go +++ b/cmd/helm/inspect.go @@ -82,7 +82,7 @@ func newInspectCmd(out io.Writer) *cobra.Command { inspectCommand := &cobra.Command{ Use: "inspect [CHART]", - Short: "inspect a chart", + Short: "Inspect a chart", Long: inspectDesc, RunE: func(cmd *cobra.Command, args []string) error { if err := checkArgsLength(len(args), "chart name"); err != nil { @@ -145,62 +145,62 @@ func newInspectCmd(out io.Writer) *cobra.Command { cmds := []*cobra.Command{inspectCommand, readmeSubCmd, valuesSubCmd, chartSubCmd} vflag := "verify" - vdesc := "verify the provenance data for this chart" + vdesc := "Verify the provenance data for this chart" for _, subCmd := range cmds { subCmd.Flags().BoolVar(&insp.verify, vflag, false, vdesc) } kflag := "keyring" - kdesc := "path to the keyring containing public verification keys" + kdesc := "Path to the keyring containing public verification keys" kdefault := defaultKeyring() for _, subCmd := range cmds { subCmd.Flags().StringVar(&insp.keyring, kflag, kdefault, kdesc) } verflag := "version" - verdesc := "version of the chart. By default, the newest chart is shown" + verdesc := "Version of the chart. By default, the newest chart is shown" for _, subCmd := range cmds { subCmd.Flags().StringVar(&insp.version, verflag, "", verdesc) } repoURL := "repo" - repoURLdesc := "chart repository url where to locate the requested chart" + repoURLdesc := "Chart repository url where to locate the requested chart" for _, subCmd := range cmds { subCmd.Flags().StringVar(&insp.repoURL, repoURL, "", repoURLdesc) } username := "username" - usernamedesc := "chart repository username where to locate the requested chart" + usernamedesc := "Chart repository username where to locate the requested chart" inspectCommand.Flags().StringVar(&insp.username, username, "", usernamedesc) valuesSubCmd.Flags().StringVar(&insp.username, username, "", usernamedesc) chartSubCmd.Flags().StringVar(&insp.username, username, "", usernamedesc) password := "password" - passworddesc := "chart repository password where to locate the requested chart" + passworddesc := "Chart repository password where to locate the requested chart" inspectCommand.Flags().StringVar(&insp.password, password, "", passworddesc) valuesSubCmd.Flags().StringVar(&insp.password, password, "", passworddesc) chartSubCmd.Flags().StringVar(&insp.password, password, "", passworddesc) develFlag := "devel" - develDesc := "use development versions, too. Equivalent to version '>0.0.0-0'. If --version is set, this is ignored." + develDesc := "Use development versions, too. Equivalent to version '>0.0.0-0'. If --version is set, this is ignored." for _, subCmd := range cmds { subCmd.Flags().BoolVar(&insp.devel, develFlag, false, develDesc) } certFile := "cert-file" - certFiledesc := "verify certificates of HTTPS-enabled servers using this CA bundle" + certFiledesc := "Verify certificates of HTTPS-enabled servers using this CA bundle" for _, subCmd := range cmds { subCmd.Flags().StringVar(&insp.certFile, certFile, "", certFiledesc) } keyFile := "key-file" - keyFiledesc := "identify HTTPS client using this SSL key file" + keyFiledesc := "Identify HTTPS client using this SSL key file" for _, subCmd := range cmds { subCmd.Flags().StringVar(&insp.keyFile, keyFile, "", keyFiledesc) } caFile := "ca-file" - caFiledesc := "chart repository url where to locate the requested chart" + caFiledesc := "Chart repository url where to locate the requested chart" for _, subCmd := range cmds { subCmd.Flags().StringVar(&insp.caFile, caFile, "", caFiledesc) } diff --git a/cmd/helm/install.go b/cmd/helm/install.go index 4602ea9fd..23f307564 100644 --- a/cmd/helm/install.go +++ b/cmd/helm/install.go @@ -170,7 +170,7 @@ func newInstallCmd(c helm.Interface, out io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "install [CHART]", - Short: "install a chart archive", + Short: "Install a chart archive", Long: installDesc, PreRunE: func(_ *cobra.Command, _ []string) error { return setupConnection() }, RunE: func(cmd *cobra.Command, args []string) error { @@ -199,33 +199,33 @@ func newInstallCmd(c helm.Interface, out io.Writer) *cobra.Command { f := cmd.Flags() settings.AddFlagsTLS(f) - f.VarP(&inst.valueFiles, "values", "f", "specify values in a YAML file or a URL(can specify multiple)") - f.StringVarP(&inst.name, "name", "n", "", "release name. If unspecified, it will autogenerate one for you") - f.StringVar(&inst.namespace, "namespace", "", "namespace to install the release into. Defaults to the current kube config namespace.") - f.BoolVar(&inst.dryRun, "dry-run", false, "simulate an install") - f.BoolVar(&inst.disableHooks, "no-hooks", false, "prevent hooks from running during install") - f.BoolVar(&inst.disableCRDHook, "no-crd-hook", false, "prevent CRD hooks from running, but run other hooks") - f.BoolVar(&inst.replace, "replace", false, "re-use the given name, even if that name is already used. This is unsafe in production") - f.StringArrayVar(&inst.values, "set", []string{}, "set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)") - f.StringArrayVar(&inst.stringValues, "set-string", []string{}, "set STRING values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)") - f.StringArrayVar(&inst.fileValues, "set-file", []string{}, "set values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)") - f.StringVar(&inst.nameTemplate, "name-template", "", "specify template used to name the release") - f.BoolVar(&inst.verify, "verify", false, "verify the package before installing it") - f.StringVar(&inst.keyring, "keyring", defaultKeyring(), "location of public keys used for verification") - f.StringVar(&inst.version, "version", "", "specify the exact chart version to install. If this is not specified, the latest version is installed") - f.Int64Var(&inst.timeout, "timeout", 300, "time in seconds to wait for any individual Kubernetes operation (like Jobs for hooks)") - f.BoolVar(&inst.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(&inst.atomic, "atomic", false, "if set, installation process purges chart on fail, also sets --wait flag") - f.StringVar(&inst.repoURL, "repo", "", "chart repository url where to locate the requested chart") - f.StringVar(&inst.username, "username", "", "chart repository username where to locate the requested chart") - f.StringVar(&inst.password, "password", "", "chart repository password where to locate the requested chart") - 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.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-0'. If --version is set, this is ignored.") - f.BoolVar(&inst.depUp, "dep-up", false, "run helm dependency update before installing the chart") - f.BoolVar(&inst.subNotes, "render-subchart-notes", false, "render subchart notes along with the parent") - f.StringVar(&inst.description, "description", "", "specify a description for the release") + f.VarP(&inst.valueFiles, "values", "f", "Specify values in a YAML file or a URL(can specify multiple)") + f.StringVarP(&inst.name, "name", "n", "", "The release name. If unspecified, it will autogenerate one for you") + f.StringVar(&inst.namespace, "namespace", "", "Namespace to install the release into. Defaults to the current kube config namespace.") + f.BoolVar(&inst.dryRun, "dry-run", false, "Simulate an install") + f.BoolVar(&inst.disableHooks, "no-hooks", false, "Prevent hooks from running during install") + f.BoolVar(&inst.disableCRDHook, "no-crd-hook", false, "Prevent CRD hooks from running, but run other hooks") + f.BoolVar(&inst.replace, "replace", false, "Re-use the given name, even if that name is already used. This is unsafe in production") + f.StringArrayVar(&inst.values, "set", []string{}, "Set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)") + f.StringArrayVar(&inst.stringValues, "set-string", []string{}, "Set STRING values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)") + f.StringArrayVar(&inst.fileValues, "set-file", []string{}, "Set values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)") + f.StringVar(&inst.nameTemplate, "name-template", "", "Specify template used to name the release") + f.BoolVar(&inst.verify, "verify", false, "Verify the package before installing it") + f.StringVar(&inst.keyring, "keyring", defaultKeyring(), "Location of public keys used for verification") + f.StringVar(&inst.version, "version", "", "Specify the exact chart version to install. If this is not specified, the latest version is installed") + f.Int64Var(&inst.timeout, "timeout", 300, "Time in seconds to wait for any individual Kubernetes operation (like Jobs for hooks)") + f.BoolVar(&inst.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(&inst.atomic, "atomic", false, "If set, installation process purges chart on fail, also sets --wait flag") + f.StringVar(&inst.repoURL, "repo", "", "Chart repository url where to locate the requested chart") + f.StringVar(&inst.username, "username", "", "Chart repository username where to locate the requested chart") + f.StringVar(&inst.password, "password", "", "Chart repository password where to locate the requested chart") + 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.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-0'. If --version is set, this is ignored.") + f.BoolVar(&inst.depUp, "dep-up", false, "Run helm dependency update before installing the chart") + f.BoolVar(&inst.subNotes, "render-subchart-notes", false, "Render subchart notes along with the parent") + f.StringVar(&inst.description, "description", "", "Specify a description for the release") // set defaults from environment settings.InitTLS(f) diff --git a/cmd/helm/lint.go b/cmd/helm/lint.go index d0159d34b..c1247ae2b 100644 --- a/cmd/helm/lint.go +++ b/cmd/helm/lint.go @@ -61,7 +61,7 @@ func newLintCmd(out io.Writer) *cobra.Command { } cmd := &cobra.Command{ Use: "lint [flags] PATH", - Short: "examines a chart for possible issues", + Short: "Examines a chart for possible issues", Long: longLintHelp, RunE: func(cmd *cobra.Command, args []string) error { if len(args) > 0 { @@ -71,12 +71,12 @@ func newLintCmd(out io.Writer) *cobra.Command { }, } - cmd.Flags().VarP(&l.valueFiles, "values", "f", "specify values in a YAML file (can specify multiple)") - cmd.Flags().StringArrayVar(&l.values, "set", []string{}, "set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)") - cmd.Flags().StringArrayVar(&l.sValues, "set-string", []string{}, "set STRING values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)") - cmd.Flags().StringArrayVar(&l.fValues, "set-file", []string{}, "set values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)") - cmd.Flags().StringVar(&l.namespace, "namespace", "default", "namespace to put the release into") - cmd.Flags().BoolVar(&l.strict, "strict", false, "fail on lint warnings") + cmd.Flags().VarP(&l.valueFiles, "values", "f", "Specify values in a YAML file (can specify multiple)") + cmd.Flags().StringArrayVar(&l.values, "set", []string{}, "Set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)") + cmd.Flags().StringArrayVar(&l.sValues, "set-string", []string{}, "Set STRING values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)") + cmd.Flags().StringArrayVar(&l.fValues, "set-file", []string{}, "Set values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)") + cmd.Flags().StringVar(&l.namespace, "namespace", "default", "Namespace to put the release into") + cmd.Flags().BoolVar(&l.strict, "strict", false, "Fail on lint warnings") return cmd } diff --git a/cmd/helm/list.go b/cmd/helm/list.go index 3ca3fbbfa..87b3ce54d 100644 --- a/cmd/helm/list.go +++ b/cmd/helm/list.go @@ -104,7 +104,7 @@ func newListCmd(client helm.Interface, out io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "list [flags] [FILTER]", - Short: "list releases", + Short: "List releases", Long: listHelp, Aliases: []string{"ls"}, PreRunE: func(_ *cobra.Command, _ []string) error { return setupConnection() }, @@ -121,21 +121,21 @@ func newListCmd(client helm.Interface, out io.Writer) *cobra.Command { f := cmd.Flags() settings.AddFlagsTLS(f) - f.BoolVarP(&list.short, "short", "q", false, "output short (quiet) listing format") - f.BoolVarP(&list.byDate, "date", "d", false, "sort by release date") - f.BoolVarP(&list.sortDesc, "reverse", "r", false, "reverse the sort order") - f.IntVarP(&list.limit, "max", "m", 256, "maximum number of releases to fetch") - f.StringVarP(&list.offset, "offset", "o", "", "next release name in the list, used to offset from start value") - f.BoolVarP(&list.all, "all", "a", false, "show all releases, not just the ones marked DEPLOYED") - f.BoolVar(&list.deleted, "deleted", false, "show deleted releases") - f.BoolVar(&list.deleting, "deleting", false, "show releases that are currently being deleted") - f.BoolVar(&list.deployed, "deployed", false, "show deployed releases. If no other is specified, this will be automatically enabled") - f.BoolVar(&list.failed, "failed", false, "show failed releases") - f.BoolVar(&list.pending, "pending", false, "show pending releases") - f.StringVar(&list.namespace, "namespace", "", "show releases within a specific namespace") - f.UintVar(&list.colWidth, "col-width", 60, "specifies the max column width of output") - f.StringVar(&list.output, "output", "", "output the specified format (json or yaml)") - f.BoolVarP(&list.byChartName, "chart-name", "c", false, "sort by chart name") + f.BoolVarP(&list.short, "short", "q", false, "Output short (quiet) listing format") + f.BoolVarP(&list.byDate, "date", "d", false, "Sort by release date") + f.BoolVarP(&list.sortDesc, "reverse", "r", false, "Reverse the sort order") + f.IntVarP(&list.limit, "max", "m", 256, "Maximum number of releases to fetch") + f.StringVarP(&list.offset, "offset", "o", "", "Next release name in the list, used to offset from start value") + f.BoolVarP(&list.all, "all", "a", false, "Show all releases, not just the ones marked DEPLOYED") + f.BoolVar(&list.deleted, "deleted", false, "Show deleted releases") + f.BoolVar(&list.deleting, "deleting", false, "Show releases that are currently being deleted") + f.BoolVar(&list.deployed, "deployed", false, "Show deployed releases. If no other is specified, this will be automatically enabled") + f.BoolVar(&list.failed, "failed", false, "Show failed releases") + f.BoolVar(&list.pending, "pending", false, "Show pending releases") + f.StringVar(&list.namespace, "namespace", "", "Show releases within a specific namespace") + f.UintVar(&list.colWidth, "col-width", 60, "Specifies the max column width of output") + f.StringVar(&list.output, "output", "", "Output the specified format (json or yaml)") + f.BoolVarP(&list.byChartName, "chart-name", "c", false, "Sort by chart name") // TODO: Do we want this as a feature of 'helm list'? //f.BoolVar(&list.superseded, "history", true, "show historical releases") diff --git a/cmd/helm/package.go b/cmd/helm/package.go index 05fdf02f8..c3643e9b5 100644 --- a/cmd/helm/package.go +++ b/cmd/helm/package.go @@ -70,7 +70,7 @@ func newPackageCmd(out io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "package [flags] [CHART_PATH] [...]", - Short: "package a chart directory into a chart archive", + Short: "Package a chart directory into a chart archive", Long: packageDesc, RunE: func(cmd *cobra.Command, args []string) error { pkg.home = settings.Home @@ -96,14 +96,14 @@ func newPackageCmd(out io.Writer) *cobra.Command { } f := cmd.Flags() - f.BoolVar(&pkg.save, "save", true, "save packaged chart to local chart repository") - f.BoolVar(&pkg.sign, "sign", false, "use a PGP private key to sign this package") - f.StringVar(&pkg.key, "key", "", "name of the key to use when signing. Used if --sign is true") - f.StringVar(&pkg.keyring, "keyring", defaultKeyring(), "location of a public keyring") - f.StringVar(&pkg.version, "version", "", "set the version on the chart to this semver version") - f.StringVar(&pkg.appVersion, "app-version", "", "set the appVersion on the chart to this version") - f.StringVarP(&pkg.destination, "destination", "d", ".", "location to write the chart.") - f.BoolVarP(&pkg.dependencyUpdate, "dependency-update", "u", false, `update dependencies from "requirements.yaml" to dir "charts/" before packaging`) + f.BoolVar(&pkg.save, "save", true, "Save packaged chart to local chart repository") + f.BoolVar(&pkg.sign, "sign", false, "Use a PGP private key to sign this package") + f.StringVar(&pkg.key, "key", "", "Name of the key to use when signing. Used if --sign is true") + f.StringVar(&pkg.keyring, "keyring", defaultKeyring(), "Location of a public keyring") + f.StringVar(&pkg.version, "version", "", "Set the version on the chart to this semver version") + f.StringVar(&pkg.appVersion, "app-version", "", "Set the appVersion on the chart to this version") + f.StringVarP(&pkg.destination, "destination", "d", ".", "Location to write the chart.") + f.BoolVarP(&pkg.dependencyUpdate, "dependency-update", "u", false, `Update dependencies from "requirements.yaml" to dir "charts/" before packaging`) return cmd } diff --git a/cmd/helm/plugin.go b/cmd/helm/plugin.go index fbdd1245b..99117dbb2 100644 --- a/cmd/helm/plugin.go +++ b/cmd/helm/plugin.go @@ -33,7 +33,7 @@ Manage client-side Helm plugins. func newPluginCmd(out io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "plugin", - Short: "add, list, or remove Helm plugins", + Short: "Add, list, or remove Helm plugins", Long: pluginHelp, } cmd.AddCommand( diff --git a/cmd/helm/plugin_install.go b/cmd/helm/plugin_install.go index 7d77be3fc..abf60537b 100644 --- a/cmd/helm/plugin_install.go +++ b/cmd/helm/plugin_install.go @@ -44,7 +44,7 @@ func newPluginInstallCmd(out io.Writer) *cobra.Command { pcmd := &pluginInstallCmd{out: out} cmd := &cobra.Command{ Use: "install [options] ...", - Short: "install one or more Helm plugins", + Short: "Install one or more Helm plugins", Long: pluginInstallDesc, PreRunE: func(cmd *cobra.Command, args []string) error { return pcmd.complete(args) @@ -53,7 +53,7 @@ func newPluginInstallCmd(out io.Writer) *cobra.Command { return pcmd.run() }, } - cmd.Flags().StringVar(&pcmd.version, "version", "", "specify a version constraint. If this is not specified, the latest version is installed") + cmd.Flags().StringVar(&pcmd.version, "version", "", "Specify a version constraint. If this is not specified, the latest version is installed") return cmd } diff --git a/cmd/helm/plugin_list.go b/cmd/helm/plugin_list.go index 9693baaa2..efaac164e 100644 --- a/cmd/helm/plugin_list.go +++ b/cmd/helm/plugin_list.go @@ -34,7 +34,7 @@ func newPluginListCmd(out io.Writer) *cobra.Command { pcmd := &pluginListCmd{out: out} cmd := &cobra.Command{ Use: "list", - Short: "list installed Helm plugins", + Short: "List installed Helm plugins", RunE: func(cmd *cobra.Command, args []string) error { pcmd.home = settings.Home return pcmd.run() diff --git a/cmd/helm/plugin_remove.go b/cmd/helm/plugin_remove.go index f30e5b516..d4321558a 100644 --- a/cmd/helm/plugin_remove.go +++ b/cmd/helm/plugin_remove.go @@ -38,7 +38,7 @@ func newPluginRemoveCmd(out io.Writer) *cobra.Command { pcmd := &pluginRemoveCmd{out: out} cmd := &cobra.Command{ Use: "remove ...", - Short: "remove one or more Helm plugins", + Short: "Remove one or more Helm plugins", PreRunE: func(cmd *cobra.Command, args []string) error { return pcmd.complete(args) }, diff --git a/cmd/helm/plugin_update.go b/cmd/helm/plugin_update.go index f9d5a3fac..285572824 100644 --- a/cmd/helm/plugin_update.go +++ b/cmd/helm/plugin_update.go @@ -39,7 +39,7 @@ func newPluginUpdateCmd(out io.Writer) *cobra.Command { pcmd := &pluginUpdateCmd{out: out} cmd := &cobra.Command{ Use: "update ...", - Short: "update one or more Helm plugins", + Short: "Update one or more Helm plugins", PreRunE: func(cmd *cobra.Command, args []string) error { return pcmd.complete(args) }, diff --git a/cmd/helm/release_testing.go b/cmd/helm/release_testing.go index 91c0d7189..e108ade81 100644 --- a/cmd/helm/release_testing.go +++ b/cmd/helm/release_testing.go @@ -50,7 +50,7 @@ func newReleaseTestCmd(c helm.Interface, out io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "test [RELEASE]", - Short: "test a release", + Short: "Test a release", Long: releaseTestDesc, PreRunE: func(_ *cobra.Command, _ []string) error { return setupConnection() }, RunE: func(cmd *cobra.Command, args []string) error { @@ -66,9 +66,9 @@ func newReleaseTestCmd(c helm.Interface, out io.Writer) *cobra.Command { f := cmd.Flags() settings.AddFlagsTLS(f) - f.Int64Var(&rlsTest.timeout, "timeout", 300, "time in seconds to wait for any individual Kubernetes operation (like Jobs for hooks)") - f.BoolVar(&rlsTest.cleanup, "cleanup", false, "delete test pods upon completion") - f.BoolVar(&rlsTest.parallel, "parallel", false, "run test pods in parallel") + f.Int64Var(&rlsTest.timeout, "timeout", 300, "Time in seconds to wait for any individual Kubernetes operation (like Jobs for hooks)") + f.BoolVar(&rlsTest.cleanup, "cleanup", false, "Delete test pods upon completion") + f.BoolVar(&rlsTest.parallel, "parallel", false, "Run test pods in parallel") // set defaults from environment settings.InitTLS(f) diff --git a/cmd/helm/repo.go b/cmd/helm/repo.go index 9f1dc8928..9eac9237d 100644 --- a/cmd/helm/repo.go +++ b/cmd/helm/repo.go @@ -33,7 +33,7 @@ Example usage: func newRepoCmd(out io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "repo [FLAGS] add|remove|list|index|update [ARGS]", - Short: "add, list, remove, update, and index chart repositories", + Short: "Add, list, remove, update, and index chart repositories", Long: repoHelm, } diff --git a/cmd/helm/repo_add.go b/cmd/helm/repo_add.go index bfb3f0174..15d4c842e 100644 --- a/cmd/helm/repo_add.go +++ b/cmd/helm/repo_add.go @@ -49,7 +49,7 @@ func newRepoAddCmd(out io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "add [flags] [NAME] [URL]", - Short: "add a chart repository", + Short: "Add a chart repository", RunE: func(cmd *cobra.Command, args []string) error { if err := checkArgsLength(len(args), "name for the chart repository", "the url of the chart repository"); err != nil { return err @@ -64,12 +64,12 @@ func newRepoAddCmd(out io.Writer) *cobra.Command { } f := cmd.Flags() - f.StringVar(&add.username, "username", "", "chart repository username") - f.StringVar(&add.password, "password", "", "chart repository password") - f.BoolVar(&add.noupdate, "no-update", false, "raise error if repo is already registered") - f.StringVar(&add.certFile, "cert-file", "", "identify HTTPS client using this SSL certificate file") - f.StringVar(&add.keyFile, "key-file", "", "identify HTTPS client using this SSL key file") - f.StringVar(&add.caFile, "ca-file", "", "verify certificates of HTTPS-enabled servers using this CA bundle") + f.StringVar(&add.username, "username", "", "Chart repository username") + f.StringVar(&add.password, "password", "", "Chart repository password") + f.BoolVar(&add.noupdate, "no-update", false, "Raise error if repo is already registered") + f.StringVar(&add.certFile, "cert-file", "", "Identify HTTPS client using this SSL certificate file") + f.StringVar(&add.keyFile, "key-file", "", "Identify HTTPS client using this SSL key file") + f.StringVar(&add.caFile, "ca-file", "", "Verify certificates of HTTPS-enabled servers using this CA bundle") return cmd } diff --git a/cmd/helm/repo_index.go b/cmd/helm/repo_index.go index b3f49fb97..cd7b2aea0 100644 --- a/cmd/helm/repo_index.go +++ b/cmd/helm/repo_index.go @@ -50,7 +50,7 @@ func newRepoIndexCmd(out io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "index [flags] [DIR]", - Short: "generate an index file given a directory containing packaged charts", + Short: "Generate an index file given a directory containing packaged charts", Long: repoIndexDesc, RunE: func(cmd *cobra.Command, args []string) error { if err := checkArgsLength(len(args), "path to a directory"); err != nil { @@ -64,8 +64,8 @@ func newRepoIndexCmd(out io.Writer) *cobra.Command { } f := cmd.Flags() - f.StringVar(&index.url, "url", "", "url of chart repository") - f.StringVar(&index.merge, "merge", "", "merge the generated index into the given index") + f.StringVar(&index.url, "url", "", "URL of the chart repository") + f.StringVar(&index.merge, "merge", "", "Merge the generated index into the given index") return cmd } diff --git a/cmd/helm/repo_list.go b/cmd/helm/repo_list.go index 36887c69b..5983bca97 100644 --- a/cmd/helm/repo_list.go +++ b/cmd/helm/repo_list.go @@ -38,7 +38,7 @@ func newRepoListCmd(out io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "list [flags]", - Short: "list chart repositories", + Short: "List chart repositories", RunE: func(cmd *cobra.Command, args []string) error { list.home = settings.Home return list.run() diff --git a/cmd/helm/repo_remove.go b/cmd/helm/repo_remove.go index f13b8dadb..98b801151 100644 --- a/cmd/helm/repo_remove.go +++ b/cmd/helm/repo_remove.go @@ -39,7 +39,7 @@ func newRepoRemoveCmd(out io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "remove [flags] [NAME]", Aliases: []string{"rm"}, - Short: "remove a chart repository", + Short: "Remove a chart repository", RunE: func(cmd *cobra.Command, args []string) error { if len(args) == 0 { return fmt.Errorf("need at least one argument, name of chart repository") diff --git a/cmd/helm/repo_update.go b/cmd/helm/repo_update.go index 592ad4b7d..9d5e04b5d 100644 --- a/cmd/helm/repo_update.go +++ b/cmd/helm/repo_update.go @@ -55,7 +55,7 @@ func newRepoUpdateCmd(out io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "update", Aliases: []string{"up"}, - Short: "update information of available charts locally from chart repositories", + Short: "Update information of available charts locally from chart repositories", Long: updateDesc, RunE: func(cmd *cobra.Command, args []string) error { u.home = settings.Home @@ -64,7 +64,7 @@ func newRepoUpdateCmd(out io.Writer) *cobra.Command { } f := cmd.Flags() - f.BoolVar(&u.strict, "strict", false, "fail on update warnings") + f.BoolVar(&u.strict, "strict", false, "Fail on update warnings") return cmd } diff --git a/cmd/helm/reset.go b/cmd/helm/reset.go index 887ce34d0..5cd4addb1 100644 --- a/cmd/helm/reset.go +++ b/cmd/helm/reset.go @@ -56,7 +56,7 @@ func newResetCmd(client helm.Interface, out io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "reset", - Short: "uninstalls Tiller from a cluster", + Short: "Uninstalls Tiller from a cluster", Long: resetDesc, PreRunE: func(cmd *cobra.Command, args []string) error { if err := setupConnection(); !d.force && err != nil { @@ -79,8 +79,8 @@ func newResetCmd(client helm.Interface, out io.Writer) *cobra.Command { f := cmd.Flags() settings.AddFlagsTLS(f) - f.BoolVarP(&d.force, "force", "f", false, "forces Tiller uninstall even if there are releases installed, or if Tiller is not in ready state. Releases are not deleted.)") - f.BoolVar(&d.removeHelmHome, "remove-helm-home", false, "if set deletes $HELM_HOME") + f.BoolVarP(&d.force, "force", "f", false, "Forces Tiller uninstall even if there are releases installed, or if Tiller is not in ready state. Releases are not deleted.)") + f.BoolVar(&d.removeHelmHome, "remove-helm-home", false, "If set, deletes $HELM_HOME") // set defaults from environment settings.InitTLS(f) diff --git a/cmd/helm/rollback.go b/cmd/helm/rollback.go index 95a2b2c8c..970afef32 100644 --- a/cmd/helm/rollback.go +++ b/cmd/helm/rollback.go @@ -58,7 +58,7 @@ func newRollbackCmd(c helm.Interface, out io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "rollback [flags] [RELEASE] [REVISION]", - Short: "roll back a release to a previous revision", + Short: "Rollback a release to a previous revision", Long: rollbackDesc, PreRunE: func(_ *cobra.Command, _ []string) error { return setupConnection() }, RunE: func(cmd *cobra.Command, args []string) error { @@ -81,14 +81,14 @@ func newRollbackCmd(c helm.Interface, out io.Writer) *cobra.Command { f := cmd.Flags() settings.AddFlagsTLS(f) - 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.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.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.StringVar(&rollback.description, "description", "", "specify a description for the release") - f.BoolVar(&rollback.cleanupOnFail, "cleanup-on-fail", false, "allow deletion of new resources created in this rollback when rollback failed") + 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.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.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.StringVar(&rollback.description, "description", "", "Specify a description for the release") + f.BoolVar(&rollback.cleanupOnFail, "cleanup-on-fail", false, "Allow deletion of new resources created in this rollback when rollback failed") // set defaults from environment settings.InitTLS(f) diff --git a/cmd/helm/search.go b/cmd/helm/search.go index 2e7611609..99ffafbd3 100644 --- a/cmd/helm/search.go +++ b/cmd/helm/search.go @@ -55,7 +55,7 @@ func newSearchCmd(out io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "search [keyword]", - Short: "search for a keyword in charts", + Short: "Search for a keyword in charts", Long: searchDesc, RunE: func(cmd *cobra.Command, args []string) error { sc.helmhome = settings.Home @@ -64,10 +64,10 @@ func newSearchCmd(out io.Writer) *cobra.Command { } f := cmd.Flags() - f.BoolVarP(&sc.regexp, "regexp", "r", false, "use regular expressions for searching") - f.BoolVarP(&sc.versions, "versions", "l", false, "show the long listing, with each version of each chart on its own line") - f.StringVarP(&sc.version, "version", "v", "", "search using semantic versioning constraints") - f.UintVar(&sc.colWidth, "col-width", 60, "specifies the max column width of output") + f.BoolVarP(&sc.regexp, "regexp", "r", false, "Use regular expressions for searching") + f.BoolVarP(&sc.versions, "versions", "l", false, "Show the long listing, with each version of each chart on its own line") + f.StringVarP(&sc.version, "version", "v", "", "Search using semantic versioning constraints") + f.UintVar(&sc.colWidth, "col-width", 60, "Specifies the max column width of output") return cmd } diff --git a/cmd/helm/serve.go b/cmd/helm/serve.go index 7ddae6ca2..f1ffdcb15 100644 --- a/cmd/helm/serve.go +++ b/cmd/helm/serve.go @@ -53,7 +53,7 @@ func newServeCmd(out io.Writer) *cobra.Command { srv := &serveCmd{out: out} cmd := &cobra.Command{ Use: "serve", - Short: "start a local http web server", + Short: "Start a local http web server", Long: serveDesc, PreRunE: func(cmd *cobra.Command, args []string) error { return srv.complete() @@ -64,9 +64,9 @@ func newServeCmd(out io.Writer) *cobra.Command { } f := cmd.Flags() - 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.url, "url", "", "external URL of chart repository") + 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.url, "url", "", "External URL of chart repository") return cmd } diff --git a/cmd/helm/status.go b/cmd/helm/status.go index b03453adc..dac91916b 100644 --- a/cmd/helm/status.go +++ b/cmd/helm/status.go @@ -61,7 +61,7 @@ func newStatusCmd(client helm.Interface, out io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "status [flags] RELEASE_NAME", - Short: "displays the status of the named release", + Short: "Displays the status of the named release", Long: statusHelp, PreRunE: func(_ *cobra.Command, _ []string) error { return setupConnection() }, RunE: func(cmd *cobra.Command, args []string) error { @@ -78,8 +78,8 @@ func newStatusCmd(client helm.Interface, out io.Writer) *cobra.Command { f := cmd.Flags() settings.AddFlagsTLS(f) - f.Int32Var(&status.version, "revision", 0, "if set, display the status of the named release with revision") - f.StringVarP(&status.outfmt, "output", "o", "", "output the status in the specified format (json or yaml)") + f.Int32Var(&status.version, "revision", 0, "If set, display the status of the named release with revision") + f.StringVarP(&status.outfmt, "output", "o", "", "Output the status in the specified format (json or yaml)") // set defaults from environment settings.InitTLS(f) diff --git a/cmd/helm/template.go b/cmd/helm/template.go index 1838bb758..cef55b4f2 100644 --- a/cmd/helm/template.go +++ b/cmd/helm/template.go @@ -86,24 +86,24 @@ func newTemplateCmd(out io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "template [flags] CHART", - Short: fmt.Sprintf("locally render templates"), + Short: "Locally render templates", Long: templateDesc, RunE: t.run, } f := cmd.Flags() - f.BoolVar(&t.showNotes, "notes", false, "show the computed NOTES.txt file as well") - f.StringVarP(&t.releaseName, "name", "n", "release-name", "release name") - f.BoolVar(&t.releaseIsUpgrade, "is-upgrade", false, "set .Release.IsUpgrade instead of .Release.IsInstall") - f.StringArrayVarP(&t.renderFiles, "execute", "x", []string{}, "only execute the given templates") - f.VarP(&t.valueFiles, "values", "f", "specify values in a YAML file (can specify multiple)") - f.StringVar(&t.namespace, "namespace", "", "namespace to install the release into") - f.StringArrayVar(&t.values, "set", []string{}, "set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)") - f.StringArrayVar(&t.stringValues, "set-string", []string{}, "set STRING values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)") - f.StringArrayVar(&t.fileValues, "set-file", []string{}, "set values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)") - f.StringVar(&t.nameTemplate, "name-template", "", "specify template used to name the release") - f.StringVar(&t.kubeVersion, "kube-version", defaultKubeVersion, "kubernetes version used as Capabilities.KubeVersion.Major/Minor") - f.StringVar(&t.outputDir, "output-dir", "", "writes the executed templates to files in output-dir instead of stdout") + f.BoolVar(&t.showNotes, "notes", false, "Show the computed NOTES.txt file as well") + f.StringVarP(&t.releaseName, "name", "n", "release-name", "Release name") + f.BoolVar(&t.releaseIsUpgrade, "is-upgrade", false, "Set .Release.IsUpgrade instead of .Release.IsInstall") + f.StringArrayVarP(&t.renderFiles, "execute", "x", []string{}, "Only execute the given templates") + f.VarP(&t.valueFiles, "values", "f", "Specify values in a YAML file (can specify multiple)") + f.StringVar(&t.namespace, "namespace", "", "Namespace to install the release into") + f.StringArrayVar(&t.values, "set", []string{}, "Set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)") + f.StringArrayVar(&t.stringValues, "set-string", []string{}, "Set STRING values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)") + f.StringArrayVar(&t.fileValues, "set-file", []string{}, "Set values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)") + f.StringVar(&t.nameTemplate, "name-template", "", "Specify template used to name the release") + f.StringVar(&t.kubeVersion, "kube-version", defaultKubeVersion, "Kubernetes version used as Capabilities.KubeVersion.Major/Minor") + f.StringVar(&t.outputDir, "output-dir", "", "Writes the executed templates to files in output-dir instead of stdout") return cmd } diff --git a/cmd/helm/upgrade.go b/cmd/helm/upgrade.go index 683b1f54d..aa4bebeef 100644 --- a/cmd/helm/upgrade.go +++ b/cmd/helm/upgrade.go @@ -128,7 +128,7 @@ func newUpgradeCmd(client helm.Interface, out io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "upgrade [RELEASE] [CHART]", - Short: "upgrade a release", + Short: "Upgrade a release", Long: upgradeDesc, PreRunE: func(_ *cobra.Command, _ []string) error { return setupConnection() }, RunE: func(cmd *cobra.Command, args []string) error { @@ -152,37 +152,37 @@ func newUpgradeCmd(client helm.Interface, out io.Writer) *cobra.Command { f := cmd.Flags() settings.AddFlagsTLS(f) - f.VarP(&upgrade.valueFiles, "values", "f", "specify values in a YAML file or a URL(can specify multiple)") - 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.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.stringValues, "set-string", []string{}, "set STRING values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)") - f.StringArrayVar(&upgrade.fileValues, "set-file", []string{}, "set values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)") - 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.verify, "verify", false, "verify the provenance of the chart before upgrading") - f.StringVar(&upgrade.keyring, "keyring", defaultKeyring(), "path to the keyring that contains public signing keys") - f.BoolVarP(&upgrade.install, "install", "i", false, "if a release by this name doesn't already exist, run an install") - f.StringVar(&upgrade.namespace, "namespace", "", "namespace to install the release into (only used if --install is set). Defaults to the current kube config namespace") - f.StringVar(&upgrade.version, "version", "", "specify the exact chart version to use. If this is not specified, the latest version is used") - f.Int64Var(&upgrade.timeout, "timeout", 300, "time in seconds to wait for any individual Kubernetes operation (like Jobs for hooks)") - f.BoolVar(&upgrade.resetValues, "reset-values", false, "when upgrading, reset the values to the ones built into the chart") - f.BoolVar(&upgrade.reuseValues, "reuse-values", false, "when upgrading, reuse the last release's values and merge in any overrides from the command line via --set and -f. If '--reset-values' is specified, this is ignored.") - f.BoolVar(&upgrade.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(&upgrade.atomic, "atomic", false, "if set, upgrade process rolls back changes made in case of failed upgrade, also sets --wait flag") - f.StringVar(&upgrade.repoURL, "repo", "", "chart repository url where to locate the requested chart") - f.StringVar(&upgrade.username, "username", "", "chart repository username where to locate the requested chart") - f.StringVar(&upgrade.password, "password", "", "chart repository password where to locate the requested chart") - 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.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-0'. If --version is set, this is ignored.") - f.BoolVar(&upgrade.subNotes, "render-subchart-notes", false, "render subchart notes along with parent") - f.StringVar(&upgrade.description, "description", "", "specify the description to use for the upgrade, rather than the default") - f.BoolVar(&upgrade.cleanupOnFail, "cleanup-on-fail", false, "allow deletion of new resources created in this upgrade when upgrade failed") - - f.MarkDeprecated("disable-hooks", "use --no-hooks instead") + f.VarP(&upgrade.valueFiles, "values", "f", "Specify values in a YAML file or a URL(can specify multiple)") + 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.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.stringValues, "set-string", []string{}, "Set STRING values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)") + f.StringArrayVar(&upgrade.fileValues, "set-file", []string{}, "Set values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)") + 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.verify, "verify", false, "Verify the provenance of the chart before upgrading") + f.StringVar(&upgrade.keyring, "keyring", defaultKeyring(), "Path to the keyring that contains public signing keys") + f.BoolVarP(&upgrade.install, "install", "i", false, "If a release by this name doesn't already exist, run an install") + f.StringVar(&upgrade.namespace, "namespace", "", "Namespace to install the release into (only used if --install is set). Defaults to the current kube config namespace") + f.StringVar(&upgrade.version, "version", "", "Specify the exact chart version to use. If this is not specified, the latest version is used") + f.Int64Var(&upgrade.timeout, "timeout", 300, "Time in seconds to wait for any individual Kubernetes operation (like Jobs for hooks)") + f.BoolVar(&upgrade.resetValues, "reset-values", false, "When upgrading, reset the values to the ones built into the chart") + f.BoolVar(&upgrade.reuseValues, "reuse-values", false, "When upgrading, reuse the last release's values and merge in any overrides from the command line via --set and -f. If '--reset-values' is specified, this is ignored.") + f.BoolVar(&upgrade.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(&upgrade.atomic, "atomic", false, "If set, upgrade process rolls back changes made in case of failed upgrade, also sets --wait flag") + f.StringVar(&upgrade.repoURL, "repo", "", "Chart repository url where to locate the requested chart") + f.StringVar(&upgrade.username, "username", "", "Chart repository username where to locate the requested chart") + f.StringVar(&upgrade.password, "password", "", "Chart repository password where to locate the requested chart") + 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.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-0'. If --version is set, this is ignored.") + f.BoolVar(&upgrade.subNotes, "render-subchart-notes", false, "Render subchart notes along with parent") + f.StringVar(&upgrade.description, "description", "", "Specify the description to use for the upgrade, rather than the default") + f.BoolVar(&upgrade.cleanupOnFail, "cleanup-on-fail", false, "Allow deletion of new resources created in this upgrade when upgrade failed") + + f.MarkDeprecated("disable-hooks", "Use --no-hooks instead") // set defaults from environment settings.InitTLS(f) diff --git a/cmd/helm/verify.go b/cmd/helm/verify.go index 6b8e6895d..377f511f6 100644 --- a/cmd/helm/verify.go +++ b/cmd/helm/verify.go @@ -47,7 +47,7 @@ func newVerifyCmd(out io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "verify [flags] PATH", - Short: "verify that a chart at the given path has been signed and is valid", + Short: "Verify that a chart at the given path has been signed and is valid", Long: verifyDesc, RunE: func(cmd *cobra.Command, args []string) error { if len(args) == 0 { @@ -59,7 +59,7 @@ func newVerifyCmd(out io.Writer) *cobra.Command { } f := cmd.Flags() - f.StringVar(&vc.keyring, "keyring", defaultKeyring(), "keyring containing public keys") + f.StringVar(&vc.keyring, "keyring", defaultKeyring(), "Keyring containing public keys") return cmd } diff --git a/cmd/helm/version.go b/cmd/helm/version.go index a5360ea36..c1a05e0c1 100644 --- a/cmd/helm/version.go +++ b/cmd/helm/version.go @@ -66,7 +66,7 @@ func newVersionCmd(c helm.Interface, out io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "version", - Short: "print the client/server version information", + Short: "Print the client/server version information", Long: versionDesc, RunE: func(cmd *cobra.Command, args []string) error { // If neither is explicitly set, show both. @@ -78,10 +78,10 @@ func newVersionCmd(c helm.Interface, out io.Writer) *cobra.Command { } f := cmd.Flags() settings.AddFlagsTLS(f) - f.BoolVarP(&version.showClient, "client", "c", false, "client version only") - f.BoolVarP(&version.showServer, "server", "s", false, "server version only") - f.BoolVar(&version.short, "short", false, "print the version number") - f.StringVar(&version.template, "template", "", "template for version string format") + f.BoolVarP(&version.showClient, "client", "c", false, "Client version only") + f.BoolVarP(&version.showServer, "server", "s", false, "Server version only") + f.BoolVar(&version.short, "short", false, "Print the version number") + f.StringVar(&version.template, "template", "", "Template for version string format") // set defaults from environment settings.InitTLS(f) diff --git a/docs/helm/helm.md b/docs/helm/helm.md index b57be9f9d..ef9b729ab 100644 --- a/docs/helm/helm.md +++ b/docs/helm/helm.md @@ -15,68 +15,68 @@ It will also set up any necessary local configuration. Common actions from this point include: -- helm search: search for charts -- helm fetch: download a chart to your local directory to view -- helm install: upload the chart to Kubernetes -- helm list: list releases of charts +- helm search: Search for charts +- helm fetch: Download a chart to your local directory to view +- helm install: Upload the chart to Kubernetes +- helm list: List releases of charts Environment: -- $HELM_HOME: set an alternative location for Helm files. By default, these are stored in ~/.helm -- $HELM_HOST: set an alternative Tiller host. The format is host:port -- $HELM_NO_PLUGINS: disable plugins. Set HELM_NO_PLUGINS=1 to disable plugins. -- $TILLER_NAMESPACE: set an alternative Tiller namespace (default "kube-system") -- $KUBECONFIG: set an alternative Kubernetes configuration file (default "~/.kube/config") -- $HELM_TLS_CA_CERT: path to TLS CA certificate used to verify the Helm client and Tiller server certificates (default "$HELM_HOME/ca.pem") -- $HELM_TLS_CERT: path to TLS client certificate file for authenticating to Tiller (default "$HELM_HOME/cert.pem") -- $HELM_TLS_KEY: path to TLS client key file for authenticating to Tiller (default "$HELM_HOME/key.pem") -- $HELM_TLS_ENABLE: enable TLS connection between Helm and Tiller (default "false") -- $HELM_TLS_VERIFY: enable TLS connection between Helm and Tiller and verify Tiller server certificate (default "false") -- $HELM_TLS_HOSTNAME: the hostname or IP address used to verify the Tiller server certificate (default "127.0.0.1") -- $HELM_KEY_PASSPHRASE: set HELM_KEY_PASSPHRASE to the passphrase of your PGP private key. If set, you will not be prompted for the passphrase while signing helm charts +- $HELM_HOME: Set an alternative location for Helm files. By default, these are stored in ~/.helm +- $HELM_HOST: Set an alternative Tiller host. The format is host:port +- $HELM_NO_PLUGINS: Disable plugins. Set HELM_NO_PLUGINS=1 to disable plugins. +- $TILLER_NAMESPACE: Set an alternative Tiller namespace (default "kube-system") +- $KUBECONFIG: Set an alternative Kubernetes configuration file (default "~/.kube/config") +- $HELM_TLS_CA_CERT: Path to TLS CA certificate used to verify the Helm client and Tiller server certificates (default "$HELM_HOME/ca.pem") +- $HELM_TLS_CERT: Path to TLS client certificate file for authenticating to Tiller (default "$HELM_HOME/cert.pem") +- $HELM_TLS_KEY: Path to TLS client key file for authenticating to Tiller (default "$HELM_HOME/key.pem") +- $HELM_TLS_ENABLE: Enable TLS connection between Helm and Tiller (default "false") +- $HELM_TLS_VERIFY: Enable TLS connection between Helm and Tiller and verify Tiller server certificate (default "false") +- $HELM_TLS_HOSTNAME: The hostname or IP address used to verify the Tiller server certificate (default "127.0.0.1") +- $HELM_KEY_PASSPHRASE: Set HELM_KEY_PASSPHRASE to the passphrase of your PGP private key. If set, you will not be prompted for the passphrase while signing helm charts ### Options ``` - --debug enable verbose output + --debug Enable verbose output -h, --help help for helm - --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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### SEE ALSO * [helm completion](helm_completion.md) - Generate autocompletions script for the specified shell (bash or zsh) -* [helm create](helm_create.md) - create a new chart with the given name -* [helm delete](helm_delete.md) - given a release name, delete the release from Kubernetes -* [helm dependency](helm_dependency.md) - manage a chart's dependencies -* [helm fetch](helm_fetch.md) - download a chart from a repository and (optionally) unpack it in local directory -* [helm get](helm_get.md) - download a named release -* [helm history](helm_history.md) - fetch release history -* [helm home](helm_home.md) - displays the location of HELM_HOME -* [helm init](helm_init.md) - initialize Helm on both client and server -* [helm inspect](helm_inspect.md) - inspect a chart -* [helm install](helm_install.md) - install a chart archive -* [helm lint](helm_lint.md) - examines a chart for possible issues -* [helm list](helm_list.md) - list releases -* [helm package](helm_package.md) - package a chart directory into a chart archive -* [helm plugin](helm_plugin.md) - add, list, or remove Helm plugins -* [helm repo](helm_repo.md) - add, list, remove, update, and index chart repositories -* [helm reset](helm_reset.md) - uninstalls Tiller from a cluster -* [helm rollback](helm_rollback.md) - roll back a release to a previous revision -* [helm search](helm_search.md) - search for a keyword in charts -* [helm serve](helm_serve.md) - start a local http web server -* [helm status](helm_status.md) - displays the status of the named release -* [helm template](helm_template.md) - locally render templates -* [helm test](helm_test.md) - test a release -* [helm upgrade](helm_upgrade.md) - upgrade a release -* [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 - -###### Auto generated by spf13/cobra on 25-Apr-2019 +* [helm create](helm_create.md) - Create a new chart with the given name +* [helm delete](helm_delete.md) - Given a release name, delete the release from Kubernetes +* [helm dependency](helm_dependency.md) - Manage a chart's dependencies +* [helm fetch](helm_fetch.md) - Download a chart from a repository and (optionally) unpack it in local directory +* [helm get](helm_get.md) - Download a named release +* [helm history](helm_history.md) - Fetch release history +* [helm home](helm_home.md) - Displays the location of HELM_HOME +* [helm init](helm_init.md) - Initialize Helm on both client and server +* [helm inspect](helm_inspect.md) - Inspect a chart +* [helm install](helm_install.md) - Install a chart archive +* [helm lint](helm_lint.md) - Examines a chart for possible issues +* [helm list](helm_list.md) - List releases +* [helm package](helm_package.md) - Package a chart directory into a chart archive +* [helm plugin](helm_plugin.md) - Add, list, or remove Helm plugins +* [helm repo](helm_repo.md) - Add, list, remove, update, and index chart repositories +* [helm reset](helm_reset.md) - Uninstalls Tiller from a cluster +* [helm rollback](helm_rollback.md) - Rollback a release to a previous revision +* [helm search](helm_search.md) - Search for a keyword in charts +* [helm serve](helm_serve.md) - Start a local http web server +* [helm status](helm_status.md) - Displays the status of the named release +* [helm template](helm_template.md) - Locally render templates +* [helm test](helm_test.md) - Test a release +* [helm upgrade](helm_upgrade.md) - Upgrade a release +* [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 + +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_completion.md b/docs/helm/helm_completion.md index 440393076..01f7fedb8 100644 --- a/docs/helm/helm_completion.md +++ b/docs/helm/helm_completion.md @@ -29,17 +29,17 @@ helm completion SHELL [flags] ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### SEE ALSO * [helm](helm.md) - The Helm package manager for Kubernetes. -###### Auto generated by spf13/cobra on 1-Aug-2018 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_create.md b/docs/helm/helm_create.md index 2dc45a77c..be37467d8 100644 --- a/docs/helm/helm_create.md +++ b/docs/helm/helm_create.md @@ -1,6 +1,6 @@ ## helm create -create a new chart with the given name +Create a new chart with the given name ### Synopsis @@ -39,23 +39,23 @@ helm create NAME [flags] ``` -h, --help help for create - -p, --starter string the named Helm starter scaffold + -p, --starter string The named Helm starter scaffold ``` ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### SEE ALSO * [helm](helm.md) - The Helm package manager for Kubernetes. -###### Auto generated by spf13/cobra on 18-Sep-2018 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_delete.md b/docs/helm/helm_delete.md index 3c6a46844..afe8852a9 100644 --- a/docs/helm/helm_delete.md +++ b/docs/helm/helm_delete.md @@ -1,6 +1,6 @@ ## helm delete -given a release name, delete the release from Kubernetes +Given a release name, delete the release from Kubernetes ### Synopsis @@ -19,34 +19,34 @@ helm delete [flags] RELEASE_NAME [...] ### Options ``` - --description string specify a description for the release - --dry-run simulate a delete + --description string Specify a description for the release + --dry-run Simulate a delete -h, --help help for delete - --no-hooks prevent hooks from running during deletion - --purge remove the release from the store and make its name free for later use - --timeout int time in seconds to wait for any individual Kubernetes operation (like Jobs for hooks) (default 300) - --tls enable TLS for request - --tls-ca-cert string path to TLS CA certificate file (default "$HELM_HOME/ca.pem") - --tls-cert string path to TLS certificate file (default "$HELM_HOME/cert.pem") - --tls-hostname string the server name used to verify the hostname on the returned certificates from the server - --tls-key string path to TLS key file (default "$HELM_HOME/key.pem") - --tls-verify enable TLS for request and verify remote + --no-hooks Prevent hooks from running during deletion + --purge Remove the release from the store and make its name free for later use + --timeout int Time in seconds to wait for any individual Kubernetes operation (like Jobs for hooks) (default 300) + --tls Enable TLS for request + --tls-ca-cert string Path to TLS CA certificate file (default "$HELM_HOME/ca.pem") + --tls-cert string Path to TLS certificate file (default "$HELM_HOME/cert.pem") + --tls-hostname string The server name used to verify the hostname on the returned certificates from the server + --tls-key string Path to TLS key file (default "$HELM_HOME/key.pem") + --tls-verify Enable TLS for request and verify remote ``` ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### SEE ALSO * [helm](helm.md) - The Helm package manager for Kubernetes. -###### Auto generated by spf13/cobra on 10-Aug-2018 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_dependency.md b/docs/helm/helm_dependency.md index 8c7d7d65f..3a508764c 100644 --- a/docs/helm/helm_dependency.md +++ b/docs/helm/helm_dependency.md @@ -1,6 +1,6 @@ ## helm dependency -manage a chart's dependencies +Manage a chart's dependencies ### Synopsis @@ -62,20 +62,20 @@ for this case. ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### SEE ALSO * [helm](helm.md) - The Helm package manager for Kubernetes. -* [helm dependency build](helm_dependency_build.md) - rebuild the charts/ directory based on the requirements.lock file -* [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 build](helm_dependency_build.md) - Rebuild the charts/ directory based on the requirements.lock file +* [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 -###### Auto generated by spf13/cobra on 26-Mar-2019 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_dependency_build.md b/docs/helm/helm_dependency_build.md index 1df32d9ab..281b03418 100644 --- a/docs/helm/helm_dependency_build.md +++ b/docs/helm/helm_dependency_build.md @@ -1,6 +1,6 @@ ## helm dependency build -rebuild the charts/ directory based on the requirements.lock file +Rebuild the charts/ directory based on the requirements.lock file ### Synopsis @@ -14,6 +14,7 @@ If no lock file is found, 'helm dependency build' will mirror the behavior of the 'helm dependency update' command. This means it will update the on-disk dependencies to mirror the requirements.yaml file and generate a lock file. + ``` helm dependency build [flags] CHART ``` @@ -22,24 +23,24 @@ helm dependency build [flags] CHART ``` -h, --help help for build - --keyring string keyring containing public keys (default "~/.gnupg/pubring.gpg") - --verify verify the packages against signatures + --keyring string Keyring containing public keys (default "~/.gnupg/pubring.gpg") + --verify Verify the packages against signatures ``` ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### 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 1-Aug-2018 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_dependency_list.md b/docs/helm/helm_dependency_list.md index da754c5d1..449aad202 100644 --- a/docs/helm/helm_dependency_list.md +++ b/docs/helm/helm_dependency_list.md @@ -1,6 +1,6 @@ ## helm dependency list -list the dependencies for the given chart +List the dependencies for the given chart ### Synopsis @@ -27,17 +27,17 @@ helm dependency list [flags] CHART ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### 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 1-Aug-2018 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_dependency_update.md b/docs/helm/helm_dependency_update.md index 88bf3fafd..2dc5a03e1 100644 --- a/docs/helm/helm_dependency_update.md +++ b/docs/helm/helm_dependency_update.md @@ -1,6 +1,6 @@ ## helm dependency update -update charts/ based on the contents of requirements.yaml +Update charts/ based on the contents of requirements.yaml ### Synopsis @@ -27,25 +27,25 @@ helm dependency update [flags] CHART ``` -h, --help help for update - --keyring string keyring containing public keys (default "~/.gnupg/pubring.gpg") - --skip-refresh do not refresh the local repository cache - --verify verify the packages against signatures + --keyring string Keyring containing public keys (default "~/.gnupg/pubring.gpg") + --skip-refresh Do not refresh the local repository cache + --verify Verify the packages against signatures ``` ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### 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 1-Aug-2018 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_fetch.md b/docs/helm/helm_fetch.md index 81c0a9596..056068786 100644 --- a/docs/helm/helm_fetch.md +++ b/docs/helm/helm_fetch.md @@ -1,6 +1,6 @@ ## helm fetch -download a chart from a repository and (optionally) unpack it in local directory +Download a chart from a repository and (optionally) unpack it in local directory ### Synopsis @@ -26,37 +26,37 @@ helm fetch [flags] [chart URL | repo/chartname] [...] ### Options ``` - --ca-file string verify certificates of HTTPS-enabled servers using this CA bundle - --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 ".") - --devel use development versions, too. Equivalent to version '>0.0.0-0'. If --version is set, this is ignored. + --ca-file string Verify certificates of HTTPS-enabled servers using this CA bundle + --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 ".") + --devel Use development versions, too. Equivalent to version '>0.0.0-0'. If --version is set, this is ignored. -h, --help help for fetch - --key-file string identify HTTPS client using this SSL key file - --keyring string keyring containing public keys (default "~/.gnupg/pubring.gpg") - --password string chart repository password - --prov fetch the provenance file, but don't perform verification - --repo string chart repository url where to locate the requested chart - --untar if set to true, will untar the chart after downloading it - --untardir string if untar is specified, this flag specifies the name of the directory into which the chart is expanded (default ".") - --username string chart repository username - --verify verify the package against its signature - --version string specific version of a chart. Without this, the latest version is fetched + --key-file string Identify HTTPS client using this SSL key file + --keyring string Keyring containing public keys (default "~/.gnupg/pubring.gpg") + --password string Chart repository password + --prov Fetch the provenance file, but don't perform verification + --repo string Chart repository url where to locate the requested chart + --untar If set to true, will untar the chart after downloading it + --untardir string If untar is specified, this flag specifies the name of the directory into which the chart is expanded (default ".") + --username string Chart repository username + --verify Verify the package against its signature + --version string Specific version of a chart. Without this, the latest version is fetched ``` ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### SEE ALSO * [helm](helm.md) - The Helm package manager for Kubernetes. -###### Auto generated by spf13/cobra on 1-Aug-2018 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_get.md b/docs/helm/helm_get.md index 3ce0ff191..3d2dca608 100644 --- a/docs/helm/helm_get.md +++ b/docs/helm/helm_get.md @@ -1,6 +1,6 @@ ## helm get -download a named release +Download a named release ### Synopsis @@ -25,34 +25,34 @@ helm get [flags] RELEASE_NAME ``` -h, --help help for get - --revision int32 get the named release with revision - --template string go template for formatting the output, eg: {{.Release.Name}} - --tls enable TLS for request - --tls-ca-cert string path to TLS CA certificate file (default "$HELM_HOME/ca.pem") - --tls-cert string path to TLS certificate file (default "$HELM_HOME/cert.pem") - --tls-hostname string the server name used to verify the hostname on the returned certificates from the server - --tls-key string path to TLS key file (default "$HELM_HOME/key.pem") - --tls-verify enable TLS for request and verify remote + --revision int32 Get the named release with revision + --template string Go template for formatting the output, eg: {{.Release.Name}} + --tls Enable TLS for request + --tls-ca-cert string Path to TLS CA certificate file (default "$HELM_HOME/ca.pem") + --tls-cert string Path to TLS certificate file (default "$HELM_HOME/cert.pem") + --tls-hostname string The server name used to verify the hostname on the returned certificates from the server + --tls-key string Path to TLS key file (default "$HELM_HOME/key.pem") + --tls-verify Enable TLS for request and verify remote ``` ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### SEE ALSO * [helm](helm.md) - The Helm package manager for Kubernetes. -* [helm get hooks](helm_get_hooks.md) - download all hooks for a named release -* [helm get manifest](helm_get_manifest.md) - download the manifest for a named release -* [helm get notes](helm_get_notes.md) - displays the notes of the named release -* [helm get values](helm_get_values.md) - download the values file for a named release +* [helm get hooks](helm_get_hooks.md) - Download all hooks for a named release +* [helm get manifest](helm_get_manifest.md) - Download the manifest for a named release +* [helm get notes](helm_get_notes.md) - Displays the notes of the named release +* [helm get values](helm_get_values.md) - Download the values file for a named release -###### Auto generated by spf13/cobra on 25-Mar-2019 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_get_hooks.md b/docs/helm/helm_get_hooks.md index d7097fd59..716e0f692 100644 --- a/docs/helm/helm_get_hooks.md +++ b/docs/helm/helm_get_hooks.md @@ -1,6 +1,6 @@ ## helm get hooks -download all hooks for a named release +Download all hooks for a named release ### Synopsis @@ -18,29 +18,29 @@ helm get hooks [flags] RELEASE_NAME ``` -h, --help help for hooks - --revision int32 get the named release with revision - --tls enable TLS for request - --tls-ca-cert string path to TLS CA certificate file (default "$HELM_HOME/ca.pem") - --tls-cert string path to TLS certificate file (default "$HELM_HOME/cert.pem") - --tls-hostname string the server name used to verify the hostname on the returned certificates from the server - --tls-key string path to TLS key file (default "$HELM_HOME/key.pem") - --tls-verify enable TLS for request and verify remote + --revision int32 Get the named release with revision + --tls Enable TLS for request + --tls-ca-cert string Path to TLS CA certificate file (default "$HELM_HOME/ca.pem") + --tls-cert string Path to TLS certificate file (default "$HELM_HOME/cert.pem") + --tls-hostname string The server name used to verify the hostname on the returned certificates from the server + --tls-key string Path to TLS key file (default "$HELM_HOME/key.pem") + --tls-verify Enable TLS for request and verify remote ``` ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### 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 10-Aug-2018 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_get_manifest.md b/docs/helm/helm_get_manifest.md index 60bfeac0b..ec3987108 100644 --- a/docs/helm/helm_get_manifest.md +++ b/docs/helm/helm_get_manifest.md @@ -1,6 +1,6 @@ ## helm get manifest -download the manifest for a named release +Download the manifest for a named release ### Synopsis @@ -20,29 +20,29 @@ helm get manifest [flags] RELEASE_NAME ``` -h, --help help for manifest - --revision int32 get the named release with revision - --tls enable TLS for request - --tls-ca-cert string path to TLS CA certificate file (default "$HELM_HOME/ca.pem") - --tls-cert string path to TLS certificate file (default "$HELM_HOME/cert.pem") - --tls-hostname string the server name used to verify the hostname on the returned certificates from the server - --tls-key string path to TLS key file (default "$HELM_HOME/key.pem") - --tls-verify enable TLS for request and verify remote + --revision int32 Get the named release with revision + --tls Enable TLS for request + --tls-ca-cert string Path to TLS CA certificate file (default "$HELM_HOME/ca.pem") + --tls-cert string Path to TLS certificate file (default "$HELM_HOME/cert.pem") + --tls-hostname string The server name used to verify the hostname on the returned certificates from the server + --tls-key string Path to TLS key file (default "$HELM_HOME/key.pem") + --tls-verify Enable TLS for request and verify remote ``` ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### 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 10-Aug-2018 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_get_notes.md b/docs/helm/helm_get_notes.md index 076aaaa59..b7859533f 100644 --- a/docs/helm/helm_get_notes.md +++ b/docs/helm/helm_get_notes.md @@ -1,6 +1,6 @@ ## helm get notes -displays the notes of the named release +Displays the notes of the named release ### Synopsis @@ -16,29 +16,29 @@ helm get notes [flags] RELEASE_NAME ``` -h, --help help for notes - --revision int32 get the notes of the named release with revision - --tls enable TLS for request - --tls-ca-cert string path to TLS CA certificate file (default "$HELM_HOME/ca.pem") - --tls-cert string path to TLS certificate file (default "$HELM_HOME/cert.pem") - --tls-hostname string the server name used to verify the hostname on the returned certificates from the server - --tls-key string path to TLS key file (default "$HELM_HOME/key.pem") - --tls-verify enable TLS for request and verify remote + --revision int32 Get the notes of the named release with revision + --tls Enable TLS for request + --tls-ca-cert string Path to TLS CA certificate file (default "$HELM_HOME/ca.pem") + --tls-cert string Path to TLS certificate file (default "$HELM_HOME/cert.pem") + --tls-hostname string The server name used to verify the hostname on the returned certificates from the server + --tls-key string Path to TLS key file (default "$HELM_HOME/key.pem") + --tls-verify Enable TLS for request and verify remote ``` ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### 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 1-Sep-2018 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_get_values.md b/docs/helm/helm_get_values.md index 87d21b954..ab4a4494e 100644 --- a/docs/helm/helm_get_values.md +++ b/docs/helm/helm_get_values.md @@ -1,6 +1,6 @@ ## helm get values -download the values file for a named release +Download the values file for a named release ### Synopsis @@ -15,32 +15,32 @@ helm get values [flags] RELEASE_NAME ### Options ``` - -a, --all dump all (computed) values + -a, --all Dump all (computed) values -h, --help help for values - --output string output the specified format (json or yaml) (default "yaml") - --revision int32 get the named release with revision - --tls enable TLS for request - --tls-ca-cert string path to TLS CA certificate file (default "$HELM_HOME/ca.pem") - --tls-cert string path to TLS certificate file (default "$HELM_HOME/cert.pem") - --tls-hostname string the server name used to verify the hostname on the returned certificates from the server - --tls-key string path to TLS key file (default "$HELM_HOME/key.pem") - --tls-verify enable TLS for request and verify remote + --output string Output the specified format (json or yaml) (default "yaml") + --revision int32 Get the named release with revision + --tls Enable TLS for request + --tls-ca-cert string Path to TLS CA certificate file (default "$HELM_HOME/ca.pem") + --tls-cert string Path to TLS certificate file (default "$HELM_HOME/cert.pem") + --tls-hostname string The server name used to verify the hostname on the returned certificates from the server + --tls-key string Path to TLS key file (default "$HELM_HOME/key.pem") + --tls-verify Enable TLS for request and verify remote ``` ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### 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 7-Sep-2018 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_history.md b/docs/helm/helm_history.md index 7f0a68928..2c93adebc 100755 --- a/docs/helm/helm_history.md +++ b/docs/helm/helm_history.md @@ -1,6 +1,6 @@ ## helm history -fetch release history +Fetch release history ### Synopsis @@ -27,32 +27,32 @@ helm history [flags] RELEASE_NAME ### Options ``` - --col-width uint specifies the max column width of output (default 60) + --col-width uint Specifies the max column width of output (default 60) -h, --help help for history - --max int32 maximum number of revision to include in history (default 256) - -o, --output string prints the output in the specified format (json|table|yaml) (default "table") - --tls enable TLS for request - --tls-ca-cert string path to TLS CA certificate file (default "$HELM_HOME/ca.pem") - --tls-cert string path to TLS certificate file (default "$HELM_HOME/cert.pem") - --tls-hostname string the server name used to verify the hostname on the returned certificates from the server - --tls-key string path to TLS key file (default "$HELM_HOME/key.pem") - --tls-verify enable TLS for request and verify remote + --max int32 Maximum number of revisions to include in history (default 256) + -o, --output string Prints the output in the specified format (json|table|yaml) (default "table") + --tls Enable TLS for request + --tls-ca-cert string Path to TLS CA certificate file (default "$HELM_HOME/ca.pem") + --tls-cert string Path to TLS certificate file (default "$HELM_HOME/cert.pem") + --tls-hostname string The server name used to verify the hostname on the returned certificates from the server + --tls-key string Path to TLS key file (default "$HELM_HOME/key.pem") + --tls-verify Enable TLS for request and verify remote ``` ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### SEE ALSO * [helm](helm.md) - The Helm package manager for Kubernetes. -###### Auto generated by spf13/cobra on 10-Aug-2018 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_home.md b/docs/helm/helm_home.md index 192302424..050251cc1 100644 --- a/docs/helm/helm_home.md +++ b/docs/helm/helm_home.md @@ -1,6 +1,6 @@ ## helm home -displays the location of HELM_HOME +Displays the location of HELM_HOME ### Synopsis @@ -22,17 +22,17 @@ helm home [flags] ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### SEE ALSO * [helm](helm.md) - The Helm package manager for Kubernetes. -###### Auto generated by spf13/cobra on 1-Aug-2018 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_init.md b/docs/helm/helm_init.md index 72fd9e86b..64f8bcf62 100644 --- a/docs/helm/helm_init.md +++ b/docs/helm/helm_init.md @@ -1,6 +1,6 @@ ## helm init -initialize Helm on both client and server +Initialize Helm on both client and server ### Synopsis @@ -32,47 +32,47 @@ helm init [flags] ### Options ``` - --automount-service-account-token auto-mount the given service account to tiller (default true) - --canary-image use the canary Tiller image - -c, --client-only if set does not install Tiller - --dry-run do not install local or remote - --force-upgrade force upgrade of Tiller to the current helm version + --automount-service-account-token Auto-mount the given service account to tiller (default true) + --canary-image Use the canary Tiller image + -c, --client-only If set does not install Tiller + --dry-run Do not install local or remote + --force-upgrade Force upgrade of Tiller to the current helm version -h, --help help for init - --history-max int limit the maximum number of revisions saved per release. Use 0 for no limit. + --history-max int Limit the maximum number of revisions saved per release. Use 0 for no limit. --local-repo-url string URL for local repository (default "http://127.0.0.1:8879/charts") - --net-host install Tiller with net=host - --node-selectors string labels to specify the node on which Tiller is installed (app=tiller,helm=rocks) - -o, --output OutputFormat skip installation and output Tiller's manifest in specified format (json or yaml) - --override stringArray override values for the Tiller Deployment manifest (can specify multiple or separate values with commas: key1=val1,key2=val2) - --replicas int amount of tiller instances to run on the cluster (default 1) - --service-account string name of service account - --skip-refresh do not refresh (download) the local repository cache + --net-host Install Tiller with net=host + --node-selectors string Labels to specify the node on which Tiller is installed (app=tiller,helm=rocks) + -o, --output OutputFormat Skip installation and output Tiller's manifest in specified format (json or yaml) + --override stringArray Override values for the Tiller Deployment manifest (can specify multiple or separate values with commas: key1=val1,key2=val2) + --replicas int Amount of tiller instances to run on the cluster (default 1) + --service-account string Name of service account + --skip-refresh Do not refresh (download) the local repository cache --stable-repo-url string URL for stable repository (default "https://kubernetes-charts.storage.googleapis.com") - -i, --tiller-image string override Tiller image - --tiller-tls install Tiller with TLS enabled - --tiller-tls-cert string path to TLS certificate file to install with Tiller - --tiller-tls-hostname string the server name used to verify the hostname on the returned certificates from Tiller - --tiller-tls-key string path to TLS key file to install with Tiller - --tiller-tls-verify install Tiller with TLS enabled and to verify remote certificates - --tls-ca-cert string path to CA root certificate - --upgrade upgrade if Tiller is already installed - --wait block until Tiller is running and ready to receive requests + -i, --tiller-image string Override Tiller image + --tiller-tls Install Tiller with TLS enabled + --tiller-tls-cert string Path to TLS certificate file to install with Tiller + --tiller-tls-hostname string The server name used to verify the hostname on the returned certificates from Tiller + --tiller-tls-key string Path to TLS key file to install with Tiller + --tiller-tls-verify Install Tiller with TLS enabled and to verify remote certificates + --tls-ca-cert string Path to CA root certificate + --upgrade Upgrade if Tiller is already installed + --wait Block until Tiller is running and ready to receive requests ``` ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### SEE ALSO * [helm](helm.md) - The Helm package manager for Kubernetes. -###### Auto generated by spf13/cobra on 4-Sep-2018 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_inspect.md b/docs/helm/helm_inspect.md index 8bdf1092d..d5845c78c 100644 --- a/docs/helm/helm_inspect.md +++ b/docs/helm/helm_inspect.md @@ -1,6 +1,6 @@ ## helm inspect -inspect a chart +Inspect a chart ### Synopsis @@ -18,29 +18,29 @@ helm inspect [CHART] [flags] ### Options ``` - --ca-file string chart repository url where to locate the requested chart - --cert-file string verify certificates of HTTPS-enabled servers using this CA bundle - --devel use development versions, too. Equivalent to version '>0.0.0-0'. If --version is set, this is ignored. + --ca-file string Chart repository url where to locate the requested chart + --cert-file string Verify certificates of HTTPS-enabled servers using this CA bundle + --devel Use development versions, too. Equivalent to version '>0.0.0-0'. If --version is set, this is ignored. -h, --help help for inspect - --key-file string identify HTTPS client using this SSL key file - --keyring string path to the keyring containing public verification keys (default "~/.gnupg/pubring.gpg") - --password string chart repository password where to locate the requested chart - --repo string chart repository url where to locate the requested chart - --username string chart repository username where to locate the requested chart - --verify verify the provenance data for this chart - --version string version of the chart. By default, the newest chart is shown + --key-file string Identify HTTPS client using this SSL key file + --keyring string Path to the keyring containing public verification keys (default "~/.gnupg/pubring.gpg") + --password string Chart repository password where to locate the requested chart + --repo string Chart repository url where to locate the requested chart + --username string Chart repository username where to locate the requested chart + --verify Verify the provenance data for this chart + --version string Version of the chart. By default, the newest chart is shown ``` ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### SEE ALSO @@ -50,4 +50,4 @@ helm inspect [CHART] [flags] * [helm inspect readme](helm_inspect_readme.md) - shows inspect readme * [helm inspect values](helm_inspect_values.md) - shows inspect values -###### Auto generated by spf13/cobra on 8-Jan-2019 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_inspect_chart.md b/docs/helm/helm_inspect_chart.md index 1cd13fc72..447de556b 100644 --- a/docs/helm/helm_inspect_chart.md +++ b/docs/helm/helm_inspect_chart.md @@ -16,33 +16,33 @@ helm inspect chart [CHART] [flags] ### Options ``` - --ca-file string chart repository url where to locate the requested chart - --cert-file string verify certificates of HTTPS-enabled servers using this CA bundle - --devel use development versions, too. Equivalent to version '>0.0.0-0'. If --version is set, this is ignored. + --ca-file string Chart repository url where to locate the requested chart + --cert-file string Verify certificates of HTTPS-enabled servers using this CA bundle + --devel Use development versions, too. Equivalent to version '>0.0.0-0'. If --version is set, this is ignored. -h, --help help for chart - --key-file string identify HTTPS client using this SSL key file - --keyring string path to the keyring containing public verification keys (default "~/.gnupg/pubring.gpg") - --password string chart repository password where to locate the requested chart - --repo string chart repository url where to locate the requested chart - --username string chart repository username where to locate the requested chart - --verify verify the provenance data for this chart - --version string version of the chart. By default, the newest chart is shown + --key-file string Identify HTTPS client using this SSL key file + --keyring string Path to the keyring containing public verification keys (default "~/.gnupg/pubring.gpg") + --password string Chart repository password where to locate the requested chart + --repo string Chart repository url where to locate the requested chart + --username string Chart repository username where to locate the requested chart + --verify Verify the provenance data for this chart + --version string Version of the chart. By default, the newest chart is shown ``` ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### SEE ALSO -* [helm inspect](helm_inspect.md) - inspect a chart +* [helm inspect](helm_inspect.md) - Inspect a chart -###### Auto generated by spf13/cobra on 8-Jan-2019 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_inspect_readme.md b/docs/helm/helm_inspect_readme.md index 9570d19d6..5cfe73de2 100644 --- a/docs/helm/helm_inspect_readme.md +++ b/docs/helm/helm_inspect_readme.md @@ -16,31 +16,31 @@ helm inspect readme [CHART] [flags] ### Options ``` - --ca-file string chart repository url where to locate the requested chart - --cert-file string verify certificates of HTTPS-enabled servers using this CA bundle - --devel use development versions, too. Equivalent to version '>0.0.0-0'. If --version is set, this is ignored. + --ca-file string Chart repository url where to locate the requested chart + --cert-file string Verify certificates of HTTPS-enabled servers using this CA bundle + --devel Use development versions, too. Equivalent to version '>0.0.0-0'. If --version is set, this is ignored. -h, --help help for readme - --key-file string identify HTTPS client using this SSL key file - --keyring string path to the keyring containing public verification keys (default "~/.gnupg/pubring.gpg") - --repo string chart repository url where to locate the requested chart - --verify verify the provenance data for this chart - --version string version of the chart. By default, the newest chart is shown + --key-file string Identify HTTPS client using this SSL key file + --keyring string Path to the keyring containing public verification keys (default "~/.gnupg/pubring.gpg") + --repo string Chart repository url where to locate the requested chart + --verify Verify the provenance data for this chart + --version string Version of the chart. By default, the newest chart is shown ``` ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### SEE ALSO -* [helm inspect](helm_inspect.md) - inspect a chart +* [helm inspect](helm_inspect.md) - Inspect a chart -###### Auto generated by spf13/cobra on 8-Jan-2019 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_inspect_values.md b/docs/helm/helm_inspect_values.md index a634134dd..34d76a7ba 100644 --- a/docs/helm/helm_inspect_values.md +++ b/docs/helm/helm_inspect_values.md @@ -16,33 +16,33 @@ helm inspect values [CHART] [flags] ### Options ``` - --ca-file string chart repository url where to locate the requested chart - --cert-file string verify certificates of HTTPS-enabled servers using this CA bundle - --devel use development versions, too. Equivalent to version '>0.0.0-0'. If --version is set, this is ignored. + --ca-file string Chart repository url where to locate the requested chart + --cert-file string Verify certificates of HTTPS-enabled servers using this CA bundle + --devel Use development versions, too. Equivalent to version '>0.0.0-0'. If --version is set, this is ignored. -h, --help help for values - --key-file string identify HTTPS client using this SSL key file - --keyring string path to the keyring containing public verification keys (default "~/.gnupg/pubring.gpg") - --password string chart repository password where to locate the requested chart - --repo string chart repository url where to locate the requested chart - --username string chart repository username where to locate the requested chart - --verify verify the provenance data for this chart - --version string version of the chart. By default, the newest chart is shown + --key-file string Identify HTTPS client using this SSL key file + --keyring string Path to the keyring containing public verification keys (default "~/.gnupg/pubring.gpg") + --password string Chart repository password where to locate the requested chart + --repo string Chart repository url where to locate the requested chart + --username string Chart repository username where to locate the requested chart + --verify Verify the provenance data for this chart + --version string Version of the chart. By default, the newest chart is shown ``` ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### SEE ALSO -* [helm inspect](helm_inspect.md) - inspect a chart +* [helm inspect](helm_inspect.md) - Inspect a chart -###### Auto generated by spf13/cobra on 8-Jan-2019 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_install.md b/docs/helm/helm_install.md index 12ae81b78..d988dfcdd 100644 --- a/docs/helm/helm_install.md +++ b/docs/helm/helm_install.md @@ -1,6 +1,6 @@ ## helm install -install a chart archive +Install a chart archive ### Synopsis @@ -78,56 +78,56 @@ helm install [CHART] [flags] ### Options ``` - --atomic if set, installation process purges chart on fail, also sets --wait flag - --ca-file string verify certificates of HTTPS-enabled servers using this CA bundle - --cert-file string identify HTTPS client using this SSL certificate file - --dep-up run helm dependency update before installing the chart - --description string specify a description for the release - --devel use development versions, too. Equivalent to version '>0.0.0-0'. If --version is set, this is ignored. - --dry-run simulate an install + --atomic If set, installation process purges chart on fail, also sets --wait flag + --ca-file string Verify certificates of HTTPS-enabled servers using this CA bundle + --cert-file string Identify HTTPS client using this SSL certificate file + --dep-up Run helm dependency update before installing the chart + --description string Specify a description for the release + --devel Use development versions, too. Equivalent to version '>0.0.0-0'. If --version is set, this is ignored. + --dry-run Simulate an install -h, --help help for install - --key-file string identify HTTPS client using this SSL key file - --keyring string location of public keys used for verification (default "~/.gnupg/pubring.gpg") - -n, --name string release name. If unspecified, it will autogenerate one for you - --name-template string specify template used to name the release - --namespace string namespace to install the release into. Defaults to the current kube config namespace. - --no-crd-hook prevent CRD hooks from running, but run other hooks - --no-hooks prevent hooks from running during install - --password string chart repository password where to locate the requested chart - --render-subchart-notes render subchart notes along with the parent - --replace re-use the given name, even if that name is already used. This is unsafe in production - --repo string chart repository url where to locate the requested chart - --set stringArray set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2) - --set-file stringArray set values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2) - --set-string stringArray set STRING values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2) - --timeout int time in seconds to wait for any individual Kubernetes operation (like Jobs for hooks) (default 300) - --tls enable TLS for request - --tls-ca-cert string path to TLS CA certificate file (default "$HELM_HOME/ca.pem") - --tls-cert string path to TLS certificate file (default "$HELM_HOME/cert.pem") - --tls-hostname string the server name used to verify the hostname on the returned certificates from the server - --tls-key string path to TLS key file (default "$HELM_HOME/key.pem") - --tls-verify enable TLS for request and verify remote - --username string chart repository username where to locate the requested chart - -f, --values valueFiles specify values in a YAML file or a URL(can specify multiple) (default []) - --verify verify the package before installing it - --version string specify the exact chart version to install. If this is not specified, the latest version is installed - --wait 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 + --key-file string Identify HTTPS client using this SSL key file + --keyring string Location of public keys used for verification (default "~/.gnupg/pubring.gpg") + -n, --name string The release name. If unspecified, it will autogenerate one for you + --name-template string Specify template used to name the release + --namespace string Namespace to install the release into. Defaults to the current kube config namespace. + --no-crd-hook Prevent CRD hooks from running, but run other hooks + --no-hooks Prevent hooks from running during install + --password string Chart repository password where to locate the requested chart + --render-subchart-notes Render subchart notes along with the parent + --replace Re-use the given name, even if that name is already used. This is unsafe in production + --repo string Chart repository url where to locate the requested chart + --set stringArray Set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2) + --set-file stringArray Set values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2) + --set-string stringArray Set STRING values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2) + --timeout int Time in seconds to wait for any individual Kubernetes operation (like Jobs for hooks) (default 300) + --tls Enable TLS for request + --tls-ca-cert string Path to TLS CA certificate file (default "$HELM_HOME/ca.pem") + --tls-cert string Path to TLS certificate file (default "$HELM_HOME/cert.pem") + --tls-hostname string The server name used to verify the hostname on the returned certificates from the server + --tls-key string Path to TLS key file (default "$HELM_HOME/key.pem") + --tls-verify Enable TLS for request and verify remote + --username string Chart repository username where to locate the requested chart + -f, --values valueFiles Specify values in a YAML file or a URL(can specify multiple) (default []) + --verify Verify the package before installing it + --version string Specify the exact chart version to install. If this is not specified, the latest version is installed + --wait 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 ``` ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### SEE ALSO * [helm](helm.md) - The Helm package manager for Kubernetes. -###### Auto generated by spf13/cobra on 28-Jan-2019 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_lint.md b/docs/helm/helm_lint.md index bf168184e..e341975b7 100644 --- a/docs/helm/helm_lint.md +++ b/docs/helm/helm_lint.md @@ -1,6 +1,6 @@ ## helm lint -examines a chart for possible issues +Examines a chart for possible issues ### Synopsis @@ -21,28 +21,28 @@ helm lint [flags] PATH ``` -h, --help help for lint - --namespace string namespace to put the release into (default "default") - --set stringArray set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2) - --set-file stringArray set values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2) - --set-string stringArray set STRING values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2) - --strict fail on lint warnings - -f, --values valueFiles specify values in a YAML file (can specify multiple) (default []) + --namespace string Namespace to put the release into (default "default") + --set stringArray Set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2) + --set-file stringArray Set values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2) + --set-string stringArray Set STRING values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2) + --strict Fail on lint warnings + -f, --values valueFiles Specify values in a YAML file (can specify multiple) (default []) ``` ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### SEE ALSO * [helm](helm.md) - The Helm package manager for Kubernetes. -###### Auto generated by spf13/cobra on 1-Aug-2018 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_list.md b/docs/helm/helm_list.md index 5087c8a59..568a3c7be 100755 --- a/docs/helm/helm_list.md +++ b/docs/helm/helm_list.md @@ -1,6 +1,6 @@ ## helm list -list releases +List releases ### Synopsis @@ -38,44 +38,44 @@ helm list [flags] [FILTER] ### Options ``` - -a, --all show all releases, not just the ones marked DEPLOYED - -c, --chart-name sort by chart name - --col-width uint specifies the max column width of output (default 60) - -d, --date sort by release date - --deleted show deleted releases - --deleting show releases that are currently being deleted - --deployed show deployed releases. If no other is specified, this will be automatically enabled - --failed show failed releases + -a, --all Show all releases, not just the ones marked DEPLOYED + -c, --chart-name Sort by chart name + --col-width uint Specifies the max column width of output (default 60) + -d, --date Sort by release date + --deleted Show deleted releases + --deleting Show releases that are currently being deleted + --deployed Show deployed releases. If no other is specified, this will be automatically enabled + --failed Show failed releases -h, --help help for list - -m, --max int maximum number of releases to fetch (default 256) - --namespace string show releases within a specific namespace - -o, --offset string next release name in the list, used to offset from start value - --output string output the specified format (json or yaml) - --pending show pending releases - -r, --reverse reverse the sort order - -q, --short output short (quiet) listing format - --tls enable TLS for request - --tls-ca-cert string path to TLS CA certificate file (default "$HELM_HOME/ca.pem") - --tls-cert string path to TLS certificate file (default "$HELM_HOME/cert.pem") - --tls-hostname string the server name used to verify the hostname on the returned certificates from the server - --tls-key string path to TLS key file (default "$HELM_HOME/key.pem") - --tls-verify enable TLS for request and verify remote + -m, --max int Maximum number of releases to fetch (default 256) + --namespace string Show releases within a specific namespace + -o, --offset string Next release name in the list, used to offset from start value + --output string Output the specified format (json or yaml) + --pending Show pending releases + -r, --reverse Reverse the sort order + -q, --short Output short (quiet) listing format + --tls Enable TLS for request + --tls-ca-cert string Path to TLS CA certificate file (default "$HELM_HOME/ca.pem") + --tls-cert string Path to TLS certificate file (default "$HELM_HOME/cert.pem") + --tls-hostname string The server name used to verify the hostname on the returned certificates from the server + --tls-key string Path to TLS key file (default "$HELM_HOME/key.pem") + --tls-verify Enable TLS for request and verify remote ``` ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### SEE ALSO * [helm](helm.md) - The Helm package manager for Kubernetes. -###### Auto generated by spf13/cobra on 1-Sep-2018 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_package.md b/docs/helm/helm_package.md index b772fa70c..a3db8bec8 100644 --- a/docs/helm/helm_package.md +++ b/docs/helm/helm_package.md @@ -1,6 +1,6 @@ ## helm package -package a chart directory into a chart archive +Package a chart directory into a chart archive ### Synopsis @@ -22,31 +22,31 @@ helm package [flags] [CHART_PATH] [...] ### Options ``` - --app-version string set the appVersion on the chart to this version - -u, --dependency-update update dependencies from "requirements.yaml" to dir "charts/" before packaging - -d, --destination string location to write the chart. (default ".") + --app-version string Set the appVersion on the chart to this version + -u, --dependency-update Update dependencies from "requirements.yaml" to dir "charts/" before packaging + -d, --destination string Location to write the chart. (default ".") -h, --help help for package - --key string name of the key to use when signing. Used if --sign is true - --keyring string location of a public keyring (default "~/.gnupg/pubring.gpg") - --save save packaged chart to local chart repository (default true) - --sign use a PGP private key to sign this package - --version string set the version on the chart to this semver version + --key string Name of the key to use when signing. Used if --sign is true + --keyring string Location of a public keyring (default "~/.gnupg/pubring.gpg") + --save Save packaged chart to local chart repository (default true) + --sign Use a PGP private key to sign this package + --version string Set the version on the chart to this semver version ``` ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### SEE ALSO * [helm](helm.md) - The Helm package manager for Kubernetes. -###### Auto generated by spf13/cobra on 1-Aug-2018 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_plugin.md b/docs/helm/helm_plugin.md index 5aa57b69c..ab66d7a05 100644 --- a/docs/helm/helm_plugin.md +++ b/docs/helm/helm_plugin.md @@ -1,6 +1,6 @@ ## helm plugin -add, list, or remove Helm plugins +Add, list, or remove Helm plugins ### Synopsis @@ -17,21 +17,21 @@ Manage client-side Helm plugins. ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### SEE ALSO * [helm](helm.md) - The Helm package manager for Kubernetes. -* [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 remove](helm_plugin_remove.md) - remove one or more Helm plugins -* [helm plugin update](helm_plugin_update.md) - update 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 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 1-Aug-2018 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_plugin_install.md b/docs/helm/helm_plugin_install.md index f30bfff55..47f4ea4ca 100644 --- a/docs/helm/helm_plugin_install.md +++ b/docs/helm/helm_plugin_install.md @@ -1,6 +1,6 @@ ## helm plugin install -install one or more Helm plugins +Install one or more Helm plugins ### Synopsis @@ -19,23 +19,23 @@ helm plugin install [options] ... [flags] ``` -h, --help help for install - --version string specify a version constraint. If this is not specified, the latest version is installed + --version string Specify a version constraint. If this is not specified, the latest version is installed ``` ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### 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 1-Aug-2018 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_plugin_list.md b/docs/helm/helm_plugin_list.md index 373462e2b..897a6b5d0 100644 --- a/docs/helm/helm_plugin_list.md +++ b/docs/helm/helm_plugin_list.md @@ -1,10 +1,10 @@ ## helm plugin list -list installed Helm plugins +List installed Helm plugins ### Synopsis -list installed Helm plugins +List installed Helm plugins ``` helm plugin list [flags] @@ -19,17 +19,17 @@ helm plugin list [flags] ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### 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 1-Aug-2018 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_plugin_remove.md b/docs/helm/helm_plugin_remove.md index 30f222c9f..e1a017f9a 100644 --- a/docs/helm/helm_plugin_remove.md +++ b/docs/helm/helm_plugin_remove.md @@ -1,10 +1,10 @@ ## helm plugin remove -remove one or more Helm plugins +Remove one or more Helm plugins ### Synopsis -remove one or more Helm plugins +Remove one or more Helm plugins ``` helm plugin remove ... [flags] @@ -19,17 +19,17 @@ helm plugin remove ... [flags] ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### 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 1-Aug-2018 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_plugin_update.md b/docs/helm/helm_plugin_update.md index 65b16cd9d..bedae44a3 100644 --- a/docs/helm/helm_plugin_update.md +++ b/docs/helm/helm_plugin_update.md @@ -1,10 +1,10 @@ ## helm plugin update -update one or more Helm plugins +Update one or more Helm plugins ### Synopsis -update one or more Helm plugins +Update one or more Helm plugins ``` helm plugin update ... [flags] @@ -19,17 +19,17 @@ helm plugin update ... [flags] ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### 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 1-Aug-2018 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_repo.md b/docs/helm/helm_repo.md index 0b73fbcd0..9f9a6a921 100644 --- a/docs/helm/helm_repo.md +++ b/docs/helm/helm_repo.md @@ -1,6 +1,6 @@ ## helm repo -add, list, remove, update, and index chart repositories +Add, list, remove, update, and index chart repositories ### Synopsis @@ -21,22 +21,22 @@ Example usage: ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### SEE ALSO * [helm](helm.md) - The Helm package manager for Kubernetes. -* [helm repo add](helm_repo_add.md) - add a chart repository -* [helm repo index](helm_repo_index.md) - generate an index file given a directory containing packaged charts -* [helm repo list](helm_repo_list.md) - list chart repositories -* [helm repo remove](helm_repo_remove.md) - remove a chart repository -* [helm repo update](helm_repo_update.md) - update information of available charts locally from chart repositories +* [helm repo add](helm_repo_add.md) - Add a chart repository +* [helm repo index](helm_repo_index.md) - Generate an index file given a directory containing packaged charts +* [helm repo list](helm_repo_list.md) - List chart repositories +* [helm repo remove](helm_repo_remove.md) - Remove a chart repository +* [helm repo update](helm_repo_update.md) - Update information of available charts locally from chart repositories -###### Auto generated by spf13/cobra on 1-Aug-2018 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_repo_add.md b/docs/helm/helm_repo_add.md index 29947147d..f985a32c3 100644 --- a/docs/helm/helm_repo_add.md +++ b/docs/helm/helm_repo_add.md @@ -1,10 +1,10 @@ ## helm repo add -add a chart repository +Add a chart repository ### Synopsis -add a chart repository +Add a chart repository ``` helm repo add [flags] [NAME] [URL] @@ -13,29 +13,29 @@ helm repo add [flags] [NAME] [URL] ### Options ``` - --ca-file string verify certificates of HTTPS-enabled servers using this CA bundle - --cert-file string identify HTTPS client using this SSL certificate file + --ca-file string Verify certificates of HTTPS-enabled servers using this CA bundle + --cert-file string Identify HTTPS client using this SSL certificate file -h, --help help for add - --key-file string identify HTTPS client using this SSL key file - --no-update raise error if repo is already registered - --password string chart repository password - --username string chart repository username + --key-file string Identify HTTPS client using this SSL key file + --no-update Raise error if repo is already registered + --password string Chart repository password + --username string Chart repository username ``` ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### 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 1-Aug-2018 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_repo_index.md b/docs/helm/helm_repo_index.md index 4660489f9..e57fd29ff 100644 --- a/docs/helm/helm_repo_index.md +++ b/docs/helm/helm_repo_index.md @@ -1,6 +1,6 @@ ## helm repo index -generate an index file given a directory containing packaged charts +Generate an index file given a directory containing packaged charts ### Synopsis @@ -23,24 +23,24 @@ helm repo index [flags] [DIR] ``` -h, --help help for index - --merge string merge the generated index into the given index - --url string url of chart repository + --merge string Merge the generated index into the given index + --url string URL of the chart repository ``` ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### 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 1-Aug-2018 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_repo_list.md b/docs/helm/helm_repo_list.md index bebaa6333..9a544a6ba 100644 --- a/docs/helm/helm_repo_list.md +++ b/docs/helm/helm_repo_list.md @@ -1,10 +1,10 @@ ## helm repo list -list chart repositories +List chart repositories ### Synopsis -list chart repositories +List chart repositories ``` helm repo list [flags] @@ -19,17 +19,17 @@ helm repo list [flags] ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### 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 1-Aug-2018 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_repo_remove.md b/docs/helm/helm_repo_remove.md index 89f43a130..87b35b5be 100644 --- a/docs/helm/helm_repo_remove.md +++ b/docs/helm/helm_repo_remove.md @@ -1,10 +1,10 @@ ## helm repo remove -remove a chart repository +Remove a chart repository ### Synopsis -remove a chart repository +Remove a chart repository ``` helm repo remove [flags] [NAME] @@ -19,17 +19,17 @@ helm repo remove [flags] [NAME] ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### 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 1-Aug-2018 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_repo_update.md b/docs/helm/helm_repo_update.md index 381c12fb3..e374620ac 100644 --- a/docs/helm/helm_repo_update.md +++ b/docs/helm/helm_repo_update.md @@ -1,6 +1,6 @@ ## helm repo update -update information of available charts locally from chart repositories +Update information of available charts locally from chart repositories ### Synopsis @@ -20,23 +20,23 @@ helm repo update [flags] ``` -h, --help help for update - --strict fail on update warnings + --strict Fail on update warnings ``` ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### 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 15-Nov-2018 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_reset.md b/docs/helm/helm_reset.md index 772ac42c3..929a64088 100644 --- a/docs/helm/helm_reset.md +++ b/docs/helm/helm_reset.md @@ -1,6 +1,6 @@ ## helm reset -uninstalls Tiller from a cluster +Uninstalls Tiller from a cluster ### Synopsis @@ -17,31 +17,31 @@ helm reset [flags] ### Options ``` - -f, --force forces Tiller uninstall even if there are releases installed, or if Tiller is not in ready state. Releases are not deleted.) + -f, --force Forces Tiller uninstall even if there are releases installed, or if Tiller is not in ready state. Releases are not deleted.) -h, --help help for reset - --remove-helm-home if set deletes $HELM_HOME - --tls enable TLS for request - --tls-ca-cert string path to TLS CA certificate file (default "$HELM_HOME/ca.pem") - --tls-cert string path to TLS certificate file (default "$HELM_HOME/cert.pem") - --tls-hostname string the server name used to verify the hostname on the returned certificates from the server - --tls-key string path to TLS key file (default "$HELM_HOME/key.pem") - --tls-verify enable TLS for request and verify remote + --remove-helm-home If set, deletes $HELM_HOME + --tls Enable TLS for request + --tls-ca-cert string Path to TLS CA certificate file (default "$HELM_HOME/ca.pem") + --tls-cert string Path to TLS certificate file (default "$HELM_HOME/cert.pem") + --tls-hostname string The server name used to verify the hostname on the returned certificates from the server + --tls-key string Path to TLS key file (default "$HELM_HOME/key.pem") + --tls-verify Enable TLS for request and verify remote ``` ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### SEE ALSO * [helm](helm.md) - The Helm package manager for Kubernetes. -###### Auto generated by spf13/cobra on 10-Aug-2018 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_rollback.md b/docs/helm/helm_rollback.md index 87c68f6c8..e50960504 100644 --- a/docs/helm/helm_rollback.md +++ b/docs/helm/helm_rollback.md @@ -1,6 +1,6 @@ ## helm rollback -roll back a release to a previous revision +Rollback a release to a previous revision ### Synopsis @@ -20,37 +20,37 @@ helm rollback [flags] [RELEASE] [REVISION] ### Options ``` - --cleanup-on-fail allow deletion of new resources created in this rollback when rollback failed - --description string specify a description for the release - --dry-run simulate a rollback - --force force resource update through delete/recreate if needed + --cleanup-on-fail Allow deletion of new resources created in this rollback when rollback failed + --description string Specify a description for the release + --dry-run Simulate a rollback + --force Force resource update through delete/recreate if needed -h, --help help for rollback - --no-hooks prevent hooks from running during rollback - --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) - --tls enable TLS for request - --tls-ca-cert string path to TLS CA certificate file (default "$HELM_HOME/ca.pem") - --tls-cert string path to TLS certificate file (default "$HELM_HOME/cert.pem") - --tls-hostname string the server name used to verify the hostname on the returned certificates from the server - --tls-key string path to TLS key file (default "$HELM_HOME/key.pem") - --tls-verify enable TLS for request and verify remote - --wait 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 + --no-hooks Prevent hooks from running during rollback + --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) + --tls Enable TLS for request + --tls-ca-cert string Path to TLS CA certificate file (default "$HELM_HOME/ca.pem") + --tls-cert string Path to TLS certificate file (default "$HELM_HOME/cert.pem") + --tls-hostname string The server name used to verify the hostname on the returned certificates from the server + --tls-key string Path to TLS key file (default "$HELM_HOME/key.pem") + --tls-verify Enable TLS for request and verify remote + --wait 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 ``` ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### SEE ALSO * [helm](helm.md) - The Helm package manager for Kubernetes. -###### Auto generated by spf13/cobra on 5-Feb-2019 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_search.md b/docs/helm/helm_search.md index c45a397e3..b1a89c4f9 100644 --- a/docs/helm/helm_search.md +++ b/docs/helm/helm_search.md @@ -1,6 +1,6 @@ ## helm search -search for a keyword in charts +Search for a keyword in charts ### Synopsis @@ -18,27 +18,27 @@ helm search [keyword] [flags] ### Options ``` - --col-width uint specifies the max column width of output (default 60) + --col-width uint Specifies the max column width of output (default 60) -h, --help help for search - -r, --regexp use regular expressions for searching - -v, --version string search using semantic versioning constraints - -l, --versions show the long listing, with each version of each chart on its own line + -r, --regexp Use regular expressions for searching + -v, --version string Search using semantic versioning constraints + -l, --versions Show the long listing, with each version of each chart on its own line ``` ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### SEE ALSO * [helm](helm.md) - The Helm package manager for Kubernetes. -###### Auto generated by spf13/cobra on 1-Aug-2018 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_serve.md b/docs/helm/helm_serve.md index 62a68595a..f9b24e7af 100644 --- a/docs/helm/helm_serve.md +++ b/docs/helm/helm_serve.md @@ -1,6 +1,6 @@ ## helm serve -start a local http web server +Start a local http web server ### Synopsis @@ -26,26 +26,26 @@ helm serve [flags] ### Options ``` - --address string address to listen on (default "127.0.0.1:8879") + --address string Address to listen on (default "127.0.0.1:8879") -h, --help help for serve - --repo-path string local directory path from which to serve charts - --url string external URL of chart repository + --repo-path string Local directory path from which to serve charts + --url string External URL of chart repository ``` ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### SEE ALSO * [helm](helm.md) - The Helm package manager for Kubernetes. -###### Auto generated by spf13/cobra on 1-Aug-2018 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_status.md b/docs/helm/helm_status.md index 9dca005fd..38e774b8f 100644 --- a/docs/helm/helm_status.md +++ b/docs/helm/helm_status.md @@ -1,6 +1,6 @@ ## helm status -displays the status of the named release +Displays the status of the named release ### Synopsis @@ -23,30 +23,30 @@ helm status [flags] RELEASE_NAME ``` -h, --help help for status - -o, --output string output the status in the specified format (json or yaml) - --revision int32 if set, display the status of the named release with revision - --tls enable TLS for request - --tls-ca-cert string path to TLS CA certificate file (default "$HELM_HOME/ca.pem") - --tls-cert string path to TLS certificate file (default "$HELM_HOME/cert.pem") - --tls-hostname string the server name used to verify the hostname on the returned certificates from the server - --tls-key string path to TLS key file (default "$HELM_HOME/key.pem") - --tls-verify enable TLS for request and verify remote + -o, --output string Output the status in the specified format (json or yaml) + --revision int32 If set, display the status of the named release with revision + --tls Enable TLS for request + --tls-ca-cert string Path to TLS CA certificate file (default "$HELM_HOME/ca.pem") + --tls-cert string Path to TLS certificate file (default "$HELM_HOME/cert.pem") + --tls-hostname string The server name used to verify the hostname on the returned certificates from the server + --tls-key string Path to TLS key file (default "$HELM_HOME/key.pem") + --tls-verify Enable TLS for request and verify remote ``` ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### SEE ALSO * [helm](helm.md) - The Helm package manager for Kubernetes. -###### Auto generated by spf13/cobra on 10-Aug-2018 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_template.md b/docs/helm/helm_template.md index 805556096..ffc0ecc83 100644 --- a/docs/helm/helm_template.md +++ b/docs/helm/helm_template.md @@ -1,6 +1,6 @@ ## helm template -locally render templates +Locally render templates ### Synopsis @@ -24,35 +24,35 @@ helm template [flags] CHART ### Options ``` - -x, --execute stringArray only execute the given templates + -x, --execute stringArray Only execute the given templates -h, --help help for template - --is-upgrade set .Release.IsUpgrade instead of .Release.IsInstall - --kube-version string kubernetes version used as Capabilities.KubeVersion.Major/Minor (default "1.9") - -n, --name string release name (default "release-name") - --name-template string specify template used to name the release - --namespace string namespace to install the release into - --notes show the computed NOTES.txt file as well - --output-dir string writes the executed templates to files in output-dir instead of stdout - --set stringArray set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2) - --set-file stringArray set values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2) - --set-string stringArray set STRING values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2) - -f, --values valueFiles specify values in a YAML file (can specify multiple) (default []) + --is-upgrade Set .Release.IsUpgrade instead of .Release.IsInstall + --kube-version string Kubernetes version used as Capabilities.KubeVersion.Major/Minor (default "1.9") + -n, --name string Release name (default "release-name") + --name-template string Specify template used to name the release + --namespace string Namespace to install the release into + --notes Show the computed NOTES.txt file as well + --output-dir string Writes the executed templates to files in output-dir instead of stdout + --set stringArray Set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2) + --set-file stringArray Set values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2) + --set-string stringArray Set STRING values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2) + -f, --values valueFiles Specify values in a YAML file (can specify multiple) (default []) ``` ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### SEE ALSO * [helm](helm.md) - The Helm package manager for Kubernetes. -###### Auto generated by spf13/cobra on 1-Aug-2018 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_test.md b/docs/helm/helm_test.md index e8ddfbc9b..3e1b53120 100644 --- a/docs/helm/helm_test.md +++ b/docs/helm/helm_test.md @@ -1,6 +1,6 @@ ## helm test -test a release +Test a release ### Synopsis @@ -18,32 +18,32 @@ helm test [RELEASE] [flags] ### Options ``` - --cleanup delete test pods upon completion + --cleanup Delete test pods upon completion -h, --help help for test - --parallel run test pods in parallel - --timeout int time in seconds to wait for any individual Kubernetes operation (like Jobs for hooks) (default 300) - --tls enable TLS for request - --tls-ca-cert string path to TLS CA certificate file (default "$HELM_HOME/ca.pem") - --tls-cert string path to TLS certificate file (default "$HELM_HOME/cert.pem") - --tls-hostname string the server name used to verify the hostname on the returned certificates from the server - --tls-key string path to TLS key file (default "$HELM_HOME/key.pem") - --tls-verify enable TLS for request and verify remote + --parallel Run test pods in parallel + --timeout int Time in seconds to wait for any individual Kubernetes operation (like Jobs for hooks) (default 300) + --tls Enable TLS for request + --tls-ca-cert string Path to TLS CA certificate file (default "$HELM_HOME/ca.pem") + --tls-cert string Path to TLS certificate file (default "$HELM_HOME/cert.pem") + --tls-hostname string The server name used to verify the hostname on the returned certificates from the server + --tls-key string Path to TLS key file (default "$HELM_HOME/key.pem") + --tls-verify Enable TLS for request and verify remote ``` ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### SEE ALSO * [helm](helm.md) - The Helm package manager for Kubernetes. -###### Auto generated by spf13/cobra on 9-Nov-2018 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_upgrade.md b/docs/helm/helm_upgrade.md index d54b7c3a2..0aa52565b 100644 --- a/docs/helm/helm_upgrade.md +++ b/docs/helm/helm_upgrade.md @@ -1,6 +1,6 @@ ## helm upgrade -upgrade a release +Upgrade a release ### Synopsis @@ -65,57 +65,57 @@ helm upgrade [RELEASE] [CHART] [flags] ### Options ``` - --atomic if set, upgrade process rolls back changes made in case of failed upgrade, also sets --wait flag - --ca-file string verify certificates of HTTPS-enabled servers using this CA bundle - --cert-file string identify HTTPS client using this SSL certificate file - --cleanup-on-fail allow deletion of new resources created in this upgrade when upgrade failed - --description string specify the description to use for the upgrade, rather than the default - --devel use development versions, too. Equivalent to version '>0.0.0-0'. If --version is set, this is ignored. - --dry-run simulate an upgrade - --force force resource update through delete/recreate if needed + --atomic If set, upgrade process rolls back changes made in case of failed upgrade, also sets --wait flag + --ca-file string Verify certificates of HTTPS-enabled servers using this CA bundle + --cert-file string Identify HTTPS client using this SSL certificate file + --cleanup-on-fail Allow deletion of new resources created in this upgrade when upgrade failed + --description string Specify the description to use for the upgrade, rather than the default + --devel Use development versions, too. Equivalent to version '>0.0.0-0'. If --version is set, this is ignored. + --dry-run Simulate an upgrade + --force Force resource update through delete/recreate if needed -h, --help help for upgrade - -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 - --keyring string path to the keyring that contains public signing keys (default "~/.gnupg/pubring.gpg") - --namespace string namespace to install the release into (only used if --install is set). Defaults to the current kube config namespace - --no-hooks disable pre/post upgrade hooks - --password string chart repository password where to locate the requested chart - --recreate-pods performs pods restart for the resource if applicable - --render-subchart-notes render subchart notes along with parent - --repo string chart repository url where to locate the requested chart - --reset-values when upgrading, reset the values to the ones built into the chart - --reuse-values when upgrading, reuse the last release's values and merge in any overrides from the command line via --set and -f. If '--reset-values' is specified, this is ignored. - --set stringArray set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2) - --set-file stringArray set values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2) - --set-string stringArray set STRING values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2) - --timeout int time in seconds to wait for any individual Kubernetes operation (like Jobs for hooks) (default 300) - --tls enable TLS for request - --tls-ca-cert string path to TLS CA certificate file (default "$HELM_HOME/ca.pem") - --tls-cert string path to TLS certificate file (default "$HELM_HOME/cert.pem") - --tls-hostname string the server name used to verify the hostname on the returned certificates from the server - --tls-key string path to TLS key file (default "$HELM_HOME/key.pem") - --tls-verify enable TLS for request and verify remote - --username string chart repository username where to locate the requested chart - -f, --values valueFiles specify values in a YAML file or a URL(can specify multiple) (default []) - --verify verify the provenance of the chart before upgrading - --version string specify the exact chart version to use. If this is not specified, the latest version is used - --wait 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 + -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 + --keyring string Path to the keyring that contains public signing keys (default "~/.gnupg/pubring.gpg") + --namespace string Namespace to install the release into (only used if --install is set). Defaults to the current kube config namespace + --no-hooks Disable pre/post upgrade hooks + --password string Chart repository password where to locate the requested chart + --recreate-pods Performs pods restart for the resource if applicable + --render-subchart-notes Render subchart notes along with parent + --repo string Chart repository url where to locate the requested chart + --reset-values When upgrading, reset the values to the ones built into the chart + --reuse-values When upgrading, reuse the last release's values and merge in any overrides from the command line via --set and -f. If '--reset-values' is specified, this is ignored. + --set stringArray Set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2) + --set-file stringArray Set values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2) + --set-string stringArray Set STRING values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2) + --timeout int Time in seconds to wait for any individual Kubernetes operation (like Jobs for hooks) (default 300) + --tls Enable TLS for request + --tls-ca-cert string Path to TLS CA certificate file (default "$HELM_HOME/ca.pem") + --tls-cert string Path to TLS certificate file (default "$HELM_HOME/cert.pem") + --tls-hostname string The server name used to verify the hostname on the returned certificates from the server + --tls-key string Path to TLS key file (default "$HELM_HOME/key.pem") + --tls-verify Enable TLS for request and verify remote + --username string Chart repository username where to locate the requested chart + -f, --values valueFiles Specify values in a YAML file or a URL(can specify multiple) (default []) + --verify Verify the provenance of the chart before upgrading + --version string Specify the exact chart version to use. If this is not specified, the latest version is used + --wait 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 ``` ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### SEE ALSO * [helm](helm.md) - The Helm package manager for Kubernetes. -###### Auto generated by spf13/cobra on 5-Feb-2019 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_verify.md b/docs/helm/helm_verify.md index e6d683dfb..98e8bda4f 100644 --- a/docs/helm/helm_verify.md +++ b/docs/helm/helm_verify.md @@ -1,6 +1,6 @@ ## helm verify -verify that a chart at the given path has been signed and is valid +Verify that a chart at the given path has been signed and is valid ### Synopsis @@ -23,23 +23,23 @@ helm verify [flags] PATH ``` -h, --help help for verify - --keyring string keyring containing public keys (default "~/.gnupg/pubring.gpg") + --keyring string Keyring containing public keys (default "~/.gnupg/pubring.gpg") ``` ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### SEE ALSO * [helm](helm.md) - The Helm package manager for Kubernetes. -###### Auto generated by spf13/cobra on 25-Feb-2019 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/docs/helm/helm_version.md b/docs/helm/helm_version.md index 33d33cf12..8be50ac96 100644 --- a/docs/helm/helm_version.md +++ b/docs/helm/helm_version.md @@ -1,6 +1,6 @@ ## helm version -print the client/server version information +Print the client/server version information ### Synopsis @@ -29,33 +29,33 @@ helm version [flags] ### Options ``` - -c, --client client version only + -c, --client Client version only -h, --help help for version - -s, --server server version only - --short print the version number - --template string template for version string format - --tls enable TLS for request - --tls-ca-cert string path to TLS CA certificate file (default "$HELM_HOME/ca.pem") - --tls-cert string path to TLS certificate file (default "$HELM_HOME/cert.pem") - --tls-hostname string the server name used to verify the hostname on the returned certificates from the server - --tls-key string path to TLS key file (default "$HELM_HOME/key.pem") - --tls-verify enable TLS for request and verify remote + -s, --server Server version only + --short Print the version number + --template string Template for version string format + --tls Enable TLS for request + --tls-ca-cert string Path to TLS CA certificate file (default "$HELM_HOME/ca.pem") + --tls-cert string Path to TLS certificate file (default "$HELM_HOME/cert.pem") + --tls-hostname string The server name used to verify the hostname on the returned certificates from the server + --tls-key string Path to TLS key file (default "$HELM_HOME/key.pem") + --tls-verify Enable TLS for request and verify remote ``` ### 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 - --kubeconfig string absolute path to the kubeconfig file to use - --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) - --tiller-namespace string namespace of Tiller (default "kube-system") + --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 + --kubeconfig string Absolute path of the kubeconfig file to be used + --tiller-connection-timeout int The duration (in seconds) Helm will wait to establish a connection to Tiller (default 300) + --tiller-namespace string Namespace of Tiller (default "kube-system") ``` ### SEE ALSO * [helm](helm.md) - The Helm package manager for Kubernetes. -###### Auto generated by spf13/cobra on 10-Aug-2018 +###### Auto generated by spf13/cobra on 16-May-2019 diff --git a/pkg/helm/environment/environment.go b/pkg/helm/environment/environment.go index 6d40fb846..9cfe80a1d 100644 --- a/pkg/helm/environment/environment.go +++ b/pkg/helm/environment/environment.go @@ -80,23 +80,23 @@ type EnvSettings struct { // AddFlags binds flags to the given flagset. func (s *EnvSettings) AddFlags(fs *pflag.FlagSet) { - fs.StringVar((*string)(&s.Home), "home", DefaultHelmHome, "location of your Helm config. Overrides $HELM_HOME") - fs.StringVar(&s.TillerHost, "host", "", "address of Tiller. Overrides $HELM_HOST") - fs.StringVar(&s.KubeContext, "kube-context", "", "name of the kubeconfig context to use") - fs.StringVar(&s.KubeConfig, "kubeconfig", "", "absolute path to the kubeconfig file to use") - fs.BoolVar(&s.Debug, "debug", false, "enable verbose output") - fs.StringVar(&s.TillerNamespace, "tiller-namespace", "kube-system", "namespace of Tiller") - fs.Int64Var(&s.TillerConnectionTimeout, "tiller-connection-timeout", int64(300), "the duration (in seconds) Helm will wait to establish a connection to tiller") + fs.StringVar((*string)(&s.Home), "home", DefaultHelmHome, "Location of your Helm config. Overrides $HELM_HOME") + fs.StringVar(&s.TillerHost, "host", "", "Address of Tiller. Overrides $HELM_HOST") + fs.StringVar(&s.KubeContext, "kube-context", "", "Name of the kubeconfig context to use") + fs.StringVar(&s.KubeConfig, "kubeconfig", "", "Absolute path of the kubeconfig file to be used") + fs.BoolVar(&s.Debug, "debug", false, "Enable verbose output") + fs.StringVar(&s.TillerNamespace, "tiller-namespace", "kube-system", "Namespace of Tiller") + fs.Int64Var(&s.TillerConnectionTimeout, "tiller-connection-timeout", int64(300), "The duration (in seconds) Helm will wait to establish a connection to Tiller") } // AddFlagsTLS adds the flags for supporting client side TLS to the given flagset. func (s *EnvSettings) AddFlagsTLS(fs *pflag.FlagSet) { - fs.StringVar(&s.TLSServerName, "tls-hostname", s.TillerHost, "the server name used to verify the hostname on the returned certificates from the server") - fs.StringVar(&s.TLSCaCertFile, "tls-ca-cert", DefaultTLSCaCert, "path to TLS CA certificate file") - fs.StringVar(&s.TLSCertFile, "tls-cert", DefaultTLSCert, "path to TLS certificate file") - fs.StringVar(&s.TLSKeyFile, "tls-key", DefaultTLSKeyFile, "path to TLS key file") - fs.BoolVar(&s.TLSVerify, "tls-verify", DefaultTLSVerify, "enable TLS for request and verify remote") - fs.BoolVar(&s.TLSEnable, "tls", DefaultTLSEnable, "enable TLS for request") + fs.StringVar(&s.TLSServerName, "tls-hostname", s.TillerHost, "The server name used to verify the hostname on the returned certificates from the server") + fs.StringVar(&s.TLSCaCertFile, "tls-ca-cert", DefaultTLSCaCert, "Path to TLS CA certificate file") + fs.StringVar(&s.TLSCertFile, "tls-cert", DefaultTLSCert, "Path to TLS certificate file") + fs.StringVar(&s.TLSKeyFile, "tls-key", DefaultTLSKeyFile, "Path to TLS key file") + fs.BoolVar(&s.TLSVerify, "tls-verify", DefaultTLSVerify, "Enable TLS for request and verify remote") + fs.BoolVar(&s.TLSEnable, "tls", DefaultTLSEnable, "Enable TLS for request") } // Init sets values from the environment. From be82cb240c11a5b6ce8dce7314295476308c7e8a Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Fri, 17 May 2019 22:52:23 -0400 Subject: [PATCH 221/327] Add a filter to the helm list call for completion Signed-off-by: Marc Khouzam --- cmd/helm/helm.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cmd/helm/helm.go b/cmd/helm/helm.go index b3f16fb7f..8d4652984 100644 --- a/cmd/helm/helm.go +++ b/cmd/helm/helm.go @@ -71,14 +71,18 @@ __helm_override_flags() __helm_list_releases() { - local out - if out=$(helm list $(__helm_override_flags) -a -q 2>/dev/null); then + __helm_debug "${FUNCNAME[0]}: c is $c words[c] is ${words[c]}" + local out filter + # Use ^ to map from the start of the release name + filter="^${words[c]}" + if out=$(helm list $(__helm_override_flags) -a -q ${filter} 2>/dev/null); then COMPREPLY=( $( compgen -W "${out[*]}" -- "$cur" ) ) fi } __helm_custom_func() { + __helm_debug "${FUNCNAME[0]}: c is $c words[@] is ${words[@]}" case ${last_command} in helm_delete | helm_history | helm_status | helm_test |\ helm_upgrade | helm_rollback | helm_get_*) From 0880703a40e4464a31c1da61a2f14b770e97d17c Mon Sep 17 00:00:00 2001 From: ialidzhikov Date: Sun, 19 May 2019 00:07:54 +0300 Subject: [PATCH 222/327] Change extension rule to warning severity Signed-off-by: ialidzhikov --- pkg/lint/rules/template.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/lint/rules/template.go b/pkg/lint/rules/template.go index 192150737..69b9c397f 100644 --- a/pkg/lint/rules/template.go +++ b/pkg/lint/rules/template.go @@ -99,7 +99,7 @@ func Templates(linter *support.Linter, values []byte, namespace string, strict b fileName, _ := template.Name, template.Data path = fileName - linter.RunLinterRule(support.ErrorSev, path, validateAllowedExtension(fileName)) + linter.RunLinterRule(support.WarningSev, path, validateAllowedExtension(fileName)) // We only apply the following lint rules to yaml files if filepath.Ext(fileName) != ".yaml" || filepath.Ext(fileName) == ".yml" { From ad886c5e36abd2b7cdc1d36b4a48ed638847a981 Mon Sep 17 00:00:00 2001 From: Morten Torkildsen Date: Sun, 19 May 2019 08:31:09 -0700 Subject: [PATCH 223/327] fix(helm): Disable schema validation for manifests Signed-off-by: Morten Torkildsen --- pkg/kube/client.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/kube/client.go b/pkg/kube/client.go index 36467fad5..dfce2aaff 100644 --- a/pkg/kube/client.go +++ b/pkg/kube/client.go @@ -157,13 +157,16 @@ func (c *Client) BuildUnstructured(namespace string, reader io.Reader) (Result, } // Validate reads Kubernetes manifests and validates the content. +// +// This function does not actually do schema validation of manifests. Adding +// validation now breaks existing clients of helm: https://github.com/helm/helm/issues/5750 func (c *Client) Validate(namespace string, reader io.Reader) error { _, err := c.NewBuilder(). Unstructured(). ContinueOnError(). NamespaceParam(namespace). DefaultNamespace(). - Schema(c.validator()). + // Schema(c.validator()). // No schema validation Stream(reader, ""). Flatten(). Do().Infos() From 0239cc4457463cfd6af1f61ec26aa35845dcb1c5 Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Mon, 20 May 2019 12:56:22 -0400 Subject: [PATCH 224/327] (helm): Proper fix for #5046 PR #5072 followed by #5406 tweaked the handling of the associative array 'aliashash' when in zsh. However, upon further investigation the root of the problem was the 'aliashash' was not being declared properly as it was declared within a method and therefore not accessible to the rest of the completion script. The previous commit of this PR makes the necessary change to properly declare 'aliashash' which makes the previous tweak unecessary. This commit removes the tweak. Signed-off-by: Marc Khouzam --- cmd/helm/completion.go | 1 - 1 file changed, 1 deletion(-) diff --git a/cmd/helm/completion.go b/cmd/helm/completion.go index 051f946fd..f0345d32a 100644 --- a/cmd/helm/completion.go +++ b/cmd/helm/completion.go @@ -205,7 +205,6 @@ __helm_convert_bash_to_zsh() { -e "s/${LWORD}compopt${RWORD}/__helm_compopt/g" \ -e "s/${LWORD}declare${RWORD}/builtin declare/g" \ -e "s/\\\$(type${RWORD}/\$(__helm_type/g" \ - -e 's/aliashash\["\(.\{1,\}\)"\]/aliashash[\1]/g' \ -e 's/FUNCNAME/funcstack/g' \ <<'BASH_COMPLETION_EOF' ` From 3d487547f9f55623dc83291ab782cfab7b4f1fa9 Mon Sep 17 00:00:00 2001 From: dev-chulbuji Date: Wed, 22 May 2019 00:44:57 +0900 Subject: [PATCH 225/327] change deployment version Signed-off-by: dev-chulbuji --- cmd/helm/installer/install.go | 2 +- docs/examples/nginx/templates/deployment.yaml | 2 +- docs/install.md | 4 ++-- pkg/kube/client_test.go | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cmd/helm/installer/install.go b/cmd/helm/installer/install.go index 5c3369c7d..42c7132db 100644 --- a/cmd/helm/installer/install.go +++ b/cmd/helm/installer/install.go @@ -125,7 +125,7 @@ func Deployment(opts *Options) (*v1beta1.Deployment, error) { } dep.TypeMeta = metav1.TypeMeta{ Kind: "Deployment", - APIVersion: "extensions/v1beta1", + APIVersion: "apps/v1", } return dep, nil } diff --git a/docs/examples/nginx/templates/deployment.yaml b/docs/examples/nginx/templates/deployment.yaml index 5bb30f9af..139d780cd 100644 --- a/docs/examples/nginx/templates/deployment.yaml +++ b/docs/examples/nginx/templates/deployment.yaml @@ -1,4 +1,4 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: # This uses a "fullname" template (see _helpers) diff --git a/docs/install.md b/docs/install.md index d240e72cf..354b97690 100755 --- a/docs/install.md +++ b/docs/install.md @@ -280,7 +280,7 @@ helm init --override metadata.annotations."deployment\.kubernetes\.io/revision"= Output: ``` -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: annotations: @@ -337,7 +337,7 @@ The Tiller installation is skipped and the manifest is output to stdout in JSON format. ``` -"apiVersion": "extensions/v1beta1", +"apiVersion": "apps/v1", "kind": "Deployment", "metadata": { "creationTimestamp": null, diff --git a/pkg/kube/client_test.go b/pkg/kube/client_test.go index 810abdf17..4cac11f52 100644 --- a/pkg/kube/client_test.go +++ b/pkg/kube/client_test.go @@ -27,7 +27,7 @@ import ( "time" "k8s.io/api/core/v1" - apiextv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" + apiextv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiapps/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" @@ -700,7 +700,7 @@ spec: tier: backend role: master --- -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: redis-master @@ -740,7 +740,7 @@ spec: tier: backend role: slave --- -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: redis-slave @@ -780,7 +780,7 @@ spec: app: guestbook tier: frontend --- -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: frontend From 3708fad5170670dfa650b13e5d10fc2521636661 Mon Sep 17 00:00:00 2001 From: dev-chulbuji Date: Wed, 22 May 2019 00:54:15 +0900 Subject: [PATCH 226/327] feat: change miss fixing Signed-off-by: dev-chulbuji --- pkg/kube/client_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/kube/client_test.go b/pkg/kube/client_test.go index 4cac11f52..561aa8acb 100644 --- a/pkg/kube/client_test.go +++ b/pkg/kube/client_test.go @@ -27,7 +27,7 @@ import ( "time" "k8s.io/api/core/v1" - apiextv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiapps/v1" + apiextv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" From b0e7b8c9d98cbed46f3e4ae1e6060a979ab2d940 Mon Sep 17 00:00:00 2001 From: Per Hermansson Date: Mon, 20 May 2019 21:43:09 +0200 Subject: [PATCH 227/327] Skip waiting for paused deployments Signed-off-by: Per Hermansson --- pkg/kube/wait.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pkg/kube/wait.go b/pkg/kube/wait.go index 105d79b93..ad779bcc8 100644 --- a/pkg/kube/wait.go +++ b/pkg/kube/wait.go @@ -71,6 +71,10 @@ func (c *Client) waitForResources(timeout time.Duration, created Result) error { if err != nil { return false, err } + // If paused deployment will never be ready + if currentDeployment.Spec.Paused { + continue + } // Find RS associated with deployment newReplicaSet, err := deploymentutil.GetNewReplicaSet(currentDeployment, kcs.AppsV1()) if err != nil || newReplicaSet == nil { @@ -86,6 +90,10 @@ func (c *Client) waitForResources(timeout time.Duration, created Result) error { if err != nil { return false, err } + // If paused deployment will never be ready + if currentDeployment.Spec.Paused { + continue + } // Find RS associated with deployment newReplicaSet, err := deploymentutil.GetNewReplicaSet(currentDeployment, kcs.AppsV1()) if err != nil || newReplicaSet == nil { @@ -101,6 +109,10 @@ func (c *Client) waitForResources(timeout time.Duration, created Result) error { if err != nil { return false, err } + // If paused deployment will never be ready + if currentDeployment.Spec.Paused { + continue + } // Find RS associated with deployment newReplicaSet, err := deploymentutil.GetNewReplicaSet(currentDeployment, kcs.AppsV1()) if err != nil || newReplicaSet == nil { @@ -116,6 +128,10 @@ func (c *Client) waitForResources(timeout time.Duration, created Result) error { if err != nil { return false, err } + // If paused deployment will never be ready + if currentDeployment.Spec.Paused { + continue + } // Find RS associated with deployment newReplicaSet, err := deploymentutil.GetNewReplicaSet(currentDeployment, kcs.AppsV1()) if err != nil || newReplicaSet == nil { From ccf933b29a6966adce5b5c722119c94ca5a07c5c Mon Sep 17 00:00:00 2001 From: Tariq Ibrahim Date: Thu, 23 May 2019 10:54:06 -0700 Subject: [PATCH 228/327] return error when io.Copy fails in Digest Signed-off-by: Tariq Ibrahim --- pkg/provenance/sign.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/provenance/sign.go b/pkg/provenance/sign.go index 5a7626424..26ae26031 100644 --- a/pkg/provenance/sign.go +++ b/pkg/provenance/sign.go @@ -405,7 +405,7 @@ func DigestFile(filename string) (string, error) { func Digest(in io.Reader) (string, error) { hash := crypto.SHA256.New() if _, err := io.Copy(hash, in); err != nil { - return "", nil + return "", err } return hex.EncodeToString(hash.Sum(nil)), nil } From e407dd48f1f8fdb36fcf905ac3c061c86da1206b Mon Sep 17 00:00:00 2001 From: Andreu Gallofre Date: Sat, 25 May 2019 13:23:18 +0200 Subject: [PATCH 229/327] Change the starter label for the actual one used Signed-off-by: Andreu Gallofre Change the label sizing in CONTRIBUTING.md Change the label size and merging conditions to match the actual labels and conditions used Signed-off-by: Andreu Gallofre Add requested changes Add missing dot, removes duplicated information and change requirements for merging size/L Signed-off-by: Andreu Gallofre --- CONTRIBUTING.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7b381fcf3..3965e18db 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -302,7 +302,7 @@ The following tables define all label types used for Helm. It is split up by cat | `help wanted` | This issue is one the core maintainers cannot get to right now and would appreciate help with | | `proposal` | This issue is a proposal | | `question/support` | This issue is a support request or question | -| `starter` | This issue is a good for someone new to contributing to Helm | +| `good first issue` | This issue is a good for someone new to contributing to Helm | | `wont fix` | The issue has been discussed and will not be implemented (or accepted in the case of a proposal) | ### PR Specific @@ -327,6 +327,9 @@ lines is greater than defined below. | Label | Description | | ----- | ----------- | -| `size/small` | Anything less than or equal to 4 files and 150 lines. Only small amounts of manual testing may be required | -| `size/medium` | Anything greater than `size/small` and less than or equal to 8 files and 300 lines. Manual validation should be required. | -| `size/large` | Anything greater than `size/medium`. This should be thoroughly tested before merging and always requires 2 approvals. This also should be applied to anything that is a significant logic change. | +| `size/XS` | Anything less than or equal to 9 lines ignoring generated files. Only small amounts of manual testing may be required. | +| `size/S` | Anything greater than `size/XS` less than or equal to 29 lines ignoring the generated files. Only small amounts of manual testing may be required. | +| `size/M` | Anything greater than `size/S` less than or equal to 99 lines ignoring the generated files. Manual validation should be required. | +| `size/L` | Anything greater than `size/M` less than or equal to 499 lines ignoring the generated files. This should be thoroughly tested before merging and always requires 2 approvals. This also should be applied to anything that is a significant logic change. | +| `size/XL` | Anything greater than `size/L` less than or equal to 999 lines ignoring the generated files. This should be thoroughly tested before merging and always requires 2 approvals. This also should be applied to anything that is a significant logic change. | +| `size/XXL` | Anything greater than `size/XL`. This should be thoroughly tested before merging and always requires 2 approvals. This also should be applied to anything that is a significant logic change. | From c0a334b4eae50af4cf9f35309a5e923ce918c816 Mon Sep 17 00:00:00 2001 From: Justin Scott Date: Thu, 30 May 2019 11:14:28 -0700 Subject: [PATCH 230/327] Move jascott1 to emeritus Signed-off-by: Justin Scott --- OWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OWNERS b/OWNERS index fcc3606c2..3fa911034 100644 --- a/OWNERS +++ b/OWNERS @@ -3,7 +3,6 @@ maintainers: - bacongobbler - fibonacci1729 - hickeyma - - jascott1 - mattfarina - michelleN - prydonius @@ -12,6 +11,7 @@ maintainers: - thomastaylor312 - viglesiasce emeritus: + - jascott1 - migmartri - nebril - seh From e4ce76a2a0635b4dfc85607fae82670140967711 Mon Sep 17 00:00:00 2001 From: Ace Eldeib Date: Thu, 30 May 2019 21:37:57 -0700 Subject: [PATCH 231/327] chore(glide): bump kubernetes to 1.14.2 Signed-off-by: Ace Eldeib --- glide.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/glide.yaml b/glide.yaml index c9ac54b98..565ba1069 100644 --- a/glide.yaml +++ b/glide.yaml @@ -49,19 +49,19 @@ import: version: 0.9.2 - package: github.com/grpc-ecosystem/go-grpc-prometheus - package: k8s.io/kubernetes - version: v1.14.1 + version: v1.14.2 - package: k8s.io/client-go - version: kubernetes-1.14.1 + version: kubernetes-1.14.2 - package: k8s.io/api - version: kubernetes-1.14.1 + version: kubernetes-1.14.2 - package: k8s.io/apimachinery - version: kubernetes-1.14.1 + version: kubernetes-1.14.2 - package: k8s.io/apiserver - version: kubernetes-1.14.1 + version: kubernetes-1.14.2 - package: k8s.io/cli-runtime - version: kubernetes-1.14.1 + version: kubernetes-1.14.2 - package: k8s.io/apiextensions-apiserver - version: kubernetes-1.14.1 + version: kubernetes-1.14.2 - package: github.com/cyphar/filepath-securejoin version: ^0.2.1 - package: github.com/jmoiron/sqlx From 5b9311d163654c2d3a7ee54742f6497a017a91ee Mon Sep 17 00:00:00 2001 From: Adam Eijdenberg Date: Fri, 18 Jan 2019 15:25:30 +1100 Subject: [PATCH 232/327] Fix nested null value overrides - Add ability to test for nested non-existent keys - Add test cases for nested null values - Minimalist fix for nested null key test cases - Add missing metadata to integration test Signed-off-by: Adam Eijdenberg --- cmd/helm/get_values_test.go | 7 +++- pkg/chartutil/testdata/moby/values.yaml | 15 +++++++ pkg/chartutil/values.go | 19 +++++++-- pkg/chartutil/values_test.go | 54 +++++++++++++++++++++++-- 4 files changed, 85 insertions(+), 10 deletions(-) diff --git a/cmd/helm/get_values_test.go b/cmd/helm/get_values_test.go index aec5ce0c2..40b46bfda 100644 --- a/cmd/helm/get_values_test.go +++ b/cmd/helm/get_values_test.go @@ -29,8 +29,11 @@ import ( func TestGetValuesCmd(t *testing.T) { releaseWithValues := helm.ReleaseMock(&helm.MockReleaseOptions{ - Name: "thomas-guide", - Chart: &chart.Chart{Values: &chart.Config{Raw: `foo2: "bar2"`}}, + Name: "thomas-guide", + Chart: &chart.Chart{ + Metadata: &chart.Metadata{Name: "thomas-guide-chart-name"}, + Values: &chart.Config{Raw: `foo2: "bar2"`}, + }, Config: &chart.Config{Raw: `foo: "bar"`}, }) diff --git a/pkg/chartutil/testdata/moby/values.yaml b/pkg/chartutil/testdata/moby/values.yaml index 54e1ce463..ecf22b563 100644 --- a/pkg/chartutil/testdata/moby/values.yaml +++ b/pkg/chartutil/testdata/moby/values.yaml @@ -7,3 +7,18 @@ right: exists left: exists front: exists back: exists + +# nested tables for null coalesce testing +web: + livenessProbe: + failureThreshold: 5 + httpGet: + path: /api/v1/info + port: atc + initialDelaySeconds: 10 + periodSeconds: 15 + timeoutSeconds: 3 + readinessProbe: + httpGet: + path: /api/v1/info + port: atc diff --git a/pkg/chartutil/values.go b/pkg/chartutil/values.go index 352524c13..6270531d7 100644 --- a/pkg/chartutil/values.go +++ b/pkg/chartutil/values.go @@ -327,16 +327,21 @@ func coalesceTables(dst, src map[string]interface{}, chartName string) map[strin // Because dest has higher precedence than src, dest values override src // values. for key, val := range src { + dv, ok := dst[key] + if ok && dv == nil { + // skip here, we delete at end + continue + } if istable(val) { - if innerdst, ok := dst[key]; !ok { + if !ok { dst[key] = val - } else if istable(innerdst) { - coalesceTables(innerdst.(map[string]interface{}), val.(map[string]interface{}), chartName) + } else if istable(dv) { + coalesceTables(dv.(map[string]interface{}), val.(map[string]interface{}), chartName) } else { log.Printf("Warning: Merging destination map for chart '%s'. Cannot overwrite table item '%s', with non table value: %v", chartName, key, val) } continue - } else if dv, ok := dst[key]; ok && istable(dv) { + } else if ok && istable(dv) { log.Printf("Warning: Merging destination map for chart '%s'. The destination item '%s' is a table and ignoring the source '%s' as it has a non-table value of: %v", chartName, key, key, val) continue } else if !ok { // <- ok is still in scope from preceding conditional. @@ -344,6 +349,12 @@ func coalesceTables(dst, src map[string]interface{}, chartName string) map[strin continue } } + // never return a nil value, rather delete the key + for k, v := range dst { + if v == nil { + delete(dst, k) + } + } return dst } diff --git a/pkg/chartutil/values_test.go b/pkg/chartutil/values_test.go index 3fea14c3a..af6c77d27 100644 --- a/pkg/chartutil/values_test.go +++ b/pkg/chartutil/values_test.go @@ -21,6 +21,7 @@ import ( "encoding/json" "fmt" "reflect" + "strings" "testing" "text/template" @@ -300,6 +301,25 @@ pequod: sail: true ahab: scope: whale + +# test coalesce with nested null values +web: + livenessProbe: + httpGet: null + exec: + command: + - curl + - -f + - http://localhost:8080/api/v1/info + timeoutSeconds: null + readinessProbe: + httpGet: null + exec: + command: + - curl + - -f + - http://localhost:8080/api/v1/info + timeoutSeconds: null # catches the case where this wasn't defined in the original source... ` func TestCoalesceValues(t *testing.T) { @@ -344,6 +364,13 @@ func TestCoalesceValues(t *testing.T) { {"{{.spouter.global.nested.boat}}", "true"}, {"{{.pequod.global.nested.sail}}", "true"}, {"{{.spouter.global.nested.sail}}", ""}, + + {"{{.web.livenessProbe.failureThreshold}}", "5"}, + {"{{.web.livenessProbe.initialDelaySeconds}}", "10"}, + {"{{.web.livenessProbe.periodSeconds}}", "15"}, + {"{{.web.livenessProbe.exec}}", "map[command:[curl -f http://localhost:8080/api/v1/info]]"}, + + {"{{.web.readinessProbe.exec}}", "map[command:[curl -f http://localhost:8080/api/v1/info]]"}, } for _, tt := range tests { @@ -352,10 +379,29 @@ func TestCoalesceValues(t *testing.T) { } } - nullKeys := []string{"bottom", "right", "left", "front"} + nullKeys := []string{"bottom", "right", "left", "front", + "web.livenessProbe.httpGet", "web.readinessProbe.httpGet", "web.livenessProbe.timeoutSeconds", "web.readinessProbe.timeoutSeconds"} for _, nullKey := range nullKeys { - if _, ok := v[nullKey]; ok { - t.Errorf("Expected key %q to be removed, still present", nullKey) + parts := strings.Split(nullKey, ".") + curMap := v + for partIdx, part := range parts { + nextVal, ok := curMap[part] + if partIdx == len(parts)-1 { // are we the last? + if ok { + t.Errorf("Expected key %q to be removed, still present", nullKey) + break + } + } else { // we are not the last + if !ok { + t.Errorf("Expected key %q to be removed, but partial parent path was not found", nullKey) + break + } + curMap, ok = nextVal.(map[string]interface{}) + if !ok { + t.Errorf("Expected key %q to be removed, but partial parent path did not result in a map", nullKey) + break + } + } } } } @@ -386,7 +432,7 @@ func TestCoalesceTables(t *testing.T) { // What we expect is that anything in dst overrides anything in src, but that // otherwise the values are coalesced. - coalesceTables(dst, src, "") + dst = coalesceTables(dst, src, "") if dst["name"] != "Ishmael" { t.Errorf("Unexpected name: %s", dst["name"]) From 40bc1b173d2d20591c0d9bf9d690e06bc0de7c55 Mon Sep 17 00:00:00 2001 From: Daniel Badea Date: Mon, 3 Jun 2019 13:33:18 +0300 Subject: [PATCH 233/327] dont' reference built-in objects count Built-in objects listed in the previous sections are: Release, Values, Chart, Files, Capabilities and Template. Text here refers to four built-in objects. Signed-off-by: Daniel Badea --- docs/chart_template_guide/values_files.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/chart_template_guide/values_files.md b/docs/chart_template_guide/values_files.md index 0a72b6bc2..a6b179970 100644 --- a/docs/chart_template_guide/values_files.md +++ b/docs/chart_template_guide/values_files.md @@ -1,6 +1,6 @@ # Values Files -In the previous section we looked at the built-in objects that Helm templates offer. One of the four built-in objects is `Values`. This object provides access to values passed into the chart. Its contents come from four sources: +In the previous section we looked at the built-in objects that Helm templates offer. One of these built-in objects is `Values`. This object provides access to values passed into the chart. Its contents come from four sources: - The `values.yaml` file in the chart - If this is a subchart, the `values.yaml` file of a parent chart From 8455aaa129a4444f7dbb335e562e165a683914cf Mon Sep 17 00:00:00 2001 From: Alex Khaerov Date: Tue, 4 Jun 2019 23:14:49 +0800 Subject: [PATCH 234/327] Update helm-gcs plug-in address helm-gcs has a new owner. Signed-off-by: Alex Khaerov --- docs/related.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/related.md b/docs/related.md index be16ea22f..dc8d62091 100644 --- a/docs/related.md +++ b/docs/related.md @@ -38,7 +38,7 @@ or [pull request](https://github.com/helm/helm/pulls). - [helm-cos](https://github.com/imroc/helm-cos) - Plugin to manage repositories on Tencent Cloud Object Storage - [helm-edit](https://github.com/mstrzele/helm-edit) - Plugin for editing release's values - [helm-env](https://github.com/adamreese/helm-env) - Plugin to show current environment -- [helm-gcs](https://github.com/nouney/helm-gcs) - Plugin to manage repositories on Google Cloud Storage +- [helm-gcs](https://github.com/hayorov/helm-gcs) - Plugin to manage repositories on Google Cloud Storage - [helm-github](https://github.com/sagansystems/helm-github) - Plugin to install Helm Charts from Github repositories - [helm-hashtag](https://github.com/balboah/helm-hashtag) - Plugin for tracking docker tag hash digests as values - [helm-inject](https://github.com/maorfr/helm-inject) - Plugin for injecting additional configurations during release upgrade From b2eed7644ae5bab07925fd1bcf8e42132e769901 Mon Sep 17 00:00:00 2001 From: Daniel Badea Date: Tue, 4 Jun 2019 17:38:23 +0300 Subject: [PATCH 235/327] doc: tuple replaced by list Built-in function 'tuple' is implemented in Sprig as 'list'. (see https://github.com/Masterminds/sprig/blob/2625cd487a689ca112e1301a58b89b347ba2c994/functions.go#L237 ) Replace documentation references to 'tuple' with 'list' so there is no need to explain what a tuple is. Signed-off-by: Daniel Badea --- docs/chart_template_guide/accessing_files.md | 4 ++-- docs/chart_template_guide/builtin_objects.md | 2 +- docs/chart_template_guide/control_structures.md | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/chart_template_guide/accessing_files.md b/docs/chart_template_guide/accessing_files.md index 206ad0cec..23bead122 100644 --- a/docs/chart_template_guide/accessing_files.md +++ b/docs/chart_template_guide/accessing_files.md @@ -54,13 +54,13 @@ metadata: name: {{ .Release.Name }}-configmap data: {{- $files := .Files }} - {{- range tuple "config1.toml" "config2.toml" "config3.toml" }} + {{- range list "config1.toml" "config2.toml" "config3.toml" }} {{ . }}: |- {{ $files.Get . }} {{- end }} ``` -This config map uses several of the techniques discussed in previous sections. For example, we create a `$files` variable to hold a reference to the `.Files` object. We also use the `tuple` function to create a list of files that we loop through. Then we print each file name (`{{.}}: |-`) followed by the contents of the file `{{ $files.Get . }}`. +This config map uses several of the techniques discussed in previous sections. For example, we create a `$files` variable to hold a reference to the `.Files` object. We also use the `list` function to create a list of files that we loop through. Then we print each file name (`{{.}}: |-`) followed by the contents of the file `{{ $files.Get . }}`. Running this template will produce a single ConfigMap with the contents of all three files: diff --git a/docs/chart_template_guide/builtin_objects.md b/docs/chart_template_guide/builtin_objects.md index f7b2857bc..c38edb17a 100644 --- a/docs/chart_template_guide/builtin_objects.md +++ b/docs/chart_template_guide/builtin_objects.md @@ -1,6 +1,6 @@ # Built-in Objects -Objects are passed into a template from the template engine. And your code can pass objects around (we'll see examples when we look at the `with` and `range` statements). There are even a few ways to create new objects within your templates, like with the `tuple` function we'll see later. +Objects are passed into a template from the template engine. And your code can pass objects around (we'll see examples when we look at the `with` and `range` statements). There are even a few ways to create new objects within your templates, like with the `list` function we'll see later. Objects can be simple, and have just one value. Or they can contain other objects or functions. For example. the `Release` object contains several objects (like `Release.Name`) and the `Files` object has a few functions. diff --git a/docs/chart_template_guide/control_structures.md b/docs/chart_template_guide/control_structures.md index d411c2f79..c9d2dd0bf 100644 --- a/docs/chart_template_guide/control_structures.md +++ b/docs/chart_template_guide/control_structures.md @@ -333,11 +333,11 @@ Now, in this example we've done something tricky. The `toppings: |-` line is dec > The `|-` marker in YAML takes a multi-line string. This can be a useful technique for embedding big blocks of data inside of your manifests, as exemplified here. -Sometimes it's useful to be able to quickly make a list inside of your template, and then iterate over that list. Helm templates have a function to make this easy: `tuple`. In computer science, a tuple is a list-like collection of fixed size, but with arbitrary data types. This roughly conveys the way a `tuple` is used. +Sometimes it's useful to be able to quickly make a list inside of your template, and then iterate over that list. Helm templates have a function that's called just that: `list`. ```yaml sizes: |- - {{- range tuple "small" "medium" "large" }} + {{- range list "small" "medium" "large" }} - {{ . }} {{- end }} ``` @@ -351,4 +351,4 @@ The above will produce this: - large ``` -In addition to lists and tuples, `range` can be used to iterate over collections that have a key and a value (like a `map` or `dict`). We'll see how to do that in the next section when we introduce template variables. +In addition to lists, `range` can be used to iterate over collections that have a key and a value (like a `map` or `dict`). We'll see how to do that in the next section when we introduce template variables. From 741dd4a93be4d1c534de77e70ea995e46d6d93c2 Mon Sep 17 00:00:00 2001 From: Tim Schrumpf Date: Fri, 17 May 2019 20:40:11 +0200 Subject: [PATCH 236/327] Ingress ServicePort from Values Signed-off-by: tillepille --- pkg/chartutil/create.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/chartutil/create.go b/pkg/chartutil/create.go index f8e0356e4..74607aff2 100644 --- a/pkg/chartutil/create.go +++ b/pkg/chartutil/create.go @@ -130,6 +130,7 @@ const defaultIgnore = `# Patterns to ignore when building packages. const defaultIngress = `{{- if .Values.ingress.enabled -}} {{- $fullName := include ".fullname" . -}} +{{- $svcPort := .Values.service.port -}} apiVersion: extensions/v1beta1 kind: Ingress metadata: @@ -160,7 +161,7 @@ spec: - path: {{ . }} backend: serviceName: {{ $fullName }} - servicePort: http + servicePort: {{ $svcPort }} {{- end }} {{- end }} {{- end }} From 95775d0c60804b3d3674510e1f57a30ca8074ddd Mon Sep 17 00:00:00 2001 From: Matthew Fisher Date: Fri, 10 May 2019 07:41:25 -0700 Subject: [PATCH 237/327] feat(ci): push release assets to Azure and GCS Signed-off-by: Matthew Fisher --- .circleci/deploy.sh | 13 +++++++++++++ Makefile | 2 +- docs/install.md | 8 ++++---- docs/install_faq.md | 3 +-- docs/release_checklist.md | 25 ++++++++++++------------- scripts/get | 2 +- 6 files changed, 32 insertions(+), 21 deletions(-) diff --git a/.circleci/deploy.sh b/.circleci/deploy.sh index 08adad568..fe95a5634 100755 --- a/.circleci/deploy.sh +++ b/.circleci/deploy.sh @@ -22,6 +22,8 @@ fi : ${GCLOUD_SERVICE_KEY:?"GCLOUD_SERVICE_KEY environment variable is not set"} : ${PROJECT_NAME:?"PROJECT_NAME environment variable is not set"} +: ${AZURE_STORAGE_CONNECTION_STRING:?"AZURE_STORAGE_CONNECTION_STRING environment variable is not set"} +: ${AZURE_STORAGE_CONTAINER_NAME:?"AZURE_STORAGE_CONTAINER_NAME environment variable is not set"} VERSION= if [[ -n "${CIRCLE_TAG:-}" ]]; then @@ -50,6 +52,14 @@ ${HOME}/google-cloud-sdk/bin/gcloud auth activate-service-account --key-file "${ ${HOME}/google-cloud-sdk/bin/gcloud config set project "${PROJECT_NAME}" docker login -u _json_key -p "$(cat ${HOME}/gcloud-service-key.json)" https://gcr.io +echo "Installing Azure CLI" +apt update +apt install -y apt-transport-https +echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ stretch main" | tee /etc/apt/sources.list.d/azure-cli.list +curl -L https://packages.microsoft.com/keys/microsoft.asc | apt-key add +apt update +apt install -y azure-cli + echo "Building the tiller image" make docker-build VERSION="${VERSION}" @@ -62,3 +72,6 @@ make dist checksum VERSION="${VERSION}" echo "Pushing binaries to gs bucket" ${HOME}/google-cloud-sdk/bin/gsutil cp ./_dist/* "gs://${PROJECT_NAME}" + +echo "Pushing binaries to Azure" +az storage blob upload-batch -s _dist/ -d "$AZURE_STORAGE_CONTAINER_NAME" --pattern 'helm-*' --connection-string "$AZURE_STORAGE_CONNECTION_STRING" diff --git a/Makefile b/Makefile index 1b5932db8..0c474c135 100644 --- a/Makefile +++ b/Makefile @@ -50,7 +50,7 @@ fetch-dist: mkdir -p _dist cd _dist && \ for obj in ${TARGET_OBJS} ; do \ - curl -sSL -o helm-${VERSION}-$${obj} https://storage.googleapis.com/kubernetes-helm/helm-${VERSION}-$${obj} ; \ + curl -sSL -o helm-${VERSION}-$${obj} https://get.helm.sh/helm-${VERSION}-$${obj} ; \ done .PHONY: sign diff --git a/docs/install.md b/docs/install.md index 354b97690..d9a345f80 100755 --- a/docs/install.md +++ b/docs/install.md @@ -83,12 +83,12 @@ the latest master branch. They are not official releases, and may not be stable. However, they offer the opportunity to test the cutting edge features. -Canary Helm binaries are stored in the [Kubernetes Helm GCS bucket](https://kubernetes-helm.storage.googleapis.com). +Canary Helm binaries are stored at [get.helm.sh](https://get.helm.sh). Here are links to the common builds: -- [Linux AMD64](https://kubernetes-helm.storage.googleapis.com/helm-canary-linux-amd64.tar.gz) -- [macOS AMD64](https://kubernetes-helm.storage.googleapis.com/helm-canary-darwin-amd64.tar.gz) -- [Experimental Windows AMD64](https://kubernetes-helm.storage.googleapis.com/helm-canary-windows-amd64.zip) +- [Linux AMD64](https://get.helm.sh/helm-canary-linux-amd64.tar.gz) +- [macOS AMD64](https://get.helm.sh/helm-canary-darwin-amd64.tar.gz) +- [Experimental Windows AMD64](https://get.helm.sh/helm-canary-windows-amd64.zip) ### From Source (Linux, macOS) diff --git a/docs/install_faq.md b/docs/install_faq.md index d4840417f..c1ac5e6af 100644 --- a/docs/install_faq.md +++ b/docs/install_faq.md @@ -13,8 +13,7 @@ I want to know more about my downloading options. **Q: I can't get to GitHub releases of the newest Helm. Where are they?** -A: We no longer use GitHub releases. Binaries are now stored in a -[GCS public bucket](https://kubernetes-helm.storage.googleapis.com). +Binaries are stored at [get.helm.sh](https://get.helm.sh). **Q: Why aren't there Debian/Fedora/... native packages of Helm?** diff --git a/docs/release_checklist.md b/docs/release_checklist.md index 867457830..f6e970d03 100644 --- a/docs/release_checklist.md +++ b/docs/release_checklist.md @@ -195,25 +195,24 @@ CircleCI will automatically create a tagged release image and client binary to test with. For testers, the process to start testing after CircleCI finishes building the -artifacts involves the following steps to grab the client from Google Cloud -Storage: +artifacts involves the following steps to grab the client: linux/amd64, using /bin/bash: ```shell -wget https://kubernetes-helm.storage.googleapis.com/helm-$RELEASE_CANDIDATE_NAME-linux-amd64.tar.gz +wget https://get.helm.sh/helm-$RELEASE_CANDIDATE_NAME-linux-amd64.tar.gz ``` darwin/amd64, using Terminal.app: ```shell -wget https://kubernetes-helm.storage.googleapis.com/helm-$RELEASE_CANDIDATE_NAME-darwin-amd64.tar.gz +wget https://get.helm.sh/helm-$RELEASE_CANDIDATE_NAME-darwin-amd64.tar.gz ``` windows/amd64, using PowerShell: ```shell -PS C:\> Invoke-WebRequest -Uri "https://kubernetes-helm.storage.googleapis.com/helm-$RELEASE_CANDIDATE_NAME-windows-amd64.zip" -OutFile "helm-$ReleaseCandidateName-windows-amd64.zip" +PS C:\> Invoke-WebRequest -Uri "https://get.helm.sh/helm-$RELEASE_CANDIDATE_NAME-windows-amd64.zip" -OutFile "helm-$ReleaseCandidateName-windows-amd64.zip" ``` Then, unpack and move the binary to somewhere on your $PATH, or move it @@ -322,14 +321,14 @@ The community keeps growing, and we'd love to see you there! Download Helm X.Y. The common platform binaries are here: -- [MacOS amd64](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-darwin-amd64.tar.gz) ([checksum](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-darwin-amd64.tar.gz.sha256) / CHECKSUM_VAL) -- [Linux amd64](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-linux-amd64.tar.gz) ([checksum](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-linux-amd64.tar.gz.sha256) / CHECKSUM_VAL) -- [Linux arm](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-linux-arm.tar.gz) ([checksum](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-linux-arm.tar.gz.sha256) / CHECKSUM_VAL) -- [Linux arm64](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-linux-arm64.tar.gz) ([checksum](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-linux-arm64.tar.gz.sha256) / CHECKSUM_VAL) -- [Linux i386](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-linux-386.tar.gz) ([checksum](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-linux-386.tar.gz.sha256) / CHECKSUM_VAL) -- [Linux ppc64le](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-linux-ppc64le.tar.gz) ([checksum](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-linux-ppc64le.tar.gz.sha256) / CHECKSUM_VAL) -- [Linux s390x](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-linux-s390x.tar.gz) ([checksum](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-linux-s390x.tar.gz.sha256) / CHECKSUM_VAL) -- [Windows amd64](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-windows-amd64.zip) ([checksum](https://storage.googleapis.com/kubernetes-helm/helm-vX.Y.Z-windows-amd64.zip.sha256) / CHECKSUM_VAL) +- [MacOS amd64](https://get.helm.sh/helm-vX.Y.Z-darwin-amd64.tar.gz) ([checksum](https://get.helm.sh/helm-vX.Y.Z-darwin-amd64.tar.gz.sha256) / CHECKSUM_VAL) +- [Linux amd64](https://get.helm.sh/helm-vX.Y.Z-linux-amd64.tar.gz) ([checksum](https://get.helm.sh/helm-vX.Y.Z-linux-amd64.tar.gz.sha256) / CHECKSUM_VAL) +- [Linux arm](https://get.helm.sh/helm-vX.Y.Z-linux-arm.tar.gz) ([checksum](https://get.helm.sh/helm-vX.Y.Z-linux-arm.tar.gz.sha256) / CHECKSUM_VAL) +- [Linux arm64](https://get.helm.sh/helm-vX.Y.Z-linux-arm64.tar.gz) ([checksum](https://get.helm.sh/helm-vX.Y.Z-linux-arm64.tar.gz.sha256) / CHECKSUM_VAL) +- [Linux i386](https://get.helm.sh/helm-vX.Y.Z-linux-386.tar.gz) ([checksum](https://get.helm.sh/helm-vX.Y.Z-linux-386.tar.gz.sha256) / CHECKSUM_VAL) +- [Linux ppc64le](https://get.helm.sh/helm-vX.Y.Z-linux-ppc64le.tar.gz) ([checksum](https://get.helm.sh/helm-vX.Y.Z-linux-ppc64le.tar.gz.sha256) / CHECKSUM_VAL) +- [Linux s390x](https://get.helm.sh/helm-vX.Y.Z-linux-s390x.tar.gz) ([checksum](https://get.helm.sh/helm-vX.Y.Z-linux-s390x.tar.gz.sha256) / CHECKSUM_VAL) +- [Windows amd64](https://get.helm.sh/helm-vX.Y.Z-windows-amd64.zip) ([checksum](https://get.helm.sh/helm-vX.Y.Z-windows-amd64.zip.sha256) / CHECKSUM_VAL) Once you have the client installed, upgrade Tiller with `helm init --upgrade`. diff --git a/scripts/get b/scripts/get index 5479abddb..ea2056ca6 100755 --- a/scripts/get +++ b/scripts/get @@ -111,7 +111,7 @@ checkHelmInstalledVersion() { # for that binary. downloadFile() { HELM_DIST="helm-$TAG-$OS-$ARCH.tar.gz" - DOWNLOAD_URL="https://kubernetes-helm.storage.googleapis.com/$HELM_DIST" + DOWNLOAD_URL="https://get.helm.sh/$HELM_DIST" CHECKSUM_URL="$DOWNLOAD_URL.sha256" HELM_TMP_ROOT="$(mktemp -dt helm-installer-XXXXXX)" HELM_TMP_FILE="$HELM_TMP_ROOT/$HELM_DIST" From 35b740af22b2170e1ed8fd747cdfe1fad382cffb Mon Sep 17 00:00:00 2001 From: Matt Farina Date: Tue, 4 Jun 2019 14:49:52 -0400 Subject: [PATCH 238/327] Adding Kinds to the capabilities apiversions lookup for templates This will enable the detection of specific objects including CRDs that may vary widely between kubernetes clusters Signed-off-by: Matt Farina --- pkg/tiller/release_server.go | 55 ++++++++++++++++++++++++++++++- pkg/tiller/release_server_test.go | 14 ++++++++ 2 files changed, 68 insertions(+), 1 deletion(-) diff --git a/pkg/tiller/release_server.go b/pkg/tiller/release_server.go index c5638d20d..291135706 100644 --- a/pkg/tiller/release_server.go +++ b/pkg/tiller/release_server.go @@ -251,7 +251,7 @@ func capabilities(disc discovery.DiscoveryInterface) (*chartutil.Capabilities, e if err != nil { return nil, err } - vs, err := GetVersionSet(disc) + vs, err := GetAllVersionSet(disc) if err != nil { return nil, fmt.Errorf("Could not get apiVersions from Kubernetes: %s", err) } @@ -262,6 +262,59 @@ func capabilities(disc discovery.DiscoveryInterface) (*chartutil.Capabilities, e }, nil } +// GetAllVersionSet retrieves a set of available k8s API versions and objects +// +// This is a different function from GetVersionSet because the signature changed. +// To keep compatibility through the public functions this needed to be a new +// function.GetAllVersionSet +// TODO(mattfarina): In Helm v3 merge with GetVersionSet +func GetAllVersionSet(client discovery.ServerResourcesInterface) (chartutil.VersionSet, error) { + groups, resources, err := client.ServerGroupsAndResources() + if err != nil { + return chartutil.DefaultVersionSet, err + } + + // FIXME: The Kubernetes test fixture for cli appears to always return nil + // for calls to Discovery().ServerGroupsAndResources(). So in this case, we + // return the default API list. This is also a safe value to return in any + // other odd-ball case. + if len(groups) == 0 && len(resources) == 0 { + return chartutil.DefaultVersionSet, nil + } + + versionMap := make(map[string]interface{}) + versions := []string{} + + // Extract the groups + for _, g := range groups { + for _, gv := range g.Versions { + versionMap[gv.GroupVersion] = struct{}{} + } + } + + // Extract the resources + var id string + var ok bool + for _, r := range resources { + for _, rl := range r.APIResources { + + // A Kind at a GroupVersion can show up more than once. We only want + // it displayed once in the final output. + id = path.Join(r.GroupVersion, rl.Kind) + if _, ok = versionMap[id]; !ok { + versionMap[id] = struct{}{} + } + } + } + + // Convert to a form that NewVersionSet can use + for k := range versionMap { + versions = append(versions, k) + } + + return chartutil.NewVersionSet(versions...), nil +} + // GetVersionSet retrieves a set of available k8s API versions func GetVersionSet(client discovery.ServerGroupsInterface) (chartutil.VersionSet, error) { groups, err := client.ServerGroups() diff --git a/pkg/tiller/release_server_test.go b/pkg/tiller/release_server_test.go index d70221ed1..6fc1d48f6 100644 --- a/pkg/tiller/release_server_test.go +++ b/pkg/tiller/release_server_test.go @@ -338,6 +338,20 @@ func TestValidName(t *testing.T) { } } +func TestGetAllVersionSet(t *testing.T) { + rs := rsFixture() + vs, err := GetAllVersionSet(rs.clientset.Discovery()) + if err != nil { + t.Error(err) + } + if !vs.Has("v1") { + t.Errorf("Expected supported versions to at least include v1.") + } + if vs.Has("nosuchversion/v1") { + t.Error("Non-existent version is reported found.") + } +} + func TestGetVersionSet(t *testing.T) { rs := rsFixture() vs, err := GetVersionSet(rs.clientset.Discovery()) From 4c6e67b5db5bd5b757c6556a5beb3be4fab79720 Mon Sep 17 00:00:00 2001 From: Matt Farina Date: Tue, 4 Jun 2019 14:55:50 -0400 Subject: [PATCH 239/327] Updating docs on resources in capabilities apiversions search Signed-off-by: Matt Farina --- docs/chart_template_guide/builtin_objects.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/chart_template_guide/builtin_objects.md b/docs/chart_template_guide/builtin_objects.md index f7b2857bc..77d95f5f3 100644 --- a/docs/chart_template_guide/builtin_objects.md +++ b/docs/chart_template_guide/builtin_objects.md @@ -22,7 +22,7 @@ In the previous section, we use `{{.Release.Name}}` to insert the name of a rele - `Files.GetBytes` is a function for getting the contents of a file as an array of bytes instead of as a string. This is useful for things like images. - `Capabilities`: This provides information about what capabilities the Kubernetes cluster supports. - `Capabilities.APIVersions` is a set of versions. - - `Capabilities.APIVersions.Has $version` indicates whether a version (`batch/v1`) is enabled on the cluster. + - `Capabilities.APIVersions.Has $version` indicates whether a version (e.g., `batch/v1`) or resource (e.g., `apps/v1/Deployment`) is available on the cluster. Note, resources were not available before Helm v2.15. - `Capabilities.KubeVersion` provides a way to look up the Kubernetes version. It has the following values: `Major`, `Minor`, `GitVersion`, `GitCommit`, `GitTreeState`, `BuildDate`, `GoVersion`, `Compiler`, and `Platform`. - `Capabilities.TillerVersion` provides a way to look up the Tiller version. It has the following values: `SemVer`, `GitCommit`, and `GitTreeState`. - `Template`: Contains information about the current template that is being executed From 3a5e9709ee502ea1ed106feeba51db6365d7d711 Mon Sep 17 00:00:00 2001 From: Ace Eldeib Date: Tue, 4 Jun 2019 12:51:18 -0700 Subject: [PATCH 240/327] fix: include glick.lock Signed-off-by: Ace Eldeib --- glide.lock | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/glide.lock b/glide.lock index 4f031a502..c8b75c737 100644 --- a/glide.lock +++ b/glide.lock @@ -1,5 +1,5 @@ -hash: 7571b58bbda7d85993d2b737b50d0c52f5fadce0c63e7fac064bc0a99faaefab -updated: 2019-05-07T10:43:27.329085-04:00 +hash: d633cc94d6f7fd656b85a64cd1eccffdeed7c45848369ce55ed9a4ae731dd843 +updated: 2019-06-04T12:50:58.563587342-07:00 imports: - name: cloud.google.com/go version: 3b1ae45394a234c385be014e9a488f2bb6eef821 @@ -179,12 +179,12 @@ imports: - reflectx - name: github.com/json-iterator/go version: ab8a2e0c74be9d3be70b3184d9acc634935ded82 -- name: github.com/liggitt/tabwriter - version: 89fcab3d43de07060e4fd4c1547430ed57e87f24 - name: github.com/lib/pq version: 88edab0803230a3898347e77b474f8c1820a1f20 subpackages: - oid +- name: github.com/liggitt/tabwriter + version: 89fcab3d43de07060e4fd4c1547430ed57e87f24 - name: github.com/mailru/easyjson version: 2f5df55504ebc322e4d52d34df6a1f5b503bf26d subpackages: @@ -391,7 +391,7 @@ imports: - name: gopkg.in/yaml.v2 version: 5420a8b6744d3b0345ab293f6fcba19c978f1183 - name: k8s.io/api - version: 6e4e0e4f393bf5e8bbff570acd13217aa5a770cd + version: a675ac48af67cf21d815b5f8df288462096eb9c9 subpackages: - admission/v1beta1 - admissionregistration/v1beta1 @@ -432,7 +432,7 @@ imports: - storage/v1alpha1 - storage/v1beta1 - name: k8s.io/apiextensions-apiserver - version: 727a075fdec8319bf095330e344b3ccc668abc73 + version: bf6753f2aa24fe1d69a2abeea1c106042bcf3f5f subpackages: - pkg/apis/apiextensions - pkg/apis/apiextensions/v1beta1 @@ -494,7 +494,7 @@ imports: - third_party/forked/golang/netutil - third_party/forked/golang/reflect - name: k8s.io/apiserver - version: 1ec86e4da56ce0573788fc12bb3a5530600c0e5d + version: f89599b3f64533b7e94fa4d169acbc861b464f2e subpackages: - pkg/authentication/authenticator - pkg/authentication/serviceaccount @@ -502,7 +502,7 @@ imports: - pkg/features - pkg/util/feature - name: k8s.io/cli-runtime - version: d644b00f3b79346b7627329269bb25f2135f941c + version: 17bc0b7fcef59215541144136f75284656a789fb subpackages: - pkg/genericclioptions - pkg/kustomize @@ -517,7 +517,7 @@ imports: - pkg/printers - pkg/resource - name: k8s.io/client-go - version: 1a26190bd76a9017e289958b9fba936430aa3704 + version: ae8359b20417914b73a4b514b7a3d642597700bb subpackages: - discovery - discovery/cached/disk @@ -661,7 +661,7 @@ imports: - pkg/util/proto/testing - pkg/util/proto/validation - name: k8s.io/kubernetes - version: b7394102d6ef778017f2ca4046abbaa23b88c290 + version: 66049e3b21efe110454d67df4fa62b08ea79a19b subpackages: - pkg/api/legacyscheme - pkg/api/service From 3b392e41eaabcee25fdf248e7b48e667d2ac43ec Mon Sep 17 00:00:00 2001 From: Xiang Dai <764524258@qq.com> Date: Fri, 31 May 2019 19:17:29 +0800 Subject: [PATCH 241/327] Update helm create doc Signed-off-by: Xiang Dai <764524258@qq.com> --- cmd/helm/create.go | 7 ++++++- docs/helm/helm_create.md | 9 +++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/cmd/helm/create.go b/cmd/helm/create.go index 0c4b4b1cb..451b4ce86 100644 --- a/cmd/helm/create.go +++ b/cmd/helm/create.go @@ -31,7 +31,8 @@ import ( const createDesc = ` This command creates a chart directory along with the common files and -directories used in a chart. +directories used in a chart. It provides a basic example and is not +meant to cover all Kubernetes resources. For example, 'helm create foo' will create a directory structure that looks something like this: @@ -54,6 +55,10 @@ something like this: do not exist, Helm will attempt to create them as it goes. If the given destination exists and there are files in that directory, conflicting files will be overwritten, but other files will be left alone. + +The chart that is created by invoking this command contains a Deployment, Ingress +and a Service. To use other Kubernetes resources with your chart, refer to +[The Chart Template Developer's Guide](https://helm.sh/docs/chart_template_guide). ` type createCmd struct { diff --git a/docs/helm/helm_create.md b/docs/helm/helm_create.md index be37467d8..0bf526a22 100644 --- a/docs/helm/helm_create.md +++ b/docs/helm/helm_create.md @@ -6,7 +6,8 @@ Create a new chart with the given name This command creates a chart directory along with the common files and -directories used in a chart. +directories used in a chart. It provides a basic example and is not +meant to cover all Kubernetes resources. For example, 'helm create foo' will create a directory structure that looks something like this: @@ -30,6 +31,10 @@ do not exist, Helm will attempt to create them as it goes. If the given destination exists and there are files in that directory, conflicting files will be overwritten, but other files will be left alone. +The chart that is created by invoking this command contains a Deployment, Ingress +and a Service. To use other Kubernetes resources with your chart, refer to +[The Chart Template Developer's Guide](https://helm.sh/docs/chart_template_guide). + ``` helm create NAME [flags] @@ -58,4 +63,4 @@ helm create NAME [flags] * [helm](helm.md) - The Helm package manager for Kubernetes. -###### Auto generated by spf13/cobra on 16-May-2019 +###### Auto generated by spf13/cobra on 5-Jun-2019 From 116522b0146e439f699b915071bab3ec36d5529b Mon Sep 17 00:00:00 2001 From: Martin Hickey Date: Wed, 5 Jun 2019 14:22:20 +0100 Subject: [PATCH 242/327] Update release checklist Some updates to the doc which would be beneficial to someone new to the process.. Signed-off-by: Martin Hickey --- docs/release_checklist.md | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/docs/release_checklist.md b/docs/release_checklist.md index f6e970d03..7474a01a6 100644 --- a/docs/release_checklist.md +++ b/docs/release_checklist.md @@ -77,6 +77,15 @@ export RELEASE_BRANCH_NAME="release-X.Y" export RELEASE_CANDIDATE_NAME="$RELEASE_NAME-rc.1" ``` +We are also going to be adding security and verification of the release process by +hashing the binaries and providing signature files. We perform this using +[GitHub and GPG](https://help.github.com/en/articles/about-commit-signature-verification). +If you do not have GPG already setup you can follow these steps: +1. [Install GPG](https://gnupg.org/index.html) +2. [Generate GPG key](https://help.github.com/en/articles/generating-a-new-gpg-key) +3. [Add key to GitHub account](https://help.github.com/en/articles/adding-a-new-gpg-key-to-your-github-account) +4. [Set signing key in Git](https://help.github.com/en/articles/telling-git-about-your-signing-key) + ## 1. Create the Release Branch ### Major/Minor Releases @@ -267,6 +276,9 @@ git tag --sign --annotate "${RELEASE_NAME}" --message "Helm release ${RELEASE_NA git push upstream $RELEASE_NAME ``` +Verify that the release succeeded in CI. If not, you will need to fix the +release and push the release again. + ## 7. PGP Sign the downloads While hashes provide a signature that the content of the downloads is what it @@ -276,6 +288,7 @@ from. To do this, run the following `make` commands: ```shell +export VERSION="$RELEASE_NAME" make clean make fetch-dist make sign @@ -371,16 +384,19 @@ Once finished, go into GitHub and edit the release notes for the tagged release Remember to attach the ascii armored signatures generated in the previous step to the release notes. +It is now worth getting other people to take a look at the release notes before the release is published. Send +a request out to [#helm-dev](https://kubernetes.slack.com/messages/C51E88VDG) for review. It is always +beneficial as it can be easy to miss something. + +When you are ready to go, hit `publish`. + ## 9. Evangelize Congratulations! You're done. Go grab yourself a $DRINK_OF_CHOICE. You've earned it. After enjoying a nice $DRINK_OF_CHOICE, go forth and announce the glad tidings -of the new release in Slack and on Twitter. You should also notify any key -partners in the helm community such as the homebrew formula maintainers, the -owners of incubator projects (e.g. ChartMuseum) and any other interested -parties. +of the new release in Slack and on Twitter. Optionally, write a blog post about the new release and showcase some of the new features on there! From 1bd6281761f84a29dfe713d5f51ff9c9aecbe06d Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Wed, 5 Jun 2019 16:02:29 -0400 Subject: [PATCH 243/327] Revert "Cannot have an = sign as an index" This reverts commit d2ab3f5062467b66de8dc9728dd8c7509e8dcb07. The reverted commit turned out to be a workaroud another problem. The real fix is submitted in PR #5680 Signed-off-by: Marc Khouzam --- cmd/helm/completion.go | 1 - 1 file changed, 1 deletion(-) diff --git a/cmd/helm/completion.go b/cmd/helm/completion.go index 53d1c21e5..039dcbe5f 100644 --- a/cmd/helm/completion.go +++ b/cmd/helm/completion.go @@ -213,7 +213,6 @@ __helm_convert_bash_to_zsh() { -e "s/${LWORD}declare${RWORD}/__helm_declare/g" \ -e "s/\\\$(type${RWORD}/\$(__helm_type/g" \ -e 's/aliashash\["\(.\{1,\}\)"\]/aliashash[\1]/g' \ - -e 's/flaghash\[${flagname/flaghash[${flagname%=/' \ -e 's/FUNCNAME/funcstack/g' \ <<'BASH_COMPLETION_EOF' ` From 5703bc9699fd05bb8066c344f5639883f5fa27fb Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Wed, 5 Jun 2019 19:01:20 -0400 Subject: [PATCH 244/327] Use the latest version of Cobra Signed-off-by: Marc Khouzam --- glide.lock | 6 +++--- glide.yaml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/glide.lock b/glide.lock index c8b75c737..b736eec9a 100644 --- a/glide.lock +++ b/glide.lock @@ -1,5 +1,5 @@ -hash: d633cc94d6f7fd656b85a64cd1eccffdeed7c45848369ce55ed9a4ae731dd843 -updated: 2019-06-04T12:50:58.563587342-07:00 +hash: 7104a8ce1f0b3f2338d10b102b3ba9bfd308000396cc9edb43095c2a2e133272 +updated: 2019-06-05T21:58:04.295502-04:00 imports: - name: cloud.google.com/go version: 3b1ae45394a234c385be014e9a488f2bb6eef821 @@ -254,7 +254,7 @@ imports: - name: github.com/sirupsen/logrus version: 89742aefa4b206dcf400792f3bd35b542998eb3b - name: github.com/spf13/cobra - version: fe5e611709b0c57fa4a89136deaa8e1d4004d053 + version: 67fc4837d267bc9bfd6e47f77783fcc3dffc68de subpackages: - doc - name: github.com/spf13/pflag diff --git a/glide.yaml b/glide.yaml index 565ba1069..ef2d27cf5 100644 --- a/glide.yaml +++ b/glide.yaml @@ -12,7 +12,7 @@ import: - unix - windows - package: github.com/spf13/cobra - version: fe5e611709b0c57fa4a89136deaa8e1d4004d053 + version: ^0.0.4 - package: github.com/spf13/pflag version: ~1.0.1 - package: github.com/Masterminds/vcs From 48f0e3101d49a3de1466ff75fc786ce012f369cc Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Wed, 5 Jun 2019 22:09:15 -0400 Subject: [PATCH 245/327] Allow for completion of aliases Turns out that removing the quotes from the associate array 'aliashash' is still required, but because it is needed for completion of alias commands. For example helm dep does not complete as expected (as if it was 'helm dependency') if the quotes are not removed. This is because although bash ignores quotes when using associative arrays, zsh does not. So when looking for an alias aliashash[dep] will not match the entry aliashash["dep"] in zsh but will for bash. Therefore, removing the quotes fixes things. Signed-off-by: Marc Khouzam --- cmd/helm/completion.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/helm/completion.go b/cmd/helm/completion.go index f0345d32a..051f946fd 100644 --- a/cmd/helm/completion.go +++ b/cmd/helm/completion.go @@ -205,6 +205,7 @@ __helm_convert_bash_to_zsh() { -e "s/${LWORD}compopt${RWORD}/__helm_compopt/g" \ -e "s/${LWORD}declare${RWORD}/builtin declare/g" \ -e "s/\\\$(type${RWORD}/\$(__helm_type/g" \ + -e 's/aliashash\["\(.\{1,\}\)"\]/aliashash[\1]/g' \ -e 's/FUNCNAME/funcstack/g' \ <<'BASH_COMPLETION_EOF' ` From c49ba7da852c5e4d918a0a1b6a152a3e0b5e6cd9 Mon Sep 17 00:00:00 2001 From: Deepak Sattiraju Date: Thu, 17 Jan 2019 19:17:40 +0530 Subject: [PATCH 246/327] feat(helm): adding --name to update single repo Signed-off-by: Deepak Sattiraju Lint Signed-off-by: ds-ms make docs Signed-off-by: ds-ms make docs Signed-off-by: ds-ms Signed-off-by: Deepak Sattiraju using args instead of --name Signed-off-by: ds-ms Adding [repo_name] to use Signed-off-by: ds-ms Adding test Signed-off-by: ds-ms Adding positive test case Signed-off-by: ds-ms lint Signed-off-by: ds-ms Renaming Signed-off-by: ds-ms Updating repo_name to REPO_NAME feat(helm): adding --name to update single repo Signed-off-by: Deepak Sattiraju Lint Signed-off-by: ds-ms make docs Signed-off-by: ds-ms make docs Signed-off-by: ds-ms Signed-off-by: Deepak Sattiraju using args instead of --name Signed-off-by: ds-ms Adding [repo_name] to use Signed-off-by: ds-ms Adding test Signed-off-by: ds-ms Adding positive test case Signed-off-by: ds-ms lint Signed-off-by: ds-ms Renaming Signed-off-by: ds-ms Updating repo_name to REPO_NAME --- cmd/helm/repo_update.go | 30 +++++++++++++- cmd/helm/repo_update_test.go | 75 +++++++++++++++++++++++++++++++++++ docs/helm/helm_repo_update.md | 11 ++++- 3 files changed, 112 insertions(+), 4 deletions(-) diff --git a/cmd/helm/repo_update.go b/cmd/helm/repo_update.go index 9d5e04b5d..f1e9fb566 100644 --- a/cmd/helm/repo_update.go +++ b/cmd/helm/repo_update.go @@ -36,15 +36,24 @@ Information is cached locally, where it is used by commands like 'helm search'. 'helm update' is the deprecated form of 'helm repo update'. It will be removed in future releases. + +You can specify the name of a repository you want to update. + + $ helm repo update + +To update all the repositories, use 'helm repo update'. + ` var errNoRepositories = errors.New("no repositories found. You must add one before updating") +var errNoRepositoriesMatchingRepoName = errors.New("no repositories found matching the provided name. Verify if the repo exists") type repoUpdateCmd struct { update func([]*repo.ChartRepository, io.Writer, helmpath.Home, bool) error home helmpath.Home out io.Writer strict bool + name string } func newRepoUpdateCmd(out io.Writer) *cobra.Command { @@ -53,12 +62,15 @@ func newRepoUpdateCmd(out io.Writer) *cobra.Command { update: updateCharts, } cmd := &cobra.Command{ - Use: "update", + Use: "update [REPO_NAME]", Aliases: []string{"up"}, Short: "Update information of available charts locally from chart repositories", Long: updateDesc, RunE: func(cmd *cobra.Command, args []string) error { u.home = settings.Home + if len(args) != 0 { + u.name = args[0] + } return u.run() }, } @@ -84,8 +96,22 @@ func (u *repoUpdateCmd) run() error { if err != nil { return err } - repos = append(repos, r) + if len(u.name) != 0 { + if cfg.Name == u.name { + repos = append(repos, r) + break + } else { + continue + } + } else { + repos = append(repos, r) + } } + + if len(repos) == 0 { + return errNoRepositoriesMatchingRepoName + } + return u.update(repos, u.out, u.home, u.strict) } diff --git a/cmd/helm/repo_update_test.go b/cmd/helm/repo_update_test.go index 5b1058008..d26df98c5 100644 --- a/cmd/helm/repo_update_test.go +++ b/cmd/helm/repo_update_test.go @@ -132,3 +132,78 @@ func TestUpdateCmdStrictFlag(t *testing.T) { t.Errorf("Expected 'Unable to get an update', got %q", got) } } + +func TestUpdateCmdWithSingleRepoNameWhichDoesntExist(t *testing.T) { + thome, err := tempHelmHome(t) + if err != nil { + t.Fatal(err) + } + + cleanup := resetEnv() + defer func() { + os.RemoveAll(thome.String()) + cleanup() + }() + + settings.Home = thome + + out := bytes.NewBuffer(nil) + cmd := newRepoUpdateCmd(out) + + if err = cmd.RunE(cmd, []string{"randomRepo"}); err == nil { + t.Fatal("expected error due to wrong repo name") + } + + if got := fmt.Sprintf("%v", err); !strings.Contains(got, "no repositories found matching the provided name. Verify if the repo exists") { + t.Errorf("Expected 'no repositories found matching the provided name. Verify if the repo exists', got %q", got) + } +} + +func TestUpdateRepo(t *testing.T) { + ts, thome, err := repotest.NewTempServer("testdata/testserver/*.*") + if err != nil { + t.Fatal(err) + } + + hh := helmpath.Home(thome) + cleanup := resetEnv() + defer func() { + ts.Stop() + os.RemoveAll(thome.String()) + cleanup() + }() + if err := ensureTestHome(hh, t); err != nil { + t.Fatal(err) + } + + settings.Home = thome + + if err := addRepository("repo1", ts.URL(), "", "", hh, "", "", "", true); err != nil { + t.Error(err) + } + + if err := addRepository("repo2", ts.URL(), "", "", hh, "", "", "", true); err != nil { + t.Error(err) + } + + out := bytes.NewBuffer(nil) + cmd := newRepoUpdateCmd(out) + + if err = cmd.RunE(cmd, []string{"repo1"}); err != nil { + t.Fatal("expected to update repo1 correctly") + } + + got := out.String() + + if !strings.Contains(got, "Successfully got an update from the \"repo1\"") { + t.Errorf("Expected to successfully update \"repo1\" repository, got %q", got) + } + + if strings.Contains(got, "Successfully got an update from the \"repo2\"") { + t.Errorf("Shouldn't have updated \"repo2\" repository, got %q", got) + } + + if !strings.Contains(got, "Update Complete.") { + t.Error("Update was not successful") + } +} diff --git a/docs/helm/helm_repo_update.md b/docs/helm/helm_repo_update.md index e374620ac..d5e8849bc 100644 --- a/docs/helm/helm_repo_update.md +++ b/docs/helm/helm_repo_update.md @@ -11,9 +11,16 @@ Information is cached locally, where it is used by commands like 'helm search'. 'helm update' is the deprecated form of 'helm repo update'. It will be removed in future releases. +You can specify the name of a repository you want to update. + + $ helm repo update + +To update all the repositories, use 'helm repo update'. + + ``` -helm repo update [flags] +helm repo update [REPO_NAME] [flags] ``` ### Options @@ -39,4 +46,4 @@ helm repo update [flags] * [helm repo](helm_repo.md) - Add, list, remove, update, and index chart repositories -###### Auto generated by spf13/cobra on 16-May-2019 +###### Auto generated by spf13/cobra on 7-Jun-2019 From 2f0a89a96109ddd77b6053e62b6e8430144a2b84 Mon Sep 17 00:00:00 2001 From: Patrik Fuhrmann Date: Mon, 10 Jun 2019 02:42:37 +0200 Subject: [PATCH 247/327] Adding newline to references More readable this way. Signed-off-by: Patrik Fuhrmann --- docs/tiller_ssl.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/tiller_ssl.md b/docs/tiller_ssl.md index 3705723fa..703c9e4a8 100644 --- a/docs/tiller_ssl.md +++ b/docs/tiller_ssl.md @@ -312,6 +312,6 @@ If your tiller certificate has expired, you'll need to sign a new certificate, b ## References -https://github.com/denji/golang-tls -https://www.openssl.org/docs/ +https://github.com/denji/golang-tls +https://www.openssl.org/docs/ https://jamielinux.com/docs/openssl-certificate-authority/sign-server-and-client-certificates.html From b4475775fd670ed223479e743960e3b7c5934b61 Mon Sep 17 00:00:00 2001 From: Patrik Fuhrmann Date: Mon, 10 Jun 2019 21:21:41 +0200 Subject: [PATCH 248/327] Making references into list Signed-off-by: Patrik Fuhrmann --- docs/tiller_ssl.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/tiller_ssl.md b/docs/tiller_ssl.md index 703c9e4a8..8491c2c78 100644 --- a/docs/tiller_ssl.md +++ b/docs/tiller_ssl.md @@ -312,6 +312,6 @@ If your tiller certificate has expired, you'll need to sign a new certificate, b ## References -https://github.com/denji/golang-tls -https://www.openssl.org/docs/ -https://jamielinux.com/docs/openssl-certificate-authority/sign-server-and-client-certificates.html +- https://github.com/denji/golang-tls +- https://www.openssl.org/docs/ +- https://jamielinux.com/docs/openssl-certificate-authority/sign-server-and-client-certificates.html From 29a295eb84ffdfd00e3174818123f37033a02a3e Mon Sep 17 00:00:00 2001 From: Adam Eijdenberg Date: Wed, 12 Jun 2019 10:05:05 +1000 Subject: [PATCH 249/327] Add test for existing merging behaviour of mixed types Signed-off-by: Adam Eijdenberg --- pkg/chartutil/values_test.go | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/pkg/chartutil/values_test.go b/pkg/chartutil/values_test.go index af6c77d27..fb26c6938 100644 --- a/pkg/chartutil/values_test.go +++ b/pkg/chartutil/values_test.go @@ -585,3 +585,27 @@ anotherNewKey: } } } + +func TestOverriteTableItemWithNonTableValue(t *testing.T) { + // src has a table value for "foo" + src := map[string]interface{}{ + "foo": map[string]interface{}{ + "baz": "boz", + }, + } + + // dst has a non-table value for "foo" + dst := map[string]interface{}{ + "foo": "bar", + } + + // result - this may print a warning, but we has always "worked" + result := coalesceTables(dst, src, "") + expected := map[string]interface{}{ + "foo": "bar", + } + + if !reflect.DeepEqual(result, expected) { + t.Errorf("Expected %v, but got %v", expected, result) + } +} From dda84976bf75e4f3fca9090f0aabe6a7208d709d Mon Sep 17 00:00:00 2001 From: Adam Eijdenberg Date: Fri, 18 Jan 2019 15:37:16 +1100 Subject: [PATCH 250/327] Refactor to use common codepath for table coalescing Stop mutating maps passed on input Signed-off-by: Adam Eijdenberg --- pkg/chartutil/requirements.go | 5 +- pkg/chartutil/values.go | 131 ++++++++++++---------------------- 2 files changed, 49 insertions(+), 87 deletions(-) diff --git a/pkg/chartutil/requirements.go b/pkg/chartutil/requirements.go index f21a22005..ac2649d7c 100644 --- a/pkg/chartutil/requirements.go +++ b/pkg/chartutil/requirements.go @@ -391,7 +391,7 @@ func processImportValues(c *chart.Chart) error { if err != nil { return err } - b := make(map[string]interface{}, 0) + b := cvals.AsMap() // import values from each dependency if specified in import-values for _, r := range reqs.Dependencies { // only process raw requirement that is found in chart's dependencies (enabled) @@ -428,7 +428,7 @@ func processImportValues(c *chart.Chart) error { } // create value map from child to be merged into parent vm := pathToMap(nm["parent"], vv.AsMap()) - b = coalesceTables(cvals, vm, c.Metadata.Name) + b = coalesceTables(b, vm, c.Metadata.Name) case string: nm := map[string]string{ "child": "exports." + iv, @@ -448,7 +448,6 @@ func processImportValues(c *chart.Chart) error { r.ImportValues = outiv } } - b = coalesceTables(b, cvals, c.Metadata.Name) y, err := yaml.Marshal(b) if err != nil { return err diff --git a/pkg/chartutil/values.go b/pkg/chartutil/values.go index 6270531d7..1612b7596 100644 --- a/pkg/chartutil/values.go +++ b/pkg/chartutil/values.go @@ -172,9 +172,7 @@ func CoalesceValues(chrt *chart.Chart, vals *chart.Config) (Values, error) { } } - var err error - cvals, err = coalesceDeps(chrt, cvals) - return cvals, err + return coalesceDeps(chrt, cvals) } // coalesce coalesces the dest values and the chart values, giving priority to the dest values. @@ -186,8 +184,7 @@ func coalesce(ch *chart.Chart, dest map[string]interface{}) (map[string]interfac if err != nil { return dest, err } - coalesceDeps(ch, dest) - return dest, nil + return coalesceDeps(ch, dest) } // coalesceDeps coalesces the dependencies of the given chart. @@ -203,7 +200,7 @@ func coalesceDeps(chrt *chart.Chart, dest map[string]interface{}) (map[string]in dvmap := dv.(map[string]interface{}) // Get globals out of dest and merge them into dvmap. - coalesceGlobals(dvmap, dest, chrt.Metadata.Name) + dvmap = coalesceGlobals(dvmap, dest, chrt.Metadata.Name) var err error // Now coalesce the rest of the values. @@ -236,45 +233,20 @@ func coalesceGlobals(dest, src map[string]interface{}, chartName string) map[str return dg } + rv := make(map[string]interface{}) + for k, v := range dest { + rv[k] = v + } + // EXPERIMENTAL: In the past, we have disallowed globals to test tables. This // reverses that decision. It may somehow be possible to introduce a loop // here, but I haven't found a way. So for the time being, let's allow // tables in globals. - for key, val := range sg { - if istable(val) { - vv := copyMap(val.(map[string]interface{})) - if destv, ok := dg[key]; ok { - if destvmap, ok := destv.(map[string]interface{}); ok { - // Basically, we reverse order of coalesce here to merge - // top-down. - coalesceTables(vv, destvmap, chartName) - dg[key] = vv - continue - } else { - log.Printf("Warning: For chart '%s', cannot merge map onto non-map for key '%q'. Skipping.", chartName, key) - } - } else { - // Here there is no merge. We're just adding. - dg[key] = vv - } - } else if dv, ok := dg[key]; ok && istable(dv) { - // It's not clear if this condition can actually ever trigger. - log.Printf("Warning: For chart '%s', key '%s' is a table. Skipping.", chartName, key) - continue - } - // TODO: Do we need to do any additional checking on the value? - dg[key] = val - } - dest[GlobalKey] = dg - return dest -} -func copyMap(src map[string]interface{}) map[string]interface{} { - dest := make(map[string]interface{}, len(src)) - for k, v := range src { - dest[k] = v - } - return dest + // Basically, we reverse order of coalesce here to merge + // top-down. + rv[GlobalKey] = coalesceTables(sg, dg, chartName) + return rv } // coalesceValues builds up a values map for a particular chart. @@ -294,30 +266,7 @@ func coalesceValues(c *chart.Chart, v map[string]interface{}) (map[string]interf return v, fmt.Errorf("Error: Reading chart '%s' default values (%s): %s", c.Metadata.Name, c.Values.Raw, err) } - for key, val := range nv { - if value, ok := v[key]; ok { - if value == nil { - // When the YAML value is null, we remove the value's key. - // This allows Helm's various sources of values (value files or --set) to - // remove incompatible keys from any previous chart, file, or set values. - delete(v, key) - } else if dest, ok := value.(map[string]interface{}); ok { - // if v[key] is a table, merge nv's val table into v[key]. - src, ok := val.(map[string]interface{}) - if !ok { - log.Printf("Warning: Building values map for chart '%s'. Skipped value (%+v) for '%s', as it is not a table.", c.Metadata.Name, src, key) - continue - } - // Because v has higher precedence than nv, dest values override src - // values. - coalesceTables(dest, src, c.Metadata.Name) - } - } else { - // If the key is not in v, copy it from nv. - v[key] = val - } - } - return v, nil + return coalesceTables(v, nv.AsMap(), c.Metadata.Name), nil } // coalesceTables merges a source map into a destination map. @@ -326,36 +275,50 @@ func coalesceValues(c *chart.Chart, v map[string]interface{}) (map[string]interf func coalesceTables(dst, src map[string]interface{}, chartName string) map[string]interface{} { // Because dest has higher precedence than src, dest values override src // values. + + rv := make(map[string]interface{}) for key, val := range src { dv, ok := dst[key] - if ok && dv == nil { - // skip here, we delete at end + if !ok { // if not in dst, then copy from src + rv[key] = val continue } - if istable(val) { - if !ok { - dst[key] = val - } else if istable(dv) { - coalesceTables(dv.(map[string]interface{}), val.(map[string]interface{}), chartName) - } else { - log.Printf("Warning: Merging destination map for chart '%s'. Cannot overwrite table item '%s', with non table value: %v", chartName, key, val) - } + if dv == nil { // if set to nil in dst, then ignore + // When the YAML value is null, we skip the value's key. + // This allows Helm's various sources of values (value files or --set) to + // remove incompatible keys from any previous chart, file, or set values. continue - } else if ok && istable(dv) { + } + + srcTable, srcIsTable := val.(map[string]interface{}) + dstTable, dstIsTable := dv.(map[string]interface{}) + switch { + case srcIsTable && dstIsTable: // both tables, we coalesce + rv[key] = coalesceTables(dstTable, srcTable, chartName) + case srcIsTable && !dstIsTable: + log.Printf("Warning: Merging destination map for chart '%s'. Cannot overwrite table item '%s', with non table value: %v", chartName, key, val) + // despite message in warning, we appear to do exactly that, and do take the dst value + rv[key] = dv + case !srcIsTable && dstIsTable: log.Printf("Warning: Merging destination map for chart '%s'. The destination item '%s' is a table and ignoring the source '%s' as it has a non-table value of: %v", chartName, key, key, val) - continue - } else if !ok { // <- ok is still in scope from preceding conditional. - dst[key] = val - continue + rv[key] = dv + default: // neither are tables, simply take the dst value + rv[key] = dv } } - // never return a nil value, rather delete the key - for k, v := range dst { - if v == nil { - delete(dst, k) + + // do we have anything in dst that wasn't processed already that we need to copy across? + for key, val := range dst { + if val == nil { + continue + } + _, ok := rv[key] + if !ok { + rv[key] = val } } - return dst + + return rv } // ReleaseOptions represents the additional release options needed From 0ba4c63546a3688e57ca34f4db00123d67ccd70c Mon Sep 17 00:00:00 2001 From: Adam Eijdenberg Date: Wed, 12 Jun 2019 10:05:51 +1000 Subject: [PATCH 251/327] Update warning to be more accurate Signed-off-by: Adam Eijdenberg --- pkg/chartutil/values.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/chartutil/values.go b/pkg/chartutil/values.go index 1612b7596..890cd5540 100644 --- a/pkg/chartutil/values.go +++ b/pkg/chartutil/values.go @@ -296,8 +296,7 @@ func coalesceTables(dst, src map[string]interface{}, chartName string) map[strin case srcIsTable && dstIsTable: // both tables, we coalesce rv[key] = coalesceTables(dstTable, srcTable, chartName) case srcIsTable && !dstIsTable: - log.Printf("Warning: Merging destination map for chart '%s'. Cannot overwrite table item '%s', with non table value: %v", chartName, key, val) - // despite message in warning, we appear to do exactly that, and do take the dst value + log.Printf("Warning: Merging destination map for chart '%s'. Overwriting table item '%s', with non table value: %v", chartName, key, dv) rv[key] = dv case !srcIsTable && dstIsTable: log.Printf("Warning: Merging destination map for chart '%s'. The destination item '%s' is a table and ignoring the source '%s' as it has a non-table value of: %v", chartName, key, key, val) From 94201711ff37d97c2211df6e4776cbaa34b367c2 Mon Sep 17 00:00:00 2001 From: Ihor Dvoretskyi Date: Thu, 13 Jun 2019 14:54:40 +0000 Subject: [PATCH 252/327] Snap installation information Installation information added (and a minor fix) Signed-off-by: Ihor Dvoretskyi --- README.md | 2 ++ docs/install.md | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1889e818e..3262ba54f 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,8 @@ If you want to use a package manager: - [Chocolatey](https://chocolatey.org/) users can use `choco install kubernetes-helm`. - [Scoop](https://scoop.sh/) users can use `scoop install helm`. - [GoFish](https://gofi.sh/) users can use `gofish install helm`. +- [Snap](https://snapcraft.io/) users can use `sudo snap install helm + --classic`. To rapidly get Helm up and running, start with the [Quick Start Guide](https://docs.helm.sh/using_helm/#quickstart-guide). diff --git a/docs/install.md b/docs/install.md index d9a345f80..3742385f3 100755 --- a/docs/install.md +++ b/docs/install.md @@ -30,7 +30,7 @@ The Snap package for Helm is maintained by [Snapcrafters](https://github.com/snapcrafters/helm). ``` -$ sudo snap install helm --classic +sudo snap install helm --classic ``` ### From Homebrew (macOS) From a985f34b810967b710f32599ffe1a9b4080f3916 Mon Sep 17 00:00:00 2001 From: Naseem Date: Thu, 13 Jun 2019 15:14:43 -0400 Subject: [PATCH 253/327] Add sa Signed-off-by: Naseem --- cmd/helm/create_test.go | 2 +- pkg/chartutil/create.go | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/cmd/helm/create_test.go b/cmd/helm/create_test.go index c9459b477..20bace864 100644 --- a/cmd/helm/create_test.go +++ b/cmd/helm/create_test.go @@ -143,7 +143,7 @@ func TestCreateStarterCmd(t *testing.T) { t.Errorf("Wrong API version: %q", c.Metadata.ApiVersion) } - expectedTemplateCount := 7 + expectedTemplateCount := 8 if l := len(c.Templates); l != expectedTemplateCount { t.Errorf("Expected %d templates, got %d", expectedTemplateCount, l) } diff --git a/pkg/chartutil/create.go b/pkg/chartutil/create.go index 74607aff2..3aa0808b0 100644 --- a/pkg/chartutil/create.go +++ b/pkg/chartutil/create.go @@ -42,6 +42,8 @@ const ( DeploymentName = "deployment.yaml" // ServiceName is the name of the example service file. ServiceName = "service.yaml" + // ServiceAccountName is the name of the example serviceaccount file. + ServiceAccountName = "serviceaccount.yaml" // NotesName is the name of the example NOTES.txt file. NotesName = "NOTES.txt" // HelpersName is the name of the example helpers file. @@ -67,6 +69,13 @@ imagePullSecrets: [] nameOverride: "" fullnameOverride: "" +serviceAccount: + # Specifies whether a service account should be created + create: true + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: + service: type: ClusterIP port: 80 @@ -189,6 +198,7 @@ spec: imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} + serviceAccountName: {{ template ".serviceAccountName" . }} containers: - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" @@ -238,6 +248,15 @@ spec: app.kubernetes.io/name: {{ include ".name" . }} app.kubernetes.io/instance: {{ .Release.Name }} ` +const defaultServiceAccount = `{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ template ".serviceAccountName" . }} + labels: + {{ include ".labels" . | indent 4 }} +{{- end -}} +` const defaultNotes = `1. Get the application URL by running these commands: {{- if .Values.ingress.enabled }} @@ -307,6 +326,17 @@ app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} app.kubernetes.io/managed-by: {{ .Release.Service }} {{- end -}} + +{{/* +Create the name of the service account to use +*/}} +{{- define ".serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include ".fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} ` const defaultTestConnection = `apiVersion: v1 @@ -425,6 +455,11 @@ func Create(chartfile *chart.Metadata, dir string) (string, error) { path: filepath.Join(cdir, TemplatesDir, ServiceName), content: Transform(defaultService, "", chartfile.Name), }, + { + // serviceaccount.yaml + path: filepath.Join(cdir, TemplatesDir, ServiceAccountName), + content: Transform(defaultServiceAccount, "", chartfile.Name), + }, { // NOTES.txt path: filepath.Join(cdir, TemplatesDir, NotesName), From ab8585faea4955abf38ad190807876b14221fde2 Mon Sep 17 00:00:00 2001 From: Naseem Date: Fri, 14 Jun 2019 15:29:37 -0400 Subject: [PATCH 254/327] Keep indentation consistent Signed-off-by: Naseem --- pkg/chartutil/create.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/chartutil/create.go b/pkg/chartutil/create.go index 3aa0808b0..f8785b46f 100644 --- a/pkg/chartutil/create.go +++ b/pkg/chartutil/create.go @@ -254,7 +254,7 @@ kind: ServiceAccount metadata: name: {{ template ".serviceAccountName" . }} labels: - {{ include ".labels" . | indent 4 }} +{{ include ".labels" . | indent 4 }} {{- end -}} ` From 2868aed3218db9c0519bc65208cda2c3790708bc Mon Sep 17 00:00:00 2001 From: Aisuko Date: Sat, 15 Jun 2019 15:03:28 +0800 Subject: [PATCH 255/327] Change port forward command order in default note Signed-off-by: Aisuko --- pkg/chartutil/create.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/chartutil/create.go b/pkg/chartutil/create.go index 74607aff2..0a68856e2 100644 --- a/pkg/chartutil/create.go +++ b/pkg/chartutil/create.go @@ -257,8 +257,8 @@ const defaultNotes = `1. Get the application URL by running these commands: echo http://$SERVICE_IP:{{ .Values.service.port }} {{- else if contains "ClusterIP" .Values.service.type }} export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include ".name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") - echo "Visit http://127.0.0.1:8080 to use your application" kubectl port-forward $POD_NAME 8080:80 + echo "Visit http://127.0.0.1:8080 to use your application" {{- end }} ` From d93b660c62f9a9655747b0d00ff2b941df203730 Mon Sep 17 00:00:00 2001 From: Matthew Fisher Date: Mon, 17 Jun 2019 07:30:28 -0700 Subject: [PATCH 256/327] Revert "Change port forward command order in default note" Signed-off-by: Matthew Fisher --- pkg/chartutil/create.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/chartutil/create.go b/pkg/chartutil/create.go index 6828ae902..f8785b46f 100644 --- a/pkg/chartutil/create.go +++ b/pkg/chartutil/create.go @@ -276,8 +276,8 @@ const defaultNotes = `1. Get the application URL by running these commands: echo http://$SERVICE_IP:{{ .Values.service.port }} {{- else if contains "ClusterIP" .Values.service.type }} export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include ".name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") - kubectl port-forward $POD_NAME 8080:80 echo "Visit http://127.0.0.1:8080 to use your application" + kubectl port-forward $POD_NAME 8080:80 {{- end }} ` From 79235eef11a311e400e9c27ad2df55932390c01d Mon Sep 17 00:00:00 2001 From: Matt Farina Date: Mon, 17 Jun 2019 10:44:49 -0400 Subject: [PATCH 257/327] Add more capabilities to the detault set used by helm template - These are the capabilities as of k8s 1.14 - They are generated because getting them at runtime uses so much memory it causes CI errors Signed-off-by: Matt Farina --- Makefile | 4 + docs/helm/helm_template.md | 4 +- pkg/chartutil/capabilities.go | 10 +- pkg/chartutil/capabilities_test.go | 7 +- .../capabilities_versions_generated.go | 575 ++++++++++++++++++ .../capabilities_default_versions_generate.go | 106 ++++ 6 files changed, 697 insertions(+), 9 deletions(-) create mode 100644 pkg/chartutil/capabilities_versions_generated.go create mode 100644 pkg/chartutil/generator/capabilities_default_versions_generate.go diff --git a/Makefile b/Makefile index 0c474c135..fc175a781 100644 --- a/Makefile +++ b/Makefile @@ -141,6 +141,10 @@ docker-test-style: check-docker protoc: $(MAKE) -C _proto/ all +.PHONY: generate +generate: + $(GO) generate ./... + .PHONY: docs docs: build @scripts/update-docs.sh diff --git a/docs/helm/helm_template.md b/docs/helm/helm_template.md index ffc0ecc83..8f890e27d 100644 --- a/docs/helm/helm_template.md +++ b/docs/helm/helm_template.md @@ -27,7 +27,7 @@ helm template [flags] CHART -x, --execute stringArray Only execute the given templates -h, --help help for template --is-upgrade Set .Release.IsUpgrade instead of .Release.IsInstall - --kube-version string Kubernetes version used as Capabilities.KubeVersion.Major/Minor (default "1.9") + --kube-version string Kubernetes version used as Capabilities.KubeVersion.Major/Minor (default "1.14") -n, --name string Release name (default "release-name") --name-template string Specify template used to name the release --namespace string Namespace to install the release into @@ -55,4 +55,4 @@ helm template [flags] CHART * [helm](helm.md) - The Helm package manager for Kubernetes. -###### Auto generated by spf13/cobra on 16-May-2019 +###### Auto generated by spf13/cobra on 17-Jun-2019 diff --git a/pkg/chartutil/capabilities.go b/pkg/chartutil/capabilities.go index b4533e417..a6808c702 100644 --- a/pkg/chartutil/capabilities.go +++ b/pkg/chartutil/capabilities.go @@ -12,6 +12,7 @@ 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. */ +//go:generate go run generator/capabilities_default_versions_generate.go package chartutil @@ -24,14 +25,15 @@ import ( ) var ( - // DefaultVersionSet is the default version set, which includes only Core V1 ("v1"). - DefaultVersionSet = NewVersionSet("v1") + // DefaultVersionSet is the default version set in included in Kubernetes for workloads + // Default versions as of Kubernetes 1.14 + DefaultVersionSet = NewVersionSet(defaultVersions()...) // DefaultKubeVersion is the default kubernetes version DefaultKubeVersion = &version.Info{ Major: "1", - Minor: "9", - GitVersion: "v1.9.0", + Minor: "14", + GitVersion: "v1.14.0", GoVersion: runtime.Version(), Compiler: runtime.Compiler, Platform: fmt.Sprintf("%s/%s", runtime.GOOS, runtime.GOARCH), diff --git a/pkg/chartutil/capabilities_test.go b/pkg/chartutil/capabilities_test.go index 1f7020a39..666303e44 100644 --- a/pkg/chartutil/capabilities_test.go +++ b/pkg/chartutil/capabilities_test.go @@ -38,9 +38,6 @@ func TestDefaultVersionSet(t *testing.T) { if !DefaultVersionSet.Has("v1") { t.Error("Expected core v1 version set") } - if d := len(DefaultVersionSet); d != 1 { - t.Errorf("Expected only one version, got %d", d) - } } func TestCapabilities(t *testing.T) { @@ -51,4 +48,8 @@ func TestCapabilities(t *testing.T) { if !cap.APIVersions.Has("v1") { t.Error("APIVersions should have v1") } + + if !cap.APIVersions.Has("apps/v1/Deployment") { + t.Error("APIVersions should have apps/v1/Deployment") + } } diff --git a/pkg/chartutil/capabilities_versions_generated.go b/pkg/chartutil/capabilities_versions_generated.go new file mode 100644 index 000000000..bc33a40e8 --- /dev/null +++ b/pkg/chartutil/capabilities_versions_generated.go @@ -0,0 +1,575 @@ +/* +Copyright The Helm Authors. +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. +*/ +// Code generated by capabilities_default_versions_generate.go; DO NOT EDIT. +package chartutil + +func defaultVersions() []string { + return []string{ + "__internal", + "__internal/WatchEvent", + "admissionregistration.k8s.io/__internal", + "admissionregistration.k8s.io/__internal/WatchEvent", + "admissionregistration.k8s.io/v1beta1", + "admissionregistration.k8s.io/v1beta1/CreateOptions", + "admissionregistration.k8s.io/v1beta1/DeleteOptions", + "admissionregistration.k8s.io/v1beta1/ExportOptions", + "admissionregistration.k8s.io/v1beta1/GetOptions", + "admissionregistration.k8s.io/v1beta1/ListOptions", + "admissionregistration.k8s.io/v1beta1/MutatingWebhookConfiguration", + "admissionregistration.k8s.io/v1beta1/MutatingWebhookConfigurationList", + "admissionregistration.k8s.io/v1beta1/PatchOptions", + "admissionregistration.k8s.io/v1beta1/UpdateOptions", + "admissionregistration.k8s.io/v1beta1/ValidatingWebhookConfiguration", + "admissionregistration.k8s.io/v1beta1/ValidatingWebhookConfigurationList", + "admissionregistration.k8s.io/v1beta1/WatchEvent", + "apps/__internal", + "apps/__internal/WatchEvent", + "apps/v1", + "apps/v1/ControllerRevision", + "apps/v1/ControllerRevisionList", + "apps/v1/CreateOptions", + "apps/v1/DaemonSet", + "apps/v1/DaemonSetList", + "apps/v1/DeleteOptions", + "apps/v1/Deployment", + "apps/v1/DeploymentList", + "apps/v1/ExportOptions", + "apps/v1/GetOptions", + "apps/v1/ListOptions", + "apps/v1/PatchOptions", + "apps/v1/ReplicaSet", + "apps/v1/ReplicaSetList", + "apps/v1/StatefulSet", + "apps/v1/StatefulSetList", + "apps/v1/UpdateOptions", + "apps/v1/WatchEvent", + "apps/v1beta1", + "apps/v1beta1/ControllerRevision", + "apps/v1beta1/ControllerRevisionList", + "apps/v1beta1/CreateOptions", + "apps/v1beta1/DeleteOptions", + "apps/v1beta1/Deployment", + "apps/v1beta1/DeploymentList", + "apps/v1beta1/DeploymentRollback", + "apps/v1beta1/ExportOptions", + "apps/v1beta1/GetOptions", + "apps/v1beta1/ListOptions", + "apps/v1beta1/PatchOptions", + "apps/v1beta1/Scale", + "apps/v1beta1/StatefulSet", + "apps/v1beta1/StatefulSetList", + "apps/v1beta1/UpdateOptions", + "apps/v1beta1/WatchEvent", + "apps/v1beta2", + "apps/v1beta2/ControllerRevision", + "apps/v1beta2/ControllerRevisionList", + "apps/v1beta2/CreateOptions", + "apps/v1beta2/DaemonSet", + "apps/v1beta2/DaemonSetList", + "apps/v1beta2/DeleteOptions", + "apps/v1beta2/Deployment", + "apps/v1beta2/DeploymentList", + "apps/v1beta2/ExportOptions", + "apps/v1beta2/GetOptions", + "apps/v1beta2/ListOptions", + "apps/v1beta2/PatchOptions", + "apps/v1beta2/ReplicaSet", + "apps/v1beta2/ReplicaSetList", + "apps/v1beta2/Scale", + "apps/v1beta2/StatefulSet", + "apps/v1beta2/StatefulSetList", + "apps/v1beta2/UpdateOptions", + "apps/v1beta2/WatchEvent", + "auditregistration.k8s.io/__internal", + "auditregistration.k8s.io/__internal/WatchEvent", + "auditregistration.k8s.io/v1alpha1", + "auditregistration.k8s.io/v1alpha1/AuditSink", + "auditregistration.k8s.io/v1alpha1/AuditSinkList", + "auditregistration.k8s.io/v1alpha1/CreateOptions", + "auditregistration.k8s.io/v1alpha1/DeleteOptions", + "auditregistration.k8s.io/v1alpha1/ExportOptions", + "auditregistration.k8s.io/v1alpha1/GetOptions", + "auditregistration.k8s.io/v1alpha1/ListOptions", + "auditregistration.k8s.io/v1alpha1/PatchOptions", + "auditregistration.k8s.io/v1alpha1/UpdateOptions", + "auditregistration.k8s.io/v1alpha1/WatchEvent", + "authentication.k8s.io/__internal", + "authentication.k8s.io/__internal/WatchEvent", + "authentication.k8s.io/v1", + "authentication.k8s.io/v1/CreateOptions", + "authentication.k8s.io/v1/DeleteOptions", + "authentication.k8s.io/v1/ExportOptions", + "authentication.k8s.io/v1/GetOptions", + "authentication.k8s.io/v1/ListOptions", + "authentication.k8s.io/v1/PatchOptions", + "authentication.k8s.io/v1/TokenRequest", + "authentication.k8s.io/v1/TokenReview", + "authentication.k8s.io/v1/UpdateOptions", + "authentication.k8s.io/v1/WatchEvent", + "authentication.k8s.io/v1beta1", + "authentication.k8s.io/v1beta1/CreateOptions", + "authentication.k8s.io/v1beta1/DeleteOptions", + "authentication.k8s.io/v1beta1/ExportOptions", + "authentication.k8s.io/v1beta1/GetOptions", + "authentication.k8s.io/v1beta1/ListOptions", + "authentication.k8s.io/v1beta1/PatchOptions", + "authentication.k8s.io/v1beta1/TokenReview", + "authentication.k8s.io/v1beta1/UpdateOptions", + "authentication.k8s.io/v1beta1/WatchEvent", + "authorization.k8s.io/__internal", + "authorization.k8s.io/__internal/WatchEvent", + "authorization.k8s.io/v1", + "authorization.k8s.io/v1/CreateOptions", + "authorization.k8s.io/v1/DeleteOptions", + "authorization.k8s.io/v1/ExportOptions", + "authorization.k8s.io/v1/GetOptions", + "authorization.k8s.io/v1/ListOptions", + "authorization.k8s.io/v1/LocalSubjectAccessReview", + "authorization.k8s.io/v1/PatchOptions", + "authorization.k8s.io/v1/SelfSubjectAccessReview", + "authorization.k8s.io/v1/SelfSubjectRulesReview", + "authorization.k8s.io/v1/SubjectAccessReview", + "authorization.k8s.io/v1/UpdateOptions", + "authorization.k8s.io/v1/WatchEvent", + "authorization.k8s.io/v1beta1", + "authorization.k8s.io/v1beta1/CreateOptions", + "authorization.k8s.io/v1beta1/DeleteOptions", + "authorization.k8s.io/v1beta1/ExportOptions", + "authorization.k8s.io/v1beta1/GetOptions", + "authorization.k8s.io/v1beta1/ListOptions", + "authorization.k8s.io/v1beta1/LocalSubjectAccessReview", + "authorization.k8s.io/v1beta1/PatchOptions", + "authorization.k8s.io/v1beta1/SelfSubjectAccessReview", + "authorization.k8s.io/v1beta1/SelfSubjectRulesReview", + "authorization.k8s.io/v1beta1/SubjectAccessReview", + "authorization.k8s.io/v1beta1/UpdateOptions", + "authorization.k8s.io/v1beta1/WatchEvent", + "autoscaling/__internal", + "autoscaling/__internal/WatchEvent", + "autoscaling/v1", + "autoscaling/v1/CreateOptions", + "autoscaling/v1/DeleteOptions", + "autoscaling/v1/ExportOptions", + "autoscaling/v1/GetOptions", + "autoscaling/v1/HorizontalPodAutoscaler", + "autoscaling/v1/HorizontalPodAutoscalerList", + "autoscaling/v1/ListOptions", + "autoscaling/v1/PatchOptions", + "autoscaling/v1/Scale", + "autoscaling/v1/UpdateOptions", + "autoscaling/v1/WatchEvent", + "autoscaling/v2beta1", + "autoscaling/v2beta1/CreateOptions", + "autoscaling/v2beta1/DeleteOptions", + "autoscaling/v2beta1/ExportOptions", + "autoscaling/v2beta1/GetOptions", + "autoscaling/v2beta1/HorizontalPodAutoscaler", + "autoscaling/v2beta1/HorizontalPodAutoscalerList", + "autoscaling/v2beta1/ListOptions", + "autoscaling/v2beta1/PatchOptions", + "autoscaling/v2beta1/UpdateOptions", + "autoscaling/v2beta1/WatchEvent", + "autoscaling/v2beta2", + "autoscaling/v2beta2/CreateOptions", + "autoscaling/v2beta2/DeleteOptions", + "autoscaling/v2beta2/ExportOptions", + "autoscaling/v2beta2/GetOptions", + "autoscaling/v2beta2/HorizontalPodAutoscaler", + "autoscaling/v2beta2/HorizontalPodAutoscalerList", + "autoscaling/v2beta2/ListOptions", + "autoscaling/v2beta2/PatchOptions", + "autoscaling/v2beta2/UpdateOptions", + "autoscaling/v2beta2/WatchEvent", + "batch/__internal", + "batch/__internal/WatchEvent", + "batch/v1", + "batch/v1/CreateOptions", + "batch/v1/DeleteOptions", + "batch/v1/ExportOptions", + "batch/v1/GetOptions", + "batch/v1/Job", + "batch/v1/JobList", + "batch/v1/ListOptions", + "batch/v1/PatchOptions", + "batch/v1/UpdateOptions", + "batch/v1/WatchEvent", + "batch/v1beta1", + "batch/v1beta1/CreateOptions", + "batch/v1beta1/CronJob", + "batch/v1beta1/CronJobList", + "batch/v1beta1/DeleteOptions", + "batch/v1beta1/ExportOptions", + "batch/v1beta1/GetOptions", + "batch/v1beta1/JobTemplate", + "batch/v1beta1/ListOptions", + "batch/v1beta1/PatchOptions", + "batch/v1beta1/UpdateOptions", + "batch/v1beta1/WatchEvent", + "batch/v2alpha1", + "batch/v2alpha1/CreateOptions", + "batch/v2alpha1/CronJob", + "batch/v2alpha1/CronJobList", + "batch/v2alpha1/DeleteOptions", + "batch/v2alpha1/ExportOptions", + "batch/v2alpha1/GetOptions", + "batch/v2alpha1/JobTemplate", + "batch/v2alpha1/ListOptions", + "batch/v2alpha1/PatchOptions", + "batch/v2alpha1/UpdateOptions", + "batch/v2alpha1/WatchEvent", + "certificates.k8s.io/__internal", + "certificates.k8s.io/__internal/WatchEvent", + "certificates.k8s.io/v1beta1", + "certificates.k8s.io/v1beta1/CertificateSigningRequest", + "certificates.k8s.io/v1beta1/CertificateSigningRequestList", + "certificates.k8s.io/v1beta1/CreateOptions", + "certificates.k8s.io/v1beta1/DeleteOptions", + "certificates.k8s.io/v1beta1/ExportOptions", + "certificates.k8s.io/v1beta1/GetOptions", + "certificates.k8s.io/v1beta1/ListOptions", + "certificates.k8s.io/v1beta1/PatchOptions", + "certificates.k8s.io/v1beta1/UpdateOptions", + "certificates.k8s.io/v1beta1/WatchEvent", + "coordination.k8s.io/__internal", + "coordination.k8s.io/__internal/WatchEvent", + "coordination.k8s.io/v1", + "coordination.k8s.io/v1/CreateOptions", + "coordination.k8s.io/v1/DeleteOptions", + "coordination.k8s.io/v1/ExportOptions", + "coordination.k8s.io/v1/GetOptions", + "coordination.k8s.io/v1/Lease", + "coordination.k8s.io/v1/LeaseList", + "coordination.k8s.io/v1/ListOptions", + "coordination.k8s.io/v1/PatchOptions", + "coordination.k8s.io/v1/UpdateOptions", + "coordination.k8s.io/v1/WatchEvent", + "coordination.k8s.io/v1beta1", + "coordination.k8s.io/v1beta1/CreateOptions", + "coordination.k8s.io/v1beta1/DeleteOptions", + "coordination.k8s.io/v1beta1/ExportOptions", + "coordination.k8s.io/v1beta1/GetOptions", + "coordination.k8s.io/v1beta1/Lease", + "coordination.k8s.io/v1beta1/LeaseList", + "coordination.k8s.io/v1beta1/ListOptions", + "coordination.k8s.io/v1beta1/PatchOptions", + "coordination.k8s.io/v1beta1/UpdateOptions", + "coordination.k8s.io/v1beta1/WatchEvent", + "events.k8s.io/__internal", + "events.k8s.io/__internal/WatchEvent", + "events.k8s.io/v1beta1", + "events.k8s.io/v1beta1/CreateOptions", + "events.k8s.io/v1beta1/DeleteOptions", + "events.k8s.io/v1beta1/Event", + "events.k8s.io/v1beta1/EventList", + "events.k8s.io/v1beta1/ExportOptions", + "events.k8s.io/v1beta1/GetOptions", + "events.k8s.io/v1beta1/ListOptions", + "events.k8s.io/v1beta1/PatchOptions", + "events.k8s.io/v1beta1/UpdateOptions", + "events.k8s.io/v1beta1/WatchEvent", + "extensions/__internal", + "extensions/__internal/WatchEvent", + "extensions/v1beta1", + "extensions/v1beta1/CreateOptions", + "extensions/v1beta1/DaemonSet", + "extensions/v1beta1/DaemonSetList", + "extensions/v1beta1/DeleteOptions", + "extensions/v1beta1/Deployment", + "extensions/v1beta1/DeploymentList", + "extensions/v1beta1/DeploymentRollback", + "extensions/v1beta1/ExportOptions", + "extensions/v1beta1/GetOptions", + "extensions/v1beta1/Ingress", + "extensions/v1beta1/IngressList", + "extensions/v1beta1/ListOptions", + "extensions/v1beta1/NetworkPolicy", + "extensions/v1beta1/NetworkPolicyList", + "extensions/v1beta1/PatchOptions", + "extensions/v1beta1/PodSecurityPolicy", + "extensions/v1beta1/PodSecurityPolicyList", + "extensions/v1beta1/ReplicaSet", + "extensions/v1beta1/ReplicaSetList", + "extensions/v1beta1/ReplicationControllerDummy", + "extensions/v1beta1/Scale", + "extensions/v1beta1/UpdateOptions", + "extensions/v1beta1/WatchEvent", + "networking.k8s.io/__internal", + "networking.k8s.io/__internal/WatchEvent", + "networking.k8s.io/v1", + "networking.k8s.io/v1/CreateOptions", + "networking.k8s.io/v1/DeleteOptions", + "networking.k8s.io/v1/ExportOptions", + "networking.k8s.io/v1/GetOptions", + "networking.k8s.io/v1/ListOptions", + "networking.k8s.io/v1/NetworkPolicy", + "networking.k8s.io/v1/NetworkPolicyList", + "networking.k8s.io/v1/PatchOptions", + "networking.k8s.io/v1/UpdateOptions", + "networking.k8s.io/v1/WatchEvent", + "networking.k8s.io/v1beta1", + "networking.k8s.io/v1beta1/CreateOptions", + "networking.k8s.io/v1beta1/DeleteOptions", + "networking.k8s.io/v1beta1/ExportOptions", + "networking.k8s.io/v1beta1/GetOptions", + "networking.k8s.io/v1beta1/Ingress", + "networking.k8s.io/v1beta1/IngressList", + "networking.k8s.io/v1beta1/ListOptions", + "networking.k8s.io/v1beta1/PatchOptions", + "networking.k8s.io/v1beta1/UpdateOptions", + "networking.k8s.io/v1beta1/WatchEvent", + "node.k8s.io/__internal", + "node.k8s.io/__internal/WatchEvent", + "node.k8s.io/v1alpha1", + "node.k8s.io/v1alpha1/CreateOptions", + "node.k8s.io/v1alpha1/DeleteOptions", + "node.k8s.io/v1alpha1/ExportOptions", + "node.k8s.io/v1alpha1/GetOptions", + "node.k8s.io/v1alpha1/ListOptions", + "node.k8s.io/v1alpha1/PatchOptions", + "node.k8s.io/v1alpha1/RuntimeClass", + "node.k8s.io/v1alpha1/RuntimeClassList", + "node.k8s.io/v1alpha1/UpdateOptions", + "node.k8s.io/v1alpha1/WatchEvent", + "node.k8s.io/v1beta1", + "node.k8s.io/v1beta1/CreateOptions", + "node.k8s.io/v1beta1/DeleteOptions", + "node.k8s.io/v1beta1/ExportOptions", + "node.k8s.io/v1beta1/GetOptions", + "node.k8s.io/v1beta1/ListOptions", + "node.k8s.io/v1beta1/PatchOptions", + "node.k8s.io/v1beta1/RuntimeClass", + "node.k8s.io/v1beta1/RuntimeClassList", + "node.k8s.io/v1beta1/UpdateOptions", + "node.k8s.io/v1beta1/WatchEvent", + "policy/__internal", + "policy/__internal/WatchEvent", + "policy/v1beta1", + "policy/v1beta1/CreateOptions", + "policy/v1beta1/DeleteOptions", + "policy/v1beta1/Eviction", + "policy/v1beta1/ExportOptions", + "policy/v1beta1/GetOptions", + "policy/v1beta1/ListOptions", + "policy/v1beta1/PatchOptions", + "policy/v1beta1/PodDisruptionBudget", + "policy/v1beta1/PodDisruptionBudgetList", + "policy/v1beta1/PodSecurityPolicy", + "policy/v1beta1/PodSecurityPolicyList", + "policy/v1beta1/UpdateOptions", + "policy/v1beta1/WatchEvent", + "rbac.authorization.k8s.io/__internal", + "rbac.authorization.k8s.io/__internal/WatchEvent", + "rbac.authorization.k8s.io/v1", + "rbac.authorization.k8s.io/v1/ClusterRole", + "rbac.authorization.k8s.io/v1/ClusterRoleBinding", + "rbac.authorization.k8s.io/v1/ClusterRoleBindingList", + "rbac.authorization.k8s.io/v1/ClusterRoleList", + "rbac.authorization.k8s.io/v1/CreateOptions", + "rbac.authorization.k8s.io/v1/DeleteOptions", + "rbac.authorization.k8s.io/v1/ExportOptions", + "rbac.authorization.k8s.io/v1/GetOptions", + "rbac.authorization.k8s.io/v1/ListOptions", + "rbac.authorization.k8s.io/v1/PatchOptions", + "rbac.authorization.k8s.io/v1/Role", + "rbac.authorization.k8s.io/v1/RoleBinding", + "rbac.authorization.k8s.io/v1/RoleBindingList", + "rbac.authorization.k8s.io/v1/RoleList", + "rbac.authorization.k8s.io/v1/UpdateOptions", + "rbac.authorization.k8s.io/v1/WatchEvent", + "rbac.authorization.k8s.io/v1alpha1", + "rbac.authorization.k8s.io/v1alpha1/ClusterRole", + "rbac.authorization.k8s.io/v1alpha1/ClusterRoleBinding", + "rbac.authorization.k8s.io/v1alpha1/ClusterRoleBindingList", + "rbac.authorization.k8s.io/v1alpha1/ClusterRoleList", + "rbac.authorization.k8s.io/v1alpha1/CreateOptions", + "rbac.authorization.k8s.io/v1alpha1/DeleteOptions", + "rbac.authorization.k8s.io/v1alpha1/ExportOptions", + "rbac.authorization.k8s.io/v1alpha1/GetOptions", + "rbac.authorization.k8s.io/v1alpha1/ListOptions", + "rbac.authorization.k8s.io/v1alpha1/PatchOptions", + "rbac.authorization.k8s.io/v1alpha1/Role", + "rbac.authorization.k8s.io/v1alpha1/RoleBinding", + "rbac.authorization.k8s.io/v1alpha1/RoleBindingList", + "rbac.authorization.k8s.io/v1alpha1/RoleList", + "rbac.authorization.k8s.io/v1alpha1/UpdateOptions", + "rbac.authorization.k8s.io/v1alpha1/WatchEvent", + "rbac.authorization.k8s.io/v1beta1", + "rbac.authorization.k8s.io/v1beta1/ClusterRole", + "rbac.authorization.k8s.io/v1beta1/ClusterRoleBinding", + "rbac.authorization.k8s.io/v1beta1/ClusterRoleBindingList", + "rbac.authorization.k8s.io/v1beta1/ClusterRoleList", + "rbac.authorization.k8s.io/v1beta1/CreateOptions", + "rbac.authorization.k8s.io/v1beta1/DeleteOptions", + "rbac.authorization.k8s.io/v1beta1/ExportOptions", + "rbac.authorization.k8s.io/v1beta1/GetOptions", + "rbac.authorization.k8s.io/v1beta1/ListOptions", + "rbac.authorization.k8s.io/v1beta1/PatchOptions", + "rbac.authorization.k8s.io/v1beta1/Role", + "rbac.authorization.k8s.io/v1beta1/RoleBinding", + "rbac.authorization.k8s.io/v1beta1/RoleBindingList", + "rbac.authorization.k8s.io/v1beta1/RoleList", + "rbac.authorization.k8s.io/v1beta1/UpdateOptions", + "rbac.authorization.k8s.io/v1beta1/WatchEvent", + "scheduling.k8s.io/__internal", + "scheduling.k8s.io/__internal/WatchEvent", + "scheduling.k8s.io/v1", + "scheduling.k8s.io/v1/CreateOptions", + "scheduling.k8s.io/v1/DeleteOptions", + "scheduling.k8s.io/v1/ExportOptions", + "scheduling.k8s.io/v1/GetOptions", + "scheduling.k8s.io/v1/ListOptions", + "scheduling.k8s.io/v1/PatchOptions", + "scheduling.k8s.io/v1/PriorityClass", + "scheduling.k8s.io/v1/PriorityClassList", + "scheduling.k8s.io/v1/UpdateOptions", + "scheduling.k8s.io/v1/WatchEvent", + "scheduling.k8s.io/v1alpha1", + "scheduling.k8s.io/v1alpha1/CreateOptions", + "scheduling.k8s.io/v1alpha1/DeleteOptions", + "scheduling.k8s.io/v1alpha1/ExportOptions", + "scheduling.k8s.io/v1alpha1/GetOptions", + "scheduling.k8s.io/v1alpha1/ListOptions", + "scheduling.k8s.io/v1alpha1/PatchOptions", + "scheduling.k8s.io/v1alpha1/PriorityClass", + "scheduling.k8s.io/v1alpha1/PriorityClassList", + "scheduling.k8s.io/v1alpha1/UpdateOptions", + "scheduling.k8s.io/v1alpha1/WatchEvent", + "scheduling.k8s.io/v1beta1", + "scheduling.k8s.io/v1beta1/CreateOptions", + "scheduling.k8s.io/v1beta1/DeleteOptions", + "scheduling.k8s.io/v1beta1/ExportOptions", + "scheduling.k8s.io/v1beta1/GetOptions", + "scheduling.k8s.io/v1beta1/ListOptions", + "scheduling.k8s.io/v1beta1/PatchOptions", + "scheduling.k8s.io/v1beta1/PriorityClass", + "scheduling.k8s.io/v1beta1/PriorityClassList", + "scheduling.k8s.io/v1beta1/UpdateOptions", + "scheduling.k8s.io/v1beta1/WatchEvent", + "settings.k8s.io/__internal", + "settings.k8s.io/__internal/WatchEvent", + "settings.k8s.io/v1alpha1", + "settings.k8s.io/v1alpha1/CreateOptions", + "settings.k8s.io/v1alpha1/DeleteOptions", + "settings.k8s.io/v1alpha1/ExportOptions", + "settings.k8s.io/v1alpha1/GetOptions", + "settings.k8s.io/v1alpha1/ListOptions", + "settings.k8s.io/v1alpha1/PatchOptions", + "settings.k8s.io/v1alpha1/PodPreset", + "settings.k8s.io/v1alpha1/PodPresetList", + "settings.k8s.io/v1alpha1/UpdateOptions", + "settings.k8s.io/v1alpha1/WatchEvent", + "storage.k8s.io/__internal", + "storage.k8s.io/__internal/WatchEvent", + "storage.k8s.io/v1", + "storage.k8s.io/v1/CreateOptions", + "storage.k8s.io/v1/DeleteOptions", + "storage.k8s.io/v1/ExportOptions", + "storage.k8s.io/v1/GetOptions", + "storage.k8s.io/v1/ListOptions", + "storage.k8s.io/v1/PatchOptions", + "storage.k8s.io/v1/StorageClass", + "storage.k8s.io/v1/StorageClassList", + "storage.k8s.io/v1/UpdateOptions", + "storage.k8s.io/v1/VolumeAttachment", + "storage.k8s.io/v1/VolumeAttachmentList", + "storage.k8s.io/v1/WatchEvent", + "storage.k8s.io/v1alpha1", + "storage.k8s.io/v1alpha1/CreateOptions", + "storage.k8s.io/v1alpha1/DeleteOptions", + "storage.k8s.io/v1alpha1/ExportOptions", + "storage.k8s.io/v1alpha1/GetOptions", + "storage.k8s.io/v1alpha1/ListOptions", + "storage.k8s.io/v1alpha1/PatchOptions", + "storage.k8s.io/v1alpha1/UpdateOptions", + "storage.k8s.io/v1alpha1/VolumeAttachment", + "storage.k8s.io/v1alpha1/VolumeAttachmentList", + "storage.k8s.io/v1alpha1/WatchEvent", + "storage.k8s.io/v1beta1", + "storage.k8s.io/v1beta1/CSIDriver", + "storage.k8s.io/v1beta1/CSIDriverList", + "storage.k8s.io/v1beta1/CSINode", + "storage.k8s.io/v1beta1/CSINodeList", + "storage.k8s.io/v1beta1/CreateOptions", + "storage.k8s.io/v1beta1/DeleteOptions", + "storage.k8s.io/v1beta1/ExportOptions", + "storage.k8s.io/v1beta1/GetOptions", + "storage.k8s.io/v1beta1/ListOptions", + "storage.k8s.io/v1beta1/PatchOptions", + "storage.k8s.io/v1beta1/StorageClass", + "storage.k8s.io/v1beta1/StorageClassList", + "storage.k8s.io/v1beta1/UpdateOptions", + "storage.k8s.io/v1beta1/VolumeAttachment", + "storage.k8s.io/v1beta1/VolumeAttachmentList", + "storage.k8s.io/v1beta1/WatchEvent", + "v1", + "v1/APIGroup", + "v1/APIGroupList", + "v1/APIResourceList", + "v1/APIVersions", + "v1/Binding", + "v1/ComponentStatus", + "v1/ComponentStatusList", + "v1/ConfigMap", + "v1/ConfigMapList", + "v1/CreateOptions", + "v1/DeleteOptions", + "v1/Endpoints", + "v1/EndpointsList", + "v1/Event", + "v1/EventList", + "v1/ExportOptions", + "v1/GetOptions", + "v1/LimitRange", + "v1/LimitRangeList", + "v1/List", + "v1/ListOptions", + "v1/Namespace", + "v1/NamespaceList", + "v1/Node", + "v1/NodeList", + "v1/NodeProxyOptions", + "v1/PatchOptions", + "v1/PersistentVolume", + "v1/PersistentVolumeClaim", + "v1/PersistentVolumeClaimList", + "v1/PersistentVolumeList", + "v1/Pod", + "v1/PodAttachOptions", + "v1/PodExecOptions", + "v1/PodList", + "v1/PodLogOptions", + "v1/PodPortForwardOptions", + "v1/PodProxyOptions", + "v1/PodStatusResult", + "v1/PodTemplate", + "v1/PodTemplateList", + "v1/RangeAllocation", + "v1/ReplicationController", + "v1/ReplicationControllerList", + "v1/ResourceQuota", + "v1/ResourceQuotaList", + "v1/Secret", + "v1/SecretList", + "v1/SerializedReference", + "v1/Service", + "v1/ServiceAccount", + "v1/ServiceAccountList", + "v1/ServiceList", + "v1/ServiceProxyOptions", + "v1/Status", + "v1/UpdateOptions", + "v1/WatchEvent", + } +} diff --git a/pkg/chartutil/generator/capabilities_default_versions_generate.go b/pkg/chartutil/generator/capabilities_default_versions_generate.go new file mode 100644 index 000000000..4ed312465 --- /dev/null +++ b/pkg/chartutil/generator/capabilities_default_versions_generate.go @@ -0,0 +1,106 @@ +/* +Copyright The Helm Authors. +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. +*/ +// Generates the default versions to use with capabilities. This cannot be loaded +// dynamically as it uses enough memory to cause out of memory issues in CI. +// +// +build ignore +package main + +import ( + "bytes" + "fmt" + "io/ioutil" + "os" + "path" + "sort" + + "k8s.io/client-go/kubernetes/scheme" +) + +const licenseHeader = `/* +Copyright The Helm Authors. +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. +*/` + +func main() { + v := getVersions() + + o := createOutput(v) + + err := ioutil.WriteFile("capabilities_versions_generated.go", o, 0644) + if err != nil { + fmt.Printf("writing output: %s", err) + os.Exit(1) + } +} + +func createOutput(v []string) []byte { + var out bytes.Buffer + + fmt.Fprintln(&out, licenseHeader) + fmt.Fprintln(&out, "// Code generated by capabilities_default_versions_generate.go; DO NOT EDIT.") + fmt.Fprint(&out, "package chartutil\n\n") + fmt.Fprintln(&out, "func defaultVersions() []string {") + fmt.Fprintln(&out, "\treturn []string{") + + for _, v := range v { + fmt.Fprintf(&out, "\t\t\"%s\",\n", v) + } + + fmt.Fprintln(&out, "\t}") + fmt.Fprintln(&out, "}") + + return out.Bytes() +} + +func getVersions() []string { + + var s []string + var gv string + var gvk string + + // Check is used so that we only add an item once to the return + check := make(map[string]struct{}) + + // Client go has a default scheme set with everything in it + // This includes over 500 group versions and group versioned kinds + for k := range scheme.Scheme.AllKnownTypes() { + gv = path.Join(k.Group, k.Version) + gvk = path.Join(k.Group, k.Version, k.Kind) + if _, ok := check[gv]; !ok { + check[gv] = struct{}{} + s = append(s, gv) + } + if _, ok := check[gvk]; !ok { + check[gvk] = struct{}{} + s = append(s, gvk) + } + } + + // Put the names in a consistent order + sort.Strings(s) + + return s +} From 23b61a183d0d1ef107e4f34f57178c5fcbaf4832 Mon Sep 17 00:00:00 2001 From: Matt Farina Date: Tue, 18 Jun 2019 12:17:16 -0400 Subject: [PATCH 258/327] Updating sprig dependency version Also updated cobra Signed-off-by: Matt Farina --- glide.lock | 8 ++++---- glide.yaml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/glide.lock b/glide.lock index a9d12597c..11f8aba60 100644 --- a/glide.lock +++ b/glide.lock @@ -1,5 +1,5 @@ -hash: 7104a8ce1f0b3f2338d10b102b3ba9bfd308000396cc9edb43095c2a2e133272 -updated: 2019-06-05T21:58:04.295502-04:00 +hash: 9e12e35a6ad263380590ad000d9013499107f3ed47a454e2f96133156b6f09d5 +updated: 2019-06-18T12:14:56.802884-04:00 imports: - name: cloud.google.com/go version: 3b1ae45394a234c385be014e9a488f2bb6eef821 @@ -200,7 +200,7 @@ imports: - name: github.com/Masterminds/semver version: c7af12943936e8c39859482e61f0574c2fd7fc75 - name: github.com/Masterminds/sprig - version: 9f8fceff796fb9f4e992cd2bece016be0121ab74 + version: 258b00ffa7318e8b109a141349980ffbd30a35db - name: github.com/Masterminds/vcs version: 3084677c2c188840777bff30054f2b553729d329 - name: github.com/mattn/go-runewidth @@ -256,7 +256,7 @@ imports: - name: github.com/sirupsen/logrus version: 89742aefa4b206dcf400792f3bd35b542998eb3b - name: github.com/spf13/cobra - version: 67fc4837d267bc9bfd6e47f77783fcc3dffc68de + version: f2b07da1e2c38d5f12845a4f607e2e1018cbb1f5 subpackages: - doc - name: github.com/spf13/pflag diff --git a/glide.yaml b/glide.yaml index 49e9eec4d..ecefde2e0 100644 --- a/glide.yaml +++ b/glide.yaml @@ -19,7 +19,7 @@ import: - package: github.com/imdario/mergo version: v0.3.5 - package: github.com/Masterminds/sprig - version: ^2.19.0 + version: ^2.20.0 - package: github.com/ghodss/yaml - package: github.com/Masterminds/semver version: ~1.4.2 From cb2207c2fbddba7f0cabb626ecb7b02370ca9faa Mon Sep 17 00:00:00 2001 From: Morten Torkildsen Date: Sat, 30 Mar 2019 18:11:03 -0700 Subject: [PATCH 259/327] fix(helm): Delete hooks should wait for resource to be removed from etcd before continuing Signed-off-by: Morten Torkildsen --- _proto/hapi/release/hook.proto | 2 + docs/charts_hooks.md | 4 + pkg/hooks/hooks.go | 2 + pkg/kube/client.go | 42 +++++++- pkg/kube/client_test.go | 48 ++++++++++ pkg/proto/hapi/release/hook.pb.go | 90 +++++++++-------- pkg/tiller/environment/environment.go | 18 ++++ pkg/tiller/environment/environment_test.go | 3 + pkg/tiller/hooks.go | 15 +++ pkg/tiller/hooks_test.go | 106 +++++++++++++++++++++ pkg/tiller/release_server.go | 3 +- pkg/tiller/release_server_test.go | 7 ++ 12 files changed, 298 insertions(+), 42 deletions(-) diff --git a/_proto/hapi/release/hook.proto b/_proto/hapi/release/hook.proto index cf7e25bf6..77fbbe5d5 100644 --- a/_proto/hapi/release/hook.proto +++ b/_proto/hapi/release/hook.proto @@ -56,4 +56,6 @@ message Hook { int32 weight = 7; // DeletePolicies are the policies that indicate when to delete the hook repeated DeletePolicy delete_policies = 8; + // DeleteTimeout indicates how long to wait for a resource to be deleted before timing out + int64 delete_timeout = 9; } diff --git a/docs/charts_hooks.md b/docs/charts_hooks.md index 3044414c3..1a9341d5c 100644 --- a/docs/charts_hooks.md +++ b/docs/charts_hooks.md @@ -199,6 +199,10 @@ You can choose one or more defined annotation values: * `"hook-failed"` specifies Tiller should delete the hook if the hook failed during execution. * `"before-hook-creation"` specifies Tiller should delete the previous hook before the new hook is launched. +By default Tiller will wait for 60 seconds for a deleted hook to no longer exist in the API server before timing out. This +behavior can be changed using the `helm.sh/hook-delete-timeout` annotation. The value is the number of seconds Tiller +should wait for the hook to be fully deleted. A value of 0 means Tiller does not wait at all. + ### Defining a CRD with the `crd-install` Hook Custom Resource Definitions (CRDs) are a special kind in Kubernetes. They provide diff --git a/pkg/hooks/hooks.go b/pkg/hooks/hooks.go index 13a09b08b..6d60fad51 100644 --- a/pkg/hooks/hooks.go +++ b/pkg/hooks/hooks.go @@ -27,6 +27,8 @@ const ( HookWeightAnno = "helm.sh/hook-weight" // HookDeleteAnno is the label name for the delete policy for a hook HookDeleteAnno = "helm.sh/hook-delete-policy" + // HookDeleteTimeoutAnno is the label name for the timeout value for delete policies + HookDeleteTimeoutAnno = "helm.sh/hook-delete-timeout" ) // Types of hooks diff --git a/pkg/kube/client.go b/pkg/kube/client.go index aa025eb0a..b9c7f8a96 100644 --- a/pkg/kube/client.go +++ b/pkg/kube/client.go @@ -449,15 +449,34 @@ func (c *Client) cleanup(newlyCreatedResources []*resource.Info) (cleanupErrors // // Namespace will set the namespace. func (c *Client) Delete(namespace string, reader io.Reader) error { + return c.DeleteWithTimeout(namespace, reader, 0, false) +} + +// DeleteWithTimeout deletes Kubernetes resources from an io.reader. If shouldWait is true, the function +// will wait for all resources to be deleted from etcd before returning, or when the timeout +// has expired. +// +// Namespace will set the namespace. +func (c *Client) DeleteWithTimeout(namespace string, reader io.Reader, timeout int64, shouldWait bool) error { infos, err := c.BuildUnstructured(namespace, reader) if err != nil { return err } - return perform(infos, func(info *resource.Info) error { + err = perform(infos, func(info *resource.Info) error { c.Log("Starting delete for %q %s", info.Name, info.Mapping.GroupVersionKind.Kind) err := deleteResource(info) return c.skipIfNotFound(err) }) + if err != nil { + return err + } + + if shouldWait { + c.Log("Waiting for %d seconds for delete to be completed", timeout) + return waitUntilAllResourceDeleted(infos, time.Duration(timeout)*time.Second) + } + + return nil } func (c *Client) skipIfNotFound(err error) error { @@ -468,6 +487,27 @@ func (c *Client) skipIfNotFound(err error) error { return err } +func waitUntilAllResourceDeleted(infos Result, timeout time.Duration) error { + return wait.Poll(2*time.Second, timeout, func() (bool, error) { + allDeleted := true + err := perform(infos, func(info *resource.Info) error { + innerErr := info.Get() + if errors.IsNotFound(innerErr) { + return nil + } + if innerErr != nil { + return innerErr + } + allDeleted = false + return nil + }) + if err != nil { + return false, err + } + return allDeleted, nil + }) +} + func (c *Client) watchTimeout(t time.Duration) ResourceActorFunc { return func(info *resource.Info) error { return c.watchUntilReady(t, info) diff --git a/pkg/kube/client_test.go b/pkg/kube/client_test.go index 810abdf17..0c280f3e5 100644 --- a/pkg/kube/client_test.go +++ b/pkg/kube/client_test.go @@ -283,6 +283,54 @@ func TestUpdateNonManagedResourceError(t *testing.T) { } } +func TestDeleteWithTimeout(t *testing.T) { + testCases := map[string]struct { + deleteTimeout int64 + deleteAfter time.Duration + success bool + }{ + "resource is deleted within timeout period": { + int64((2 * time.Minute).Seconds()), + 10 * time.Second, + true, + }, + "resource is not deleted within the timeout period": { + int64((10 * time.Second).Seconds()), + 20 * time.Second, + false, + }, + } + + for tn, tc := range testCases { + t.Run(tn, func(t *testing.T) { + c := newTestClient() + defer c.Cleanup() + + service := newService("my-service") + startTime := time.Now() + c.TestFactory.UnstructuredClient = &fake.RESTClient{ + GroupVersion: schema.GroupVersion{Version: "v1"}, + NegotiatedSerializer: unstructuredSerializer, + Client: fake.CreateHTTPClient(func(req *http.Request) (*http.Response, error) { + currentTime := time.Now() + if startTime.Add(tc.deleteAfter).Before(currentTime) { + return newResponse(404, notFoundBody()) + } + return newResponse(200, &service) + }), + } + + err := c.DeleteWithTimeout(metav1.NamespaceDefault, strings.NewReader(testServiceManifest), tc.deleteTimeout, true) + if err != nil && tc.success { + t.Errorf("expected no error, but got %v", err) + } + if err == nil && !tc.success { + t.Errorf("expected error, but didn't get one") + } + }) + } +} + func TestBuild(t *testing.T) { tests := []struct { name string diff --git a/pkg/proto/hapi/release/hook.pb.go b/pkg/proto/hapi/release/hook.pb.go index bec2049b6..2faf756d7 100644 --- a/pkg/proto/hapi/release/hook.pb.go +++ b/pkg/proto/hapi/release/hook.pb.go @@ -69,7 +69,7 @@ func (x Hook_Event) String() string { return proto.EnumName(Hook_Event_name, int32(x)) } func (Hook_Event) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_hook_8076b1a80af16030, []int{0, 0} + return fileDescriptor_hook_e64400ca8195038e, []int{0, 0} } type Hook_DeletePolicy int32 @@ -95,7 +95,7 @@ func (x Hook_DeletePolicy) String() string { return proto.EnumName(Hook_DeletePolicy_name, int32(x)) } func (Hook_DeletePolicy) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_hook_8076b1a80af16030, []int{0, 1} + return fileDescriptor_hook_e64400ca8195038e, []int{0, 1} } // Hook defines a hook object. @@ -114,17 +114,19 @@ type Hook struct { // Weight indicates the sort order for execution among similar Hook type Weight int32 `protobuf:"varint,7,opt,name=weight,proto3" json:"weight,omitempty"` // DeletePolicies are the policies that indicate when to delete the hook - DeletePolicies []Hook_DeletePolicy `protobuf:"varint,8,rep,packed,name=delete_policies,json=deletePolicies,proto3,enum=hapi.release.Hook_DeletePolicy" json:"delete_policies,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + DeletePolicies []Hook_DeletePolicy `protobuf:"varint,8,rep,packed,name=delete_policies,json=deletePolicies,proto3,enum=hapi.release.Hook_DeletePolicy" json:"delete_policies,omitempty"` + // DeleteTimeout indicates how long to wait for a resource to be deleted before timing out + DeleteTimeout int64 `protobuf:"varint,9,opt,name=delete_timeout,json=deleteTimeout,proto3" json:"delete_timeout,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *Hook) Reset() { *m = Hook{} } func (m *Hook) String() string { return proto.CompactTextString(m) } func (*Hook) ProtoMessage() {} func (*Hook) Descriptor() ([]byte, []int) { - return fileDescriptor_hook_8076b1a80af16030, []int{0} + return fileDescriptor_hook_e64400ca8195038e, []int{0} } func (m *Hook) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Hook.Unmarshal(m, b) @@ -200,43 +202,51 @@ func (m *Hook) GetDeletePolicies() []Hook_DeletePolicy { return nil } +func (m *Hook) GetDeleteTimeout() int64 { + if m != nil { + return m.DeleteTimeout + } + return 0 +} + func init() { proto.RegisterType((*Hook)(nil), "hapi.release.Hook") proto.RegisterEnum("hapi.release.Hook_Event", Hook_Event_name, Hook_Event_value) proto.RegisterEnum("hapi.release.Hook_DeletePolicy", Hook_DeletePolicy_name, Hook_DeletePolicy_value) } -func init() { proto.RegisterFile("hapi/release/hook.proto", fileDescriptor_hook_8076b1a80af16030) } - -var fileDescriptor_hook_8076b1a80af16030 = []byte{ - // 453 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0x51, 0x8f, 0x9a, 0x40, - 0x10, 0x80, 0x8f, 0x53, 0x41, 0x47, 0xcf, 0xdb, 0x6e, 0x9a, 0x76, 0xe3, 0xcb, 0x19, 0x9f, 0x7c, - 0xc2, 0xe6, 0x9a, 0xfe, 0x00, 0x84, 0xb9, 0x6a, 0x24, 0x60, 0x16, 0x4c, 0x93, 0xbe, 0x10, 0xae, - 0xee, 0x29, 0x11, 0x81, 0x08, 0xb6, 0xe9, 0x1f, 0xed, 0x3f, 0xe8, 0xff, 0x68, 0x76, 0x45, 0x7a, - 0x49, 0xfb, 0x36, 0xf3, 0xcd, 0xb7, 0xb3, 0x33, 0xbb, 0xf0, 0x7e, 0x1f, 0x17, 0xc9, 0xec, 0x24, - 0x52, 0x11, 0x97, 0x62, 0xb6, 0xcf, 0xf3, 0x83, 0x59, 0x9c, 0xf2, 0x2a, 0xa7, 0x03, 0x59, 0x30, - 0xeb, 0xc2, 0xe8, 0x61, 0x97, 0xe7, 0xbb, 0x54, 0xcc, 0x54, 0xed, 0xf9, 0xfc, 0x32, 0xab, 0x92, - 0xa3, 0x28, 0xab, 0xf8, 0x58, 0x5c, 0xf4, 0xc9, 0xaf, 0x36, 0xb4, 0x17, 0x79, 0x7e, 0xa0, 0x14, - 0xda, 0x59, 0x7c, 0x14, 0x4c, 0x1b, 0x6b, 0xd3, 0x1e, 0x57, 0xb1, 0x64, 0x87, 0x24, 0xdb, 0xb2, - 0xdb, 0x0b, 0x93, 0xb1, 0x64, 0x45, 0x5c, 0xed, 0x59, 0xeb, 0xc2, 0x64, 0x4c, 0x47, 0xd0, 0x3d, - 0xc6, 0x59, 0xf2, 0x22, 0xca, 0x8a, 0xb5, 0x15, 0x6f, 0x72, 0xfa, 0x01, 0x74, 0xf1, 0x5d, 0x64, - 0x55, 0xc9, 0x3a, 0xe3, 0xd6, 0x74, 0xf8, 0x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, 0x61, 0x14, 0x6c, - 0x6c, 0x1b, 0x83, 0x80, 0xf4, 0xfe, 0xa9, 0x3c, 0x59, 0x4b, 0x77, 0xc3, 0x91, 0x80, 0xbc, 0xdb, - 0xe6, 0x4e, 0x33, 0x6d, 0x7f, 0x62, 0xc3, 0xe0, 0xf5, 0x3b, 0xd0, 0x3b, 0xe8, 0xa9, 0x3e, 0xe8, - 0xa0, 0x43, 0x6e, 0x28, 0x80, 0x2e, 0x0f, 0xa3, 0x43, 0x34, 0xd9, 0x75, 0x8e, 0x4f, 0x3e, 0xc7, - 0x68, 0xe1, 0xfb, 0xab, 0xc8, 0xe6, 0x68, 0x85, 0x4b, 0xdf, 0x23, 0xb7, 0xf3, 0xde, 0x57, 0xa3, - 0x7e, 0xd9, 0x67, 0x5d, 0x7d, 0xdb, 0xc7, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x3b, 0xcf, 0xed, - 0xd9, 0xb4, 0x02, 0x00, 0x00, +func init() { proto.RegisterFile("hapi/release/hook.proto", fileDescriptor_hook_e64400ca8195038e) } + +var fileDescriptor_hook_e64400ca8195038e = []byte{ + // 473 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0xdb, 0x8e, 0xda, 0x3c, + 0x10, 0x80, 0x37, 0x1c, 0x02, 0x0c, 0x87, 0xf5, 0x6f, 0xfd, 0x6a, 0x2d, 0x6e, 0x16, 0x21, 0x55, + 0xe2, 0x2a, 0x54, 0x5b, 0xf5, 0x01, 0x42, 0xe2, 0x2d, 0x88, 0x88, 0x20, 0x27, 0xa8, 0x52, 0x6f, + 0xa2, 0x6c, 0xf1, 0x42, 0x44, 0x88, 0x23, 0x62, 0x5a, 0xf5, 0x81, 0xfb, 0x18, 0x95, 0x2a, 0x3b, + 0x21, 0x5d, 0xa9, 0xbd, 0x9b, 0xf9, 0xe6, 0xf3, 0x78, 0xc6, 0x86, 0x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, 0xc3, 0xa8, 0x1d, 0xae, 0xfc, 0x0d, 0x6a, + 0x2c, 0x7a, 0x5f, 0x3a, 0xd5, 0x07, 0x3c, 0x9b, 0xfa, 0x77, 0x3f, 0xfc, 0x0e, 0x00, 0x00, 0xff, + 0xff, 0xce, 0x84, 0xd9, 0x98, 0xdb, 0x02, 0x00, 0x00, } diff --git a/pkg/tiller/environment/environment.go b/pkg/tiller/environment/environment.go index 21c23d421..bfb6c638f 100644 --- a/pkg/tiller/environment/environment.go +++ b/pkg/tiller/environment/environment.go @@ -127,6 +127,16 @@ type KubeClient interface { // by "\n---\n"). Delete(namespace string, reader io.Reader) error + // DeleteWithTimeout destroys one or more resources. If shouldWait is true, the function + // will not return until all the resources have been fully deleted or the provided + // timeout has expired. + // + // namespace must contain a valid existing namespace. + // + // reader must contain a YAML stream (one or more YAML documents separated + // by "\n---\n"). + DeleteWithTimeout(namespace string, reader io.Reader, timeout int64, shouldWait bool) error + // WatchUntilReady watch the resource in reader until it is "ready". // // For Jobs, "ready" means the job ran to completion (excited without error). @@ -182,6 +192,14 @@ func (p *PrintingKubeClient) Delete(ns string, r io.Reader) error { return err } +// DeleteWithTimeout implements KubeClient DeleteWithTimeout. +// +// It only prints out the content to be deleted. +func (p *PrintingKubeClient) DeleteWithTimeout(ns string, r io.Reader, timeout int64, shouldWait bool) error { + _, err := io.Copy(p.Out, r) + return err +} + // WatchUntilReady implements KubeClient WatchUntilReady. func (p *PrintingKubeClient) WatchUntilReady(ns string, r io.Reader, timeout int64, shouldWait bool) error { _, err := io.Copy(p.Out, r) diff --git a/pkg/tiller/environment/environment_test.go b/pkg/tiller/environment/environment_test.go index 24ff8b88d..4c6452b00 100644 --- a/pkg/tiller/environment/environment_test.go +++ b/pkg/tiller/environment/environment_test.go @@ -49,6 +49,9 @@ func (k *mockKubeClient) Get(ns string, r io.Reader) (string, error) { func (k *mockKubeClient) Delete(ns string, r io.Reader) error { return nil } +func (k *mockKubeClient) DeleteWithTimeout(ns string, r io.Reader, timeout int64, shouldWait bool) error { + return nil +} func (k *mockKubeClient) Update(ns string, currentReader, modifiedReader io.Reader, force bool, recreate bool, timeout int64, shouldWait bool) error { return nil } diff --git a/pkg/tiller/hooks.go b/pkg/tiller/hooks.go index 0fb7c92f8..5aa961080 100644 --- a/pkg/tiller/hooks.go +++ b/pkg/tiller/hooks.go @@ -53,6 +53,9 @@ var deletePolices = map[string]release.Hook_DeletePolicy{ hooks.BeforeHookCreation: release.Hook_BEFORE_HOOK_CREATION, } +// Timout used when deleting resources with a hook-delete-policy. +const defaultHookDeleteTimeoutInSeconds = int64(60) + // Manifest represents a manifest file, which has a name and some content. type Manifest = manifest.Manifest @@ -192,6 +195,18 @@ func (file *manifestFile) sort(result *result) error { log.Printf("info: skipping unknown hook delete policy: %q", value) } }) + + // Only check for delete timeout annotation if there is a deletion policy. + if len(h.DeletePolicies) > 0 { + h.DeleteTimeout = defaultHookDeleteTimeoutInSeconds + operateAnnotationValues(entry, hooks.HookDeleteTimeoutAnno, func(value string) { + timeout, err := strconv.ParseInt(value, 10, 64) + if err != nil || timeout < 0 { + log.Printf("info: ignoring invalid hook delete timeout value: %q", value) + } + h.DeleteTimeout = timeout + }) + } } return nil } diff --git a/pkg/tiller/hooks_test.go b/pkg/tiller/hooks_test.go index 8bd928500..daf07252e 100644 --- a/pkg/tiller/hooks_test.go +++ b/pkg/tiller/hooks_test.go @@ -17,8 +17,10 @@ limitations under the License. package tiller import ( + "bytes" "reflect" "testing" + "text/template" "github.com/ghodss/yaml" @@ -229,6 +231,110 @@ metadata: } } +var manifestTemplate = ` +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: example.com + labels: + app: example-crd + annotations: + helm.sh/hook: crd-install +{{- if .HookDeletePolicy}} + {{ .HookDeletePolicy }} +{{- end }} +{{- if .HookDeleteTimeout}} + {{ .HookDeleteTimeout }} +{{- end }} +spec: + group: example.com + version: v1alpha1 + names: + kind: example + plural: examples + scope: Cluster +` + +type manifestTemplateData struct { + HookDeletePolicy, HookDeleteTimeout string +} + +func TestSortManifestsHookDeletion(t *testing.T) { + testCases := map[string]struct { + templateData manifestTemplateData + hasDeletePolicy bool + deletePolicy release.Hook_DeletePolicy + deleteTimeout int64 + }{ + "No delete policy": { + templateData: manifestTemplateData{}, + hasDeletePolicy: false, + deletePolicy: release.Hook_BEFORE_HOOK_CREATION, + deleteTimeout: 0, + }, + "Delete policy, no delete timeout": { + templateData: manifestTemplateData{ + HookDeletePolicy: "helm.sh/hook-delete-policy: before-hook-creation", + }, + hasDeletePolicy: true, + deletePolicy: release.Hook_BEFORE_HOOK_CREATION, + deleteTimeout: defaultHookDeleteTimeoutInSeconds, + }, + "Delete policy and delete timeout": { + templateData: manifestTemplateData{ + HookDeletePolicy: "helm.sh/hook-delete-policy: hook-succeeded", + HookDeleteTimeout: `helm.sh/hook-delete-timeout: "420"`, + }, + hasDeletePolicy: true, + deletePolicy: release.Hook_SUCCEEDED, + deleteTimeout: 420, + }, + } + + for tn, tc := range testCases { + t.Run(tn, func(t *testing.T) { + tmpl := template.Must(template.New("manifest").Parse(manifestTemplate)) + var buf bytes.Buffer + err := tmpl.Execute(&buf, tc.templateData) + if err != nil { + t.Error(err) + } + + manifests := map[string]string{ + "exampleManifest": buf.String(), + } + + hs, _, err := sortManifests(manifests, chartutil.NewVersionSet("v1", "v1beta1"), InstallOrder) + if err != nil { + t.Error(err) + } + + if got, want := len(hs), 1; got != want { + t.Errorf("expected %d hooks, but got %d", want, got) + } + hook := hs[0] + + if len(hook.DeletePolicies) == 0 { + if tc.hasDeletePolicy { + t.Errorf("expected a policy, but got zero") + } + } else { + if !tc.hasDeletePolicy { + t.Errorf("expected no delete policies, but got one") + } + policy := hook.DeletePolicies[0] + if got, want := policy, tc.deletePolicy; got != want { + t.Errorf("expected delete policy %q, but got %q", want, got) + } + } + + if got, want := hook.DeleteTimeout, tc.deleteTimeout; got != want { + t.Errorf("expected timeout %d, but got %d", want, got) + } + }) + } +} + func TestVersionSet(t *testing.T) { vs := chartutil.NewVersionSet("v1", "v1beta1", "extensions/alpha5", "batch/v1") diff --git a/pkg/tiller/release_server.go b/pkg/tiller/release_server.go index 6733035f7..652234c5f 100644 --- a/pkg/tiller/release_server.go +++ b/pkg/tiller/release_server.go @@ -456,7 +456,8 @@ func (s *ReleaseServer) deleteHookByPolicy(h *release.Hook, policy string, name, b := bytes.NewBufferString(h.Manifest) if hookHasDeletePolicy(h, policy) { s.Log("deleting %s hook %s for release %s due to %q policy", hook, h.Name, name, policy) - if errHookDelete := kubeCli.Delete(namespace, b); errHookDelete != nil { + waitForDelete := h.DeleteTimeout > 0 + if errHookDelete := kubeCli.DeleteWithTimeout(namespace, b, h.DeleteTimeout, waitForDelete); errHookDelete != nil { s.Log("warning: Release %s %s %S could not be deleted: %s", name, hook, h.Path, errHookDelete) return errHookDelete } diff --git a/pkg/tiller/release_server_test.go b/pkg/tiller/release_server_test.go index 05b41be20..015fe0b54 100644 --- a/pkg/tiller/release_server_test.go +++ b/pkg/tiller/release_server_test.go @@ -540,6 +540,10 @@ func (d *deleteFailingKubeClient) Delete(ns string, r io.Reader) error { return kube.ErrNoObjectsVisited } +func (d *deleteFailingKubeClient) DeleteWithTimeout(ns string, r io.Reader, timeout int64, shouldWait bool) error { + return kube.ErrNoObjectsVisited +} + type mockListServer struct { val *services.ListReleasesResponse } @@ -612,6 +616,9 @@ func (kc *mockHooksKubeClient) Get(ns string, r io.Reader) (string, error) { return "", nil } func (kc *mockHooksKubeClient) Delete(ns string, r io.Reader) error { + return kc.DeleteWithTimeout(ns, r, 0, false) +} +func (kc *mockHooksKubeClient) DeleteWithTimeout(ns string, r io.Reader, timeout int64, shouldWait bool) error { manifest, err := kc.makeManifest(r) if err != nil { return err From 9af767c0e56b35bd87b5dcd22a4e98f8a632ca07 Mon Sep 17 00:00:00 2001 From: Naseem Date: Thu, 20 Jun 2019 09:57:05 -0400 Subject: [PATCH 260/327] Add security context Signed-off-by: Naseem --- pkg/chartutil/create.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pkg/chartutil/create.go b/pkg/chartutil/create.go index f8785b46f..2c9717e80 100644 --- a/pkg/chartutil/create.go +++ b/pkg/chartutil/create.go @@ -76,6 +76,17 @@ serviceAccount: # If not set and create is true, a name is generated using the fullname template name: +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + service: type: ClusterIP port: 80 @@ -199,8 +210,12 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} serviceAccountName: {{ template ".serviceAccountName" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} ports: From cdb0571c79b7fc3b71d86e6ca48e1b5f25709ce5 Mon Sep 17 00:00:00 2001 From: Jintao Zhang Date: Mon, 24 Jun 2019 01:46:19 +0800 Subject: [PATCH 261/327] update to alpine 3.10 Signed-off-by: Jintao Zhang --- rootfs/Dockerfile | 2 +- rootfs/Dockerfile.experimental | 2 +- rootfs/Dockerfile.rudder | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rootfs/Dockerfile b/rootfs/Dockerfile index 2aa775a55..59ead977a 100644 --- a/rootfs/Dockerfile +++ b/rootfs/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM alpine:3.9 +FROM alpine:3.10 RUN apk add --no-cache ca-certificates socat diff --git a/rootfs/Dockerfile.experimental b/rootfs/Dockerfile.experimental index 9c1cab126..0fa9254ee 100644 --- a/rootfs/Dockerfile.experimental +++ b/rootfs/Dockerfile.experimental @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM alpine:3.9 +FROM alpine:3.10 RUN apk add --no-cache ca-certificates diff --git a/rootfs/Dockerfile.rudder b/rootfs/Dockerfile.rudder index 87efba401..ed153ee67 100644 --- a/rootfs/Dockerfile.rudder +++ b/rootfs/Dockerfile.rudder @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM alpine:3.9 +FROM alpine:3.10 RUN apk add --no-cache ca-certificates From b16ec08899658cad65cd5ae6a14334aed47f0101 Mon Sep 17 00:00:00 2001 From: Shao Yang Hong Date: Mon, 24 Jun 2019 11:50:21 +0800 Subject: [PATCH 262/327] Revert "Fixed default value for `helm.sh/chart` label" Signed-off-by: Shao Yang --- docs/chart_best_practices/labels.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/chart_best_practices/labels.md b/docs/chart_best_practices/labels.md index 5a41ed1cc..6b7d24c49 100644 --- a/docs/chart_best_practices/labels.md +++ b/docs/chart_best_practices/labels.md @@ -26,7 +26,7 @@ are recommended, and _should_ be placed onto a chart for global consistency. Tho Name|Status|Description -----|------|---------- `app.kubernetes.io/name` | REC | This should be the app name, reflecting the entire app. Usually `{{ template "name" . }}` is used for this. This is used by many Kubernetes manifests, and is not Helm-specific. -`helm.sh/chart` | REC | This should be the chart name and version: `{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}`. +`helm.sh/chart` | REC | This should be the chart name and version: `{{ .Chart.Name }}-{{ .Chart.Version \| replace "+" "_" }}`. `app.kubernetes.io/managed-by` | REC | This should always be set to `{{ .Release.Service }}`. It is for finding all things managed by Tiller. `app.kubernetes.io/instance` | REC | This should be the `{{ .Release.Name }}`. It aids in differentiating between different instances of the same application. `app.kubernetes.io/version` | OPT | The version of the app and can be set to `{{ .Chart.AppVersion }}`. From b280fa5a7d5e48ce6730bda42fb99a2f436875ea Mon Sep 17 00:00:00 2001 From: ds-ms Date: Tue, 25 Jun 2019 19:07:14 +0530 Subject: [PATCH 263/327] Adding extra debug logs Signed-off-by: ds-ms Using debug function instead Signed-off-by: ds-ms Removing [INFO] from the message --- cmd/helm/init.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/helm/init.go b/cmd/helm/init.go index c7617e705..f02700508 100644 --- a/cmd/helm/init.go +++ b/cmd/helm/init.go @@ -284,6 +284,7 @@ func (i *initCmd) run() error { } fmt.Fprintln(i.out, "\nTiller (the Helm server-side component) has been upgraded to the current version.") } else { + debug("The error received while trying to init: %s", err) fmt.Fprintln(i.out, "Warning: Tiller is already installed in the cluster.\n"+ "(Use --client-only to suppress this message, or --upgrade to upgrade Tiller to the current version.)") } From 34bb64c0ff3241a81e2612e91a1d75c5ee07fd87 Mon Sep 17 00:00:00 2001 From: Neha Gupta Date: Wed, 3 Jul 2019 15:15:33 +0530 Subject: [PATCH 264/327] Documentation upgrade According to documentation helm install [CHART] [flags] should be the usage pattern. Seems a new update. Signed-off-by: Neha Gupta --- docs/chart_template_guide/getting_started.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/chart_template_guide/getting_started.md b/docs/chart_template_guide/getting_started.md index eb1d966d3..c6daec1c6 100644 --- a/docs/chart_template_guide/getting_started.md +++ b/docs/chart_template_guide/getting_started.md @@ -187,10 +187,10 @@ instead of `mychart-configmap`. You can run `helm get manifest clunky-serval` to see the entire generated YAML. -At this point, we've seen templates at their most basic: YAML files that have template directives embedded in `{{` and `}}`. In the next part, we'll take a deeper look into templates. But before moving on, there's one quick trick that can make building templates faster: When you want to test the template rendering, but not actually install anything, you can use `helm install --debug --dry-run ./mychart`. This will send the chart to the Tiller server, which will render the templates. But instead of installing the chart, it will return the rendered template to you so you can see the output: +At this point, we've seen templates at their most basic: YAML files that have template directives embedded in `{{` and `}}`. In the next part, we'll take a deeper look into templates. But before moving on, there's one quick trick that can make building templates faster: When you want to test the template rendering, but not actually install anything, you can use `helm install ./mychart --debug --dry-run`. This will send the chart to the Tiller server, which will render the templates. But instead of installing the chart, it will return the rendered template to you so you can see the output: ```console -$ helm install --debug --dry-run ./mychart +$ helm install ./mychart --debug --dry-run SERVER: "localhost:44134" CHART PATH: /Users/mattbutcher/Code/Go/src/k8s.io/helm/_scratch/mychart NAME: goodly-guppy From 98b7738081ab87b14172466a7668656cc777133e Mon Sep 17 00:00:00 2001 From: "Kostis (Codefresh)" <39800303+kostis-codefresh@users.noreply.github.com> Date: Wed, 3 Jul 2019 16:19:37 +0300 Subject: [PATCH 265/327] Mentioned Codefresh in related Helm services. Signed-off-by: Kostis Kapelonis --- docs/related.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/related.md b/docs/related.md index dc8d62091..06527d75d 100644 --- a/docs/related.md +++ b/docs/related.md @@ -92,6 +92,7 @@ Tools layered on top of Helm or Tiller. Platforms, distributions, and services that include Helm support. +- [Codefresh](https://codefresh.io/) - A CI/CD solution designed specifically for Docker/Kubernetes/Helm. Includes a private Helm repository and graphical dashboards for Helm charts, Helm releases and Helm environments. - [Fabric8](https://fabric8.io) - Integrated development platform for Kubernetes - [Jenkins X](https://jenkins-x.io/) - open source automated CI/CD for Kubernetes which uses Helm for [promoting](https://jenkins-x.io/about/features/#promotion) applications through [environments via GitOps](https://jenkins-x.io/about/features/#environments) - [Kubernetic](https://kubernetic.com/) - Kubernetes Desktop Client From a1b391951e97cc3a4f9204bd04b218dfcfed162b Mon Sep 17 00:00:00 2001 From: willise Date: Wed, 3 Jul 2019 17:07:18 +0800 Subject: [PATCH 266/327] ref(tiller): add more info when force update Signed-off-by: willise --- pkg/tiller/release_update.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/tiller/release_update.go b/pkg/tiller/release_update.go index 2f5dc24b4..5fb1552bf 100644 --- a/pkg/tiller/release_update.go +++ b/pkg/tiller/release_update.go @@ -38,8 +38,10 @@ func (s *ReleaseServer) UpdateRelease(c ctx.Context, req *services.UpdateRelease s.Log("preparing update for %s", req.Name) currentRelease, updatedRelease, err := s.prepareUpdate(req) if err != nil { + s.Log("failed to prepare update: %s", err) if req.Force { // Use the --force, Luke. + s.Log("performing force update for %s", req.Name) return s.performUpdateForce(req) } return nil, err From 86f9b9fa4c2369d518ec82913ddbd82b19c914f1 Mon Sep 17 00:00:00 2001 From: Ross Fairbanks Date: Tue, 9 Jul 2019 19:19:18 +0100 Subject: [PATCH 267/327] chore(glide): bump kubernetes to 1.15.0 Signed-off-by: Ross Fairbanks --- glide.lock | 191 ++++++++++++++++++++++++++++++++++++----------------- glide.yaml | 14 ++-- 2 files changed, 136 insertions(+), 69 deletions(-) diff --git a/glide.lock b/glide.lock index 11f8aba60..92e7c50dd 100644 --- a/glide.lock +++ b/glide.lock @@ -1,11 +1,10 @@ -hash: 9e12e35a6ad263380590ad000d9013499107f3ed47a454e2f96133156b6f09d5 -updated: 2019-06-18T12:14:56.802884-04:00 +hash: 277f7be1b21149bc06b361fa61c0a2ff81a7f00c59a6e35c21b6516f6ddfd9f7 +updated: 2019-07-03T21:59:06.87934+02:00 imports: - name: cloud.google.com/go - version: 3b1ae45394a234c385be014e9a488f2bb6eef821 + version: 0ebda48a7f143b1cce9eb37a8c1106ac762a3430 subpackages: - compute/metadata - - internal - name: github.com/asaskevich/govalidator version: 7664702784775e51966f0885f5cd27435916517b - name: github.com/Azure/go-ansiterm @@ -13,7 +12,7 @@ imports: subpackages: - winterm - name: github.com/Azure/go-autorest - version: ea233b6412b0421a65dc6160e16c893364664a95 + version: 1ffcc8896ef6dfe022d90a4317d866f925cf0f9e subpackages: - autorest - autorest/adal @@ -22,7 +21,7 @@ imports: - logger - version - name: github.com/beorn7/perks - version: 3ac7bf7a47d159a033b107610db8a1b6575507a4 + version: 3a771d992973f24aa725d07868b467d1ddfceafb subpackages: - quantile - name: github.com/BurntSushi/toml @@ -41,7 +40,7 @@ imports: - name: github.com/cyphar/filepath-securejoin version: a261ee33d7a517f054effbf451841abaafe3e0fd - name: github.com/davecgh/go-spew - version: 782f4967f2dc4564575ca782fe2d04090b5faca8 + version: 8991bc29aa16c548c550c7ff78260e27b9ab7c73 subpackages: - spew - name: github.com/dgrijalva/jwt-go @@ -52,32 +51,8 @@ imports: - digestset - reference - name: github.com/docker/docker - version: a9fbbdc8dd8794b20af358382ab780559bca589d - subpackages: - - api - - api/types - - api/types/blkiodev - - api/types/container - - api/types/events - - api/types/filters - - api/types/image - - api/types/mount - - api/types/network - - api/types/registry - - api/types/strslice - - api/types/swarm - - api/types/swarm/runtime - - api/types/time - - api/types/versions - - api/types/volume - - client - - daemon/logger/jsonfilelog/jsonlog - - pkg/jsonmessage - - pkg/mount - - pkg/parsers - - pkg/parsers/operatingsystem - - pkg/stdcopy - - pkg/sysinfo + version: be7ac8be2ae072032a4005e8f232be3fc57e4127 + subpackages: - pkg/term - pkg/term/windows - name: github.com/docker/spdystream @@ -135,6 +110,14 @@ imports: - ptypes/timestamp - name: github.com/google/btree version: 7d79101e329e5a3adf994758c578dab82b90c017 +- name: github.com/google/go-cmp + version: 6f77996f0c42f7b84e5a2b252227263f93432e9b + subpackages: + - cmp + - cmp/internal/diff + - cmp/internal/flags + - cmp/internal/function + - cmp/internal/value - name: github.com/google/gofuzz version: 24818f796faf91cd76ec7bddd72458fbced7a6c1 - name: github.com/google/uuid @@ -181,6 +164,8 @@ imports: - reflectx - name: github.com/json-iterator/go version: ab8a2e0c74be9d3be70b3184d9acc634935ded82 +- name: github.com/konsorten/go-windows-terminal-sequences + version: 5c8c8bd35d3832f5d134ae1e1e375b69a4d25242 - name: github.com/lib/pq version: 88edab0803230a3898347e77b474f8c1820a1f20 subpackages: @@ -188,7 +173,7 @@ imports: - name: github.com/liggitt/tabwriter version: 89fcab3d43de07060e4fd4c1547430ed57e87f24 - name: github.com/mailru/easyjson - version: 2f5df55504ebc322e4d52d34df6a1f5b503bf26d + version: 60711f1a8329503b04e1c88535f419d0bb440bff subpackages: - buffer - jlexer @@ -232,19 +217,21 @@ imports: subpackages: - go - name: github.com/prometheus/common - version: cfeb6f9992ffa54aaa4f2170ade4067ee478b250 + version: 4724e9255275ce38f7179b2478abeae4e28c904f subpackages: - expfmt - internal/bitbucket.org/ww/goautoneg - model - name: github.com/prometheus/procfs - version: 65c1f6f8f0fc1e2185eb9863a3bc751496404259 + version: 1dc9a6cbc91aacc3e8b2d63db4d2e957a5394ac4 subpackages: + - internal/util + - nfs - xfs - name: github.com/PuerkitoBio/purell - version: 8a290539e2e8629dbc4e6bad948158f790ec31f4 + version: 0bcb03f4b4d0a9428594752bd2a3b9aa0a9d4bd4 - name: github.com/PuerkitoBio/urlesc - version: 5bd2802263f21d8788851d5305584c82a5c75d7e + version: de5bf2ad457846296e2031421a34e2568e304e35 - name: github.com/rubenv/sql-migrate version: 1007f53448d75fe14190968f5de4d95ed63ebb83 subpackages: @@ -254,7 +241,7 @@ imports: - name: github.com/shurcooL/sanitized_anchor_name version: 10ef21a441db47d8b13ebcc5fd2310f636973c77 - name: github.com/sirupsen/logrus - version: 89742aefa4b206dcf400792f3bd35b542998eb3b + version: bcd833dfe83d3cebad139e4a29ed79cb2318bf95 - name: github.com/spf13/cobra version: f2b07da1e2c38d5f12845a4f607e2e1018cbb1f5 subpackages: @@ -264,7 +251,7 @@ imports: - name: github.com/technosophos/moniker version: a5dbd03a2245d554160e3ae6bfdcf969fe58b431 - name: golang.org/x/crypto - version: de0752318171da717af4ce24d0a2e8626afaeb11 + version: e84da0312774c21d64ee2317962ef669b27ffb41 subpackages: - cast5 - ed25519 @@ -291,7 +278,7 @@ imports: - internal/timeseries - trace - name: golang.org/x/oauth2 - version: a6bd8cefa1811bd24b86f8902872e4e8225f74c4 + version: 9f3314589c9a9136388751d9adae6b0ed400978a subpackages: - google - internal @@ -307,20 +294,15 @@ imports: - unix - windows - name: golang.org/x/text - version: b19bf474d317b857955b12035d2c5acb57ce8b01 + version: e6919f6577db79269a6443b9dc46d18f2238fb5d subpackages: - - cases - encoding - encoding/internal - encoding/internal/identifier - encoding/unicode - - internal - - internal/tag - internal/utf8internal - - language - runes - secure/bidirule - - secure/precis - transform - unicode/bidi - unicode/norm @@ -330,7 +312,7 @@ imports: subpackages: - rate - name: google.golang.org/appengine - version: 12d5545dc1cfa6047a286d5e853841b6471f4c19 + version: 54a98f90d1c46b7731eb8fb305d2a321c30ef610 subpackages: - internal - internal/app_identity @@ -393,7 +375,7 @@ imports: - name: gopkg.in/yaml.v2 version: 5420a8b6744d3b0345ab293f6fcba19c978f1183 - name: k8s.io/api - version: a675ac48af67cf21d815b5f8df288462096eb9c9 + version: 7cf5895f2711098d7d9527db0a4a49fb0dff7de2 subpackages: - admission/v1beta1 - admissionregistration/v1beta1 @@ -434,13 +416,13 @@ imports: - storage/v1alpha1 - storage/v1beta1 - name: k8s.io/apiextensions-apiserver - version: bf6753f2aa24fe1d69a2abeea1c106042bcf3f5f + version: 14e95df34f1f469647f494f5185a036e26fddcab subpackages: - pkg/apis/apiextensions - pkg/apis/apiextensions/v1beta1 - pkg/features - name: k8s.io/apimachinery - version: 6a84e37a896db9780c75367af8d2ed2bb944022e + version: 1799e75a07195de9460b8ef7300883499f12127b subpackages: - pkg/api/equality - pkg/api/errors @@ -496,7 +478,7 @@ imports: - third_party/forked/golang/netutil - third_party/forked/golang/reflect - name: k8s.io/apiserver - version: f89599b3f64533b7e94fa4d169acbc861b464f2e + version: 47dc9a115b1874c96c20cea91d02b36e4faa1bb1 subpackages: - pkg/authentication/authenticator - pkg/authentication/serviceaccount @@ -504,7 +486,7 @@ imports: - pkg/features - pkg/util/feature - name: k8s.io/cli-runtime - version: 17bc0b7fcef59215541144136f75284656a789fb + version: 2090e6d8f84c1db3e23968b0ee97fb677b363fcf subpackages: - pkg/genericclioptions - pkg/kustomize @@ -519,13 +501,66 @@ imports: - pkg/printers - pkg/resource - name: k8s.io/client-go - version: ae8359b20417914b73a4b514b7a3d642597700bb + version: 78d2af792babf2dd937ba2e2a8d99c753a5eda89 subpackages: - discovery - discovery/cached/disk - discovery/fake - dynamic + - dynamic/dynamicinformer + - dynamic/dynamiclister - dynamic/fake + - informers + - informers/admissionregistration + - informers/admissionregistration/v1beta1 + - informers/apps + - informers/apps/v1 + - informers/apps/v1beta1 + - informers/apps/v1beta2 + - informers/auditregistration + - informers/auditregistration/v1alpha1 + - informers/autoscaling + - informers/autoscaling/v1 + - informers/autoscaling/v2beta1 + - informers/autoscaling/v2beta2 + - informers/batch + - informers/batch/v1 + - informers/batch/v1beta1 + - informers/batch/v2alpha1 + - informers/certificates + - informers/certificates/v1beta1 + - informers/coordination + - informers/coordination/v1 + - informers/coordination/v1beta1 + - informers/core + - informers/core/v1 + - informers/events + - informers/events/v1beta1 + - informers/extensions + - informers/extensions/v1beta1 + - informers/internalinterfaces + - informers/networking + - informers/networking/v1 + - informers/networking/v1beta1 + - informers/node + - informers/node/v1alpha1 + - informers/node/v1beta1 + - informers/policy + - informers/policy/v1beta1 + - informers/rbac + - informers/rbac/v1 + - informers/rbac/v1alpha1 + - informers/rbac/v1beta1 + - informers/scheduling + - informers/scheduling/v1 + - informers/scheduling/v1alpha1 + - informers/scheduling/v1beta1 + - informers/settings + - informers/settings/v1alpha1 + - informers/storage + - informers/storage/v1 + - informers/storage/v1alpha1 + - informers/storage/v1beta1 - kubernetes - kubernetes/fake - kubernetes/scheme @@ -601,6 +636,38 @@ imports: - kubernetes/typed/storage/v1alpha1/fake - kubernetes/typed/storage/v1beta1 - kubernetes/typed/storage/v1beta1/fake + - listers/admissionregistration/v1beta1 + - listers/apps/v1 + - listers/apps/v1beta1 + - listers/apps/v1beta2 + - listers/auditregistration/v1alpha1 + - listers/autoscaling/v1 + - listers/autoscaling/v2beta1 + - listers/autoscaling/v2beta2 + - listers/batch/v1 + - listers/batch/v1beta1 + - listers/batch/v2alpha1 + - listers/certificates/v1beta1 + - listers/coordination/v1 + - listers/coordination/v1beta1 + - listers/core/v1 + - listers/events/v1beta1 + - listers/extensions/v1beta1 + - listers/networking/v1 + - listers/networking/v1beta1 + - listers/node/v1alpha1 + - listers/node/v1beta1 + - listers/policy/v1beta1 + - listers/rbac/v1 + - listers/rbac/v1alpha1 + - listers/rbac/v1beta1 + - listers/scheduling/v1 + - listers/scheduling/v1alpha1 + - listers/scheduling/v1beta1 + - listers/settings/v1alpha1 + - listers/storage/v1 + - listers/storage/v1alpha1 + - listers/storage/v1beta1 - pkg/apis/clientauthentication - pkg/apis/clientauthentication/v1alpha1 - pkg/apis/clientauthentication/v1beta1 @@ -649,12 +716,12 @@ imports: - util/jsonpath - util/keyutil - util/retry -- name: k8s.io/cloud-provider - version: 9c9d72d1bf90eb62005f5112f3eea019b272c44b +- name: k8s.io/component-base + version: 185d68e6e6ea654214f444cab8f645ec3af3092e subpackages: - - features + - featuregate - name: k8s.io/klog - version: 8e90cee79f823779174776412c13478955131846 + version: 89e63fd5117f8c20208186ef85f096703a280c20 - name: k8s.io/kube-openapi version: b3a7cee44a305be0a69e1b9ac03018307287e1b0 subpackages: @@ -663,7 +730,7 @@ imports: - pkg/util/proto/testing - pkg/util/proto/validation - name: k8s.io/kubernetes - version: 66049e3b21efe110454d67df4fa62b08ea79a19b + version: e8462b5b5dc2584fdcd18e6bcfe9f1e4d970a529 subpackages: - pkg/api/legacyscheme - pkg/api/service @@ -758,6 +825,7 @@ imports: - pkg/kubectl/util/event - pkg/kubectl/util/fieldpath - pkg/kubectl/util/i18n + - pkg/kubectl/util/interrupt - pkg/kubectl/util/podutils - pkg/kubectl/util/printers - pkg/kubectl/util/qos @@ -768,6 +836,7 @@ imports: - pkg/kubectl/util/templates - pkg/kubectl/util/term - pkg/kubectl/validation + - pkg/kubectl/version - pkg/kubelet/types - pkg/master/ports - pkg/printers @@ -775,12 +844,10 @@ imports: - pkg/security/apparmor - pkg/serviceaccount - pkg/util/hash - - pkg/util/interrupt - pkg/util/labels - pkg/util/node - pkg/util/parsers - pkg/util/taints - - pkg/version - name: k8s.io/utils version: c2654d5206da6b7b6ace12841e8f359bb89b443c subpackages: @@ -826,7 +893,7 @@ testImports: - name: github.com/DATA-DOG/go-sqlmock version: 472e287dbafe67e526a3797165b64cb14f34705a - name: github.com/pmezard/go-difflib - version: 5d4384ee4fb2527b0a1256a821ebfc92f91efefc + version: 792786c7400a136282c1664665ae0a8db921c6c2 subpackages: - difflib - name: github.com/stretchr/testify diff --git a/glide.yaml b/glide.yaml index ecefde2e0..96401aa8c 100644 --- a/glide.yaml +++ b/glide.yaml @@ -49,19 +49,19 @@ import: version: 0.9.2 - package: github.com/grpc-ecosystem/go-grpc-prometheus - package: k8s.io/kubernetes - version: v1.14.2 + version: v1.15.0 - package: k8s.io/client-go - version: kubernetes-1.14.2 + version: kubernetes-1.15.0 - package: k8s.io/api - version: kubernetes-1.14.2 + version: kubernetes-1.15.0 - package: k8s.io/apimachinery - version: kubernetes-1.14.2 + version: kubernetes-1.15.0 - package: k8s.io/apiserver - version: kubernetes-1.14.2 + version: kubernetes-1.15.0 - package: k8s.io/cli-runtime - version: kubernetes-1.14.2 + version: kubernetes-1.15.0 - package: k8s.io/apiextensions-apiserver - version: kubernetes-1.14.2 + version: kubernetes-1.15.0 - package: github.com/cyphar/filepath-securejoin version: ^0.2.1 - package: github.com/jmoiron/sqlx From 9014bd9c502d92fb78bfee553abdba5cf35e878f Mon Sep 17 00:00:00 2001 From: Oleg Sidorov Date: Thu, 11 Jul 2019 15:12:02 +0200 Subject: [PATCH 268/327] chartutil.ReadValues is forced to unmarshal numbers into json.Number This change is an attempt to address the common problem of json number unmarshalling where any number is converted into a float64 and represented in a scientific notation on a marshall call. This behavior breaks things like: chart versions and image tags if not converted to yaml strings explicitly. An example of this behavior: k8s failure to fetch an image tagged with a big number like: $IMAGE:20190612073634 after a few steps of yaml re-rendering turns into: $IMAGE:2.0190612073634e+13. Example issue: https://github.com/helm/helm/issues/1707 This commit forces yaml parser to use JSON modifiers and explicitly enables interface{} unmarshalling instead of float64. The change introduced might be breaking so should be processed with an extra care. Due to the fact helm mostly dals with human-produced data (charts), we have a decent level of confidence this change looses no functionality helm users rely upon (the scientific notation). Relevant doc: https://golang.org/pkg/encoding/json/#Decoder.UseNumber Signed-off-by: Oleg Sidorov --- pkg/chartutil/requirements_test.go | 5 +++++ pkg/chartutil/testdata/coleridge.yaml | 1 + pkg/chartutil/values.go | 6 +++++- pkg/chartutil/values_test.go | 7 +++++++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/pkg/chartutil/requirements_test.go b/pkg/chartutil/requirements_test.go index e433f92ea..6a41635d2 100644 --- a/pkg/chartutil/requirements_test.go +++ b/pkg/chartutil/requirements_test.go @@ -15,6 +15,7 @@ limitations under the License. package chartutil import ( + "encoding/json" "os" "path/filepath" "sort" @@ -302,6 +303,10 @@ func verifyRequirementsImportValues(t *testing.T, c *chart.Chart, v *chart.Confi } switch pv.(type) { + case json.Number: + if s := pv.(json.Number).String(); s != vv { + t.Errorf("Failed to match imported number value %v with expected %v", s, vv) + } case float64: s := strconv.FormatFloat(pv.(float64), 'f', -1, 64) if s != vv { diff --git a/pkg/chartutil/testdata/coleridge.yaml b/pkg/chartutil/testdata/coleridge.yaml index b6579628b..15535988b 100644 --- a/pkg/chartutil/testdata/coleridge.yaml +++ b/pkg/chartutil/testdata/coleridge.yaml @@ -10,3 +10,4 @@ water: water: where: "everywhere" nor: "any drop to drink" + temperature: 1234567890 diff --git a/pkg/chartutil/values.go b/pkg/chartutil/values.go index 890cd5540..1b7ba7a81 100644 --- a/pkg/chartutil/values.go +++ b/pkg/chartutil/values.go @@ -17,6 +17,7 @@ limitations under the License. package chartutil import ( + "encoding/json" "errors" "fmt" "io" @@ -132,7 +133,10 @@ func tableLookup(v Values, simple string) (Values, error) { // ReadValues will parse YAML byte data into a Values. func ReadValues(data []byte) (vals Values, err error) { - err = yaml.Unmarshal(data, &vals) + err = yaml.Unmarshal(data, &vals, func(d *json.Decoder) *json.Decoder { + d.UseNumber() + return d + }) if len(vals) == 0 { vals = Values{} } diff --git a/pkg/chartutil/values_test.go b/pkg/chartutil/values_test.go index fb26c6938..cf2d1360c 100644 --- a/pkg/chartutil/values_test.go +++ b/pkg/chartutil/values_test.go @@ -53,6 +53,7 @@ water: water: where: "everywhere" nor: "any drop to drink" + temperature: 1234567890 ` data, err := ReadValues([]byte(doc)) @@ -266,6 +267,12 @@ func matchValues(t *testing.T, data map[string]interface{}) { } else if o != "everywhere" { t.Errorf("Expected water water everywhere") } + + if o, err := ttpl("{{.water.water.temperature}}", data); err != nil { + t.Errorf(".water.water.temperature: %s", err) + } else if o != "1234567890" { + t.Errorf("Expected water water temperature: 1234567890, got: %s", o) + } } func ttpl(tpl string, v map[string]interface{}) (string, error) { From 70cd32c4cebac2af67f4da3934e141f0f0c00842 Mon Sep 17 00:00:00 2001 From: Oleg Sidorov Date: Thu, 11 Jul 2019 18:24:48 +0200 Subject: [PATCH 269/327] Fixed failing tests for helm installer Signed-off-by: Oleg Sidorov --- cmd/helm/installer/install_test.go | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/cmd/helm/installer/install_test.go b/cmd/helm/installer/install_test.go index 50cc8b1d8..1c7063450 100644 --- a/cmd/helm/installer/install_test.go +++ b/cmd/helm/installer/install_test.go @@ -17,6 +17,7 @@ limitations under the License. package installer // import "k8s.io/helm/cmd/helm/installer" import ( + "encoding/json" "os" "path/filepath" "reflect" @@ -716,9 +717,32 @@ func TestDeployment_WithSetValues(t *testing.T) { // convert our expected value to match the result type for comparison ev := tt.expect + intType := reflect.TypeOf(int64(0)) + floatType := reflect.TypeOf(float64(0)) + switch pvt := pv.(type) { + case json.Number: + evv := reflect.ValueOf(ev) + evv = reflect.Indirect(evv) + switch ev.(type) { + case float32, float64: + evv = evv.Convert(floatType) + if fpv, err := pv.(json.Number).Float64(); err != nil { + t.Errorf("Failed to convert json number to float: %s", err) + } else if fpv != evv.Float() { + t.Errorf("%s: expected float value %q, got %f", tt.name, tt.expect, fpv) + } + case byte, int, int32, int64: + evv = evv.Convert(intType) + if ipv, err := pv.(json.Number).Int64(); err != nil { + t.Errorf("Failed to convert json number to int: %s", err) + } else if ipv != evv.Int() { + t.Errorf("%s: expected int value %q, got %d", tt.name, tt.expect, ipv) + } + default: + t.Errorf("Unknown primitive type: %s", reflect.TypeOf(ev)) + } case float64: - floatType := reflect.TypeOf(float64(0)) v := reflect.ValueOf(ev) v = reflect.Indirect(v) if !v.Type().ConvertibleTo(floatType) { From 320e853b8dd5a1b91e1934b12bad6bd49b9708bf Mon Sep 17 00:00:00 2001 From: Seb Ospina Date: Thu, 16 May 2019 19:07:28 +0200 Subject: [PATCH 270/327] Added List mode for Role, ClusterRole and Bindings Kubernetes supports RoleList, RoleBindingList, ClusterRoleList and ClusterRoleBindingList, in order for a Role to be bound, it must already exist. For the List reference, see: https://github.com/kubernetes/kubernetes/blob/master/pkg/apis/rbac/types.go Signed-off-by: Seb Ospina --- pkg/tiller/kind_sorter.go | 8 ++++++++ pkg/tiller/kind_sorter_test.go | 20 ++++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/pkg/tiller/kind_sorter.go b/pkg/tiller/kind_sorter.go index f980277d2..2c11aa855 100644 --- a/pkg/tiller/kind_sorter.go +++ b/pkg/tiller/kind_sorter.go @@ -40,9 +40,13 @@ var InstallOrder SortOrder = []string{ "ServiceAccount", "CustomResourceDefinition", "ClusterRole", + "ClusterRoleList", "ClusterRoleBinding", + "ClusterRoleBindingList", "Role", + "RoleList", "RoleBinding", + "RoleBindingList", "Service", "DaemonSet", "Pod", @@ -71,9 +75,13 @@ var UninstallOrder SortOrder = []string{ "ReplicationController", "Pod", "DaemonSet", + "RoleBindingList", "RoleBinding", + "RoleList", "Role", + "ClusterRoleBindingList", "ClusterRoleBinding", + "ClusterRoleList", "ClusterRole", "CustomResourceDefinition", "ServiceAccount", diff --git a/pkg/tiller/kind_sorter_test.go b/pkg/tiller/kind_sorter_test.go index 56822f995..626e80ee6 100644 --- a/pkg/tiller/kind_sorter_test.go +++ b/pkg/tiller/kind_sorter_test.go @@ -29,10 +29,18 @@ func TestKindSorter(t *testing.T) { Name: "i", Head: &util.SimpleHead{Kind: "ClusterRole"}, }, + { + Name: "I", + Head: &util.SimpleHead{Kind: "ClusterRoleList"}, + }, { Name: "j", Head: &util.SimpleHead{Kind: "ClusterRoleBinding"}, }, + { + Name: "J", + Head: &util.SimpleHead{Kind: "ClusterRoleBindingList"}, + }, { Name: "e", Head: &util.SimpleHead{Kind: "ConfigMap"}, @@ -105,10 +113,18 @@ func TestKindSorter(t *testing.T) { Name: "k", Head: &util.SimpleHead{Kind: "Role"}, }, + { + Name: "K", + Head: &util.SimpleHead{Kind: "RoleList"}, + }, { Name: "l", Head: &util.SimpleHead{Kind: "RoleBinding"}, }, + { + Name: "L", + Head: &util.SimpleHead{Kind: "RoleBindingList"}, + }, { Name: "d", Head: &util.SimpleHead{Kind: "Secret"}, @@ -144,8 +160,8 @@ func TestKindSorter(t *testing.T) { order SortOrder expected string }{ - {"install", InstallOrder, "abc3zde1fgh2ijklmnopqrstuvw!"}, - {"uninstall", UninstallOrder, "wvmutsrqponlkji2hgf1edz3cba!"}, + {"install", InstallOrder, "abc3zde1fgh2iIjJkKlLmnopqrstuvw!"}, + {"uninstall", UninstallOrder, "wvmutsrqponLlKkJjIi2hgf1edz3cba!"}, } { var buf bytes.Buffer t.Run(test.description, func(t *testing.T) { From 5a39ff90ad25647b75a9e5351dd73ed36fe958e5 Mon Sep 17 00:00:00 2001 From: Nenad Merdanovic Date: Tue, 16 Jul 2019 11:39:28 +0200 Subject: [PATCH 271/327] Fix documentation to use existing chart in the stable repository Signed-off-by: Nenad Merdanovic --- docs/rbac.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/rbac.md b/docs/rbac.md index 9d4531ffe..a89579c61 100644 --- a/docs/rbac.md +++ b/docs/rbac.md @@ -107,7 +107,7 @@ $HELM_HOME has been configured at /Users/awesome-user/.helm. Tiller (the Helm server side component) has been installed into your Kubernetes Cluster. -$ helm install nginx --tiller-namespace tiller-world --namespace tiller-world +$ helm install stable/lamp --tiller-namespace tiller-world --namespace tiller-world NAME: wayfaring-yak LAST DEPLOYED: Mon Aug 7 16:00:16 2017 NAMESPACE: tiller-world From 5b67d6fbd97ca1258e5ae9276c9c88905fc56a2e Mon Sep 17 00:00:00 2001 From: Tine Jozelj Date: Tue, 16 Jul 2019 14:47:20 +0200 Subject: [PATCH 272/327] feat(helm:create): allow absolute paths If starter template path is an absolute path, it shouldn't be prefixed with c.home.Starters() but rather be used as is. Signed-off-by: Tine Jozelj --- cmd/helm/create.go | 6 ++- cmd/helm/create_test.go | 92 ++++++++++++++++++++++++++++++++++++++++ docs/helm/helm_create.md | 4 +- 3 files changed, 99 insertions(+), 3 deletions(-) diff --git a/cmd/helm/create.go b/cmd/helm/create.go index 451b4ce86..da91291fd 100644 --- a/cmd/helm/create.go +++ b/cmd/helm/create.go @@ -88,7 +88,7 @@ func newCreateCmd(out io.Writer) *cobra.Command { }, } - cmd.Flags().StringVarP(&cc.starter, "starter", "p", "", "The named Helm starter scaffold") + cmd.Flags().StringVarP(&cc.starter, "starter", "p", "", "The name or absolute path to Helm starter scaffold") return cmd } @@ -106,6 +106,10 @@ func (c *createCmd) run() error { if c.starter != "" { // Create from the starter lstarter := filepath.Join(c.home.Starters(), c.starter) + // If path is absolute, we dont want to prefix it with helm starters folder + if filepath.IsAbs(c.starter) { + lstarter = c.starter + } return chartutil.CreateFrom(cfile, filepath.Dir(c.name), lstarter) } diff --git a/cmd/helm/create_test.go b/cmd/helm/create_test.go index 20bace864..fb118ba58 100644 --- a/cmd/helm/create_test.go +++ b/cmd/helm/create_test.go @@ -163,3 +163,95 @@ func TestCreateStarterCmd(t *testing.T) { } } + +func TestCreateStarterAbsoluteCmd(t *testing.T) { + cname := "testchart" + // Make a temp dir + tdir, err := ioutil.TempDir("", "helm-create-") + if err != nil { + t.Fatal(err) + } + defer os.RemoveAll(tdir) + + thome, err := tempHelmHome(t) + if err != nil { + t.Fatal(err) + } + cleanup := resetEnv() + defer func() { + os.RemoveAll(thome.String()) + cleanup() + }() + + settings.Home = thome + + // Create a starter. + starterchart := filepath.Join(tdir, "starters") + os.Mkdir(starterchart, 0755) + if dest, err := chartutil.Create(&chart.Metadata{Name: "starterchart"}, starterchart); err != nil { + t.Fatalf("Could not create chart: %s", err) + } else { + t.Logf("Created %s", dest) + } + tplpath := filepath.Join(starterchart, "starterchart", "templates", "foo.tpl") + if err := ioutil.WriteFile(tplpath, []byte("test"), 0755); err != nil { + t.Fatalf("Could not write template: %s", err) + } + + // CD into it + pwd, err := os.Getwd() + if err != nil { + t.Fatal(err) + } + if err := os.Chdir(tdir); err != nil { + t.Fatal(err) + } + defer os.Chdir(pwd) + + // Run a create + cmd := newCreateCmd(ioutil.Discard) + cmd.ParseFlags([]string{"--starter", filepath.Join(starterchart, "starterchart")}) + if err := cmd.RunE(cmd, []string{cname}); err != nil { + t.Errorf("Failed to run create: %s", err) + return + } + + // Test that the chart is there + if fi, err := os.Stat(cname); err != nil { + t.Fatalf("no chart directory: %s", err) + } else if !fi.IsDir() { + t.Fatalf("chart is not directory") + } + + c, err := chartutil.LoadDir(cname) + if err != nil { + t.Fatal(err) + } + + if c.Metadata.Name != cname { + t.Errorf("Expected %q name, got %q", cname, c.Metadata.Name) + } + if c.Metadata.ApiVersion != chartutil.ApiVersionV1 { + t.Errorf("Wrong API version: %q", c.Metadata.ApiVersion) + } + + expectedTemplateCount := 8 + if l := len(c.Templates); l != expectedTemplateCount { + t.Errorf("Expected %d templates, got %d", expectedTemplateCount, l) + } + + found := false + for _, tpl := range c.Templates { + if tpl.Name == "templates/foo.tpl" { + found = true + data := tpl.Data + if string(data) != "test" { + t.Errorf("Expected template 'test', got %q", string(data)) + } + } + } + if !found { + t.Error("Did not find foo.tpl") + } + +} diff --git a/docs/helm/helm_create.md b/docs/helm/helm_create.md index 0bf526a22..f0c5cd037 100644 --- a/docs/helm/helm_create.md +++ b/docs/helm/helm_create.md @@ -44,7 +44,7 @@ helm create NAME [flags] ``` -h, --help help for create - -p, --starter string The named Helm starter scaffold + -p, --starter string The name or absolute path to Helm starter scaffold ``` ### Options inherited from parent commands @@ -63,4 +63,4 @@ helm create NAME [flags] * [helm](helm.md) - The Helm package manager for Kubernetes. -###### Auto generated by spf13/cobra on 5-Jun-2019 +###### Auto generated by spf13/cobra on 7-Jul-2019 From 535df90cc8d13978c016aaecf575dbd3f3f3541e Mon Sep 17 00:00:00 2001 From: Constantin Bugneac Date: Thu, 18 Jul 2019 15:24:32 +0100 Subject: [PATCH 273/327] Added HorizontalPodAutoscaler to sort order. Signed-off-by: Constantin Bugneac --- pkg/tiller/kind_sorter.go | 2 ++ pkg/tiller/kind_sorter_test.go | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pkg/tiller/kind_sorter.go b/pkg/tiller/kind_sorter.go index 2c11aa855..5c7193dee 100644 --- a/pkg/tiller/kind_sorter.go +++ b/pkg/tiller/kind_sorter.go @@ -53,6 +53,7 @@ var InstallOrder SortOrder = []string{ "ReplicationController", "ReplicaSet", "Deployment", + "HorizontalPodAutoscaler", "StatefulSet", "Job", "CronJob", @@ -70,6 +71,7 @@ var UninstallOrder SortOrder = []string{ "CronJob", "Job", "StatefulSet", + "HorizontalPodAutoscaler", "Deployment", "ReplicaSet", "ReplicationController", diff --git a/pkg/tiller/kind_sorter_test.go b/pkg/tiller/kind_sorter_test.go index 626e80ee6..3b37256ed 100644 --- a/pkg/tiller/kind_sorter_test.go +++ b/pkg/tiller/kind_sorter_test.go @@ -153,6 +153,10 @@ func TestKindSorter(t *testing.T) { Name: "z", Head: &util.SimpleHead{Kind: "PodDisruptionBudget"}, }, + { + Name: "x", + Head: &util.SimpleHead{Kind: "HorizontalPodAutoscaler"}, + }, } for _, test := range []struct { @@ -160,8 +164,8 @@ func TestKindSorter(t *testing.T) { order SortOrder expected string }{ - {"install", InstallOrder, "abc3zde1fgh2iIjJkKlLmnopqrstuvw!"}, - {"uninstall", UninstallOrder, "wvmutsrqponLlKkJjIi2hgf1edz3cba!"}, + {"install", InstallOrder, "abc3zde1fgh2iIjJkKlLmnopqrxstuvw!"}, + {"uninstall", UninstallOrder, "wvmutsxrqponLlKkJjIi2hgf1edz3cba!"}, } { var buf bytes.Buffer t.Run(test.description, func(t *testing.T) { From e98534d69414c53c9c7309e1ce9805096dc34b25 Mon Sep 17 00:00:00 2001 From: Matthew Fisher Date: Mon, 22 Jul 2019 12:44:15 -0700 Subject: [PATCH 274/327] docs(CONTRIBUTING): one LGTM for maintainers Signed-off-by: Matthew Fisher --- CONTRIBUTING.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3965e18db..996f6d224 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -263,6 +263,8 @@ Like any good open source project, we use Pull Requests (PRs) to track code chan - PRs should stay open until merged or if they have not been active for more than 30 days. This will help keep the PR queue to a manageable size and reduce noise. Should the PR need to stay open (like in the case of a WIP), the `keep open` label can be added. + - Before merging a PR, refer to the topic on [Size Labels](#size-labels) below to determine if + the PR requires more than one LGTM to merge. - If the owner of the PR is listed in `OWNERS`, that user **must** merge their own PRs or explicitly request another OWNER do that for them. - If the owner of a PR is _not_ listed in `OWNERS`, any maintainer may merge the PR once it is approved. @@ -320,11 +322,15 @@ The following tables define all label types used for Helm. It is split up by cat Size labels are used to indicate how "dangerous" a PR is. The guidelines below are used to assign the labels, but ultimately this can be changed by the maintainers. For example, even if a PR only makes -30 lines of changes in 1 file, but it changes key functionality, it will likely be labeled as `size/large` +30 lines of changes in 1 file, but it changes key functionality, it will likely be labeled as `size/L` because it requires sign off from multiple people. Conversely, a PR that adds a small feature, but requires -another 150 lines of tests to cover all cases, could be labeled as `size/small` even though the number +another 150 lines of tests to cover all cases, could be labeled as `size/S` even though the number lines is greater than defined below. +PRs submitted by a core maintainer, regardless of size, only requires approval from one additional +maintainer. This ensures there are at least two maintainers who are aware of any significant PRs +introduced to the codebase. + | Label | Description | | ----- | ----------- | | `size/XS` | Anything less than or equal to 9 lines ignoring generated files. Only small amounts of manual testing may be required. | From 7247956b96d0f038195af41f1be9b7ce6002c662 Mon Sep 17 00:00:00 2001 From: Pete Hodgson Date: Tue, 23 Jul 2019 09:48:17 -0700 Subject: [PATCH 275/327] Fix broken link in docs/related.md Looks like this hackernoon link is now broken, probably from when they moved off of Medium. Signed-off-by: Pete Hodgson --- docs/related.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/related.md b/docs/related.md index 06527d75d..63919790b 100644 --- a/docs/related.md +++ b/docs/related.md @@ -14,7 +14,7 @@ or [pull request](https://github.com/helm/helm/pulls). - [GitLab, Consumer Driven Contracts, Helm and Kubernetes](https://medium.com/@enxebre/gitlab-consumer-driven-contracts-helm-and-kubernetes-b7235a60a1cb#.xwp1y4tgi) - [Honestbee's Helm Chart Conventions](https://gist.github.com/so0k/f927a4b60003cedd101a0911757c605a) - [Releasing backward-incompatible changes: Kubernetes, Jenkins, Prometheus Operator, Helm and Traefik](https://medium.com/@enxebre/releasing-backward-incompatible-changes-kubernetes-jenkins-plugin-prometheus-operator-helm-self-6263ca61a1b1#.e0c7elxhq) -- [The Missing CI/CD Kubernetes Component: Helm package manager](https://hackernoon.com/the-missing-ci-cd-kubernetes-component-helm-package-manager-1fe002aac680#.691sk2zhu) +- [The Missing CI/CD Kubernetes Component: Helm package manager](https://medium.com/@gajus/the-missing-ci-cd-kubernetes-component-helm-package-manager-1fe002aac680) - [Using Helm to Deploy to Kubernetes](https://daemonza.github.io/2017/02/20/using-helm-to-deploy-to-kubernetes/) - [Writing a Helm Chart](https://www.influxdata.com/packaged-kubernetes-deployments-writing-helm-chart/) - [A basic walk through Kubernetes Helm](https://github.com/muffin87/helm-tutorial) From d8b7984d75e958c2e160363af1128ad3bdbc2ba7 Mon Sep 17 00:00:00 2001 From: Bridget Kromhout Date: Tue, 23 Jul 2019 13:13:55 -0500 Subject: [PATCH 276/327] Fixing link; adding AKS. Signed-off-by: Bridget Kromhout --- docs/install.md | 2 +- docs/kubernetes_distros.md | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/install.md b/docs/install.md index 3742385f3..759ec1759 100755 --- a/docs/install.md +++ b/docs/install.md @@ -123,7 +123,7 @@ configured to talk to a remote Kubernetes cluster. Most cloud providers enable a feature called Role-Based Access Control - RBAC for short. If your cloud provider enables this feature, you will need to create a service account for Tiller with the right roles and permissions to access resources. -Check the [Kubernetes Distribution Guide](kubernetes_distros.md) to see if there's any further points of interest on using Helm with your cloud provider. Also check out the guide on [Tiller and Role-Based Access Control](rbac.md) for more information on how to run Tiller in an RBAC-enabled Kubernetes cluster. +Check the [Kubernetes Distribution Guide](kubernetes-distribution-guide) to see if there's any further points of interest on using Helm with your cloud provider. Also check out the guide on [Tiller and Role-Based Access Control](rbac.md) for more information on how to run Tiller in an RBAC-enabled Kubernetes cluster. ### Easy In-Cluster Installation diff --git a/docs/kubernetes_distros.md b/docs/kubernetes_distros.md index bb14043da..48a73204c 100644 --- a/docs/kubernetes_distros.md +++ b/docs/kubernetes_distros.md @@ -22,6 +22,10 @@ Google's GKE hosted Kubernetes platform enables RBAC by default. You will need t See [Tiller and role-based access control](https://docs.helm.sh/using_helm/#role-based-access-control) for more information. +## AKS + +Helm works with [Azure Kubernetes Service](https://docs.microsoft.com/en-us/azure/aks/kubernetes-helm). If using an RBAC-enabled AKS cluster, you need [a service account and role binding for the Tiller service](https://helm.sh/docs/using_helm/#tiller-namespaces-and-rbac). + ## Ubuntu with 'kubeadm' Kubernetes bootstrapped with `kubeadm` is known to work on the following Linux From ce0ad06e941e12e335c5d083c145f830bf7f3083 Mon Sep 17 00:00:00 2001 From: Bridget Kromhout Date: Tue, 23 Jul 2019 15:47:11 -0500 Subject: [PATCH 277/327] Fixes per helpful feedback Signed-off-by: Bridget Kromhout --- docs/install.md | 2 +- docs/kubernetes_distros.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/install.md b/docs/install.md index 759ec1759..06a319486 100755 --- a/docs/install.md +++ b/docs/install.md @@ -123,7 +123,7 @@ configured to talk to a remote Kubernetes cluster. Most cloud providers enable a feature called Role-Based Access Control - RBAC for short. If your cloud provider enables this feature, you will need to create a service account for Tiller with the right roles and permissions to access resources. -Check the [Kubernetes Distribution Guide](kubernetes-distribution-guide) to see if there's any further points of interest on using Helm with your cloud provider. Also check out the guide on [Tiller and Role-Based Access Control](rbac.md) for more information on how to run Tiller in an RBAC-enabled Kubernetes cluster. +Check the [Kubernetes Distribution Guide](#kubernetes-distribution-guide) to see if there's any further points of interest on using Helm with your cloud provider. Also check out the guide on [Tiller and Role-Based Access Control](rbac.md) for more information on how to run Tiller in an RBAC-enabled Kubernetes cluster. ### Easy In-Cluster Installation diff --git a/docs/kubernetes_distros.md b/docs/kubernetes_distros.md index 48a73204c..52a5e1acc 100644 --- a/docs/kubernetes_distros.md +++ b/docs/kubernetes_distros.md @@ -24,7 +24,7 @@ See [Tiller and role-based access control](https://docs.helm.sh/using_helm/#role ## AKS -Helm works with [Azure Kubernetes Service](https://docs.microsoft.com/en-us/azure/aks/kubernetes-helm). If using an RBAC-enabled AKS cluster, you need [a service account and role binding for the Tiller service](https://helm.sh/docs/using_helm/#tiller-namespaces-and-rbac). +Helm works with [Azure Kubernetes Service](https://docs.microsoft.com/en-us/azure/aks/kubernetes-helm). If using an RBAC-enabled AKS cluster, you need [a service account and role binding for the Tiller service](https://docs.microsoft.com/en-us/azure/aks/kubernetes-helm#create-a-service-account). ## Ubuntu with 'kubeadm' From 276bb9b1c8ee3c51064f768e8c0e2fb64c3fd5f2 Mon Sep 17 00:00:00 2001 From: Tariq Ibrahim Date: Wed, 24 Jul 2019 16:22:46 -0700 Subject: [PATCH 278/327] fix golint issues reported by make test Signed-off-by: Tariq Ibrahim --- pkg/kube/client.go | 18 +++++++++++++----- pkg/kube/client_test.go | 2 +- pkg/lint/rules/chartfile.go | 4 ++-- pkg/tiller/environment/environment.go | 1 + 4 files changed, 17 insertions(+), 8 deletions(-) diff --git a/pkg/kube/client.go b/pkg/kube/client.go index fcaa28760..8fbfba1fd 100644 --- a/pkg/kube/client.go +++ b/pkg/kube/client.go @@ -314,7 +314,14 @@ func (c *Client) Get(namespace string, reader io.Reader) (string, error) { return buf.String(), nil } -// Deprecated; use UpdateWithOptions instead +// Update reads the current configuration and a target configuration from io.reader +// and creates resources that don't already exist, updates resources that have been modified +// in the target configuration and deletes resources from the current configuration that are +// not present in the target configuration. +// +// Namespace will set the namespaces. +// +// Deprecated: use UpdateWithOptions instead. func (c *Client) Update(namespace string, originalReader, targetReader io.Reader, force bool, recreate bool, timeout int64, shouldWait bool) error { return c.UpdateWithOptions(namespace, originalReader, targetReader, UpdateOptions{ Force: force, @@ -334,12 +341,13 @@ type UpdateOptions struct { CleanupOnFail bool } -// UpdateWithOptions reads in the current configuration and a target configuration from io.reader -// and creates resources that don't already exists, updates resources that have been modified +// UpdateWithOptions reads the current configuration and a target configuration from io.reader +// and creates resources that don't already exist, updates resources that have been modified // in the target configuration and deletes resources from the current configuration that are // not present in the target configuration. // -// Namespace will set the namespaces. +// Namespace will set the namespaces. UpdateOptions provides additional parameters to control +// update behavior. func (c *Client) UpdateWithOptions(namespace string, originalReader, targetReader io.Reader, opts UpdateOptions) error { original, err := c.BuildUnstructured(namespace, originalReader) if err != nil { @@ -552,7 +560,7 @@ func (c *Client) WatchUntilReady(namespace string, reader io.Reader, timeout int return perform(infos, c.watchTimeout(time.Duration(timeout)*time.Second)) } -// WatchUntilCRDEstablished polls the given CRD until it reaches the established +// WaitUntilCRDEstablished polls the given CRD until it reaches the established // state. A CRD needs to reach the established state before CRs can be created. // // If a naming conflict condition is found, this function will return an error. diff --git a/pkg/kube/client_test.go b/pkg/kube/client_test.go index 6faea02d0..d33b4b9d9 100644 --- a/pkg/kube/client_test.go +++ b/pkg/kube/client_test.go @@ -558,7 +558,7 @@ func TestWaitUntilCRDEstablished(t *testing.T) { } else { crd = crdWithConditions } - requestCount += 1 + requestCount++ return newResponse(200, &crd) }), } diff --git a/pkg/lint/rules/chartfile.go b/pkg/lint/rules/chartfile.go index 8ef33d0c5..8f6c16d94 100644 --- a/pkg/lint/rules/chartfile.go +++ b/pkg/lint/rules/chartfile.go @@ -51,7 +51,7 @@ func Chartfile(linter *support.Linter) { linter.RunLinterRule(support.ErrorSev, chartFileName, validateChartNameDirMatch(linter.ChartDir, chartFile)) // Chart metadata - linter.RunLinterRule(support.ErrorSev, chartFileName, validateChartApiVersion(chartFile)) + linter.RunLinterRule(support.ErrorSev, chartFileName, validateChartAPIVersion(chartFile)) linter.RunLinterRule(support.ErrorSev, chartFileName, validateChartVersion(chartFile)) linter.RunLinterRule(support.ErrorSev, chartFileName, validateChartEngine(chartFile)) linter.RunLinterRule(support.ErrorSev, chartFileName, validateChartMaintainer(chartFile)) @@ -97,7 +97,7 @@ func validateChartNameDirMatch(chartDir string, cf *chart.Metadata) error { return nil } -func validateChartApiVersion(cf *chart.Metadata) error { +func validateChartAPIVersion(cf *chart.Metadata) error { if cf.ApiVersion == "" { return errors.New("apiVersion is required") } diff --git a/pkg/tiller/environment/environment.go b/pkg/tiller/environment/environment.go index d84ad55db..83ec5e647 100644 --- a/pkg/tiller/environment/environment.go +++ b/pkg/tiller/environment/environment.go @@ -255,6 +255,7 @@ func (p *PrintingKubeClient) WaitAndGetCompletedPodPhase(namespace string, reade return v1.PodUnknown, err } +// WaitUntilCRDEstablished implements KubeClient WaitUntilCRDEstablished. func (p *PrintingKubeClient) WaitUntilCRDEstablished(reader io.Reader, timeout time.Duration) error { _, err := io.Copy(p.Out, reader) return err From e53613db3f386b8728ac3d6038b9d13eba9caece Mon Sep 17 00:00:00 2001 From: Stefan Deitmer Date: Thu, 25 Jul 2019 14:29:45 +0200 Subject: [PATCH 279/327] Fix subchart values not being deleted by setting value to nil in parent chart's values Signed-off-by: Stefan Deitmer --- .../testdata/moby/charts/spouter/values.yaml | 1 + pkg/chartutil/testdata/moby/values.yaml | 4 +++ pkg/chartutil/values.go | 5 +--- pkg/chartutil/values_test.go | 27 +++++++++++++++++++ 4 files changed, 33 insertions(+), 4 deletions(-) diff --git a/pkg/chartutil/testdata/moby/charts/spouter/values.yaml b/pkg/chartutil/testdata/moby/charts/spouter/values.yaml index f71d92a9f..36cdff290 100644 --- a/pkg/chartutil/testdata/moby/charts/spouter/values.yaml +++ b/pkg/chartutil/testdata/moby/charts/spouter/values.yaml @@ -1 +1,2 @@ scope: spouter +foo: bar \ No newline at end of file diff --git a/pkg/chartutil/testdata/moby/values.yaml b/pkg/chartutil/testdata/moby/values.yaml index ecf22b563..8cea245ce 100644 --- a/pkg/chartutil/testdata/moby/values.yaml +++ b/pkg/chartutil/testdata/moby/values.yaml @@ -22,3 +22,7 @@ web: httpGet: path: /api/v1/info port: atc + +# for testing deleting default values in sub charts +spouter: + foo: null \ No newline at end of file diff --git a/pkg/chartutil/values.go b/pkg/chartutil/values.go index 1b7ba7a81..f82b95950 100644 --- a/pkg/chartutil/values.go +++ b/pkg/chartutil/values.go @@ -170,10 +170,7 @@ func CoalesceValues(chrt *chart.Chart, vals *chart.Config) (Values, error) { if err != nil { return cvals, err } - cvals, err = coalesce(chrt, evals) - if err != nil { - return cvals, err - } + return coalesce(chrt, evals) } return coalesceDeps(chrt, cvals) diff --git a/pkg/chartutil/values_test.go b/pkg/chartutil/values_test.go index cf2d1360c..dfb38387e 100644 --- a/pkg/chartutil/values_test.go +++ b/pkg/chartutil/values_test.go @@ -475,6 +475,33 @@ func TestCoalesceTables(t *testing.T) { t.Errorf("Expected boat string, got %v", dst["boat"]) } } + +func TestCoalesceSubchart(t *testing.T) { + tchart := "testdata/moby" + c, err := LoadDir(tchart) + if err != nil { + t.Fatal(err) + } + + tvals := &chart.Config{} + + v, err := CoalesceValues(c, tvals) + if err != nil { + t.Fatal(err) + } + j, _ := json.MarshalIndent(v, "", " ") + t.Logf("Coalesced Values: %s", string(j)) + + subchartValues, ok := v["spouter"].(map[string]interface{}) + if !ok { + t.Errorf("Subchart values not found") + } + + if _, ok := subchartValues["foo"]; ok { + t.Errorf("Expected key foo to be removed, still present") + } +} + func TestPathValue(t *testing.T) { doc := ` title: "Moby Dick" From c086f78583f1996939b73ab8dfdb6f24f0cb1488 Mon Sep 17 00:00:00 2001 From: ethan Date: Thu, 25 Jul 2019 22:36:25 +0800 Subject: [PATCH 280/327] cleanup: error message typos in sql.go Signed-off-by: ethan --- pkg/storage/driver/sql.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/storage/driver/sql.go b/pkg/storage/driver/sql.go index 46bcccc32..be2962da4 100644 --- a/pkg/storage/driver/sql.go +++ b/pkg/storage/driver/sql.go @@ -199,7 +199,7 @@ func (s *SQL) Query(labels map[string]string) ([]*rspb.Release, error) { sqlFilter[dbField] = val } else { s.Log("unknown label %s", key) - return nil, fmt.Errorf("unknow label %s", key) + return nil, fmt.Errorf("unknown label %s", key) } } sort.Strings(sqlFilterKeys) From ae52477fbd1c9fd177a638a7954332772463b77f Mon Sep 17 00:00:00 2001 From: Yusuke Kuoka Date: Fri, 26 Jul 2019 23:08:01 +0900 Subject: [PATCH 281/327] fix: upgrade with CRD changes Probably since K8s 1.13.x, `converter.ConvertToVersion(info.Object, groupVersioner)` which is the body of `asVersioned` doesn't return an error or an "unstructured" object, but `apiextensions/v1beta1.CustomResourceDefinition`. The result was `helm upgrade` with any changes in CRD consistently failing. This fixes that by adding an additional case of the conversion result being `v1beta1.CustomResourceDefinition`. This is a backward-compatible change as it doesn't remove existing switch cases for older K8s versions. Fixes #5853 Signed-off-by: Yusuke Kuoka --- pkg/kube/client.go | 35 +++++++++++++++++++++++++---------- pkg/kube/wait.go | 2 +- 2 files changed, 26 insertions(+), 11 deletions(-) diff --git a/pkg/kube/client.go b/pkg/kube/client.go index 8fbfba1fd..e61d526a7 100644 --- a/pkg/kube/client.go +++ b/pkg/kube/client.go @@ -656,7 +656,7 @@ func createPatch(target *resource.Info, current runtime.Object) ([]byte, types.P } // Get a versioned object - versionedObject := asVersioned(target) + versionedObject, err := asVersioned(target) // Unstructured objects, such as CRDs, may not have an not registered error // returned from ConvertToVersion. Anything that's unstructured should @@ -664,16 +664,25 @@ func createPatch(target *resource.Info, current runtime.Object) ([]byte, types.P // on objects like CRDs. _, isUnstructured := versionedObject.(runtime.Unstructured) + // On newer K8s versions, CRDs aren't unstructured but has this dedicated type + _, isCRD := versionedObject.(*apiextv1beta1.CustomResourceDefinition) + switch { - case runtime.IsNotRegisteredError(err), isUnstructured: + case runtime.IsNotRegisteredError(err), isUnstructured, isCRD: // fall back to generic JSON merge patch patch, err := jsonpatch.CreateMergePatch(oldData, newData) - return patch, types.MergePatchType, err + if err != nil { + return nil, types.MergePatchType, fmt.Errorf("failed to create merge patch: %v", err) + } + return patch, types.MergePatchType, nil case err != nil: return nil, types.StrategicMergePatchType, fmt.Errorf("failed to get versionedObject: %s", err) default: patch, err := strategicpatch.CreateTwoWayMergePatch(oldData, newData, versionedObject) - return patch, types.StrategicMergePatchType, err + if err != nil { + return nil, types.StrategicMergePatchType, fmt.Errorf("failed to create two-way merge patch: %v", err) + } + return patch, types.StrategicMergePatchType, nil } } @@ -728,7 +737,7 @@ func updateResource(c *Client, target *resource.Info, currentObj runtime.Object, return nil } - versioned := asVersioned(target) + versioned := asVersionedOrUnstructured(target) selector, ok := getSelectorFromObject(versioned) if !ok { return nil @@ -944,7 +953,7 @@ func (c *Client) getSelectRelationPod(info *resource.Info, objPods map[string][] c.Log("get relation pod of object: %s/%s/%s", info.Namespace, info.Mapping.GroupVersionKind.Kind, info.Name) - versioned := asVersioned(info) + versioned := asVersionedOrUnstructured(info) selector, ok := getSelectorFromObject(versioned) if !ok { return objPods, nil @@ -977,17 +986,23 @@ func isFoundPod(podItem []v1.Pod, pod v1.Pod) bool { return false } -func asVersioned(info *resource.Info) runtime.Object { +func asVersionedOrUnstructured(info *resource.Info) runtime.Object { + obj, _ := asVersioned(info) + return obj +} + +func asVersioned(info *resource.Info) (runtime.Object, error) { converter := runtime.ObjectConvertor(scheme.Scheme) groupVersioner := runtime.GroupVersioner(schema.GroupVersions(scheme.Scheme.PrioritizedVersionsAllGroups())) if info.Mapping != nil { groupVersioner = info.Mapping.GroupVersionKind.GroupVersion() } - if obj, err := converter.ConvertToVersion(info.Object, groupVersioner); err == nil { - return obj + obj, err := converter.ConvertToVersion(info.Object, groupVersioner) + if err != nil { + return info.Object, err } - return info.Object + return obj, nil } func asInternal(info *resource.Info) (runtime.Object, error) { diff --git a/pkg/kube/wait.go b/pkg/kube/wait.go index 105d79b93..51fa6a6df 100644 --- a/pkg/kube/wait.go +++ b/pkg/kube/wait.go @@ -53,7 +53,7 @@ func (c *Client) waitForResources(timeout time.Duration, created Result) error { pvc := []v1.PersistentVolumeClaim{} deployments := []deployment{} for _, v := range created { - switch value := asVersioned(v).(type) { + switch value := asVersionedOrUnstructured(v).(type) { case *v1.ReplicationController: list, err := getPods(kcs, value.Namespace, value.Spec.Selector) if err != nil { From 88fc1f03c39631bc4c3f1bbbcb54b8fb284134b1 Mon Sep 17 00:00:00 2001 From: Matt Farina Date: Fri, 26 Jul 2019 10:32:44 -0400 Subject: [PATCH 282/327] Adding a KEYS file with public pgp signing keys for Helm releases This file contains the keys and instructions for adding KEYS and importing them. It follows the model Apache uses for a file like this. Signed-off-by: Matt Farina --- KEYS | 152 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 152 insertions(+) create mode 100644 KEYS diff --git a/KEYS b/KEYS new file mode 100644 index 000000000..bd0b7e3b1 --- /dev/null +++ b/KEYS @@ -0,0 +1,152 @@ +This file contains the PGP keys of developers who have signed releases of Helm. + +For your convenience, commands are provided for those who use pgp and gpg. + +For users to import keys: + pgp < KEYS + or + gpg --import KEYS + +Developers to add their keys: + pgp -kxa and append it to this file. + or + (pgpk -ll && pgpk -xa ) >> KEYS + or + (gpg --list-sigs + && gpg --armor --export ) >> KEYS + +pub rsa4096/0x461449C25E36B98E 2017-11-10 [SC] + 672C657BE06B4B30969C4A57461449C25E36B98E +uid [ultimate] Matthew Farina +sig 3 0x461449C25E36B98E 2017-11-10 Matthew Farina +sig 0x2CDBBFBB37AE822A 2018-12-12 Adnan Abdulhussein +sig 0x1EF612347F8A9958 2018-12-12 Adam Reese +sig 0x62F49E747D911B60 2018-12-12 Matt Butcher +sub rsa4096/0xCCCE67689DF05738 2017-11-10 [E] +sig 0x461449C25E36B98E 2017-11-10 Matthew Farina +sub rsa4096/0x9436E80BFBA46909 2017-11-10 [S] [expires: 2022-11-09] +sig 0x461449C25E36B98E 2017-11-10 Matthew Farina + +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQINBFoFERgBEADdhgM8EPo9fxnu2iW75r4uha2TrhWaO3EJIo53sa6U9nePIeWc +oWqjDZqYvIMJcylfocrVi4m6HdNcPrWo5pSWeKd8J9X8d4BUhoKFmJdHqWzgokwW +Rk06Doro2FHFyHoPPrI3a1HGVWA0xFhBYqSbim4j/Q0FouS566MofeRGnnacJ88z +Z7yErN5Gy4jk7pOgwvMewoGpEd8FMcyYSJfSjeoqdIZYp89EKTLbgQZuOJ9yVZnY +c0mtpH57UbkrkGv8hRuViWSO99q/mpMQyWQGYVoTV4QM/0q4jUbkRazaeY3N4hGC +I6Xf4ilWyNmmVODI6JcvWY+vXPtxIKjEjYiomVCF6jCYWWCA7cf3+kqJ+T4sc0NF +fseR/TAOkDV/XsZ1ufbSHBEiZTIjLvoAGJ+u+3go+UysVVCw4L1NSGFeDrZ97KSe +w0MeuV2SYfdZ4so7k4YDNbBLTVx0V/wl+laFtdjo167D18AYw54HIv3snHkjABfY +7Q06Ye7FuuKzdrj9KpmzUYnN3hRGqe84GIcM3D5+vElj0vyg8th32Dig5Xi38s0M +sz7hPg+oFk7csslMVAnLtWYvsv2FMSKB9FUHYv9AJ6yjYfyLlQgjjda0z6Sq5zpu +qVZqTNSxEIZFDKfTgQV6rocIK5VKP063KS6qwpHzPxKADaLTUPOWeum9/wARAQAB +tCRNYXR0aGV3IEZhcmluYSA8bWF0dEBtYXR0ZmFyaW5hLmNvbT6JAk4EEwEIADgW +IQRnLGV74GtLMJacSldGFEnCXja5jgUCWgURGAIbAwULCQgHAwUVCgkICwUWAwIB +AAIeAQIXgAAKCRBGFEnCXja5jjtQEADJ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gAFxA7g/pl5/f0IF3/IoGdTGjWoRqnBZG7NfP7bYF1CKe4f +a87Z47LriyL70BFosJqBNMJUEorS9w8sBbnmMUdpGMyk7PH386W95ib7AEOtRttL +uzYetY4LljxgMsloRgYX+Kg5i6fkntG6rod8LNYg7jWObWaIqlPoTo1RNoujYAnE +qdCDQHoUOgtZ4v6+QaxI3WV1KPBsPb7SAjuphubIQVK/6qHse9OoWVwWAABXHFqX +2qV4dyq6mq87ohTcRrZqt64ekD8H3Qe4xkYSzsWZTc0qovhs+G+dSTJ709xuV2EP ++YMbPW0/IQ== +=g11H +-----END PGP PUBLIC KEY BLOCK----- + From 50386b29170810da639f09c42fbe9cffc70aacf4 Mon Sep 17 00:00:00 2001 From: Matt Farina Date: Fri, 26 Jul 2019 11:02:15 -0400 Subject: [PATCH 283/327] Adding release docs for the KEYS file and keyservers Signed-off-by: Matt Farina --- docs/release_checklist.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/release_checklist.md b/docs/release_checklist.md index 7474a01a6..0d877fc66 100644 --- a/docs/release_checklist.md +++ b/docs/release_checklist.md @@ -86,6 +86,11 @@ If you do not have GPG already setup you can follow these steps: 3. [Add key to GitHub account](https://help.github.com/en/articles/adding-a-new-gpg-key-to-your-github-account) 4. [Set signing key in Git](https://help.github.com/en/articles/telling-git-about-your-signing-key) +Once you have a signing key you need to add it to the KEYS file at the root of +the repository. The instructions for adding it to the KEYS file are in the file. +If you have not done so already, you need to add your public key to the keyserver +network. If you use GnuPG you can follow the [instructions provided by Debian](https://debian-administration.org/article/451/Submitting_your_GPG_key_to_a_keyserver). + ## 1. Create the Release Branch ### Major/Minor Releases From 9e33f84a6f7c4483b88a916b44029c38a9bc5f42 Mon Sep 17 00:00:00 2001 From: Martin Hickey Date: Mon, 29 Jul 2019 15:32:43 +0100 Subject: [PATCH 284/327] Add public signing key Signed-off-by: Martin Hickey --- KEYS | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/KEYS b/KEYS index bd0b7e3b1..3a34a468b 100644 --- a/KEYS +++ b/KEYS @@ -150,3 +150,62 @@ qdCDQHoUOgtZ4v6+QaxI3WV1KPBsPb7SAjuphubIQVK/6qHse9OoWVwWAABXHFqX =g11H -----END PGP PUBLIC KEY BLOCK----- +pub rsa4096 2019-05-15 [SC] + F1261BDE929012C8FF2E501D6EA5D7598529A53E +uid [ultimate] Martin Hickey +sig 3 6EA5D7598529A53E 2019-05-15 Martin Hickey +sub rsa4096 2019-05-15 [E] +sig 6EA5D7598529A53E 2019-05-15 Martin Hickey + +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQINBFzcLlgBEACsmjtsbfMuKiKBl3yV5FsQBxvmNyhIwUJMtjgm5CMFcOLD+jDw +mExfsE8sM5fqfS5P7NFHn3V6NY/GyKNH3DZHGhYwDw/vG6JfHo1s9IzhjySuWEtL +7GUCJBKXk2cDfk4p0lHRgEtoYjG/sRMgk3y7WTR/W0McxllcrQQBB3RREbz8y7r7 +atJCeec36SSZgXqsyXAESx5dx7qRTdIwObPTCGxBdj2ZkgzT3D35EExdi9I8oM6L +bYOyUPy0aEj/FX6HVBOIWNGB0z8TYXjwY6/3gJG1JhaFZK1zvYogJ3p8jO07bTwo +/AzYAG4NoV4TqTyFPmb0d0+wE+lZOWA3FfF0YtYnNe3KPmPJZ/TXdTO6kle24UTy +Q9GK2s8QB3V9NA09/YoSF1qdjRfL5jo7XnRJztfFgIqW118I4EKSF+kz3hCMxH1Y +iCvHIHFQs+WX6g1bXHDI8JWe7VDiCVYwMxap8o/vtEKoETH9fjOEO/f/YF68hqpX +7eYTacDEV72qikHz/O0hNyeS1m/AnavPrd5RQi53vOT/KhwM+wC4a1bAywQUDZDW +KkSEkTqjzcSryj3DJR6EZ9y4F11Kt4TZoxHvh59UCcVyaTZPl/YdcRWom6eGo/5U +K1MFeF7fTK9ZVuJnvG6av2/W7Sbz9KaJxLHhUNAQ+ytdVkN9xfXrx1HP7QARAQAB +t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8UlSgC7FV1YT4p6qsHqQ3cLERdTSrQFLmaCb2yRCR2V9d0RiMaIwUmnbld +g1jeR4weO3LLghuWpfZHruDrDU2ZvOAObQIQdHBFmCHejA/gilf0MUdJ1h2gApuJ +m3MUub704EDCTSqz9LJc+4/NbA2esZj7mExCtsMEqaoHW7BU4ws6BRHTyeHgi+Le +1qneNQ== +=oCPv +-----END PGP PUBLIC KEY BLOCK----- From 5af2c31822aea4b717a804e3a9ec2bf376cea515 Mon Sep 17 00:00:00 2001 From: Dominic Joseph Date: Mon, 29 Jul 2019 15:32:39 -0700 Subject: [PATCH 285/327] Update example to set selector labels Signed-off-by: Dominic Joseph --- docs/examples/nginx/templates/deployment.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/examples/nginx/templates/deployment.yaml b/docs/examples/nginx/templates/deployment.yaml index 139d780cd..59b94a8aa 100644 --- a/docs/examples/nginx/templates/deployment.yaml +++ b/docs/examples/nginx/templates/deployment.yaml @@ -19,6 +19,10 @@ metadata: app.kubernetes.io/name: {{ template "nginx.name" . }} spec: replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app.kubernetes.io/name: {{ template "nginx.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} template: metadata: {{- if .Values.podAnnotations }} From 6485fec30979357284ae989f29f223bf08b7034f Mon Sep 17 00:00:00 2001 From: AllenZMC Date: Tue, 30 Jul 2019 21:11:04 +0800 Subject: [PATCH 286/327] fix word `constrint` to `constraint` Signed-off-by: czm --- pkg/plugin/installer/vcs_installer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/plugin/installer/vcs_installer.go b/pkg/plugin/installer/vcs_installer.go index 4b502dae4..9ec61ccfe 100644 --- a/pkg/plugin/installer/vcs_installer.go +++ b/pkg/plugin/installer/vcs_installer.go @@ -136,7 +136,7 @@ func (i *VCSInstaller) solveVersion(repo vcs.Repo) (string, error) { sort.Sort(sort.Reverse(semver.Collection(semvers))) for _, v := range semvers { if constraint.Check(v) { - // If the constrint passes get the original reference + // If the constraint passes get the original reference ver := v.Original() debug("setting to %s", ver) return ver, nil From d600c927240b1ffd25164957b886f141acf5361e Mon Sep 17 00:00:00 2001 From: dinesh reddy Date: Wed, 31 Jul 2019 09:04:47 -0500 Subject: [PATCH 287/327] Clean code: delete commented code Signed-off-by: dinesh reddy --- pkg/lint/rules/template.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/pkg/lint/rules/template.go b/pkg/lint/rules/template.go index 69b9c397f..26c548bac 100644 --- a/pkg/lint/rules/template.go +++ b/pkg/lint/rules/template.go @@ -106,13 +106,6 @@ func Templates(linter *support.Linter, values []byte, namespace string, strict b continue } - // NOTE: disabled for now, Refs https://github.com/kubernetes/helm/issues/1463 - // Check that all the templates have a matching value - //linter.RunLinterRule(support.WarningSev, path, validateNoMissingValues(templatesPath, valuesToRender, preExecutedTemplate)) - - // NOTE: disabled for now, Refs https://github.com/kubernetes/helm/issues/1037 - // linter.RunLinterRule(support.WarningSev, path, validateQuotes(string(preExecutedTemplate))) - renderedContent := renderedContentMap[filepath.Join(chart.GetMetadata().Name, fileName)] var yamlStruct K8sYamlStruct // Even though K8sYamlStruct only defines Metadata namespace, an error in any other From 6105acd3a89d62dd740672f41de4fe715dc67aa2 Mon Sep 17 00:00:00 2001 From: Matt Farina Date: Wed, 31 Jul 2019 16:27:17 -0400 Subject: [PATCH 288/327] Uploading KEYS file to azure along with dist files Signed-off-by: Matt Farina --- .circleci/deploy.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.circleci/deploy.sh b/.circleci/deploy.sh index fe95a5634..bdaef92ca 100755 --- a/.circleci/deploy.sh +++ b/.circleci/deploy.sh @@ -75,3 +75,6 @@ ${HOME}/google-cloud-sdk/bin/gsutil cp ./_dist/* "gs://${PROJECT_NAME}" echo "Pushing binaries to Azure" az storage blob upload-batch -s _dist/ -d "$AZURE_STORAGE_CONTAINER_NAME" --pattern 'helm-*' --connection-string "$AZURE_STORAGE_CONNECTION_STRING" + +echo "Pushing KEYS file to Azure" +az storage blob upload -f "KEYS" -n "KEYS" -c "$AZURE_STORAGE_CONTAINER_NAME" --connection-string "$AZURE_STORAGE_CONNECTION_STRING" \ No newline at end of file From b788e3dce965e76368f8af66b93c6a21abf730a3 Mon Sep 17 00:00:00 2001 From: AllenZMC Date: Thu, 1 Aug 2019 21:55:54 +0800 Subject: [PATCH 289/327] fix word 'potgres' to 'postgres' Signed-off-by: czm --- pkg/storage/driver/sql.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/storage/driver/sql.go b/pkg/storage/driver/sql.go index be2962da4..e1677c9ed 100644 --- a/pkg/storage/driver/sql.go +++ b/pkg/storage/driver/sql.go @@ -25,7 +25,7 @@ import ( "github.com/jmoiron/sqlx" migrate "github.com/rubenv/sql-migrate" - // Import pq for potgres dialect + // Import pq for postgres dialect _ "github.com/lib/pq" rspb "k8s.io/helm/pkg/proto/hapi/release" From b80fbeef630c5341e7ac6e5892e7eed30a22d443 Mon Sep 17 00:00:00 2001 From: Matthew Fisher Date: Thu, 1 Aug 2019 09:04:25 -0700 Subject: [PATCH 290/327] feat(KEYS): add bacongobbler's keys Signed-off-by: Matthew Fisher --- KEYS | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/KEYS b/KEYS index 3a34a468b..e01cfdb9d 100644 --- a/KEYS +++ b/KEYS @@ -209,3 +209,63 @@ m3MUub704EDCTSqz9LJc+4/NbA2esZj7mExCtsMEqaoHW7BU4ws6BRHTyeHgi+Le 1qneNQ== =oCPv -----END PGP PUBLIC KEY BLOCK----- + +pub rsa4096 2018-03-14 [SC] + 967F8AC5E2216F9F4FD270AD92AA783CBAAE8E3B +uid [ultimate] Matthew Fisher +sig 3 92AA783CBAAE8E3B 2018-03-14 Matthew Fisher +sub rsa4096 2018-03-14 [E] +sig 92AA783CBAAE8E3B 2018-03-14 Matthew Fisher + +-----BEGIN PGP PUBLIC KEY BL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UFkYwxhGk6PRleKOMsw28PFr +a8DVjyKGOVn+9auVhPXYQcN0sZqFl8LBDkUtaniiRD4WKH91aKYgmX1qo8sJZMhx +t/ZoHOfoHDEEa+kLqfsWu3htyTP1gleCAA8kDcRiy1v/G8v3+p2ioI6q1qegigbr +AqTHcWNOltcAEQEAAYkCNgQYAQgAIBYhBJZ/isXiIW+fT9JwrZKqeDy6ro47BQJa +qYMWAhsMAAoJEJKqeDy6ro47T7gP/j/3R9hPg+kJCErlEKPqxsEOxxlaHx+f4UGg +Zm+P6QK2SrqbrqcPhoKUXeHlbCMm2euxKTonIawgCIr44kCZvp3B8pCGUCR+M0mf +aXGO1O6EJ3MmtlbXJ+OyBAhxpklUWdM6favuzi62fAmvwEKQf1reG/9r+toJb5N4 +KwrrdZNUaLJWhb6D0fwB+1fWJbdRnDO1rozcA+YJGhhunpxF2b2nZ5OtqNuGmbqV +ofxL6/0lM4HqLNcUBlUyQihjk1+hzfWji95SlzIxP2EhH6gJh/e+/EDCaVVV00CM +0n/0dEB25nAuSMGgUx2utNmfCUP84IErGzSUlXdzN20aW5xiBFU3/uSWyz80IGuy +WeyRzksmphGdLwef+sWLKGrOJh+DkOxxpFMRaIqGEG2YViQCg3gyzjiJuI/XAdlK +AhqwVKfRke24vgifd1tN+zeFs+m28Hpw7989vky1hDvqdpK5/fiJfqIBsF0jir/H +AgtqmbiqemX9rUa3uDkBsvyu+Ou41l+wL6ahj9Pnu0+9hQnpeZERIyhq4LWn7gGb +xk5y63wrvGbeS5lev//012oSzWQfSdFWqQVzMTVtOojGFWgvwRCwZiWEPQkRIV5r +VNXtXPUdKiOEkWin01ZrwDPEyBjr3pcnu2mbgLeJETODnCRi79KA5kCtd65JbNF7 +Qknjx8fW +=jz9T +-----END PGP PUBLIC KEY BLOCK----- From 4117b38ae621a8061563417c4b125dfb8ff59b00 Mon Sep 17 00:00:00 2001 From: dzzg Date: Fri, 2 Aug 2019 10:04:59 +0800 Subject: [PATCH 291/327] cleanup: log message typo fix Signed-off-by: dzzg --- cmd/helm/reset.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/helm/reset.go b/cmd/helm/reset.go index cbe1795db..9e7a14710 100644 --- a/cmd/helm/reset.go +++ b/cmd/helm/reset.go @@ -115,7 +115,7 @@ func (d *resetCmd) run() error { } if err := installer.Uninstall(d.kubeClient, &installer.Options{Namespace: d.namespace}); err != nil { - return fmt.Errorf("error unstalling Tiller: %s", err) + return fmt.Errorf("error uninstalling Tiller: %s", err) } if d.removeHelmHome { From f653192882b488afd34422c9168e3d492f7df09f Mon Sep 17 00:00:00 2001 From: Kevin Lau Date: Fri, 2 Aug 2019 01:08:58 -0700 Subject: [PATCH 292/327] Fix typo notes -> note Signed-off-by: Kevin Lau --- docs/charts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/charts.md b/docs/charts.md index ed2e2f9eb..62b77647d 100644 --- a/docs/charts.md +++ b/docs/charts.md @@ -302,7 +302,7 @@ In the above example all charts with the tag `front-end` would be disabled but s `front-end` tag and `subchart1` will be enabled. Since `subchart2` is tagged with `back-end` and that tag evaluates to `true`, `subchart2` will be -enabled. Also notes that although `subchart2` has a condition specified in `requirements.yaml`, there +enabled. Also note that although `subchart2` has a condition specified in `requirements.yaml`, there is no corresponding path and value in the parent's values so that condition has no effect. ##### Using the CLI with Tags and Conditions From 6b5ab08a61d73980ca6f84ccdb3f6b996d950cae Mon Sep 17 00:00:00 2001 From: AllenZMC Date: Fri, 2 Aug 2019 22:54:00 +0800 Subject: [PATCH 293/327] fix word 'efault' to 'default' Signed-off-by: czm --- pkg/getter/httpgetter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/getter/httpgetter.go b/pkg/getter/httpgetter.go index 66ea82863..bf99b1cfa 100644 --- a/pkg/getter/httpgetter.go +++ b/pkg/getter/httpgetter.go @@ -26,7 +26,7 @@ import ( "k8s.io/helm/pkg/version" ) -//HttpGetter is the efault HTTP(/S) backend handler +//HttpGetter is the default HTTP(/S) backend handler // TODO: change the name to HTTPGetter in Helm 3 type HttpGetter struct { //nolint client *http.Client From bb69a1edd68cffe6aec4be8bfaa47f38135e8af8 Mon Sep 17 00:00:00 2001 From: Kevin Lau Date: Fri, 2 Aug 2019 09:22:15 -0700 Subject: [PATCH 294/327] Clarify operator docs wording The original is explaining the negation, when the body would not be included. Which would happen in the complement of the if expression, ie. flipped by De Morgan's law's: ``` not (or .Values.anUnsetVariable (not .Values.aSetVariable)) == and (not .Values.anUnsetVariable) .Values.aSetVariable ``` > unset variables evaluate to false is equivalent to `not .Values.anUnsetVariable`. > and is equivalent to `and`. > .Values.setVariable was negated with the not function doesn't seem to match `.Values.aSetVariable`. To me, that would be `not .Values.aSetVariable` instead. Anyway, explaining the `if` expression as-is and not the negation is clearer and parallels the first `if` operator. Signed-off-by: Kevin Lau --- docs/chart_template_guide/functions_and_pipelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/chart_template_guide/functions_and_pipelines.md b/docs/chart_template_guide/functions_and_pipelines.md index 1c099887d..bbce53e71 100644 --- a/docs/chart_template_guide/functions_and_pipelines.md +++ b/docs/chart_template_guide/functions_and_pipelines.md @@ -159,7 +159,7 @@ Operators are implemented as functions that return a boolean value. To use `eq`, {{ end }} -{{/* do not include the body of this if statement because unset variables evaluate to false and .Values.setVariable was negated with the not function. */}} +{{/* include the body of this if statement when the variable .Values.anUnsetVariable is set or .values.aSetVariable is not set */}} {{ if or .Values.anUnsetVariable (not .Values.aSetVariable) }} {{ ... }} {{ end }} From 915d69a2c6a0026599f28c4857edff1c1f45bab9 Mon Sep 17 00:00:00 2001 From: AllenZMC Date: Sat, 3 Aug 2019 22:02:11 +0800 Subject: [PATCH 295/327] fix word 'resoures' to 'resources Signed-off-by: czm --- pkg/tiller/environment/environment.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/tiller/environment/environment.go b/pkg/tiller/environment/environment.go index 83ec5e647..d3a478ea0 100644 --- a/pkg/tiller/environment/environment.go +++ b/pkg/tiller/environment/environment.go @@ -160,7 +160,7 @@ type KubeClient interface { // BuildUnstructured reads a stream of manifests from a reader and turns them into // info objects. Manifests are not validated against the schema, but it will fail if - // any resoures types are not known by the apiserver. + // any resources types are not known by the apiserver. // // reader must contain a YAML stream (one or more YAML documents separated by "\n---\n"). BuildUnstructured(namespace string, reader io.Reader) (kube.Result, error) From 53f1ab50e5ec38a33e7329c79a2ad61e747c4e18 Mon Sep 17 00:00:00 2001 From: AllenZMC Date: Tue, 6 Aug 2019 10:14:00 +0800 Subject: [PATCH 296/327] fix wrong spells in hooks.go Signed-off-by: czm --- pkg/tiller/hooks.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/tiller/hooks.go b/pkg/tiller/hooks.go index 5aa961080..0eae3c475 100644 --- a/pkg/tiller/hooks.go +++ b/pkg/tiller/hooks.go @@ -53,7 +53,7 @@ var deletePolices = map[string]release.Hook_DeletePolicy{ hooks.BeforeHookCreation: release.Hook_BEFORE_HOOK_CREATION, } -// Timout used when deleting resources with a hook-delete-policy. +// Timeout used when deleting resources with a hook-delete-policy. const defaultHookDeleteTimeoutInSeconds = int64(60) // Manifest represents a manifest file, which has a name and some content. From 7b0a407ff7247aa41ad8efc6c4c1e0bd2cc2a046 Mon Sep 17 00:00:00 2001 From: AllenZMC Date: Wed, 7 Aug 2019 20:51:31 +0800 Subject: [PATCH 297/327] fix mis-spelling in manager.go Signed-off-by: czm --- pkg/downloader/manager.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/downloader/manager.go b/pkg/downloader/manager.go index 970bd9546..dfaa56bf3 100644 --- a/pkg/downloader/manager.go +++ b/pkg/downloader/manager.go @@ -357,7 +357,7 @@ func (m *Manager) hasAllRepos(deps []*chartutil.Dependency) error { return nil } -// getRepoNames returns the repo names of the referenced deps which can be used to fetch the cahced index file. +// getRepoNames returns the repo names of the referenced deps which can be used to fetch the cached index file. func (m *Manager) getRepoNames(deps []*chartutil.Dependency) (map[string]string, error) { rf, err := repo.LoadRepositoriesFile(m.HelmHome.RepositoryFile()) if err != nil { From e9ea2e0d1524b7de68feb3efb7a763d92a360f91 Mon Sep 17 00:00:00 2001 From: AllenZMC Date: Fri, 9 Aug 2019 21:27:33 +0800 Subject: [PATCH 298/327] fix some log typos in tlsutil_test.go Signed-off-by: czm --- pkg/tlsutil/tlsutil_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/tlsutil/tlsutil_test.go b/pkg/tlsutil/tlsutil_test.go index a4b3c9c22..e4df1e7e7 100644 --- a/pkg/tlsutil/tlsutil_test.go +++ b/pkg/tlsutil/tlsutil_test.go @@ -47,7 +47,7 @@ func TestClientConfig(t *testing.T) { t.Fatalf("expecting 1 client certificates, got %d", got) } if cfg.InsecureSkipVerify { - t.Fatalf("insecure skip verify mistmatch, expecting false") + t.Fatalf("insecure skip verify mismatch, expecting false") } if cfg.RootCAs == nil { t.Fatalf("mismatch tls RootCAs, expecting non-nil") From dd4afa6af0d6b4994243e8bc401f5c5b9c6cd8c1 Mon Sep 17 00:00:00 2001 From: Martin Hickey Date: Sat, 10 Aug 2019 11:55:26 +0100 Subject: [PATCH 299/327] Fail to load charts that are not v1 apiVersion (#6180) Signed-off-by: Martin Hickey --- pkg/chartutil/load.go | 4 ++++ pkg/chartutil/load_test.go | 12 +++++++++++ .../testdata/frobnitz.v2/.helmignore | 1 + pkg/chartutil/testdata/frobnitz.v2/Chart.yaml | 20 ++++++++++++++++++ .../testdata/frobnitz.v2/INSTALL.txt | 1 + pkg/chartutil/testdata/frobnitz.v2/LICENSE | 1 + pkg/chartutil/testdata/frobnitz.v2/README.md | 11 ++++++++++ .../testdata/frobnitz.v2/charts/_ignore_me | 1 + .../frobnitz.v2/charts/alpine/Chart.yaml | 4 ++++ .../frobnitz.v2/charts/alpine/README.md | 9 ++++++++ .../charts/alpine/charts/mast1/Chart.yaml | 4 ++++ .../charts/alpine/charts/mast1/values.yaml | 4 ++++ .../charts/alpine/charts/mast2-0.1.0.tgz | Bin 0 -> 325 bytes .../charts/alpine/templates/alpine-pod.yaml | 16 ++++++++++++++ .../frobnitz.v2/charts/alpine/values.yaml | 2 ++ .../frobnitz.v2/charts/mariner-4.3.2.tgz | Bin 0 -> 1012 bytes .../testdata/frobnitz.v2/docs/README.md | 1 + pkg/chartutil/testdata/frobnitz.v2/icon.svg | 8 +++++++ .../testdata/frobnitz.v2/ignore/me.txt | 0 .../testdata/frobnitz.v2/requirements.lock | 8 +++++++ .../testdata/frobnitz.v2/requirements.yaml | 7 ++++++ .../frobnitz.v2/templates/template.tpl | 1 + .../testdata/frobnitz.v2/values.yaml | 6 ++++++ 23 files changed, 121 insertions(+) create mode 100644 pkg/chartutil/testdata/frobnitz.v2/.helmignore create mode 100644 pkg/chartutil/testdata/frobnitz.v2/Chart.yaml create mode 100644 pkg/chartutil/testdata/frobnitz.v2/INSTALL.txt create mode 100644 pkg/chartutil/testdata/frobnitz.v2/LICENSE create mode 100644 pkg/chartutil/testdata/frobnitz.v2/README.md create mode 100644 pkg/chartutil/testdata/frobnitz.v2/charts/_ignore_me create mode 100644 pkg/chartutil/testdata/frobnitz.v2/charts/alpine/Chart.yaml create mode 100644 pkg/chartutil/testdata/frobnitz.v2/charts/alpine/README.md create mode 100644 pkg/chartutil/testdata/frobnitz.v2/charts/alpine/charts/mast1/Chart.yaml create mode 100644 pkg/chartutil/testdata/frobnitz.v2/charts/alpine/charts/mast1/values.yaml create mode 100644 pkg/chartutil/testdata/frobnitz.v2/charts/alpine/charts/mast2-0.1.0.tgz create mode 100644 pkg/chartutil/testdata/frobnitz.v2/charts/alpine/templates/alpine-pod.yaml create mode 100644 pkg/chartutil/testdata/frobnitz.v2/charts/alpine/values.yaml create mode 100644 pkg/chartutil/testdata/frobnitz.v2/charts/mariner-4.3.2.tgz create mode 100644 pkg/chartutil/testdata/frobnitz.v2/docs/README.md create mode 100644 pkg/chartutil/testdata/frobnitz.v2/icon.svg create mode 100644 pkg/chartutil/testdata/frobnitz.v2/ignore/me.txt create mode 100644 pkg/chartutil/testdata/frobnitz.v2/requirements.lock create mode 100644 pkg/chartutil/testdata/frobnitz.v2/requirements.yaml create mode 100644 pkg/chartutil/testdata/frobnitz.v2/templates/template.tpl create mode 100644 pkg/chartutil/testdata/frobnitz.v2/values.yaml diff --git a/pkg/chartutil/load.go b/pkg/chartutil/load.go index b0927a5cf..95b835d5b 100644 --- a/pkg/chartutil/load.go +++ b/pkg/chartutil/load.go @@ -171,6 +171,10 @@ func LoadFiles(files []*BufferedFile) (*chart.Chart, error) { return c, err } c.Metadata = m + var apiVersion = c.Metadata.ApiVersion + if apiVersion != "" && apiVersion != ApiVersionV1 { + return c, fmt.Errorf("apiVersion '%s' is not valid. The value must be \"v1\"", apiVersion) + } } else if f.Name == "values.toml" { return c, errors.New("values.toml is illegal as of 2.0.0-alpha.2") } else if f.Name == "values.yaml" { diff --git a/pkg/chartutil/load_test.go b/pkg/chartutil/load_test.go index c031a6a96..f139abf5c 100644 --- a/pkg/chartutil/load_test.go +++ b/pkg/chartutil/load_test.go @@ -23,6 +23,7 @@ import ( "os" "path" "path/filepath" + "strings" "testing" "time" @@ -39,6 +40,17 @@ func TestLoadDir(t *testing.T) { verifyRequirements(t, c) } +func TestLoadNonV1Chart(t *testing.T) { + _, err := Load("testdata/frobnitz.v2") + if err != nil { + if strings.Compare(err.Error(), "apiVersion 'v2' is not valid. The value must be \"v1\"") != 0 { + t.Errorf("Unexpected message: %s", err) + } + return + } + t.Fatalf("chart with v2 apiVersion should not load") +} + func TestLoadFile(t *testing.T) { c, err := Load("testdata/frobnitz-1.2.3.tgz") if err != nil { diff --git a/pkg/chartutil/testdata/frobnitz.v2/.helmignore b/pkg/chartutil/testdata/frobnitz.v2/.helmignore new file mode 100644 index 000000000..9973a57b8 --- /dev/null +++ b/pkg/chartutil/testdata/frobnitz.v2/.helmignore @@ -0,0 +1 @@ +ignore/ diff --git a/pkg/chartutil/testdata/frobnitz.v2/Chart.yaml b/pkg/chartutil/testdata/frobnitz.v2/Chart.yaml new file mode 100644 index 000000000..157af54c1 --- /dev/null +++ b/pkg/chartutil/testdata/frobnitz.v2/Chart.yaml @@ -0,0 +1,20 @@ +apiVersion: v2 +name: frobnitz +description: This is a frobnitz as a v2 chart +version: "1.2.3" +keywords: + - frobnitz + - sprocket + - dodad +maintainers: + - name: The Helm Team + email: helm@example.com + - name: Someone Else + email: nobody@example.com +sources: + - https://example.com/foo/bar +home: http://example.com +icon: https://example.com/64x64.png +annotations: + extrakey: extravalue + anotherkey: anothervalue diff --git a/pkg/chartutil/testdata/frobnitz.v2/INSTALL.txt b/pkg/chartutil/testdata/frobnitz.v2/INSTALL.txt new file mode 100644 index 000000000..2010438c2 --- /dev/null +++ b/pkg/chartutil/testdata/frobnitz.v2/INSTALL.txt @@ -0,0 +1 @@ +This is an install document. The client may display this. diff --git a/pkg/chartutil/testdata/frobnitz.v2/LICENSE b/pkg/chartutil/testdata/frobnitz.v2/LICENSE new file mode 100644 index 000000000..6121943b1 --- /dev/null +++ b/pkg/chartutil/testdata/frobnitz.v2/LICENSE @@ -0,0 +1 @@ +LICENSE placeholder. diff --git a/pkg/chartutil/testdata/frobnitz.v2/README.md b/pkg/chartutil/testdata/frobnitz.v2/README.md new file mode 100644 index 000000000..8cf4cc3d7 --- /dev/null +++ b/pkg/chartutil/testdata/frobnitz.v2/README.md @@ -0,0 +1,11 @@ +# Frobnitz + +This is an example chart. + +## Usage + +This is an example. It has no usage. + +## Development + +For developer info, see the top-level repository. diff --git a/pkg/chartutil/testdata/frobnitz.v2/charts/_ignore_me b/pkg/chartutil/testdata/frobnitz.v2/charts/_ignore_me new file mode 100644 index 000000000..2cecca682 --- /dev/null +++ b/pkg/chartutil/testdata/frobnitz.v2/charts/_ignore_me @@ -0,0 +1 @@ +This should be ignored by the loader, but may be included in a chart. diff --git a/pkg/chartutil/testdata/frobnitz.v2/charts/alpine/Chart.yaml b/pkg/chartutil/testdata/frobnitz.v2/charts/alpine/Chart.yaml new file mode 100644 index 000000000..38a4aaa54 --- /dev/null +++ b/pkg/chartutil/testdata/frobnitz.v2/charts/alpine/Chart.yaml @@ -0,0 +1,4 @@ +name: alpine +description: Deploy a basic Alpine Linux pod +version: 0.1.0 +home: https://k8s.io/helm diff --git a/pkg/chartutil/testdata/frobnitz.v2/charts/alpine/README.md b/pkg/chartutil/testdata/frobnitz.v2/charts/alpine/README.md new file mode 100644 index 000000000..a7c84fc41 --- /dev/null +++ b/pkg/chartutil/testdata/frobnitz.v2/charts/alpine/README.md @@ -0,0 +1,9 @@ +This example was generated using the command `helm create alpine`. + +The `templates/` directory contains a very simple pod resource with a +couple of parameters. + +The `values.toml` file contains the default values for the +`alpine-pod.yaml` template. + +You can install this example using `helm install docs/examples/alpine`. diff --git a/pkg/chartutil/testdata/frobnitz.v2/charts/alpine/charts/mast1/Chart.yaml b/pkg/chartutil/testdata/frobnitz.v2/charts/alpine/charts/mast1/Chart.yaml new file mode 100644 index 000000000..171e36156 --- /dev/null +++ b/pkg/chartutil/testdata/frobnitz.v2/charts/alpine/charts/mast1/Chart.yaml @@ -0,0 +1,4 @@ +name: mast1 +description: A Helm chart for Kubernetes +version: 0.1.0 +home: "" diff --git a/pkg/chartutil/testdata/frobnitz.v2/charts/alpine/charts/mast1/values.yaml b/pkg/chartutil/testdata/frobnitz.v2/charts/alpine/charts/mast1/values.yaml new file mode 100644 index 000000000..42c39c262 --- /dev/null +++ b/pkg/chartutil/testdata/frobnitz.v2/charts/alpine/charts/mast1/values.yaml @@ -0,0 +1,4 @@ +# Default values for mast1. +# This is a YAML-formatted file. +# Declare name/value pairs to be passed into your templates. +# name = "value" diff --git a/pkg/chartutil/testdata/frobnitz.v2/charts/alpine/charts/mast2-0.1.0.tgz b/pkg/chartutil/testdata/frobnitz.v2/charts/alpine/charts/mast2-0.1.0.tgz new file mode 100644 index 0000000000000000000000000000000000000000..ced5a4a6adf946f76033b6ee584affc12433cb78 GIT binary patch literal 325 zcmV-L0lNMliwFRxBUV=c1MSw|YJ)Ho2Jl|{6o>BKov2ah-PkS$dy3RWS}syLpID4If6g{VtOEXtaBMKbNS zqRDw>=dBp!{dV&0PTP0q&C|N>lXXt-@itxw6Y{^`DeLnWW%?A)n7>C|RUhXsgbeu$ zF~=_IIe#g+SrMn$%(;J_|DcTCP^g0JS-aNm4}L!m8@i)M-5Y9`%Ajtv^fYa?9kkaj zJ8J8~B+f<7*=}6cSg*6cei`_&c>Y7mE>#=&?)@Lnf3ci@t|adNONjYC00000 X0000000000z?FFgy`&fL04M+ebFHRB literal 0 HcmV?d00001 diff --git a/pkg/chartutil/testdata/frobnitz.v2/charts/alpine/templates/alpine-pod.yaml b/pkg/chartutil/testdata/frobnitz.v2/charts/alpine/templates/alpine-pod.yaml new file mode 100644 index 000000000..c34fa8c47 --- /dev/null +++ b/pkg/chartutil/testdata/frobnitz.v2/charts/alpine/templates/alpine-pod.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Pod +metadata: + name: {{.Release.Name}}-{{.Chart.Name}} + labels: + app.kubernetes.io/managed-by: {{.Release.Service}} + chartName: {{.Chart.Name}} + chartVersion: {{.Chart.Version | quote}} + annotations: + "helm.sh/created": "{{.Release.Time.Seconds}}" +spec: + restartPolicy: {{default "Never" .restart_policy}} + containers: + - name: waiter + image: "alpine:3.3" + command: ["/bin/sleep","9000"] diff --git a/pkg/chartutil/testdata/frobnitz.v2/charts/alpine/values.yaml b/pkg/chartutil/testdata/frobnitz.v2/charts/alpine/values.yaml new file mode 100644 index 000000000..6c2aab7ba --- /dev/null +++ b/pkg/chartutil/testdata/frobnitz.v2/charts/alpine/values.yaml @@ -0,0 +1,2 @@ +# The pod name +name: "my-alpine" diff --git a/pkg/chartutil/testdata/frobnitz.v2/charts/mariner-4.3.2.tgz b/pkg/chartutil/testdata/frobnitz.v2/charts/mariner-4.3.2.tgz new file mode 100644 index 0000000000000000000000000000000000000000..78fabe241b042dcd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$KkF}5PtE+Xqr&>;_{v|u zobg_3J2%*OU*`IX%QJf~eIop_=ZoIU@iULE(~pg1Mn{i4Q!%i=ckS0p=02G2kD@hK icf1~Y>h8pa!C){L3 + + Example icon + + + diff --git a/pkg/chartutil/testdata/frobnitz.v2/ignore/me.txt b/pkg/chartutil/testdata/frobnitz.v2/ignore/me.txt new file mode 100644 index 000000000..e69de29bb diff --git a/pkg/chartutil/testdata/frobnitz.v2/requirements.lock b/pkg/chartutil/testdata/frobnitz.v2/requirements.lock new file mode 100644 index 000000000..6fcc2ed9f --- /dev/null +++ b/pkg/chartutil/testdata/frobnitz.v2/requirements.lock @@ -0,0 +1,8 @@ +dependencies: + - name: alpine + version: "0.1.0" + repository: https://example.com/charts + - name: mariner + version: "4.3.2" + repository: https://example.com/charts +digest: invalid diff --git a/pkg/chartutil/testdata/frobnitz.v2/requirements.yaml b/pkg/chartutil/testdata/frobnitz.v2/requirements.yaml new file mode 100644 index 000000000..5eb0bc98b --- /dev/null +++ b/pkg/chartutil/testdata/frobnitz.v2/requirements.yaml @@ -0,0 +1,7 @@ +dependencies: + - name: alpine + version: "0.1.0" + repository: https://example.com/charts + - name: mariner + version: "4.3.2" + repository: https://example.com/charts diff --git a/pkg/chartutil/testdata/frobnitz.v2/templates/template.tpl b/pkg/chartutil/testdata/frobnitz.v2/templates/template.tpl new file mode 100644 index 000000000..c651ee6a0 --- /dev/null +++ b/pkg/chartutil/testdata/frobnitz.v2/templates/template.tpl @@ -0,0 +1 @@ +Hello {{.Name | default "world"}} diff --git a/pkg/chartutil/testdata/frobnitz.v2/values.yaml b/pkg/chartutil/testdata/frobnitz.v2/values.yaml new file mode 100644 index 000000000..61f501258 --- /dev/null +++ b/pkg/chartutil/testdata/frobnitz.v2/values.yaml @@ -0,0 +1,6 @@ +# A values file contains configuration. + +name: "Some Name" + +section: + name: "Name in a section" From 03443bb0b5f2c47a75539476afac83bb14c74cc8 Mon Sep 17 00:00:00 2001 From: Matthew Fisher Date: Tue, 13 Aug 2019 14:01:56 -0700 Subject: [PATCH 300/327] docs(OWNERS): add jdolitsky as a core maintainer Signed-off-by: Matthew Fisher --- OWNERS | 1 + 1 file changed, 1 insertion(+) diff --git a/OWNERS b/OWNERS index 3fa911034..715c8993d 100644 --- a/OWNERS +++ b/OWNERS @@ -3,6 +3,7 @@ maintainers: - bacongobbler - fibonacci1729 - hickeyma + - jdolitsky - mattfarina - michelleN - prydonius From 66974afddb661b0e350c07e675e6d03ecf972cdd Mon Sep 17 00:00:00 2001 From: Xiang Dai <764524258@qq.com> Date: Fri, 16 Aug 2019 16:44:40 +0800 Subject: [PATCH 301/327] remove duplicate check Signed-off-by: Xiang Dai <764524258@qq.com> --- pkg/downloader/manager.go | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/pkg/downloader/manager.go b/pkg/downloader/manager.go index dfaa56bf3..cca198916 100644 --- a/pkg/downloader/manager.go +++ b/pkg/downloader/manager.go @@ -407,24 +407,22 @@ func (m *Manager) getRepoNames(deps []*chartutil.Dependency) (map[string]string, } } if len(missing) > 0 { - if len(missing) > 0 { - errorMessage := fmt.Sprintf("no repository definition for %s. Please add them via 'helm repo add'", strings.Join(missing, ", ")) - // It is common for people to try to enter "stable" as a repository instead of the actual URL. - // For this case, let's give them a suggestion. - containsNonURL := false - for _, repo := range missing { - if !strings.Contains(repo, "//") && !strings.HasPrefix(repo, "@") && !strings.HasPrefix(repo, "alias:") { - containsNonURL = true - } + errorMessage := fmt.Sprintf("no repository definition for %s. Please add them via 'helm repo add'", strings.Join(missing, ", ")) + // It is common for people to try to enter "stable" as a repository instead of the actual URL. + // For this case, let's give them a suggestion. + containsNonURL := false + for _, repo := range missing { + if !strings.Contains(repo, "//") && !strings.HasPrefix(repo, "@") && !strings.HasPrefix(repo, "alias:") { + containsNonURL = true } - if containsNonURL { - errorMessage += ` + } + if containsNonURL { + errorMessage += ` Note that repositories must be URLs or aliases. For example, to refer to the stable repository, use "https://kubernetes-charts.storage.googleapis.com/" or "@stable" instead of "stable". Don't forget to add the repo, too ('helm repo add').` - } - return nil, errors.New(errorMessage) } + return nil, errors.New(errorMessage) } return reposMap, nil } From 627283ac7441c7fc1890be843d15e580705f45b8 Mon Sep 17 00:00:00 2001 From: Sakura Date: Fri, 23 Aug 2019 12:02:21 +0800 Subject: [PATCH 302/327] fix typo Signed-off-by: Sakura --- _proto/hapi/release/status.proto | 2 +- docs/charts.md | 2 +- pkg/kube/client.go | 2 +- pkg/proto/hapi/release/status.pb.go | 2 +- pkg/storage/storage.go | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/_proto/hapi/release/status.proto b/_proto/hapi/release/status.proto index e6ccd3d6e..6cc16b351 100644 --- a/_proto/hapi/release/status.proto +++ b/_proto/hapi/release/status.proto @@ -41,7 +41,7 @@ message Status { PENDING_INSTALL = 6; // Status_PENDING_UPGRADE indicates that an upgrade operation is underway. PENDING_UPGRADE = 7; - // Status_PENDING_ROLLBACK indicates that an rollback operation is underway. + // Status_PENDING_ROLLBACK indicates that a rollback operation is underway. PENDING_ROLLBACK = 8; } diff --git a/docs/charts.md b/docs/charts.md index 62b77647d..9affe50cb 100644 --- a/docs/charts.md +++ b/docs/charts.md @@ -479,7 +479,7 @@ Furthermore, A is dependent on chart B that creates objects - replicaset "B-ReplicaSet" - service "B-Service" -After installation/upgrade of chart A a single Helm release is created/modified. The release will +After installation/upgrade of chart A, a single Helm release is created/modified. The release will create/update all of the above Kubernetes objects in the following order: - A-Namespace diff --git a/pkg/kube/client.go b/pkg/kube/client.go index e61d526a7..aa6f54ae0 100644 --- a/pkg/kube/client.go +++ b/pkg/kube/client.go @@ -658,7 +658,7 @@ func createPatch(target *resource.Info, current runtime.Object) ([]byte, types.P // Get a versioned object versionedObject, err := asVersioned(target) - // Unstructured objects, such as CRDs, may not have an not registered error + // Unstructured objects, such as CRDs, may not have a not registered error // returned from ConvertToVersion. Anything that's unstructured should // use the jsonpatch.CreateMergePatch. Strategic Merge Patch is not supported // on objects like CRDs. diff --git a/pkg/proto/hapi/release/status.pb.go b/pkg/proto/hapi/release/status.pb.go index c5ed59202..99bcbc585 100644 --- a/pkg/proto/hapi/release/status.pb.go +++ b/pkg/proto/hapi/release/status.pb.go @@ -38,7 +38,7 @@ const ( Status_PENDING_INSTALL Status_Code = 6 // Status_PENDING_UPGRADE indicates that an upgrade operation is underway. Status_PENDING_UPGRADE Status_Code = 7 - // Status_PENDING_ROLLBACK indicates that an rollback operation is underway. + // Status_PENDING_ROLLBACK indicates that a rollback operation is underway. Status_PENDING_ROLLBACK Status_Code = 8 ) diff --git a/pkg/storage/storage.go b/pkg/storage/storage.go index 9520db08b..e79cacc8d 100644 --- a/pkg/storage/storage.go +++ b/pkg/storage/storage.go @@ -50,7 +50,7 @@ func (s *Storage) Get(name string, version int32) (*rspb.Release, error) { // Create creates a new storage entry holding the release. An // error is returned if the storage driver failed to store the -// release, or a release with identical an key already exists. +// release, or a release with identical key already exists. func (s *Storage) Create(rls *rspb.Release) error { s.Log("creating release %q", makeKey(rls.Name, rls.Version)) if s.MaxHistory > 0 { From aaf24e065851e96632997b4849c98721745a7a12 Mon Sep 17 00:00:00 2001 From: kamal namdeo Date: Fri, 23 Aug 2019 16:15:05 +0200 Subject: [PATCH 303/327] Fix the developer.md typo (#6203) Signed-off-by: kamal namdeo --- docs/developers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/developers.md b/docs/developers.md index 70203b2d0..32adbf823 100644 --- a/docs/developers.md +++ b/docs/developers.md @@ -103,7 +103,7 @@ helm init --canary-image For developing on Tiller, it is sometimes more expedient to run Tiller locally instead of packaging it into an image and running it in-cluster. You can do -this by telling the Helm client to us a local instance. +this by telling the Helm client to use a local instance. ```console $ make build From f8f8b5d076483291adc6713923a8409baee40f8c Mon Sep 17 00:00:00 2001 From: Adam Eijdenberg Date: Sat, 24 Aug 2019 02:22:54 +1000 Subject: [PATCH 304/327] Add test for subchart with null value (#6146) Signed-off-by: Adam Eijdenberg --- pkg/chartutil/values_test.go | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/pkg/chartutil/values_test.go b/pkg/chartutil/values_test.go index dfb38387e..04b507fbc 100644 --- a/pkg/chartutil/values_test.go +++ b/pkg/chartutil/values_test.go @@ -643,3 +643,35 @@ func TestOverriteTableItemWithNonTableValue(t *testing.T) { t.Errorf("Expected %v, but got %v", expected, result) } } + +func TestSubchartCoaleseWithNullValue(t *testing.T) { + v, err := CoalesceValues(&chart.Chart{ + Metadata: &chart.Metadata{Name: "demo"}, + Dependencies: []*chart.Chart{ + { + Metadata: &chart.Metadata{Name: "logstash"}, + Values: &chart.Config{ + Raw: `livenessProbe: {httpGet: {path: "/", port: monitor}}`, + }, + }, + }, + Values: &chart.Config{ + Raw: `logstash: {livenessProbe: {httpGet: null, exec: "/bin/true"}}`, + }, + }, &chart.Config{}) + if err != nil { + t.Errorf("Failed with %s", err) + } + result := v.AsMap() + expected := map[string]interface{}{ + "logstash": map[string]interface{}{ + "global": map[string]interface{}{}, + "livenessProbe": map[string]interface{}{ + "exec": "/bin/true", + }, + }, + } + if !reflect.DeepEqual(result, expected) { + t.Errorf("got %+v, expected %+v", result, expected) + } +} From 256765aa741d0b6559b4c449baeb56ebb9c285f3 Mon Sep 17 00:00:00 2001 From: Gasmi Christophe Date: Mon, 26 Aug 2019 11:43:07 +0200 Subject: [PATCH 305/327] Networkpolicy kind sort (#6266) * Add NetworkPolicy in kind sorter Signed-off-by: Christophe GASMI * Added NetworkPolicy to sort order test Signed-off-by: Christophe GASMI --- pkg/tiller/kind_sorter.go | 2 ++ pkg/tiller/kind_sorter_test.go | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pkg/tiller/kind_sorter.go b/pkg/tiller/kind_sorter.go index 5c7193dee..90678cce5 100644 --- a/pkg/tiller/kind_sorter.go +++ b/pkg/tiller/kind_sorter.go @@ -28,6 +28,7 @@ type SortOrder []string // Those occurring earlier in the list get installed before those occurring later in the list. var InstallOrder SortOrder = []string{ "Namespace", + "NetworkPolicy", "ResourceQuota", "LimitRange", "PodSecurityPolicy", @@ -96,6 +97,7 @@ var UninstallOrder SortOrder = []string{ "PodSecurityPolicy", "LimitRange", "ResourceQuota", + "NetworkPolicy", "Namespace", } diff --git a/pkg/tiller/kind_sorter_test.go b/pkg/tiller/kind_sorter_test.go index 3b37256ed..f4106f62e 100644 --- a/pkg/tiller/kind_sorter_test.go +++ b/pkg/tiller/kind_sorter_test.go @@ -157,6 +157,10 @@ func TestKindSorter(t *testing.T) { Name: "x", Head: &util.SimpleHead{Kind: "HorizontalPodAutoscaler"}, }, + { + Name: "B", + Head: &util.SimpleHead{Kind: "NetworkPolicy"}, + }, } for _, test := range []struct { @@ -164,8 +168,8 @@ func TestKindSorter(t *testing.T) { order SortOrder expected string }{ - {"install", InstallOrder, "abc3zde1fgh2iIjJkKlLmnopqrxstuvw!"}, - {"uninstall", UninstallOrder, "wvmutsxrqponLlKkJjIi2hgf1edz3cba!"}, + {"install", InstallOrder, "aBbc3zde1fgh2iIjJkKlLmnopqrxstuvw!"}, + {"uninstall", UninstallOrder, "wvmutsxrqponLlKkJjIi2hgf1edz3cbBa!"}, } { var buf bytes.Buffer t.Run(test.description, func(t *testing.T) { From 95ec21339549e2242ff2fa9a0940ca0527bcbe83 Mon Sep 17 00:00:00 2001 From: yuxiaobo Date: Fri, 30 Aug 2019 13:10:06 +0800 Subject: [PATCH 306/327] delete extra space Signed-off-by: yuxiaobo --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 996f6d224..aee515e37 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -199,7 +199,7 @@ $ git pull upstream master ```sh $ git checkout -b new-feature ``` -6. Make any change on the branch `new-feature` then build and test your codes. +6. Make any change on the branch `new-feature` then build and test your codes. 7. Include in what will be committed. ```sh $ git add From 55ccdd040d8a6f244f1ebd93323c17a46aa890f7 Mon Sep 17 00:00:00 2001 From: Richard Connon Date: Fri, 12 Jul 2019 13:58:12 +0100 Subject: [PATCH 307/327] Use watcher with retries to wait for resources When waiting for resources use the `ListWatchUntil` instead of `UntilWithoutRetry` so that if the connection drops between tiller and the API while waiting the operation can still succeed. Signed-off-by: Richard Connon --- pkg/kube/client.go | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/pkg/kube/client.go b/pkg/kube/client.go index aa6f54ae0..e78c10f2d 100644 --- a/pkg/kube/client.go +++ b/pkg/kube/client.go @@ -41,6 +41,7 @@ import ( apiequality "k8s.io/apimachinery/pkg/api/equality" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" @@ -51,6 +52,7 @@ import ( "k8s.io/cli-runtime/pkg/genericclioptions" "k8s.io/cli-runtime/pkg/resource" "k8s.io/client-go/kubernetes/scheme" + cachetools "k8s.io/client-go/tools/cache" watchtools "k8s.io/client-go/tools/watch" "k8s.io/kubernetes/pkg/api/legacyscheme" "k8s.io/kubernetes/pkg/apis/core" @@ -810,10 +812,7 @@ func getSelectorFromObject(obj runtime.Object) (map[string]string, bool) { } func (c *Client) watchUntilReady(timeout time.Duration, info *resource.Info) error { - w, err := resource.NewHelper(info.Client, info.Mapping).WatchSingle(info.Namespace, info.Name, info.ResourceVersion) - if err != nil { - return err - } + lw := cachetools.NewListWatchFromClient(info.Client, info.Mapping.Resource.Resource, info.Namespace, fields.Everything()) kind := info.Mapping.GroupVersionKind.Kind c.Log("Watching for changes to %s %s with timeout of %v", kind, info.Name, timeout) @@ -826,7 +825,7 @@ func (c *Client) watchUntilReady(timeout time.Duration, info *resource.Info) err ctx, cancel := watchtools.ContextWithOptionalTimeout(context.Background(), timeout) defer cancel() - _, err = watchtools.UntilWithoutRetry(ctx, w, func(e watch.Event) (bool, error) { + _, err := watchtools.ListWatchUntil(ctx, lw, func(e watch.Event) (bool, error) { switch e.Type { case watch.Added, watch.Modified: // For things like a secret or a config map, this is the best indicator @@ -914,15 +913,12 @@ func (c *Client) WaitAndGetCompletedPodPhase(namespace string, reader io.Reader, } func (c *Client) watchPodUntilComplete(timeout time.Duration, info *resource.Info) error { - w, err := resource.NewHelper(info.Client, info.Mapping).WatchSingle(info.Namespace, info.Name, info.ResourceVersion) - if err != nil { - return err - } + lw := cachetools.NewListWatchFromClient(info.Client, info.Mapping.Resource.Resource, info.Namespace, fields.Everything()) c.Log("Watching pod %s for completion with timeout of %v", info.Name, timeout) ctx, cancel := watchtools.ContextWithOptionalTimeout(context.Background(), timeout) defer cancel() - _, err = watchtools.UntilWithoutRetry(ctx, w, func(e watch.Event) (bool, error) { + _, err := watchtools.ListWatchUntil(ctx, lw, func(e watch.Event) (bool, error) { return isPodComplete(e) }) From a584ee9a00a73bd5cd8684efd2ebd84d3bf02def Mon Sep 17 00:00:00 2001 From: ammarn911 <49419471+ammarn911@users.noreply.github.com> Date: Fri, 30 Aug 2019 11:44:02 -0500 Subject: [PATCH 308/327] Adding MicroK8s to kubernetes_distros.md Signed-off-by: ammarn911 <49419471+ammarn911@users.noreply.github.com> --- docs/kubernetes_distros.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/kubernetes_distros.md b/docs/kubernetes_distros.md index 52a5e1acc..1efe3807b 100644 --- a/docs/kubernetes_distros.md +++ b/docs/kubernetes_distros.md @@ -6,6 +6,10 @@ environments. We are trying to add more details to this document. Please contribute via Pull Requests if you can. +## MicroK8s + +Helm can be enabled in [MicroK8s](https://microk8s.io) using the command: `microk8s.enable helm` + ## MiniKube Helm is tested and known to work with [minikube](https://github.com/kubernetes/minikube). From 540fe23b692ab22b04e4718644cc654d694abc04 Mon Sep 17 00:00:00 2001 From: Anton Date: Mon, 2 Sep 2019 19:20:36 +0200 Subject: [PATCH 309/327] fix BusyBox sed (#6327) BusyBox sed works the same way as GNU sed Signed-off-by: tipok --- cmd/helm/completion.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/helm/completion.go b/cmd/helm/completion.go index 039dcbe5f..e6ca1c6ac 100644 --- a/cmd/helm/completion.go +++ b/cmd/helm/completion.go @@ -194,7 +194,7 @@ autoload -U +X bashcompinit && bashcompinit # use word boundary patterns for BSD or GNU sed LWORD='[[:<:]]' RWORD='[[:>:]]' -if sed --help 2>&1 | grep -q GNU; then +if sed --help 2>&1 | grep -q 'GNU\|BusyBox'; then LWORD='\<' RWORD='\>' fi From 3ed073b2e0c37dd5c994562d6fe8e04b5f3609eb Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Tue, 3 Sep 2019 10:01:47 -0400 Subject: [PATCH 310/327] v2: Dynamic completion for "helm repo" and "helm plugin" (#6265) * feat(helm): Completion for helm repo remove Signed-off-by: Marc Khouzam * feat(helm): Complete for helm plugin remove/update helm repo remove (will select from the names of configured repos) helm plugin remove (will select from names of installed plugins) helm plugin update (will select from names of installed plugins) Signed-off-by: Marc Khouzam * feat(helm): Completion for helm repo update Signed-off-by: Marc Khouzam --- cmd/helm/helm.go | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/cmd/helm/helm.go b/cmd/helm/helm.go index 2f394968f..20742836d 100644 --- a/cmd/helm/helm.go +++ b/cmd/helm/helm.go @@ -41,7 +41,7 @@ import ( const ( bashCompletionFunc = ` -__helm_override_flag_list=(--kubeconfig --kube-context --host --tiller-namespace) +__helm_override_flag_list=(--kubeconfig --kube-context --host --tiller-namespace --home) __helm_override_flags() { local ${__helm_override_flag_list[*]##*-} two_word_of of var @@ -80,6 +80,28 @@ __helm_list_releases() fi } +__helm_list_repos() +{ + __helm_debug "${FUNCNAME[0]}: c is $c words[c] is ${words[c]}" + local out oflags + oflags=$(__helm_override_flags) + __helm_debug "${FUNCNAME[0]}: __helm_override_flags are ${oflags}" + if out=$(helm repo list ${oflags} | tail +2 | cut -f1 2>/dev/null); then + COMPREPLY=( $( compgen -W "${out[*]}" -- "$cur" ) ) + fi +} + +__helm_list_plugins() +{ + __helm_debug "${FUNCNAME[0]}: c is $c words[c] is ${words[c]}" + local out oflags + oflags=$(__helm_override_flags) + __helm_debug "${FUNCNAME[0]}: __helm_override_flags are ${oflags}" + if out=$(helm plugin list ${oflags} | tail +2 | cut -f1 2>/dev/null); then + COMPREPLY=( $( compgen -W "${out[*]}" -- "$cur" ) ) + fi +} + __helm_custom_func() { __helm_debug "${FUNCNAME[0]}: c is $c words[@] is ${words[@]}" @@ -89,6 +111,14 @@ __helm_custom_func() __helm_list_releases return ;; + helm_repo_remove | helm_repo_update) + __helm_list_repos + return + ;; + helm_plugin_remove | helm_plugin_update) + __helm_list_plugins + return + ;; *) ;; esac From eeff9079b84eeb67a0f0f7652c644c480aa2d045 Mon Sep 17 00:00:00 2001 From: Steven Cipriano Date: Thu, 5 Sep 2019 13:41:41 -0700 Subject: [PATCH 311/327] In get script, use specified path to helm binary for helm version check Signed-off-by: Steven Cipriano --- scripts/get | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/get b/scripts/get index ea2056ca6..3f645f807 100755 --- a/scripts/get +++ b/scripts/get @@ -94,7 +94,7 @@ checkDesiredVersion() { # if it needs to be changed. checkHelmInstalledVersion() { if [[ -f "${HELM_INSTALL_DIR}/${PROJECT_NAME}" ]]; then - local version=$(helm version -c | grep '^Client' | cut -d'"' -f2) + local version=$("${HELM_INSTALL_DIR}/${PROJECT_NAME}" version -c | grep '^Client' | cut -d'"' -f2) if [[ "$version" == "$TAG" ]]; then echo "Helm ${version} is already ${DESIRED_VERSION:-latest}" return 0 From b49f4269c5bdfee920b0d5fd7954513f5e17dad6 Mon Sep 17 00:00:00 2001 From: Xiang Dai <764524258@qq.com> Date: Wed, 21 Aug 2019 10:36:42 +0800 Subject: [PATCH 312/327] fix issue when dependency is URL Signed-off-by: Xiang Dai <764524258@qq.com> --- pkg/downloader/chart_downloader.go | 5 +++++ pkg/downloader/manager.go | 19 ++++++++++++++++--- pkg/downloader/manager_test.go | 16 ++++++++-------- pkg/resolver/resolver.go | 13 ++++++++++++- 4 files changed, 41 insertions(+), 12 deletions(-) diff --git a/pkg/downloader/chart_downloader.go b/pkg/downloader/chart_downloader.go index 563188ec3..c2e9f6dc1 100644 --- a/pkg/downloader/chart_downloader.go +++ b/pkg/downloader/chart_downloader.go @@ -205,6 +205,11 @@ func (c *ChartDownloader) ResolveChartVersion(ref, version string) (*url.URL, ge } c.setCredentials(r) + // Skip if dependency not contain name + if len(r.Config.Name) == 0 { + return u, r.Client, nil + } + // Next, we need to load the index, and actually look up the chart. i, err := repo.LoadIndexFile(c.HelmHome.CacheIndex(r.Config.Name)) if err != nil { diff --git a/pkg/downloader/manager.go b/pkg/downloader/manager.go index cca198916..6c6886e8a 100644 --- a/pkg/downloader/manager.go +++ b/pkg/downloader/manager.go @@ -233,7 +233,7 @@ func (m *Manager) downloadAll(deps []*chartutil.Dependency) error { // Any failure to resolve/download a chart should fail: // https://github.com/kubernetes/helm/issues/1439 - churl, username, password, err := findChartURL(dep.Name, dep.Version, dep.Repository, repos) + churl, username, password, err := m.findChartURL(dep.Name, dep.Version, dep.Repository, repos) if err != nil { saveError = fmt.Errorf("could not find %s: %s", churl, err) break @@ -403,9 +403,17 @@ func (m *Manager) getRepoNames(deps []*chartutil.Dependency) (map[string]string, } } if !found { - missing = append(missing, dd.Repository) + repository := dd.Repository + // Add if URL + _, err := url.ParseRequestURI(repository) + if err == nil { + reposMap[repository] = repository + continue + } + missing = append(missing, repository) } } + if len(missing) > 0 { errorMessage := fmt.Sprintf("no repository definition for %s. Please add them via 'helm repo add'", strings.Join(missing, ", ")) // It is common for people to try to enter "stable" as a repository instead of the actual URL. @@ -424,6 +432,7 @@ repository, use "https://kubernetes-charts.storage.googleapis.com/" or "@stable" } return nil, errors.New(errorMessage) } + return reposMap, nil } @@ -475,7 +484,7 @@ func (m *Manager) parallelRepoUpdate(repos []*repo.Entry) error { // repoURL is the repository to search // // If it finds a URL that is "relative", it will prepend the repoURL. -func findChartURL(name, version, repoURL string, repos map[string]*repo.ChartRepository) (url, username, password string, err error) { +func (m *Manager) findChartURL(name, version, repoURL string, repos map[string]*repo.ChartRepository) (url, username, password string, err error) { for _, cr := range repos { if urlutil.Equal(repoURL, cr.Config.URL) { var entry repo.ChartVersions @@ -497,6 +506,10 @@ func findChartURL(name, version, repoURL string, repos map[string]*repo.ChartRep return } } + url, err = repo.FindChartInRepoURL(repoURL, name, version, "", "", "", m.Getters) + if err == nil { + return + } err = fmt.Errorf("chart %s not found in %s", name, repoURL) return } diff --git a/pkg/downloader/manager_test.go b/pkg/downloader/manager_test.go index cb588394a..ef8b95071 100644 --- a/pkg/downloader/manager_test.go +++ b/pkg/downloader/manager_test.go @@ -78,7 +78,7 @@ func TestFindChartURL(t *testing.T) { version := "0.1.0" repoURL := "http://example.com/charts" - churl, username, password, err := findChartURL(name, version, repoURL, repos) + churl, username, password, err := m.findChartURL(name, version, repoURL, repos) if err != nil { t.Fatal(err) } @@ -106,13 +106,6 @@ func TestGetRepoNames(t *testing.T) { err bool expectedErr string }{ - { - name: "no repo definition failure", - req: []*chartutil.Dependency{ - {Name: "oedipus-rex", Repository: "http://example.com/test"}, - }, - err: true, - }, { name: "no repo definition failure -- stable repo", req: []*chartutil.Dependency{ @@ -128,6 +121,13 @@ func TestGetRepoNames(t *testing.T) { err: true, expectedErr: "no 'repository' field specified for dependency: \"dependency-missing-repository-field\"", }, + { + name: "dependency repository is url but not exist in repos", + req: []*chartutil.Dependency{ + {Name: "oedipus-rex", Repository: "http://example.com/test"}, + }, + expect: map[string]string{"http://example.com/test": "http://example.com/test"}, + }, { name: "no repo definition failure", req: []*chartutil.Dependency{ diff --git a/pkg/resolver/resolver.go b/pkg/resolver/resolver.go index 8177df2d3..516e9260f 100644 --- a/pkg/resolver/resolver.go +++ b/pkg/resolver/resolver.go @@ -71,7 +71,18 @@ func (r *Resolver) Resolve(reqs *chartutil.Requirements, repoNames map[string]st return nil, fmt.Errorf("dependency %q has an invalid version/constraint format: %s", d.Name, err) } - repoIndex, err := repo.LoadIndexFile(r.helmhome.CacheIndex(repoNames[d.Name])) + // repo does not exist in cache but has url info + cacheRepoName := repoNames[d.Name] + if cacheRepoName == "" && d.Repository != "" { + locked[i] = &chartutil.Dependency{ + Name: d.Name, + Repository: d.Repository, + Version: d.Version, + } + continue + } + + repoIndex, err := repo.LoadIndexFile(r.helmhome.CacheIndex(cacheRepoName)) if err != nil { return nil, fmt.Errorf("no cached repo found. (try 'helm repo update'). %s", err) } From 8d8eceec92217a0eb3ad06a3e2b82e92f22b3c37 Mon Sep 17 00:00:00 2001 From: yuxiaobo Date: Tue, 10 Sep 2019 17:47:52 +0800 Subject: [PATCH 313/327] Grammar tweak Signed-off-by: yuxiaobo --- docs/chart_repository_sync_example.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/chart_repository_sync_example.md b/docs/chart_repository_sync_example.md index 931275431..91215cb25 100644 --- a/docs/chart_repository_sync_example.md +++ b/docs/chart_repository_sync_example.md @@ -38,7 +38,7 @@ Building synchronization state... Starting synchronization Would copy file://fantastic-charts/alpine-0.1.0.tgz to gs://fantastic-charts/alpine-0.1.0.tgz Would copy file://fantastic-charts/index.yaml to gs://fantastic-charts/index.yaml -Are you sure you would like to continue with these changes?? [y/N]} y +Are you sure you would like to continue with these changes? [y/N]} y Building synchronization state... Starting synchronization Copying file://fantastic-charts/alpine-0.1.0.tgz [Content-Type=application/x-tar]... From 05d5ff4747cb810e61f88685285bcd8e73f073aa Mon Sep 17 00:00:00 2001 From: Xiang Dai <764524258@qq.com> Date: Tue, 10 Sep 2019 10:05:58 +0800 Subject: [PATCH 314/327] update test Signed-off-by: Xiang Dai <764524258@qq.com> --- pkg/resolver/resolver_test.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/pkg/resolver/resolver_test.go b/pkg/resolver/resolver_test.go index 689ffbc32..f35e051fa 100644 --- a/pkg/resolver/resolver_test.go +++ b/pkg/resolver/resolver_test.go @@ -37,15 +37,6 @@ func TestResolve(t *testing.T) { }, err: true, }, - { - name: "cache index failure", - req: &chartutil.Requirements{ - Dependencies: []*chartutil.Dependency{ - {Name: "oedipus-rex", Repository: "http://example.com", Version: "1.0.0"}, - }, - }, - err: true, - }, { name: "chart not found failure", req: &chartutil.Requirements{ From aa4dae05359cf5db77a8502f814e3fa1f412df42 Mon Sep 17 00:00:00 2001 From: Matt Farina Date: Wed, 18 Sep 2019 12:49:06 -0400 Subject: [PATCH 315/327] Updating to newer versions of dependencies * This was initiated by new versions from Masterminds * Linting was set to check for the same chart version as the other checks of this were. >0.0.0-0. The -0 is important to pull in prereleases. The latest version of semver Validate now finds errors here properly where some were missed before * 0.0.0 is a valid semantic version. Instead of expecting it to be invalid in the tests to check validation now using an invalid semantic version Signed-off-by: Matt Farina --- glide.lock | 14 +++++++------- glide.yaml | 3 ++- pkg/lint/lint_test.go | 2 +- pkg/lint/rules/chartfile.go | 2 +- pkg/lint/rules/chartfile_test.go | 4 ++-- pkg/lint/rules/testdata/badchartfile/Chart.yaml | 2 +- pkg/tiller/release_install_test.go | 2 +- 7 files changed, 15 insertions(+), 14 deletions(-) diff --git a/glide.lock b/glide.lock index 92e7c50dd..d81ca12ca 100644 --- a/glide.lock +++ b/glide.lock @@ -1,5 +1,5 @@ -hash: 277f7be1b21149bc06b361fa61c0a2ff81a7f00c59a6e35c21b6516f6ddfd9f7 -updated: 2019-07-03T21:59:06.87934+02:00 +hash: 13c07a8e64f0777d08cd03d5edba6f254621ec1ee8e3c7b3ef26efc682b643ce +updated: 2019-09-18T12:07:21.888497-04:00 imports: - name: cloud.google.com/go version: 0ebda48a7f143b1cce9eb37a8c1106ac762a3430 @@ -121,7 +121,7 @@ imports: - name: github.com/google/gofuzz version: 24818f796faf91cd76ec7bddd72458fbced7a6c1 - name: github.com/google/uuid - version: 064e2069ce9c359c118179501254f67d7d37ba24 + version: 0cd6bf5da1e1c83f8b45653022c74f71af0538a4 - name: github.com/googleapis/gnostic version: 0c5108395e2debce0d731cf0287ddf7242066aba subpackages: @@ -183,11 +183,11 @@ imports: - name: github.com/Masterminds/goutils version: 41ac8693c5c10a92ea1ff5ac3a7f95646f6123b0 - name: github.com/Masterminds/semver - version: c7af12943936e8c39859482e61f0574c2fd7fc75 + version: 805c489aa98f412e79eb308a37996bf9d8b1c91e - name: github.com/Masterminds/sprig - version: 258b00ffa7318e8b109a141349980ffbd30a35db + version: 2691a9cba2adee8d9a60100a1bc49e770f97b7db - name: github.com/Masterminds/vcs - version: 3084677c2c188840777bff30054f2b553729d329 + version: f94282d8632a0620f79f0c6ff0e82604e8c5c85b - name: github.com/mattn/go-runewidth version: d6bea18f789704b5f83375793155289da36a3c7f - name: github.com/matttproud/golang_protobuf_extensions @@ -247,7 +247,7 @@ imports: subpackages: - doc - name: github.com/spf13/pflag - version: 298182f68c66c05229eb03ac171abe6e309ee79a + version: e8f29969b682c41a730f8f08b76033b120498464 - name: github.com/technosophos/moniker version: a5dbd03a2245d554160e3ae6bfdcf969fe58b431 - name: golang.org/x/crypto diff --git a/glide.yaml b/glide.yaml index 96401aa8c..565682dad 100644 --- a/glide.yaml +++ b/glide.yaml @@ -21,8 +21,9 @@ import: - package: github.com/Masterminds/sprig version: ^2.20.0 - package: github.com/ghodss/yaml + version: c7ce16629ff4cd059ed96ed06419dd3856fd3577 - package: github.com/Masterminds/semver - version: ~1.4.2 + version: ^1.4.2 - package: github.com/technosophos/moniker version: ~0.2 - package: github.com/golang/protobuf diff --git a/pkg/lint/lint_test.go b/pkg/lint/lint_test.go index 7204f36b9..0514f7f6d 100644 --- a/pkg/lint/lint_test.go +++ b/pkg/lint/lint_test.go @@ -55,7 +55,7 @@ func TestBadChart(t *testing.T) { } } if msg.Severity == support.ErrorSev { - if strings.Contains(msg.Err.Error(), "version 0.0.0 is less than or equal to 0") { + if strings.Contains(msg.Err.Error(), "version '0.0.0.0' is not a valid SemVer") { e = true } if strings.Contains(msg.Err.Error(), "name is required") { diff --git a/pkg/lint/rules/chartfile.go b/pkg/lint/rules/chartfile.go index 8f6c16d94..d851e73ab 100644 --- a/pkg/lint/rules/chartfile.go +++ b/pkg/lint/rules/chartfile.go @@ -120,7 +120,7 @@ func validateChartVersion(cf *chart.Metadata) error { return fmt.Errorf("version '%s' is not a valid SemVer", cf.Version) } - c, err := semver.NewConstraint("> 0") + c, err := semver.NewConstraint(">0.0.0-0") if err != nil { return err } diff --git a/pkg/lint/rules/chartfile_test.go b/pkg/lint/rules/chartfile_test.go index a44129acf..4ec091fa7 100644 --- a/pkg/lint/rules/chartfile_test.go +++ b/pkg/lint/rules/chartfile_test.go @@ -106,7 +106,7 @@ func TestValidateChartVersion(t *testing.T) { ErrorMsg string }{ {"", "version is required"}, - {"0", "0 is less than or equal to 0"}, + {"1.2.3.4", "version '1.2.3.4' is not a valid SemVer"}, {"waps", "'waps' is not a valid SemVer"}, {"-3", "'-3' is not a valid SemVer"}, } @@ -252,7 +252,7 @@ func TestChartfile(t *testing.T) { t.Errorf("Unexpected message 2: %s", msgs[2].Err) } - if !strings.Contains(msgs[3].Err.Error(), "version 0.0.0 is less than or equal to 0") { + if !strings.Contains(msgs[3].Err.Error(), "version '0.0.0.0' is not a valid SemVer") { t.Errorf("Unexpected message 3: %s", msgs[2].Err) } diff --git a/pkg/lint/rules/testdata/badchartfile/Chart.yaml b/pkg/lint/rules/testdata/badchartfile/Chart.yaml index dbb4a1501..c14ed7763 100644 --- a/pkg/lint/rules/testdata/badchartfile/Chart.yaml +++ b/pkg/lint/rules/testdata/badchartfile/Chart.yaml @@ -1,3 +1,3 @@ description: A Helm chart for Kubernetes -version: 0.0.0 +version: 0.0.0.0 home: "" diff --git a/pkg/tiller/release_install_test.go b/pkg/tiller/release_install_test.go index 78d00ce66..0d985b2e5 100644 --- a/pkg/tiller/release_install_test.go +++ b/pkg/tiller/release_install_test.go @@ -502,7 +502,7 @@ func TestInstallRelease_KubeVersion(t *testing.T) { rs := rsFixture() req := installRequest( - withChart(withKube(">=0.0.0")), + withChart(withKube(">=0.0.0-0")), ) _, err := rs.InstallRelease(c, req) if err != nil { From f127b7d73e0905ec06efc816127c8baf77d36cc0 Mon Sep 17 00:00:00 2001 From: Jerome Brette Date: Thu, 19 Sep 2019 18:19:38 +0000 Subject: [PATCH 316/327] Kubernetes 1.16: Migrate Tiller deployment to apps/v1 - Convert Tiller Deployment from extensions/v1betax to apps/v1 - Update installation unit tests - Add support for helm init --upgrade Signed-off-by: Jerome Brette --- cmd/helm/init_test.go | 4 +-- cmd/helm/installer/install.go | 58 +++++++++++++++++++++++------- cmd/helm/installer/install_test.go | 22 ++++++------ 3 files changed, 59 insertions(+), 25 deletions(-) diff --git a/cmd/helm/init_test.go b/cmd/helm/init_test.go index b58303f42..f9b3fcd48 100644 --- a/cmd/helm/init_test.go +++ b/cmd/helm/init_test.go @@ -28,8 +28,8 @@ import ( "github.com/ghodss/yaml" + appsv1 "k8s.io/api/apps/v1" v1 "k8s.io/api/core/v1" - "k8s.io/api/extensions/v1beta1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" @@ -83,7 +83,7 @@ func TestInitCmd_exists(t *testing.T) { defer os.RemoveAll(home) var buf bytes.Buffer - fc := fake.NewSimpleClientset(&v1beta1.Deployment{ + fc := fake.NewSimpleClientset(&appsv1.Deployment{ ObjectMeta: metav1.ObjectMeta{ Namespace: v1.NamespaceDefault, Name: "tiller-deploy", diff --git a/cmd/helm/installer/install.go b/cmd/helm/installer/install.go index 42c7132db..6cf0cb165 100644 --- a/cmd/helm/installer/install.go +++ b/cmd/helm/installer/install.go @@ -24,15 +24,16 @@ import ( "github.com/Masterminds/semver" "github.com/ghodss/yaml" + appsv1 "k8s.io/api/apps/v1" "k8s.io/api/core/v1" - "k8s.io/api/extensions/v1beta1" + extensionsv1beta1 "k8s.io/api/extensions/v1beta1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/client-go/kubernetes" + appsv1client "k8s.io/client-go/kubernetes/typed/apps/v1" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" - extensionsclient "k8s.io/client-go/kubernetes/typed/extensions/v1beta1" "k8s.io/helm/pkg/version" "k8s.io/helm/pkg/chartutil" @@ -43,7 +44,7 @@ import ( // // Returns an error if the command failed. func Install(client kubernetes.Interface, opts *Options) error { - if err := createDeployment(client.ExtensionsV1beta1(), opts); err != nil { + if err := createDeployment(client.AppsV1(), opts); err != nil { return err } if err := createService(client.CoreV1(), opts.Namespace); err != nil { @@ -61,10 +62,40 @@ func Install(client kubernetes.Interface, opts *Options) error { // // Returns an error if the command failed. func Upgrade(client kubernetes.Interface, opts *Options) error { - obj, err := client.ExtensionsV1beta1().Deployments(opts.Namespace).Get(deploymentName, metav1.GetOptions{}) - if err != nil { + appsobj, err := client.AppsV1().Deployments(opts.Namespace).Get(deploymentName, metav1.GetOptions{}) + if err == nil { + return upgradeAppsTillerDeployment(client, opts, appsobj) + } + + extensionsobj, err := client.ExtensionsV1beta1().Deployments(opts.Namespace).Get(deploymentName, metav1.GetOptions{}) + if err == nil { + return upgradeExtensionsTillerDeployment(client, opts, extensionsobj) + } + + return err +} + +func upgradeAppsTillerDeployment(client kubernetes.Interface, opts *Options, obj *appsv1.Deployment) error { + tillerImage := obj.Spec.Template.Spec.Containers[0].Image + if semverCompare(tillerImage) == -1 && !opts.ForceUpgrade { + return errors.New("current Tiller version is newer, use --force-upgrade to downgrade") + } + obj.Spec.Template.Spec.Containers[0].Image = opts.SelectImage() + obj.Spec.Template.Spec.Containers[0].ImagePullPolicy = opts.pullPolicy() + obj.Spec.Template.Spec.ServiceAccountName = opts.ServiceAccount + if _, err := client.AppsV1().Deployments(opts.Namespace).Update(obj); err != nil { return err } + // If the service does not exist that would mean we are upgrading from a Tiller version + // that didn't deploy the service, so install it. + _, err := client.CoreV1().Services(opts.Namespace).Get(serviceName, metav1.GetOptions{}) + if apierrors.IsNotFound(err) { + return createService(client.CoreV1(), opts.Namespace) + } + return err +} + +func upgradeExtensionsTillerDeployment(client kubernetes.Interface, opts *Options, obj *extensionsv1beta1.Deployment) error { tillerImage := obj.Spec.Template.Spec.Containers[0].Image if semverCompare(tillerImage) == -1 && !opts.ForceUpgrade { return errors.New("current Tiller version is newer, use --force-upgrade to downgrade") @@ -77,7 +108,7 @@ func Upgrade(client kubernetes.Interface, opts *Options) error { } // If the service does not exist that would mean we are upgrading from a Tiller version // that didn't deploy the service, so install it. - _, err = client.CoreV1().Services(opts.Namespace).Get(serviceName, metav1.GetOptions{}) + _, err := client.CoreV1().Services(opts.Namespace).Get(serviceName, metav1.GetOptions{}) if apierrors.IsNotFound(err) { return createService(client.CoreV1(), opts.Namespace) } @@ -105,7 +136,7 @@ func semverCompare(image string) int { } // createDeployment creates the Tiller Deployment resource. -func createDeployment(client extensionsclient.DeploymentsGetter, opts *Options) error { +func createDeployment(client appsv1client.DeploymentsGetter, opts *Options) error { obj, err := generateDeployment(opts) if err != nil { return err @@ -118,7 +149,7 @@ func createDeployment(client extensionsclient.DeploymentsGetter, opts *Options) // Deployment gets a deployment object that can be used to generate a manifest // as a string. This object should not be submitted directly to the Kubernetes // api -func Deployment(opts *Options) (*v1beta1.Deployment, error) { +func Deployment(opts *Options) (*appsv1.Deployment, error) { dep, err := generateDeployment(opts) if err != nil { return nil, err @@ -197,7 +228,7 @@ func parseNodeSelectorsInto(labels string, m map[string]string) error { } return nil } -func generateDeployment(opts *Options) (*v1beta1.Deployment, error) { +func generateDeployment(opts *Options) (*appsv1.Deployment, error) { labels := generateLabels(map[string]string{"name": "tiller"}) nodeSelectors := map[string]string{} if len(opts.NodeSelectors) > 0 { @@ -206,14 +237,17 @@ func generateDeployment(opts *Options) (*v1beta1.Deployment, error) { return nil, err } } - d := &v1beta1.Deployment{ + d := &appsv1.Deployment{ ObjectMeta: metav1.ObjectMeta{ Namespace: opts.Namespace, Name: deploymentName, Labels: labels, }, - Spec: v1beta1.DeploymentSpec{ + Spec: appsv1.DeploymentSpec{ Replicas: opts.getReplicas(), + Selector: &metav1.LabelSelector{ + MatchLabels: labels, + }, Template: v1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ Labels: labels, @@ -297,7 +331,7 @@ func generateDeployment(opts *Options) (*v1beta1.Deployment, error) { // merge them and convert back to Deployment if len(opts.Values) > 0 { // base deployment struct - var dd v1beta1.Deployment + var dd appsv1.Deployment // get YAML from original deployment dy, err := yaml.Marshal(d) if err != nil { diff --git a/cmd/helm/installer/install_test.go b/cmd/helm/installer/install_test.go index 1c7063450..3673712b2 100644 --- a/cmd/helm/installer/install_test.go +++ b/cmd/helm/installer/install_test.go @@ -24,8 +24,8 @@ import ( "testing" "github.com/ghodss/yaml" + appsv1 "k8s.io/api/apps/v1" "k8s.io/api/core/v1" - "k8s.io/api/extensions/v1beta1" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/kubernetes/fake" @@ -192,7 +192,7 @@ func TestInstall(t *testing.T) { fc := &fake.Clientset{} fc.AddReactor("create", "deployments", func(action testcore.Action) (bool, runtime.Object, error) { - obj := action.(testcore.CreateAction).GetObject().(*v1beta1.Deployment) + obj := action.(testcore.CreateAction).GetObject().(*appsv1.Deployment) l := obj.GetLabels() if reflect.DeepEqual(l, map[string]string{"app": "helm"}) { t.Errorf("expected labels = '', got '%s'", l) @@ -239,7 +239,7 @@ func TestInstallHA(t *testing.T) { fc := &fake.Clientset{} fc.AddReactor("create", "deployments", func(action testcore.Action) (bool, runtime.Object, error) { - obj := action.(testcore.CreateAction).GetObject().(*v1beta1.Deployment) + obj := action.(testcore.CreateAction).GetObject().(*appsv1.Deployment) replicas := obj.Spec.Replicas if int(*replicas) != 2 { t.Errorf("expected replicas = 2, got '%d'", replicas) @@ -263,7 +263,7 @@ func TestInstall_WithTLS(t *testing.T) { fc := &fake.Clientset{} fc.AddReactor("create", "deployments", func(action testcore.Action) (bool, runtime.Object, error) { - obj := action.(testcore.CreateAction).GetObject().(*v1beta1.Deployment) + obj := action.(testcore.CreateAction).GetObject().(*appsv1.Deployment) l := obj.GetLabels() if reflect.DeepEqual(l, map[string]string{"app": "helm"}) { t.Errorf("expected labels = '', got '%s'", l) @@ -331,7 +331,7 @@ func TestInstall_WithTLS(t *testing.T) { func TestInstall_canary(t *testing.T) { fc := &fake.Clientset{} fc.AddReactor("create", "deployments", func(action testcore.Action) (bool, runtime.Object, error) { - obj := action.(testcore.CreateAction).GetObject().(*v1beta1.Deployment) + obj := action.(testcore.CreateAction).GetObject().(*appsv1.Deployment) i := obj.Spec.Template.Spec.Containers[0].Image if i != "gcr.io/kubernetes-helm/tiller:canary" { t.Errorf("expected canary image, got '%s'", i) @@ -369,7 +369,7 @@ func TestUpgrade(t *testing.T) { return true, existingDeployment, nil }) fc.AddReactor("update", "deployments", func(action testcore.Action) (bool, runtime.Object, error) { - obj := action.(testcore.UpdateAction).GetObject().(*v1beta1.Deployment) + obj := action.(testcore.UpdateAction).GetObject().(*appsv1.Deployment) i := obj.Spec.Template.Spec.Containers[0].Image if i != image { t.Errorf("expected image = '%s', got '%s'", image, i) @@ -408,7 +408,7 @@ func TestUpgrade_serviceNotFound(t *testing.T) { return true, existingDeployment, nil }) fc.AddReactor("update", "deployments", func(action testcore.Action) (bool, runtime.Object, error) { - obj := action.(testcore.UpdateAction).GetObject().(*v1beta1.Deployment) + obj := action.(testcore.UpdateAction).GetObject().(*appsv1.Deployment) i := obj.Spec.Template.Spec.Containers[0].Image if i != image { t.Errorf("expected image = '%s', got '%s'", image, i) @@ -453,7 +453,7 @@ func TestUgrade_newerVersion(t *testing.T) { return true, existingDeployment, nil }) fc.AddReactor("update", "deployments", func(action testcore.Action) (bool, runtime.Object, error) { - obj := action.(testcore.UpdateAction).GetObject().(*v1beta1.Deployment) + obj := action.(testcore.UpdateAction).GetObject().(*appsv1.Deployment) i := obj.Spec.Template.Spec.Containers[0].Image if i != image { t.Errorf("expected image = '%s', got '%s'", image, i) @@ -513,7 +513,7 @@ func TestUpgrade_identical(t *testing.T) { return true, existingDeployment, nil }) fc.AddReactor("update", "deployments", func(action testcore.Action) (bool, runtime.Object, error) { - obj := action.(testcore.UpdateAction).GetObject().(*v1beta1.Deployment) + obj := action.(testcore.UpdateAction).GetObject().(*appsv1.Deployment) i := obj.Spec.Template.Spec.Containers[0].Image if i != image { t.Errorf("expected image = '%s', got '%s'", image, i) @@ -554,7 +554,7 @@ func TestUpgrade_canaryClient(t *testing.T) { return true, existingDeployment, nil }) fc.AddReactor("update", "deployments", func(action testcore.Action) (bool, runtime.Object, error) { - obj := action.(testcore.UpdateAction).GetObject().(*v1beta1.Deployment) + obj := action.(testcore.UpdateAction).GetObject().(*appsv1.Deployment) i := obj.Spec.Template.Spec.Containers[0].Image if i != image { t.Errorf("expected image = '%s', got '%s'", image, i) @@ -595,7 +595,7 @@ func TestUpgrade_canaryServer(t *testing.T) { return true, existingDeployment, nil }) fc.AddReactor("update", "deployments", func(action testcore.Action) (bool, runtime.Object, error) { - obj := action.(testcore.UpdateAction).GetObject().(*v1beta1.Deployment) + obj := action.(testcore.UpdateAction).GetObject().(*appsv1.Deployment) i := obj.Spec.Template.Spec.Containers[0].Image if i != image { t.Errorf("expected image = '%s', got '%s'", image, i) From 16cfe346a358d6edc66c248b76c62a22757d0a90 Mon Sep 17 00:00:00 2001 From: Jerome Brette Date: Thu, 19 Sep 2019 20:13:46 +0000 Subject: [PATCH 317/327] Kubernetes 1.16: Improve upgrade support Tested with versions: - kubernetes v1.16.0 - kubernetes v1.15.4 - kubernetes v1.14.7 - kubernetes v1.13.11 - kubernetes v1.12.10 Signed-off-by: Jerome Brette --- cmd/helm/init.go | 2 +- cmd/helm/installer/install.go | 69 ++++++++++++++++++++++++----------- 2 files changed, 48 insertions(+), 23 deletions(-) diff --git a/cmd/helm/init.go b/cmd/helm/init.go index f02700508..4dcb434f3 100644 --- a/cmd/helm/init.go +++ b/cmd/helm/init.go @@ -282,7 +282,7 @@ func (i *initCmd) run() error { if err := i.ping(i.opts.SelectImage()); err != nil { return err } - fmt.Fprintln(i.out, "\nTiller (the Helm server-side component) has been upgraded to the current version.") + fmt.Fprintln(i.out, "\nTiller (the Helm server-side component) has been updated to", i.opts.SelectImage(), ".") } else { debug("The error received while trying to init: %s", err) fmt.Fprintln(i.out, "Warning: Tiller is already installed in the cluster.\n"+ diff --git a/cmd/helm/installer/install.go b/cmd/helm/installer/install.go index 6cf0cb165..504b0183d 100644 --- a/cmd/helm/installer/install.go +++ b/cmd/helm/installer/install.go @@ -17,7 +17,6 @@ limitations under the License. package installer // import "k8s.io/helm/cmd/helm/installer" import ( - "errors" "fmt" "io/ioutil" "strings" @@ -34,7 +33,6 @@ import ( "k8s.io/client-go/kubernetes" appsv1client "k8s.io/client-go/kubernetes/typed/apps/v1" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" - "k8s.io/helm/pkg/version" "k8s.io/helm/pkg/chartutil" "k8s.io/helm/pkg/tiller/environment" @@ -64,11 +62,17 @@ func Install(client kubernetes.Interface, opts *Options) error { func Upgrade(client kubernetes.Interface, opts *Options) error { appsobj, err := client.AppsV1().Deployments(opts.Namespace).Get(deploymentName, metav1.GetOptions{}) if err == nil { + // Can happen in two cases: + // 1. helm init inserted an apps/v1 Deployment up front in Kubernetes + // 2. helm init inserted an extensions/v1beta1 Deployment against a K8s cluster already + // supporting apps/v1 Deployment. In such a case K8s is returning the apps/v1 object anyway.` + // (for the same reason "kubectl convert" is being deprecated) return upgradeAppsTillerDeployment(client, opts, appsobj) } extensionsobj, err := client.ExtensionsV1beta1().Deployments(opts.Namespace).Get(deploymentName, metav1.GetOptions{}) if err == nil { + // User performed helm init against older version of kubernetes (Previous to 1.9) return upgradeExtensionsTillerDeployment(client, opts, extensionsobj) } @@ -76,65 +80,86 @@ func Upgrade(client kubernetes.Interface, opts *Options) error { } func upgradeAppsTillerDeployment(client kubernetes.Interface, opts *Options, obj *appsv1.Deployment) error { - tillerImage := obj.Spec.Template.Spec.Containers[0].Image - if semverCompare(tillerImage) == -1 && !opts.ForceUpgrade { - return errors.New("current Tiller version is newer, use --force-upgrade to downgrade") + // Update the PodTemplateSpec section of the deployment + if err := updatePodTemplate(&obj.Spec.Template.Spec, opts); err != nil { + return err } - obj.Spec.Template.Spec.Containers[0].Image = opts.SelectImage() - obj.Spec.Template.Spec.Containers[0].ImagePullPolicy = opts.pullPolicy() - obj.Spec.Template.Spec.ServiceAccountName = opts.ServiceAccount + if _, err := client.AppsV1().Deployments(opts.Namespace).Update(obj); err != nil { return err } + // If the service does not exist that would mean we are upgrading from a Tiller version // that didn't deploy the service, so install it. _, err := client.CoreV1().Services(opts.Namespace).Get(serviceName, metav1.GetOptions{}) if apierrors.IsNotFound(err) { return createService(client.CoreV1(), opts.Namespace) } + return err } func upgradeExtensionsTillerDeployment(client kubernetes.Interface, opts *Options, obj *extensionsv1beta1.Deployment) error { - tillerImage := obj.Spec.Template.Spec.Containers[0].Image - if semverCompare(tillerImage) == -1 && !opts.ForceUpgrade { - return errors.New("current Tiller version is newer, use --force-upgrade to downgrade") + // Update the PodTemplateSpec section of the deployment + if err := updatePodTemplate(&obj.Spec.Template.Spec, opts); err != nil { + return err } - obj.Spec.Template.Spec.Containers[0].Image = opts.SelectImage() - obj.Spec.Template.Spec.Containers[0].ImagePullPolicy = opts.pullPolicy() - obj.Spec.Template.Spec.ServiceAccountName = opts.ServiceAccount + if _, err := client.ExtensionsV1beta1().Deployments(opts.Namespace).Update(obj); err != nil { return err } + // If the service does not exist that would mean we are upgrading from a Tiller version // that didn't deploy the service, so install it. _, err := client.CoreV1().Services(opts.Namespace).Get(serviceName, metav1.GetOptions{}) if apierrors.IsNotFound(err) { return createService(client.CoreV1(), opts.Namespace) } + return err } -// semverCompare returns whether the client's version is older, equal or newer than the given image's version. -func semverCompare(image string) int { - split := strings.Split(image, ":") - if len(split) < 2 { - // If we don't know the version, we consider the client version newer. - return 1 +func updatePodTemplate(podSpec *v1.PodSpec, opts *Options) error { + tillerImage := podSpec.Containers[0].Image + clientImage := opts.SelectImage() + + if semverCompare(tillerImage, clientImage) == -1 && !opts.ForceUpgrade { + return fmt.Errorf("current Tiller version %s is newer than client version %s, use --force-upgrade to downgrade", tillerImage, clientImage) } - tillerVersion, err := semver.NewVersion(split[1]) + podSpec.Containers[0].Image = clientImage + podSpec.Containers[0].ImagePullPolicy = opts.pullPolicy() + podSpec.ServiceAccountName = opts.ServiceAccount + + return nil +} + +// semverCompare returns whether the client's version is older, equal or newer than the given image's version. +func semverCompare(tillerImage, clientImage string) int { + tillerVersion, err := string2semver(tillerImage) if err != nil { // same thing with unparsable tiller versions (e.g. canary releases). return 1 } - clientVersion, err := semver.NewVersion(version.Version) + + // clientVersion, err := semver.NewVersion(currentVersion) + clientVersion, err := string2semver(clientImage) if err != nil { // aaaaaand same thing with unparsable helm versions (e.g. canary releases). return 1 } + return clientVersion.Compare(tillerVersion) } +func string2semver(image string) (*semver.Version, error) { + split := strings.Split(image, ":") + if len(split) < 2 { + // If we don't know the version, we consider the client version newer. + return nil, fmt.Errorf("no repository in image %s", image) + } + return semver.NewVersion(split[1]) +} + // createDeployment creates the Tiller Deployment resource. func createDeployment(client appsv1client.DeploymentsGetter, opts *Options) error { obj, err := generateDeployment(opts) From a52d6de9e17fc4dda4928f0029362e9be075aa24 Mon Sep 17 00:00:00 2001 From: Michael Schaefer Date: Fri, 12 Apr 2019 07:49:12 +0200 Subject: [PATCH 318/327] flag for output json or yaml added in install.go, repo_list.go, search.go, status.go and upgrade.go. unit test adapted for output json or yaml in install_test.go and search_test.go. docs modified for new flag helm_install.md, helm_repo_list.md, helm_search.md and helm_upgrade.md Signed-off-by: Michael Schaefer --- cmd/helm/install.go | 17 +++++++- cmd/helm/install_test.go | 16 +++++++ cmd/helm/repo_list.go | 84 +++++++++++++++++++++++++++++++------ cmd/helm/search.go | 72 +++++++++++++++++++++++++++---- cmd/helm/search_test.go | 26 ++++++++++++ cmd/helm/status.go | 83 +++++++++++++++++++++++------------- cmd/helm/upgrade.go | 16 +++++-- docs/helm/helm_install.md | 3 +- docs/helm/helm_repo_list.md | 5 ++- docs/helm/helm_search.md | 3 +- docs/helm/helm_status.md | 4 +- docs/helm/helm_upgrade.md | 3 +- 12 files changed, 272 insertions(+), 60 deletions(-) diff --git a/cmd/helm/install.go b/cmd/helm/install.go index 23f307564..a0fa6edfb 100644 --- a/cmd/helm/install.go +++ b/cmd/helm/install.go @@ -143,6 +143,7 @@ type installCmd struct { certFile string keyFile string caFile string + output string } type valueFiles []string @@ -226,6 +227,7 @@ func newInstallCmd(c helm.Interface, out io.Writer) *cobra.Command { f.BoolVar(&inst.depUp, "dep-up", false, "Run helm dependency update before installing the chart") f.BoolVar(&inst.subNotes, "render-subchart-notes", false, "Render subchart notes along with the parent") f.StringVar(&inst.description, "description", "", "Specify a description for the release") + f.StringVarP(&inst.output, "output", "o", "table", "Prints the output in the specified format (json|table|yaml)") // set defaults from environment settings.InitTLS(f) @@ -335,7 +337,10 @@ func (i *installCmd) run() error { if rel == nil { return nil } - i.printRelease(rel) + + if i.output == "table" { + i.printRelease(rel) + } // If this is a dry run, we can't display status. if i.dryRun { @@ -351,7 +356,15 @@ func (i *installCmd) run() error { if err != nil { return prettyError(err) } - PrintStatus(i.out, status) + + output, err := PrintStatusFormated(i.output, status) + + if err != nil { + return err + } + + fmt.Fprintf(i.out, output) + return nil } diff --git a/cmd/helm/install_test.go b/cmd/helm/install_test.go index 24a5abe68..e00c33a81 100644 --- a/cmd/helm/install_test.go +++ b/cmd/helm/install_test.go @@ -191,6 +191,22 @@ func TestInstall(t *testing.T) { flags: []string{"--name-template", "{{UPPER \"foobar\"}}"}, err: true, }, + // Install, using --output json + { + name: "install using output json", + args: []string{"testdata/testcharts/alpine"}, + flags: strings.Split("--name virgil --output json", " "), + resp: helm.ReleaseMock(&helm.MockReleaseOptions{Name: "virgil"}), + expected: regexp.QuoteMeta(`{"name":"virgil","info":{"status":{"code":1},"first_deployed":{"seconds":242085845},"last_deployed":{"seconds":242085845},"Description":"Release mock"},"namespace":"default"}`), + }, + // Install, using --output yaml + { + name: "install using output yaml", + args: []string{"testdata/testcharts/alpine"}, + flags: strings.Split("--name virgil --output yaml", " "), + resp: helm.ReleaseMock(&helm.MockReleaseOptions{Name: "virgil"}), + expected: "info:\n Description: Release mock\n first_deployed:\n seconds: 242085845\n last_deployed:\n seconds: 242085845\n status:\n code: 1\nname: virgil\nnamespace: default\n", + }, } runReleaseCases(t, tests, func(c *helm.FakeClient, out io.Writer) *cobra.Command { diff --git a/cmd/helm/repo_list.go b/cmd/helm/repo_list.go index 5983bca97..633bb7a75 100644 --- a/cmd/helm/repo_list.go +++ b/cmd/helm/repo_list.go @@ -17,10 +17,12 @@ limitations under the License. package main import ( - "errors" + "encoding/json" "fmt" "io" + "strings" + "github.com/ghodss/yaml" "github.com/gosuri/uitable" "github.com/spf13/cobra" @@ -29,8 +31,18 @@ import ( ) type repoListCmd struct { - out io.Writer - home helmpath.Home + out io.Writer + home helmpath.Home + output string +} + +type repositoryElement struct { + Name string + URL string +} + +type repositories struct { + Repositories []*repositoryElement } func newRepoListCmd(out io.Writer) *cobra.Command { @@ -45,22 +57,70 @@ func newRepoListCmd(out io.Writer) *cobra.Command { }, } + f := cmd.Flags() + f.StringVarP(&list.output, "output", "o", "table", "Prints the output in the specified format (json|table|yaml)") return cmd } func (a *repoListCmd) run() error { - f, err := repo.LoadRepositoriesFile(a.home.RepositoryFile()) + repoFile, err := repo.LoadRepositoriesFile(a.home.RepositoryFile()) if err != nil { return err } - if len(f.Repositories) == 0 { - return errors.New("no repositories to show") - } - table := uitable.New() - table.AddRow("NAME", "URL") - for _, re := range f.Repositories { - table.AddRow(re.Name, re.URL) + + output, err := formatRepoListResult(a.output, repoFile) + + if err != nil { + return err } - fmt.Fprintln(a.out, table) + fmt.Fprintln(a.out, output) + return nil } + +func formatRepoListResult(format string, repoFile *repo.RepoFile) (string, error) { + var output string + var err error + + if len(repoFile.Repositories) == 0 { + err = fmt.Errorf("no repositories to show") + return output, err + } + + switch format { + case "table": + table := uitable.New() + table.AddRow("NAME", "URL") + for _, re := range repoFile.Repositories { + table.AddRow(re.Name, re.URL) + } + output = table.String() + + case "json": + output, err = printFormatedRepoFile(format, repoFile, json.Marshal) + + case "yaml": + output, err = printFormatedRepoFile(format, repoFile, yaml.Marshal) + } + + return output, err +} + +func printFormatedRepoFile(format string, repoFile *repo.RepoFile, obj func(v interface{}) ([]byte, error)) (string, error) { + var output string + var err error + var repolist repositories + + for _, re := range repoFile.Repositories { + repolist.Repositories = append(repolist.Repositories, &repositoryElement{Name: re.Name, URL: re.URL}) + } + + o, e := obj(repolist) + if e != nil { + err = fmt.Errorf("Failed to Marshal %s output: %s", strings.ToUpper(format), e) + } else { + output = string(o) + } + + return output, err +} diff --git a/cmd/helm/search.go b/cmd/helm/search.go index 99ffafbd3..92e842823 100644 --- a/cmd/helm/search.go +++ b/cmd/helm/search.go @@ -17,11 +17,13 @@ limitations under the License. package main import ( + "encoding/json" "fmt" "io" "strings" "github.com/Masterminds/semver" + "github.com/ghodss/yaml" "github.com/gosuri/uitable" "github.com/spf13/cobra" @@ -48,6 +50,18 @@ type searchCmd struct { regexp bool version string colWidth uint + output string +} + +type chartElement struct { + Name string + Version string + AppVersion string + Description string +} + +type searchResult struct { + Charts []*chartElement } func newSearchCmd(out io.Writer) *cobra.Command { @@ -68,6 +82,7 @@ func newSearchCmd(out io.Writer) *cobra.Command { f.BoolVarP(&sc.versions, "versions", "l", false, "Show the long listing, with each version of each chart on its own line") f.StringVarP(&sc.version, "version", "v", "", "Search using semantic versioning constraints") f.UintVar(&sc.colWidth, "col-width", 60, "Specifies the max column width of output") + f.StringVarP(&sc.output, "output", "o", "table", "Prints the output in the specified format (json|table|yaml)") return cmd } @@ -95,7 +110,12 @@ func (s *searchCmd) run(args []string) error { return err } - fmt.Fprintln(s.out, s.formatSearchResults(data, s.colWidth)) + o, err := s.formatSearchResults(s.output, data, s.colWidth) + if err != nil { + return err + } + + fmt.Fprintln(s.out, o) return nil } @@ -128,17 +148,53 @@ func (s *searchCmd) applyConstraint(res []*search.Result) ([]*search.Result, err return data, nil } -func (s *searchCmd) formatSearchResults(res []*search.Result, colWidth uint) string { +func (s *searchCmd) formatSearchResults(format string, res []*search.Result, colWidth uint) (string, error) { + var output string + var err error + + switch format { + case "table": + if len(res) == 0 { + return "No results found", nil + } + table := uitable.New() + table.MaxColWidth = colWidth + table.AddRow("NAME", "CHART VERSION", "APP VERSION", "DESCRIPTION") + for _, r := range res { + table.AddRow(r.Name, r.Chart.Version, r.Chart.AppVersion, r.Chart.Description) + } + output = table.String() + + case "json": + output, err = s.printFormated(format, res, json.Marshal) + + case "yaml": + output, err = s.printFormated(format, res, yaml.Marshal) + } + + return output, err +} + +func (s *searchCmd) printFormated(format string, res []*search.Result, obj func(v interface{}) ([]byte, error)) (string, error) { + var sResult searchResult + var output string + var err error + if len(res) == 0 { - return "No results found" + return "[]", nil } - table := uitable.New() - table.MaxColWidth = colWidth - table.AddRow("NAME", "CHART VERSION", "APP VERSION", "DESCRIPTION") + for _, r := range res { - table.AddRow(r.Name, r.Chart.Version, r.Chart.AppVersion, r.Chart.Description) + sResult.Charts = append(sResult.Charts, &chartElement{r.Name, r.Chart.Version, r.Chart.AppVersion, r.Chart.Description}) + } + + o, e := obj(sResult) + if e != nil { + err = fmt.Errorf("Failed to Marshal %s output: %s", strings.ToUpper(format), e) + } else { + output = string(o) } - return table.String() + return output, err } func (s *searchCmd) buildIndex() (*search.Index, error) { diff --git a/cmd/helm/search_test.go b/cmd/helm/search_test.go index 233f94572..35a72260e 100644 --- a/cmd/helm/search_test.go +++ b/cmd/helm/search_test.go @@ -18,6 +18,8 @@ package main import ( "io" + "regexp" + "strings" "testing" "github.com/spf13/cobra" @@ -84,6 +86,30 @@ func TestSearchCmd(t *testing.T) { flags: []string{"--regexp"}, err: true, }, + { + name: "search for 'maria', expect one match output json", + args: []string{"maria"}, + flags: strings.Split("--output json", " "), + expected: regexp.QuoteMeta(`{"Charts":[{"Name":"testing/mariadb","Version":"0.3.0","AppVersion":"","Description":"Chart for MariaDB"}]}`), + }, + { + name: "search for 'alpine', expect two matches output json", + args: []string{"alpine"}, + flags: strings.Split("--output json", " "), + expected: regexp.QuoteMeta(`{"Charts":[{"Name":"testing/alpine","Version":"0.2.0","AppVersion":"2.3.4","Description":"Deploy a basic Alpine Linux pod"}]}`), + }, + { + name: "search for 'maria', expect one match output yaml", + args: []string{"maria"}, + flags: strings.Split("--output yaml", " "), + expected: "Charts:\n- AppVersion: \"\"\n Description: Chart for MariaDB\n Name: testing/mariadb\n Version: 0.3.0\n\n", + }, + { + name: "search for 'alpine', expect two matches output yaml", + args: []string{"alpine"}, + flags: strings.Split("--output yaml", " "), + expected: "Charts:\n- AppVersion: 2.3.4\n Description: Deploy a basic Alpine Linux pod\n Name: testing/alpine\n Version: 0.2.0\n\n", + }, } cleanup := resetEnv() diff --git a/cmd/helm/status.go b/cmd/helm/status.go index dac91916b..65025c8cc 100644 --- a/cmd/helm/status.go +++ b/cmd/helm/status.go @@ -21,6 +21,7 @@ import ( "fmt" "io" "regexp" + "strings" "text/tabwriter" "github.com/ghodss/yaml" @@ -79,7 +80,7 @@ func newStatusCmd(client helm.Interface, out io.Writer) *cobra.Command { f := cmd.Flags() settings.AddFlagsTLS(f) f.Int32Var(&status.version, "revision", 0, "If set, display the status of the named release with revision") - f.StringVarP(&status.outfmt, "output", "o", "", "Output the status in the specified format (json or yaml)") + f.StringVarP(&status.outfmt, "output", "o", "table", "Prints the output in the specified format (json|table|yaml)") // set defaults from environment settings.InitTLS(f) @@ -93,56 +94,82 @@ func (s *statusCmd) run() error { return prettyError(err) } - switch s.outfmt { - case "": - PrintStatus(s.out, res) - return nil + output, err := PrintStatusFormated(s.outfmt, res) + + if err != nil { + return err + } + + fmt.Fprintf(s.out, output) + + return nil +} + +// PrintStatusFormated prints out the status of a release. Shared because also used by +// install / upgrade +func PrintStatusFormated(format string, res *services.GetReleaseStatusResponse) (string, error) { + var output string + var err error + + switch format { + case "table": + output = printStatus(res) + case "json": - data, err := json.Marshal(res) - if err != nil { - return fmt.Errorf("Failed to Marshal JSON output: %s", err) - } - s.out.Write(data) - return nil + output, err = printFormatedReleaseStatus(format, res, json.Marshal) + case "yaml": - data, err := yaml.Marshal(res) - if err != nil { - return fmt.Errorf("Failed to Marshal YAML output: %s", err) - } - s.out.Write(data) - return nil + output, err = printFormatedReleaseStatus(format, res, yaml.Marshal) + + default: + err = fmt.Errorf("Unknown output format %q", err) } - return fmt.Errorf("Unknown output format %q", s.outfmt) + return output, err } -// PrintStatus prints out the status of a release. Shared because also used by -// install / upgrade -func PrintStatus(out io.Writer, res *services.GetReleaseStatusResponse) { +func printFormatedReleaseStatus(format string, res *services.GetReleaseStatusResponse, obj func(v interface{}) ([]byte, error)) (string, error) { + var output string + var err error + + o, err := obj(res) + if err != nil { + return "", fmt.Errorf("Failed to Marshal %s output: %s", strings.ToUpper(format), err) + } + output = string(o) + + return output, err +} + +func printStatus(res *services.GetReleaseStatusResponse) string { + var out strings.Builder + if res.Info.LastDeployed != nil { - fmt.Fprintf(out, "LAST DEPLOYED: %s\n", timeconv.String(res.Info.LastDeployed)) + fmt.Fprintf(&out, "LAST DEPLOYED: %s\n", timeconv.String(res.Info.LastDeployed)) } - fmt.Fprintf(out, "NAMESPACE: %s\n", res.Namespace) - fmt.Fprintf(out, "STATUS: %s\n", res.Info.Status.Code) - fmt.Fprintf(out, "\n") + fmt.Fprintf(&out, "NAMESPACE: %s\n", res.Namespace) + fmt.Fprintf(&out, "STATUS: %s\n", res.Info.Status.Code) + fmt.Fprintf(&out, "\n") if len(res.Info.Status.Resources) > 0 { re := regexp.MustCompile(" +") - w := tabwriter.NewWriter(out, 0, 0, 2, ' ', tabwriter.TabIndent) + w := tabwriter.NewWriter(&out, 0, 0, 2, ' ', tabwriter.TabIndent) fmt.Fprintf(w, "RESOURCES:\n%s\n", re.ReplaceAllString(res.Info.Status.Resources, "\t")) w.Flush() } if res.Info.Status.LastTestSuiteRun != nil { lastRun := res.Info.Status.LastTestSuiteRun - fmt.Fprintf(out, "TEST SUITE:\n%s\n%s\n\n%s\n", + fmt.Fprintf(&out, "TEST SUITE:\n%s\n%s\n\n%s\n", fmt.Sprintf("Last Started: %s", timeconv.String(lastRun.StartedAt)), fmt.Sprintf("Last Completed: %s", timeconv.String(lastRun.CompletedAt)), formatTestResults(lastRun.Results)) } if len(res.Info.Status.Notes) > 0 { - fmt.Fprintf(out, "NOTES:\n%s\n", res.Info.Status.Notes) + fmt.Fprintf(&out, "NOTES:\n%s\n", res.Info.Status.Notes) } + + return out.String() } func formatTestResults(results []*release.TestRun) string { diff --git a/cmd/helm/upgrade.go b/cmd/helm/upgrade.go index aa4bebeef..5c5af66cc 100644 --- a/cmd/helm/upgrade.go +++ b/cmd/helm/upgrade.go @@ -117,6 +117,7 @@ type upgradeCmd struct { certFile string keyFile string caFile string + output string } func newUpgradeCmd(client helm.Interface, out io.Writer) *cobra.Command { @@ -181,6 +182,7 @@ func newUpgradeCmd(client helm.Interface, out io.Writer) *cobra.Command { f.BoolVar(&upgrade.subNotes, "render-subchart-notes", false, "Render subchart notes along with parent") f.StringVar(&upgrade.description, "description", "", "Specify the description to use for the upgrade, rather than the default") f.BoolVar(&upgrade.cleanupOnFail, "cleanup-on-fail", false, "Allow deletion of new resources created in this upgrade when upgrade failed") + f.StringVarP(&upgrade.output, "output", "o", "table", "Prints the output in the specified format (json|table|yaml)") f.MarkDeprecated("disable-hooks", "Use --no-hooks instead") @@ -307,14 +309,22 @@ func (u *upgradeCmd) run() error { printRelease(u.out, resp.Release) } - fmt.Fprintf(u.out, "Release %q has been upgraded.\n", u.release) - + if u.output == "table" { + fmt.Fprintf(u.out, "Release %q has been upgraded.\n", u.release) + } // Print the status like status command does status, err := u.client.ReleaseStatus(u.release) if err != nil { return prettyError(err) } - PrintStatus(u.out, status) + + output, err := PrintStatusFormated(u.output, status) + + if err != nil { + return err + } + + fmt.Fprintf(u.out, output) return nil } diff --git a/docs/helm/helm_install.md b/docs/helm/helm_install.md index d988dfcdd..dc0591f6a 100644 --- a/docs/helm/helm_install.md +++ b/docs/helm/helm_install.md @@ -93,6 +93,7 @@ helm install [CHART] [flags] --namespace string Namespace to install the release into. Defaults to the current kube config namespace. --no-crd-hook Prevent CRD hooks from running, but run other hooks --no-hooks Prevent hooks from running during install + -o, --output string Prints the output in the specified format (json|table|yaml) (default "table") --password string Chart repository password where to locate the requested chart --render-subchart-notes Render subchart notes along with the parent --replace Re-use the given name, even if that name is already used. This is unsafe in production @@ -130,4 +131,4 @@ helm install [CHART] [flags] * [helm](helm.md) - The Helm package manager for Kubernetes. -###### Auto generated by spf13/cobra on 16-May-2019 +###### Auto generated by spf13/cobra on 24-Sep-2019 diff --git a/docs/helm/helm_repo_list.md b/docs/helm/helm_repo_list.md index 9a544a6ba..5f13c8c2d 100644 --- a/docs/helm/helm_repo_list.md +++ b/docs/helm/helm_repo_list.md @@ -13,7 +13,8 @@ helm repo list [flags] ### Options ``` - -h, --help help for list + -h, --help help for list + -o, --output string Prints the output in the specified format (json|table|yaml) (default "table") ``` ### Options inherited from parent commands @@ -32,4 +33,4 @@ helm repo list [flags] * [helm repo](helm_repo.md) - Add, list, remove, update, and index chart repositories -###### Auto generated by spf13/cobra on 16-May-2019 +###### Auto generated by spf13/cobra on 24-Sep-2019 diff --git a/docs/helm/helm_search.md b/docs/helm/helm_search.md index b1a89c4f9..e040b738f 100644 --- a/docs/helm/helm_search.md +++ b/docs/helm/helm_search.md @@ -20,6 +20,7 @@ helm search [keyword] [flags] ``` --col-width uint Specifies the max column width of output (default 60) -h, --help help for search + -o, --output string Prints the output in the specified format (json|table|yaml) (default "table") -r, --regexp Use regular expressions for searching -v, --version string Search using semantic versioning constraints -l, --versions Show the long listing, with each version of each chart on its own line @@ -41,4 +42,4 @@ helm search [keyword] [flags] * [helm](helm.md) - The Helm package manager for Kubernetes. -###### Auto generated by spf13/cobra on 16-May-2019 +###### Auto generated by spf13/cobra on 24-Sep-2019 diff --git a/docs/helm/helm_status.md b/docs/helm/helm_status.md index 38e774b8f..2c75ce21a 100644 --- a/docs/helm/helm_status.md +++ b/docs/helm/helm_status.md @@ -23,7 +23,7 @@ helm status [flags] RELEASE_NAME ``` -h, --help help for status - -o, --output string Output the status in the specified format (json or yaml) + -o, --output string Prints the output in the specified format (json|table|yaml) (default "table") --revision int32 If set, display the status of the named release with revision --tls Enable TLS for request --tls-ca-cert string Path to TLS CA certificate file (default "$HELM_HOME/ca.pem") @@ -49,4 +49,4 @@ helm status [flags] RELEASE_NAME * [helm](helm.md) - The Helm package manager for Kubernetes. -###### Auto generated by spf13/cobra on 16-May-2019 +###### Auto generated by spf13/cobra on 6-Sep-2019 diff --git a/docs/helm/helm_upgrade.md b/docs/helm/helm_upgrade.md index 0aa52565b..effb505f9 100644 --- a/docs/helm/helm_upgrade.md +++ b/docs/helm/helm_upgrade.md @@ -79,6 +79,7 @@ helm upgrade [RELEASE] [CHART] [flags] --keyring string Path to the keyring that contains public signing keys (default "~/.gnupg/pubring.gpg") --namespace string Namespace to install the release into (only used if --install is set). Defaults to the current kube config namespace --no-hooks Disable pre/post upgrade hooks + -o, --output string Prints the output in the specified format (json|table|yaml) (default "table") --password string Chart repository password where to locate the requested chart --recreate-pods Performs pods restart for the resource if applicable --render-subchart-notes Render subchart notes along with parent @@ -118,4 +119,4 @@ helm upgrade [RELEASE] [CHART] [flags] * [helm](helm.md) - The Helm package manager for Kubernetes. -###### Auto generated by spf13/cobra on 16-May-2019 +###### Auto generated by spf13/cobra on 24-Sep-2019 From 3e5b181a300bcfbdf2abff990904e4f5f3e8fc35 Mon Sep 17 00:00:00 2001 From: Taylor Thomas Date: Fri, 6 Sep 2019 15:34:24 -0600 Subject: [PATCH 319/327] ref(cmd): Refactors output flag to reuse more code This cuts down on the number of duplicate json/yaml marshaling blocks and simplifies how to add printing to a function by using simple "container" structs that know how to massage the data Signed-off-by: Taylor Thomas --- cmd/helm/install.go | 14 +---- cmd/helm/printer.go | 78 ++++++++++++++++++++++++ cmd/helm/repo_list.go | 82 ++++++++++--------------- cmd/helm/search.go | 116 ++++++++++++++++-------------------- cmd/helm/search_test.go | 9 ++- cmd/helm/status.go | 78 ++++++++---------------- cmd/helm/upgrade.go | 14 +---- docs/helm/helm_install.md | 2 +- docs/helm/helm_repo_list.md | 2 +- docs/helm/helm_search.md | 2 +- docs/helm/helm_status.md | 2 +- docs/helm/helm_upgrade.md | 2 +- 12 files changed, 199 insertions(+), 202 deletions(-) diff --git a/cmd/helm/install.go b/cmd/helm/install.go index a0fa6edfb..117c7ba5b 100644 --- a/cmd/helm/install.go +++ b/cmd/helm/install.go @@ -227,7 +227,7 @@ func newInstallCmd(c helm.Interface, out io.Writer) *cobra.Command { f.BoolVar(&inst.depUp, "dep-up", false, "Run helm dependency update before installing the chart") f.BoolVar(&inst.subNotes, "render-subchart-notes", false, "Render subchart notes along with the parent") f.StringVar(&inst.description, "description", "", "Specify a description for the release") - f.StringVarP(&inst.output, "output", "o", "table", "Prints the output in the specified format (json|table|yaml)") + bindOutputFlag(cmd, &inst.output) // set defaults from environment settings.InitTLS(f) @@ -338,7 +338,7 @@ func (i *installCmd) run() error { return nil } - if i.output == "table" { + if outputFormat(i.output) == outputTable { i.printRelease(rel) } @@ -357,15 +357,7 @@ func (i *installCmd) run() error { return prettyError(err) } - output, err := PrintStatusFormated(i.output, status) - - if err != nil { - return err - } - - fmt.Fprintf(i.out, output) - - return nil + return write(i.out, &statusWriter{status}, outputFormat(i.output)) } // Merges source and destination map, preferring values from the source map diff --git a/cmd/helm/printer.go b/cmd/helm/printer.go index 2f42bdab0..1c89c04ef 100644 --- a/cmd/helm/printer.go +++ b/cmd/helm/printer.go @@ -17,16 +17,31 @@ limitations under the License. package main import ( + "encoding/json" "fmt" "io" "text/template" "time" + "github.com/ghodss/yaml" + "github.com/gosuri/uitable" + "github.com/spf13/cobra" + "k8s.io/helm/pkg/chartutil" "k8s.io/helm/pkg/proto/hapi/release" "k8s.io/helm/pkg/timeconv" ) +type outputFormat string + +const ( + outputFlag = "output" + + outputTable outputFormat = "table" + outputJSON outputFormat = "json" + outputYAML outputFormat = "yaml" +) + var printReleaseTemplate = `REVISION: {{.Release.Version}} RELEASED: {{.ReleaseDate}} CHART: {{.Release.Chart.Metadata.Name}}-{{.Release.Chart.Metadata.Version}} @@ -80,3 +95,66 @@ func debug(format string, args ...interface{}) { fmt.Printf(format, args...) } } + +// bindOutputFlag will add the output flag to the given command and bind the +// value to the given string pointer +func bindOutputFlag(cmd *cobra.Command, varRef *string) { + cmd.Flags().StringVarP(varRef, outputFlag, "o", string(outputTable), fmt.Sprintf("Prints the output in the specified format. Allowed values: %s, %s, %s", outputTable, outputJSON, outputYAML)) +} + +type outputWriter interface { + WriteTable(out io.Writer) error + WriteJSON(out io.Writer) error + WriteYAML(out io.Writer) error +} + +func write(out io.Writer, ow outputWriter, format outputFormat) error { + switch format { + case outputTable: + return ow.WriteTable(out) + case outputJSON: + return ow.WriteJSON(out) + case outputYAML: + return ow.WriteYAML(out) + } + return fmt.Errorf("unsupported format %s", format) +} + +// encodeJSON is a helper function to decorate any error message with a bit more +// context and avoid writing the same code over and over for printers +func encodeJSON(out io.Writer, obj interface{}) error { + enc := json.NewEncoder(out) + err := enc.Encode(obj) + if err != nil { + return fmt.Errorf("unable to write JSON output: %s", err) + } + return nil +} + +// encodeYAML is a helper function to decorate any error message with a bit more +// context and avoid writing the same code over and over for printers +func encodeYAML(out io.Writer, obj interface{}) error { + raw, err := yaml.Marshal(obj) + if err != nil { + return fmt.Errorf("unable to write YAML output: %s", err) + } + // Append a newline, as with a JSON encoder + raw = append(raw, []byte("\n")...) + _, err = out.Write(raw) + if err != nil { + return fmt.Errorf("unable to write YAML output: %s", err) + } + return nil +} + +// encodeTable is a helper function to decorate any error message with a bit +// more context and avoid writing the same code over and over for printers +func encodeTable(out io.Writer, table *uitable.Table) error { + raw := table.Bytes() + raw = append(raw, []byte("\n")...) + _, err := out.Write(raw) + if err != nil { + return fmt.Errorf("unable to write table output: %s", err) + } + return nil +} diff --git a/cmd/helm/repo_list.go b/cmd/helm/repo_list.go index 633bb7a75..a65b81908 100644 --- a/cmd/helm/repo_list.go +++ b/cmd/helm/repo_list.go @@ -17,12 +17,8 @@ limitations under the License. package main import ( - "encoding/json" - "fmt" "io" - "strings" - "github.com/ghodss/yaml" "github.com/gosuri/uitable" "github.com/spf13/cobra" @@ -41,10 +37,6 @@ type repositoryElement struct { URL string } -type repositories struct { - Repositories []*repositoryElement -} - func newRepoListCmd(out io.Writer) *cobra.Command { list := &repoListCmd{out: out} @@ -57,8 +49,7 @@ func newRepoListCmd(out io.Writer) *cobra.Command { }, } - f := cmd.Flags() - f.StringVarP(&list.output, "output", "o", "table", "Prints the output in the specified format (json|table|yaml)") + bindOutputFlag(cmd, &list.output) return cmd } @@ -68,59 +59,46 @@ func (a *repoListCmd) run() error { return err } - output, err := formatRepoListResult(a.output, repoFile) - - if err != nil { - return err - } - fmt.Fprintln(a.out, output) - - return nil + return write(a.out, &repoListWriter{repoFile.Repositories}, outputFormat(a.output)) } -func formatRepoListResult(format string, repoFile *repo.RepoFile) (string, error) { - var output string - var err error +//////////// Printer implementation below here +type repoListWriter struct { + repos []*repo.Entry +} - if len(repoFile.Repositories) == 0 { - err = fmt.Errorf("no repositories to show") - return output, err +func (r *repoListWriter) WriteTable(out io.Writer) error { + table := uitable.New() + table.AddRow("NAME", "URL") + for _, re := range r.repos { + table.AddRow(re.Name, re.URL) } + return encodeTable(out, table) +} - switch format { - case "table": - table := uitable.New() - table.AddRow("NAME", "URL") - for _, re := range repoFile.Repositories { - table.AddRow(re.Name, re.URL) - } - output = table.String() - - case "json": - output, err = printFormatedRepoFile(format, repoFile, json.Marshal) - - case "yaml": - output, err = printFormatedRepoFile(format, repoFile, yaml.Marshal) - } +func (r *repoListWriter) WriteJSON(out io.Writer) error { + return r.encodeByFormat(out, outputJSON) +} - return output, err +func (r *repoListWriter) WriteYAML(out io.Writer) error { + return r.encodeByFormat(out, outputYAML) } -func printFormatedRepoFile(format string, repoFile *repo.RepoFile, obj func(v interface{}) ([]byte, error)) (string, error) { - var output string - var err error - var repolist repositories +func (r *repoListWriter) encodeByFormat(out io.Writer, format outputFormat) error { + var repolist []repositoryElement - for _, re := range repoFile.Repositories { - repolist.Repositories = append(repolist.Repositories, &repositoryElement{Name: re.Name, URL: re.URL}) + for _, re := range r.repos { + repolist = append(repolist, repositoryElement{Name: re.Name, URL: re.URL}) } - o, e := obj(repolist) - if e != nil { - err = fmt.Errorf("Failed to Marshal %s output: %s", strings.ToUpper(format), e) - } else { - output = string(o) + switch format { + case outputJSON: + return encodeJSON(out, repolist) + case outputYAML: + return encodeYAML(out, repolist) } - return output, err + // Because this is a non-exported function and only called internally by + // WriteJSON and WriteYAML, we shouldn't get invalid types + return nil } diff --git a/cmd/helm/search.go b/cmd/helm/search.go index 92e842823..b55997ec8 100644 --- a/cmd/helm/search.go +++ b/cmd/helm/search.go @@ -17,13 +17,11 @@ limitations under the License. package main import ( - "encoding/json" "fmt" "io" "strings" "github.com/Masterminds/semver" - "github.com/ghodss/yaml" "github.com/gosuri/uitable" "github.com/spf13/cobra" @@ -60,10 +58,6 @@ type chartElement struct { Description string } -type searchResult struct { - Charts []*chartElement -} - func newSearchCmd(out io.Writer) *cobra.Command { sc := &searchCmd{out: out} @@ -82,7 +76,7 @@ func newSearchCmd(out io.Writer) *cobra.Command { f.BoolVarP(&sc.versions, "versions", "l", false, "Show the long listing, with each version of each chart on its own line") f.StringVarP(&sc.version, "version", "v", "", "Search using semantic versioning constraints") f.UintVar(&sc.colWidth, "col-width", 60, "Specifies the max column width of output") - f.StringVarP(&sc.output, "output", "o", "table", "Prints the output in the specified format (json|table|yaml)") + bindOutputFlag(cmd, &sc.output) return cmd } @@ -110,14 +104,7 @@ func (s *searchCmd) run(args []string) error { return err } - o, err := s.formatSearchResults(s.output, data, s.colWidth) - if err != nil { - return err - } - - fmt.Fprintln(s.out, o) - - return nil + return write(s.out, &searchWriter{data, s.colWidth}, outputFormat(s.output)) } func (s *searchCmd) applyConstraint(res []*search.Result) ([]*search.Result, error) { @@ -148,55 +135,6 @@ func (s *searchCmd) applyConstraint(res []*search.Result) ([]*search.Result, err return data, nil } -func (s *searchCmd) formatSearchResults(format string, res []*search.Result, colWidth uint) (string, error) { - var output string - var err error - - switch format { - case "table": - if len(res) == 0 { - return "No results found", nil - } - table := uitable.New() - table.MaxColWidth = colWidth - table.AddRow("NAME", "CHART VERSION", "APP VERSION", "DESCRIPTION") - for _, r := range res { - table.AddRow(r.Name, r.Chart.Version, r.Chart.AppVersion, r.Chart.Description) - } - output = table.String() - - case "json": - output, err = s.printFormated(format, res, json.Marshal) - - case "yaml": - output, err = s.printFormated(format, res, yaml.Marshal) - } - - return output, err -} - -func (s *searchCmd) printFormated(format string, res []*search.Result, obj func(v interface{}) ([]byte, error)) (string, error) { - var sResult searchResult - var output string - var err error - - if len(res) == 0 { - return "[]", nil - } - - for _, r := range res { - sResult.Charts = append(sResult.Charts, &chartElement{r.Name, r.Chart.Version, r.Chart.AppVersion, r.Chart.Description}) - } - - o, e := obj(sResult) - if e != nil { - err = fmt.Errorf("Failed to Marshal %s output: %s", strings.ToUpper(format), e) - } else { - output = string(o) - } - return output, err -} - func (s *searchCmd) buildIndex() (*search.Index, error) { // Load the repositories.yaml rf, err := repo.LoadRepositoriesFile(s.helmhome.RepositoryFile()) @@ -218,3 +156,53 @@ func (s *searchCmd) buildIndex() (*search.Index, error) { } return i, nil } + +//////////// Printer implementation below here +type searchWriter struct { + results []*search.Result + columnWidth uint +} + +func (r *searchWriter) WriteTable(out io.Writer) error { + if len(r.results) == 0 { + _, err := out.Write([]byte("No results found\n")) + if err != nil { + return fmt.Errorf("unable to write results: %s", err) + } + return nil + } + table := uitable.New() + table.MaxColWidth = r.columnWidth + table.AddRow("NAME", "CHART VERSION", "APP VERSION", "DESCRIPTION") + for _, r := range r.results { + table.AddRow(r.Name, r.Chart.Version, r.Chart.AppVersion, r.Chart.Description) + } + return encodeTable(out, table) +} + +func (r *searchWriter) WriteJSON(out io.Writer) error { + return r.encodeByFormat(out, outputJSON) +} + +func (r *searchWriter) WriteYAML(out io.Writer) error { + return r.encodeByFormat(out, outputYAML) +} + +func (r *searchWriter) encodeByFormat(out io.Writer, format outputFormat) error { + var chartList []chartElement + + for _, r := range r.results { + chartList = append(chartList, chartElement{r.Name, r.Chart.Version, r.Chart.AppVersion, r.Chart.Description}) + } + + switch format { + case outputJSON: + return encodeJSON(out, chartList) + case outputYAML: + return encodeYAML(out, chartList) + } + + // Because this is a non-exported function and only called internally by + // WriteJSON and WriteYAML, we shouldn't get invalid types + return nil +} diff --git a/cmd/helm/search_test.go b/cmd/helm/search_test.go index 35a72260e..12824407c 100644 --- a/cmd/helm/search_test.go +++ b/cmd/helm/search_test.go @@ -18,7 +18,6 @@ package main import ( "io" - "regexp" "strings" "testing" @@ -90,25 +89,25 @@ func TestSearchCmd(t *testing.T) { name: "search for 'maria', expect one match output json", args: []string{"maria"}, flags: strings.Split("--output json", " "), - expected: regexp.QuoteMeta(`{"Charts":[{"Name":"testing/mariadb","Version":"0.3.0","AppVersion":"","Description":"Chart for MariaDB"}]}`), + expected: `[{"Name":"testing/mariadb","Version":"0.3.0","Appversion":"","Description":"Chart for MariaDB"}]`, }, { name: "search for 'alpine', expect two matches output json", args: []string{"alpine"}, flags: strings.Split("--output json", " "), - expected: regexp.QuoteMeta(`{"Charts":[{"Name":"testing/alpine","Version":"0.2.0","AppVersion":"2.3.4","Description":"Deploy a basic Alpine Linux pod"}]}`), + expected: `[{"Name":"testing/alpine","Version":"0.2.0","Appversion":"2.3.4","Description":"Deploy a basic Alpine Linux pod"}]`, }, { name: "search for 'maria', expect one match output yaml", args: []string{"maria"}, flags: strings.Split("--output yaml", " "), - expected: "Charts:\n- AppVersion: \"\"\n Description: Chart for MariaDB\n Name: testing/mariadb\n Version: 0.3.0\n\n", + expected: "- AppVersion: \"\"\n Description: Chart for MariaDB\n Name: testing/mariadb\n Version: 0.3.0\n\n", }, { name: "search for 'alpine', expect two matches output yaml", args: []string{"alpine"}, flags: strings.Split("--output yaml", " "), - expected: "Charts:\n- AppVersion: 2.3.4\n Description: Deploy a basic Alpine Linux pod\n Name: testing/alpine\n Version: 0.2.0\n\n", + expected: "- AppVersion: 2.3.4\n Description: Deploy a basic Alpine Linux pod\n Name: testing/alpine\n Version: 0.2.0\n\n", }, } diff --git a/cmd/helm/status.go b/cmd/helm/status.go index 65025c8cc..23120980a 100644 --- a/cmd/helm/status.go +++ b/cmd/helm/status.go @@ -17,14 +17,11 @@ limitations under the License. package main import ( - "encoding/json" "fmt" "io" "regexp" - "strings" "text/tabwriter" - "github.com/ghodss/yaml" "github.com/gosuri/uitable" "github.com/gosuri/uitable/util/strutil" "github.com/spf13/cobra" @@ -80,7 +77,7 @@ func newStatusCmd(client helm.Interface, out io.Writer) *cobra.Command { f := cmd.Flags() settings.AddFlagsTLS(f) f.Int32Var(&status.version, "revision", 0, "If set, display the status of the named release with revision") - f.StringVarP(&status.outfmt, "output", "o", "table", "Prints the output in the specified format (json|table|yaml)") + bindOutputFlag(cmd, &status.outfmt) // set defaults from environment settings.InitTLS(f) @@ -94,82 +91,55 @@ func (s *statusCmd) run() error { return prettyError(err) } - output, err := PrintStatusFormated(s.outfmt, res) - - if err != nil { - return err - } + return write(s.out, &statusWriter{res}, outputFormat(s.outfmt)) +} - fmt.Fprintf(s.out, output) +type statusWriter struct { + status *services.GetReleaseStatusResponse +} +func (s *statusWriter) WriteTable(out io.Writer) error { + PrintStatus(out, s.status) + // There is no error handling here due to backwards compatibility with + // PrintStatus return nil } -// PrintStatusFormated prints out the status of a release. Shared because also used by -// install / upgrade -func PrintStatusFormated(format string, res *services.GetReleaseStatusResponse) (string, error) { - var output string - var err error - - switch format { - case "table": - output = printStatus(res) - - case "json": - output, err = printFormatedReleaseStatus(format, res, json.Marshal) - - case "yaml": - output, err = printFormatedReleaseStatus(format, res, yaml.Marshal) - - default: - err = fmt.Errorf("Unknown output format %q", err) - } - - return output, err +func (s *statusWriter) WriteJSON(out io.Writer) error { + return encodeJSON(out, s.status) } -func printFormatedReleaseStatus(format string, res *services.GetReleaseStatusResponse, obj func(v interface{}) ([]byte, error)) (string, error) { - var output string - var err error - - o, err := obj(res) - if err != nil { - return "", fmt.Errorf("Failed to Marshal %s output: %s", strings.ToUpper(format), err) - } - output = string(o) - - return output, err +func (s *statusWriter) WriteYAML(out io.Writer) error { + return encodeYAML(out, s.status) } -func printStatus(res *services.GetReleaseStatusResponse) string { - var out strings.Builder - +// PrintStatus prints out the status of a release. Shared because also used by +// install / upgrade +func PrintStatus(out io.Writer, res *services.GetReleaseStatusResponse) { if res.Info.LastDeployed != nil { - fmt.Fprintf(&out, "LAST DEPLOYED: %s\n", timeconv.String(res.Info.LastDeployed)) + fmt.Fprintf(out, "LAST DEPLOYED: %s\n", timeconv.String(res.Info.LastDeployed)) } - fmt.Fprintf(&out, "NAMESPACE: %s\n", res.Namespace) - fmt.Fprintf(&out, "STATUS: %s\n", res.Info.Status.Code) - fmt.Fprintf(&out, "\n") + fmt.Fprintf(out, "NAMESPACE: %s\n", res.Namespace) + fmt.Fprintf(out, "STATUS: %s\n", res.Info.Status.Code) + fmt.Fprintf(out, "\n") if len(res.Info.Status.Resources) > 0 { re := regexp.MustCompile(" +") - w := tabwriter.NewWriter(&out, 0, 0, 2, ' ', tabwriter.TabIndent) + w := tabwriter.NewWriter(out, 0, 0, 2, ' ', tabwriter.TabIndent) fmt.Fprintf(w, "RESOURCES:\n%s\n", re.ReplaceAllString(res.Info.Status.Resources, "\t")) w.Flush() } if res.Info.Status.LastTestSuiteRun != nil { lastRun := res.Info.Status.LastTestSuiteRun - fmt.Fprintf(&out, "TEST SUITE:\n%s\n%s\n\n%s\n", + fmt.Fprintf(out, "TEST SUITE:\n%s\n%s\n\n%s\n", fmt.Sprintf("Last Started: %s", timeconv.String(lastRun.StartedAt)), fmt.Sprintf("Last Completed: %s", timeconv.String(lastRun.CompletedAt)), formatTestResults(lastRun.Results)) } if len(res.Info.Status.Notes) > 0 { - fmt.Fprintf(&out, "NOTES:\n%s\n", res.Info.Status.Notes) + fmt.Fprintf(out, "NOTES:\n%s\n", res.Info.Status.Notes) } - - return out.String() } func formatTestResults(results []*release.TestRun) string { diff --git a/cmd/helm/upgrade.go b/cmd/helm/upgrade.go index 5c5af66cc..a105820a6 100644 --- a/cmd/helm/upgrade.go +++ b/cmd/helm/upgrade.go @@ -182,7 +182,7 @@ func newUpgradeCmd(client helm.Interface, out io.Writer) *cobra.Command { f.BoolVar(&upgrade.subNotes, "render-subchart-notes", false, "Render subchart notes along with parent") f.StringVar(&upgrade.description, "description", "", "Specify the description to use for the upgrade, rather than the default") f.BoolVar(&upgrade.cleanupOnFail, "cleanup-on-fail", false, "Allow deletion of new resources created in this upgrade when upgrade failed") - f.StringVarP(&upgrade.output, "output", "o", "table", "Prints the output in the specified format (json|table|yaml)") + bindOutputFlag(cmd, &upgrade.output) f.MarkDeprecated("disable-hooks", "Use --no-hooks instead") @@ -309,7 +309,7 @@ func (u *upgradeCmd) run() error { printRelease(u.out, resp.Release) } - if u.output == "table" { + if outputFormat(u.output) == outputTable { fmt.Fprintf(u.out, "Release %q has been upgraded.\n", u.release) } // Print the status like status command does @@ -318,13 +318,5 @@ func (u *upgradeCmd) run() error { return prettyError(err) } - output, err := PrintStatusFormated(u.output, status) - - if err != nil { - return err - } - - fmt.Fprintf(u.out, output) - - return nil + return write(u.out, &statusWriter{status}, outputFormat(u.output)) } diff --git a/docs/helm/helm_install.md b/docs/helm/helm_install.md index dc0591f6a..d44f9ded5 100644 --- a/docs/helm/helm_install.md +++ b/docs/helm/helm_install.md @@ -93,7 +93,7 @@ helm install [CHART] [flags] --namespace string Namespace to install the release into. Defaults to the current kube config namespace. --no-crd-hook Prevent CRD hooks from running, but run other hooks --no-hooks Prevent hooks from running during install - -o, --output string Prints the output in the specified format (json|table|yaml) (default "table") + -o, --output string Prints the output in the specified format. Allowed values: table, json, yaml (default "table") --password string Chart repository password where to locate the requested chart --render-subchart-notes Render subchart notes along with the parent --replace Re-use the given name, even if that name is already used. This is unsafe in production diff --git a/docs/helm/helm_repo_list.md b/docs/helm/helm_repo_list.md index 5f13c8c2d..3ff2cbaf0 100644 --- a/docs/helm/helm_repo_list.md +++ b/docs/helm/helm_repo_list.md @@ -14,7 +14,7 @@ helm repo list [flags] ``` -h, --help help for list - -o, --output string Prints the output in the specified format (json|table|yaml) (default "table") + -o, --output string Prints the output in the specified format. Allowed values: table, json, yaml (default "table") ``` ### Options inherited from parent commands diff --git a/docs/helm/helm_search.md b/docs/helm/helm_search.md index e040b738f..558cadfee 100644 --- a/docs/helm/helm_search.md +++ b/docs/helm/helm_search.md @@ -20,7 +20,7 @@ helm search [keyword] [flags] ``` --col-width uint Specifies the max column width of output (default 60) -h, --help help for search - -o, --output string Prints the output in the specified format (json|table|yaml) (default "table") + -o, --output string Prints the output in the specified format. Allowed values: table, json, yaml (default "table") -r, --regexp Use regular expressions for searching -v, --version string Search using semantic versioning constraints -l, --versions Show the long listing, with each version of each chart on its own line diff --git a/docs/helm/helm_status.md b/docs/helm/helm_status.md index 2c75ce21a..91c3a1427 100644 --- a/docs/helm/helm_status.md +++ b/docs/helm/helm_status.md @@ -23,7 +23,7 @@ helm status [flags] RELEASE_NAME ``` -h, --help help for status - -o, --output string Prints the output in the specified format (json|table|yaml) (default "table") + -o, --output string Prints the output in the specified format. Allowed values: table, json, yaml (default "table") --revision int32 If set, display the status of the named release with revision --tls Enable TLS for request --tls-ca-cert string Path to TLS CA certificate file (default "$HELM_HOME/ca.pem") diff --git a/docs/helm/helm_upgrade.md b/docs/helm/helm_upgrade.md index effb505f9..35888d568 100644 --- a/docs/helm/helm_upgrade.md +++ b/docs/helm/helm_upgrade.md @@ -79,7 +79,7 @@ helm upgrade [RELEASE] [CHART] [flags] --keyring string Path to the keyring that contains public signing keys (default "~/.gnupg/pubring.gpg") --namespace string Namespace to install the release into (only used if --install is set). Defaults to the current kube config namespace --no-hooks Disable pre/post upgrade hooks - -o, --output string Prints the output in the specified format (json|table|yaml) (default "table") + -o, --output string Prints the output in the specified format. Allowed values: table, json, yaml (default "table") --password string Chart repository password where to locate the requested chart --recreate-pods Performs pods restart for the resource if applicable --render-subchart-notes Render subchart notes along with parent From 58c004bb89c3cc88ac3afb0d5d2570fa5fdc0dd2 Mon Sep 17 00:00:00 2001 From: yuxiaobo Date: Wed, 25 Sep 2019 15:33:30 +0800 Subject: [PATCH 320/327] Improve the quality of annotations Signed-off-by: yuxiaobo --- cmd/helm/create.go | 2 +- cmd/helm/search/search.go | 2 +- pkg/chartutil/doc.go | 2 +- pkg/releaseutil/filter_test.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/helm/create.go b/cmd/helm/create.go index da91291fd..8ecffdba6 100644 --- a/cmd/helm/create.go +++ b/cmd/helm/create.go @@ -106,7 +106,7 @@ func (c *createCmd) run() error { if c.starter != "" { // Create from the starter lstarter := filepath.Join(c.home.Starters(), c.starter) - // If path is absolute, we dont want to prefix it with helm starters folder + // If path is absolute, we don't want to prefix it with helm starters folder if filepath.IsAbs(c.starter) { lstarter = c.starter } diff --git a/cmd/helm/search/search.go b/cmd/helm/search/search.go index a9d0616e9..2fd6b4581 100644 --- a/cmd/helm/search/search.go +++ b/cmd/helm/search/search.go @@ -55,7 +55,7 @@ type Index struct { charts map[string]*repo.ChartVersion } -// NewIndex creats a new Index. +// NewIndex creates a new Index. func NewIndex() *Index { return &Index{lines: map[string]string{}, charts: map[string]*repo.ChartVersion{}} } diff --git a/pkg/chartutil/doc.go b/pkg/chartutil/doc.go index a4f6d4515..ad2224f94 100644 --- a/pkg/chartutil/doc.go +++ b/pkg/chartutil/doc.go @@ -17,7 +17,7 @@ limitations under the License. /*Package chartutil contains tools for working with charts. Charts are described in the protocol buffer definition (pkg/proto/hapi/charts). -This packe provides utilities for serializing and deserializing charts. +This package provides utilities for serializing and deserializing charts. A chart can be represented on the file system in one of two ways: diff --git a/pkg/releaseutil/filter_test.go b/pkg/releaseutil/filter_test.go index 802b1db7a..4ec81a8da 100644 --- a/pkg/releaseutil/filter_test.go +++ b/pkg/releaseutil/filter_test.go @@ -54,6 +54,6 @@ func TestFilterAll(t *testing.T) { case r0.Version == 4: t.Fatal("got release with status revision 4") case r0.Info.Status.Code == rspb.Status_DELETED: - t.Fatal("got release with status DELTED") + t.Fatal("got release with status DELETED") } } From 9d8a84ee3daa0870689ba24ca8bf6bb13a0d38ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=B0=AD=E5=86=9B?= <2799194073@qq.com> Date: Wed, 25 Sep 2019 21:10:51 +0800 Subject: [PATCH 321/327] fix-up typo (#6501) Signed-off-by: chentanjun <2799194073@qq.com> --- cmd/helm/template_test.go | 2 +- pkg/provenance/sign.go | 2 +- pkg/tiller/release_list.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/helm/template_test.go b/cmd/helm/template_test.go index 3c5026b08..2baf887eb 100644 --- a/cmd/helm/template_test.go +++ b/cmd/helm/template_test.go @@ -158,7 +158,7 @@ func TestTemplateCmd(t *testing.T) { }, { name: "check_invalid_name_template", - desc: "verify the relase name generate by template is invalid", + desc: "verify the release name generate by template is invalid", args: []string{subchart1ChartPath, "--name-template", "foobar-{{ b64enc \"abc\" }}-baz"}, expectError: "is invalid", }, diff --git a/pkg/provenance/sign.go b/pkg/provenance/sign.go index 26ae26031..d0e4d06c7 100644 --- a/pkg/provenance/sign.go +++ b/pkg/provenance/sign.go @@ -122,7 +122,7 @@ func NewFromKeyring(keyringfile, id string) (*Signatory, error) { return s, nil } - // We're gonna go all GnuPG on this and look for a string that _contains_. If + // We're going to go all GnuPG on this and look for a string that _contains_. If // two or more keys contain the string and none are a direct match, we error // out. var candidate *openpgp.Entity diff --git a/pkg/tiller/release_list.go b/pkg/tiller/release_list.go index 6d62c7bc4..cd3b63856 100644 --- a/pkg/tiller/release_list.go +++ b/pkg/tiller/release_list.go @@ -126,7 +126,7 @@ func (s *ReleaseServer) ListReleases(req *services.ListReleasesRequest, stream s return nil } -// partition packs releases into slices upto the capacity cap in bytes. +// partition packs releases into slices up to the capacity cap in bytes. func (s *ReleaseServer) partition(rels []*release.Release, cap int) <-chan []*release.Release { chunks := make(chan []*release.Release, 1) go func() { From 0b229bdd042cbb099ab1a3b61e780b261a24f92c Mon Sep 17 00:00:00 2001 From: yuxiaobo96 <41496192+yuxiaobo96@users.noreply.github.com> Date: Fri, 27 Sep 2019 17:47:55 +0800 Subject: [PATCH 322/327] Improve the quality of the document (#6510) Signed-off-by: yuxiaobo --- pkg/getter/getter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/getter/getter.go b/pkg/getter/getter.go index c595fec69..062c7269e 100644 --- a/pkg/getter/getter.go +++ b/pkg/getter/getter.go @@ -68,7 +68,7 @@ func (p Providers) ByScheme(scheme string) (Constructor, error) { } // All finds all of the registered getters as a list of Provider instances. -// Currently the build-in http/https getter and the discovered +// Currently the built-in http/https getter and the discovered // plugins with downloader notations are collected. func All(settings environment.EnvSettings) Providers { result := Providers{ From 8648ccf5d35d682dcd5f7a9c2082f0aaf071e817 Mon Sep 17 00:00:00 2001 From: Till Hoffmann Date: Fri, 27 Sep 2019 12:47:18 +0200 Subject: [PATCH 323/327] fixed typo Signed-off-by: Till Hoffmann --- pkg/engine/engine.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/engine/engine.go b/pkg/engine/engine.go index 9a155de2e..b4b6475c9 100644 --- a/pkg/engine/engine.go +++ b/pkg/engine/engine.go @@ -267,7 +267,7 @@ func (e *Engine) renderWithReferences(tpls map[string]renderable, referenceTpls rendered = make(map[string]string, len(files)) var buf bytes.Buffer for _, file := range files { - // Don't render partials. We don't care out the direct output of partials. + // Don't render partials. We don't care about the direct output of partials. // They are only included from other templates. if strings.HasPrefix(path.Base(file), "_") { continue From 1726142e297e9c4a0de45d65b6ca7564bfc25d61 Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Fri, 27 Sep 2019 10:52:31 -0400 Subject: [PATCH 324/327] feat(comp) Dynamic completion to use same binary as main call The binary of Helm to use for dynamic completion should be the same as the actual Helm binary being used. For example, if PATH points to a version of helm v3, but the user calls a binary named helm2 to use a renamed v2 version, then dynamic completion should also use helm2. If not, in this example, the dynamic completion will use the information returned by helm v3. This improvement is particularly useful for users that will run both helm v2 and helm v3 at the same time. Signed-off-by: Marc Khouzam --- cmd/helm/helm.go | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/cmd/helm/helm.go b/cmd/helm/helm.go index 20742836d..f3b8fc215 100644 --- a/cmd/helm/helm.go +++ b/cmd/helm/helm.go @@ -69,13 +69,22 @@ __helm_override_flags() done } +__helm_binary_name() +{ + local helm_binary + helm_binary="${words[0]}" + __helm_debug "${FUNCNAME[0]}: helm_binary is ${helm_binary}" + echo ${helm_binary} +} + __helm_list_releases() { __helm_debug "${FUNCNAME[0]}: c is $c words[c] is ${words[c]}" local out filter # Use ^ to map from the start of the release name filter="^${words[c]}" - if out=$(helm list $(__helm_override_flags) -a -q ${filter} 2>/dev/null); then + # Use eval in case helm_binary_name or __helm_override_flags contains a variable (e.g., $HOME/bin/h2) + if out=$(eval $(__helm_binary_name) list $(__helm_override_flags) -a -q -m 1000 ${filter} 2>/dev/null); then COMPREPLY=( $( compgen -W "${out[*]}" -- "$cur" ) ) fi } @@ -86,7 +95,8 @@ __helm_list_repos() local out oflags oflags=$(__helm_override_flags) __helm_debug "${FUNCNAME[0]}: __helm_override_flags are ${oflags}" - if out=$(helm repo list ${oflags} | tail +2 | cut -f1 2>/dev/null); then + # Use eval in case helm_binary_name contains a variable (e.g., $HOME/bin/h2) + if out=$(eval $(__helm_binary_name) repo list ${oflags} 2>/dev/null | tail +2 | cut -f1); then COMPREPLY=( $( compgen -W "${out[*]}" -- "$cur" ) ) fi } @@ -97,7 +107,8 @@ __helm_list_plugins() local out oflags oflags=$(__helm_override_flags) __helm_debug "${FUNCNAME[0]}: __helm_override_flags are ${oflags}" - if out=$(helm plugin list ${oflags} | tail +2 | cut -f1 2>/dev/null); then + # Use eval in case helm_binary_name contains a variable (e.g., $HOME/bin/h2) + if out=$(eval $(__helm_binary_name) plugin list ${oflags} 2>/dev/null | tail +2 | cut -f1); then COMPREPLY=( $( compgen -W "${out[*]}" -- "$cur" ) ) fi } From ce7880f4038cbea154f50a2b178e3dfca49bca48 Mon Sep 17 00:00:00 2001 From: Alexander Sowitzki Date: Thu, 26 Sep 2019 01:22:29 +0200 Subject: [PATCH 325/327] Add Arch Linux, KubeOne and Kubermatic to distro documentation Signed-off-by: Alexander Sowitzki --- docs/kubernetes_distros.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/kubernetes_distros.md b/docs/kubernetes_distros.md index 52a5e1acc..b564b7014 100644 --- a/docs/kubernetes_distros.md +++ b/docs/kubernetes_distros.md @@ -31,6 +31,7 @@ Helm works with [Azure Kubernetes Service](https://docs.microsoft.com/en-us/azur Kubernetes bootstrapped with `kubeadm` is known to work on the following Linux distributions: +- Arch Linux - Ubuntu 16.04 - Fedora release 25 @@ -53,3 +54,11 @@ Helm Client and Helm Server (Tiller) are pre-installed with [Platform9 Managed K Helm (both client and server) has been tested and is working on Mesospheres DC/OS 1.11 Kubernetes platform, and requires no additional configuration. + +## Kubermatic + +Helm works in user clusters that are created by Kubermatic without caveats. Since seed cluster can be setup up in different ways Helm support depends on them. + +## KubeOne + +Helm works in clusters that are set up by KubeOne without caveats. From d251b94efc23ef5ec00f473cf9c44e4679963e32 Mon Sep 17 00:00:00 2001 From: Abejide Femi Date: Wed, 2 Oct 2019 10:20:53 +0100 Subject: [PATCH 326/327] refactor manager file in pkg folder (#6551) Signed-off-by: abejidefemi1@gmail.com --- pkg/downloader/manager.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/downloader/manager.go b/pkg/downloader/manager.go index 6c6886e8a..23a5b587e 100644 --- a/pkg/downloader/manager.go +++ b/pkg/downloader/manager.go @@ -442,8 +442,7 @@ func (m *Manager) UpdateRepositories() error { if err != nil { return err } - repos := rf.Repositories - if len(repos) > 0 { + if repos := rf.Repositories; len(repos) > 0 { // This prints warnings straight to out. if err := m.parallelRepoUpdate(repos); err != nil { return err @@ -616,7 +615,7 @@ func writeLock(chartpath string, lock *chartutil.RequirementsLock) error { } // tarFromLocalDir archive a dep chart from local directory and save it into charts/ -func tarFromLocalDir(chartpath string, name string, repo string, version string) (string, error) { +func tarFromLocalDir(chartpath, name, repo, version string) (string, error) { destPath := filepath.Join(chartpath, "charts") if !strings.HasPrefix(repo, "file://") { From 94c3192f77802e2e7e5627eedb2dba176c2618ab Mon Sep 17 00:00:00 2001 From: Martin Hickey Date: Thu, 3 Oct 2019 16:13:43 +0100 Subject: [PATCH 327/327] Add link to IKS (#6565) Adds a link in docs to the IBM Cloud Container Service (IKS) Signed-off-by: Martin Hickey --- docs/kubernetes_distros.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/kubernetes_distros.md b/docs/kubernetes_distros.md index a670100ea..728525f38 100644 --- a/docs/kubernetes_distros.md +++ b/docs/kubernetes_distros.md @@ -30,6 +30,10 @@ See [Tiller and role-based access control](https://docs.helm.sh/using_helm/#role Helm works with [Azure Kubernetes Service](https://docs.microsoft.com/en-us/azure/aks/kubernetes-helm). If using an RBAC-enabled AKS cluster, you need [a service account and role binding for the Tiller service](https://docs.microsoft.com/en-us/azure/aks/kubernetes-helm#create-a-service-account). +## IKS + +Helm works with [IBM Cloud Kubernetes Service](https://cloud.ibm.com/docs/containers?topic=containers-getting-started). IKS cluster enables RBAC by default and this means you will need [a service account and role binding for the Tiller service](https://cloud.ibm.com/docs/containers?topic=containers-helm#public_helm_install). + ## Ubuntu with 'kubeadm' Kubernetes bootstrapped with `kubeadm` is known to work on the following Linux