From b1128abf4fab34e591994cc304e856eb06796869 Mon Sep 17 00:00:00 2001 From: Adam Reese Date: Wed, 9 May 2018 19:45:51 -0700 Subject: [PATCH] ref(*): s/tiller/helm/ --- pkg/chartutil/requirements_test.go | 2 +- pkg/chartutil/values.go | 2 +- pkg/chartutil/values_test.go | 2 +- pkg/hapi/chart/metadata.go | 4 ++-- pkg/helm/option.go | 11 +++++------ pkg/repo/repo.go | 6 +----- pkg/storage/driver/cfgmaps.go | 6 +++--- pkg/storage/driver/driver.go | 2 +- pkg/storage/driver/records.go | 2 +- pkg/storage/driver/secrets.go | 6 +++--- pkg/storage/storage.go | 4 ++-- pkg/tiller/release_server.go | 4 ++-- 12 files changed, 23 insertions(+), 28 deletions(-) diff --git a/pkg/chartutil/requirements_test.go b/pkg/chartutil/requirements_test.go index 84950c0cd..0206f0d2f 100644 --- a/pkg/chartutil/requirements_test.go +++ b/pkg/chartutil/requirements_test.go @@ -313,7 +313,7 @@ func verifyRequirementsImportValues(t *testing.T, c *chart.Chart, v []byte, e ma } default: if pv.(string) != vv { - t.Errorf("Failed to match imported string value %v with expected %v", pv, vv) + t.Errorf("Failed to match imported string value %q with expected %q", pv, vv) return } } diff --git a/pkg/chartutil/values.go b/pkg/chartutil/values.go index edd87fc2b..d430d1047 100644 --- a/pkg/chartutil/values.go +++ b/pkg/chartutil/values.go @@ -366,7 +366,7 @@ func ToRenderValuesCaps(chrt *chart.Chart, chrtVals []byte, options ReleaseOptio "IsUpgrade": options.IsUpgrade, "IsInstall": options.IsInstall, "Revision": options.Revision, - "Service": "Tiller", + "Service": "Helm", }, "Chart": chrt.Metadata, "Files": NewFiles(chrt.Files), diff --git a/pkg/chartutil/values_test.go b/pkg/chartutil/values_test.go index f72c9534b..4b85e56cc 100644 --- a/pkg/chartutil/values_test.go +++ b/pkg/chartutil/values_test.go @@ -145,7 +145,7 @@ where: t.Error("Expected Capabilities to have v1 as an API") } if res["Capabilities"].(*Capabilities).HelmVersion.Version == "" { - t.Error("Expected Capabilities to have a Tiller version") + t.Error("Expected Capabilities to have a Helm version") } if res["Capabilities"].(*Capabilities).KubeVersion.Major != "1" { t.Error("Expected Capabilities to have a Kube version") diff --git a/pkg/hapi/chart/metadata.go b/pkg/hapi/chart/metadata.go index dbd15ba08..84bc60096 100644 --- a/pkg/hapi/chart/metadata.go +++ b/pkg/hapi/chart/metadata.go @@ -57,10 +57,10 @@ type Metadata struct { AppVersion string `json:"appVersion,omitempty"` // Whether or not this chart is deprecated Deprecated bool `json:"deprecated,omitempty"` - // HelmVersion is a SemVer constraints on what version of Tiller is required. + // HelmVersion is a SemVer constraints on what version of Helm is required. // See SemVer ranges here: https://github.com/Masterminds/semver#basic-comparisons HelmVersion string `json:"helmVersion,omitempty"` - // Annotations are additional mappings uninterpreted by Tiller, + // Annotations are additional mappings uninterpreted by Helm, // made available for inspection by other applications. Annotations map[string]string `json:"annotations,omitempty"` // KubeVersion is a SemVer constraint specifying the version of Kubernetes required. diff --git a/pkg/helm/option.go b/pkg/helm/option.go index 662e2abb6..e362483f2 100644 --- a/pkg/helm/option.go +++ b/pkg/helm/option.go @@ -26,8 +26,7 @@ import ( ) // Option allows specifying various settings configurable by -// the helm client user for overriding the defaults used when -// issuing rpc's to the Tiller release server. +// the helm client user for overriding the defaults. type Option func(*options) // options specify optional settings used by the helm client. @@ -60,9 +59,9 @@ type options struct { before func(interface{}) error // release history options are applied directly to the get release history request histReq hapi.GetHistoryRequest - // resetValues instructs Tiller to reset values to their defaults. + // resetValues instructs Helm to reset values to their defaults. resetValues bool - // reuseValues instructs Tiller to reuse the values from the last release. + // reuseValues instructs Helm to reuse the values from the last release. reuseValues bool // release test options are applied directly to the test release history request testReq hapi.TestReleaseRequest @@ -262,7 +261,7 @@ func InstallDisableHooks(disable bool) InstallOption { } } -// InstallReuseName will (if true) instruct Tiller to re-use an existing name. +// InstallReuseName will (if true) instruct Helm to re-use an existing name. func InstallReuseName(reuse bool) InstallOption { return func(opts *options) { opts.reuseName = reuse @@ -325,7 +324,7 @@ func ResetValues(reset bool) UpdateOption { } } -// ReuseValues will cause Tiller to reuse the values from the last release. +// ReuseValues will cause Helm to reuse the values from the last release. // This is ignored if ResetValues is true. func ReuseValues(reuse bool) UpdateOption { return func(opts *options) { diff --git a/pkg/repo/repo.go b/pkg/repo/repo.go index 7c24fcba5..c8789d0e7 100644 --- a/pkg/repo/repo.go +++ b/pkg/repo/repo.go @@ -57,11 +57,7 @@ func LoadRepositoriesFile(path string) (*RepoFile, error) { b, err := ioutil.ReadFile(path) if err != nil { if os.IsNotExist(err) { - return nil, errors.Errorf( - "couldn't load repositories file (%s).\n"+ - "You might need to run `helm init` (or "+ - "`helm init --client-only` if tiller is "+ - "already installed)", path) + return nil, errors.Errorf("couldn't load repositories file (%s).\nYou might need to run `helm init`", path) } return nil, err } diff --git a/pkg/storage/driver/cfgmaps.go b/pkg/storage/driver/cfgmaps.go index b083e5fd7..4821049f1 100644 --- a/pkg/storage/driver/cfgmaps.go +++ b/pkg/storage/driver/cfgmaps.go @@ -86,7 +86,7 @@ func (cfgmaps *ConfigMaps) Get(key string) (*rspb.Release, error) { // that filter(release) == true. An error is returned if the // configmap fails to retrieve the releases. func (cfgmaps *ConfigMaps) List(filter func(*rspb.Release) bool) ([]*rspb.Release, error) { - lsel := kblabels.Set{"owner": "tiller"}.AsSelector() + lsel := kblabels.Set{"owner": "helm"}.AsSelector() opts := metav1.ListOptions{LabelSelector: lsel.String()} list, err := cfgmaps.impl.List(opts) @@ -226,11 +226,11 @@ func (cfgmaps *ConfigMaps) Delete(key string) (rls *rspb.Release, err error) { // "createdAt" - timestamp indicating when this configmap was created. (set in Create) // "version" - version of the release. // "status" - status of the release (see proto/hapi/release.status.pb.go for variants) -// "owner" - owner of the configmap, currently "tiller". +// "owner" - owner of the configmap, currently "helm". // "name" - name of the release. // func newConfigMapsObject(key string, rls *rspb.Release, lbs labels) (*v1.ConfigMap, error) { - const owner = "tiller" + const owner = "helm" // encode the release s, err := encodeRelease(rls) diff --git a/pkg/storage/driver/driver.go b/pkg/storage/driver/driver.go index 7dfae6c96..e28548ab0 100644 --- a/pkg/storage/driver/driver.go +++ b/pkg/storage/driver/driver.go @@ -71,7 +71,7 @@ type Queryor interface { // Driver is the interface composed of Creator, Updator, Deletor, and Queryor // interfaces. It defines the behavior for storing, updating, deleted, -// and retrieving Tiller releases from some underlying storage mechanism, +// and retrieving Helm releases from some underlying storage mechanism, // e.g. memory, configmaps. type Driver interface { Creator diff --git a/pkg/storage/driver/records.go b/pkg/storage/driver/records.go index c0cb16ac8..5581dfbf1 100644 --- a/pkg/storage/driver/records.go +++ b/pkg/storage/driver/records.go @@ -125,7 +125,7 @@ func newRecord(key string, rls *rspb.Release) *record { lbs.init() lbs.set("name", rls.Name) - lbs.set("owner", "tiller") + lbs.set("owner", "helm") lbs.set("status", rls.Info.Status.String()) lbs.set("version", strconv.Itoa(rls.Version)) diff --git a/pkg/storage/driver/secrets.go b/pkg/storage/driver/secrets.go index f0dd4dd1d..99057da29 100644 --- a/pkg/storage/driver/secrets.go +++ b/pkg/storage/driver/secrets.go @@ -79,7 +79,7 @@ func (secrets *Secrets) Get(key string) (*rspb.Release, error) { // that filter(release) == true. An error is returned if the // secret fails to retrieve the releases. func (secrets *Secrets) List(filter func(*rspb.Release) bool) ([]*rspb.Release, error) { - lsel := kblabels.Set{"owner": "tiller"}.AsSelector() + lsel := kblabels.Set{"owner": "helm"}.AsSelector() opts := metav1.ListOptions{LabelSelector: lsel.String()} list, err := secrets.impl.List(opts) @@ -207,11 +207,11 @@ func (secrets *Secrets) Delete(key string) (rls *rspb.Release, err error) { // "createdAt" - timestamp indicating when this secret was created. (set in Create) // "version" - version of the release. // "status" - status of the release (see proto/hapi/release.status.pb.go for variants) -// "owner" - owner of the secret, currently "tiller". +// "owner" - owner of the secret, currently "helm". // "name" - name of the release. // func newSecretsObject(key string, rls *rspb.Release, lbs labels) (*v1.Secret, error) { - const owner = "tiller" + const owner = "helm" // encode the release s, err := encodeRelease(rls) diff --git a/pkg/storage/storage.go b/pkg/storage/storage.go index 94969cec9..dadc30e8b 100644 --- a/pkg/storage/storage.go +++ b/pkg/storage/storage.go @@ -145,7 +145,7 @@ func (s *Storage) DeployedAll(name string) ([]*rspb.Release, error) { ls, err := s.Driver.Query(map[string]string{ "name": name, - "owner": "tiller", + "owner": "helm", "status": "deployed", }) if err == nil { @@ -162,7 +162,7 @@ func (s *Storage) DeployedAll(name string) ([]*rspb.Release, error) { func (s *Storage) History(name string) ([]*rspb.Release, error) { s.Log("getting release history for %q", name) - return s.Driver.Query(map[string]string{"name": name, "owner": "tiller"}) + return s.Driver.Query(map[string]string{"name": name, "owner": "helm"}) } // removeLeastRecent removes items from history until the lengh number of releases diff --git a/pkg/tiller/release_server.go b/pkg/tiller/release_server.go index 8810be0c8..44c6d7bf2 100644 --- a/pkg/tiller/release_server.go +++ b/pkg/tiller/release_server.go @@ -253,11 +253,11 @@ func GetVersionSet(client discovery.ServerGroupsInterface) (chartutil.VersionSet } func (s *ReleaseServer) renderResources(ch *chart.Chart, values chartutil.Values, vs chartutil.VersionSet) ([]*release.Hook, *bytes.Buffer, string, error) { - // Guard to make sure Tiller is at the right version to handle this chart. + // Guard to make sure Helm is at the right version to handle this chart. sver := version.GetVersion() if ch.Metadata.HelmVersion != "" && !version.IsCompatibleRange(ch.Metadata.HelmVersion, sver) { - return nil, nil, "", errors.Errorf("chart incompatible with Tiller %s", sver) + return nil, nil, "", errors.Errorf("chart incompatible with Helm %s", sver) } if ch.Metadata.KubeVersion != "" {