Merge pull request #4029 from adamreese/dev-v3-tiller-rename

ref(*): s/tiller/helm/
pull/4048/head
Adam Reese 6 years ago committed by GitHub
commit 34da765eff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -313,7 +313,7 @@ func verifyRequirementsImportValues(t *testing.T, c *chart.Chart, v []byte, e ma
} }
default: default:
if pv.(string) != vv { 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 return
} }
} }

@ -366,7 +366,7 @@ func ToRenderValuesCaps(chrt *chart.Chart, chrtVals []byte, options ReleaseOptio
"IsUpgrade": options.IsUpgrade, "IsUpgrade": options.IsUpgrade,
"IsInstall": options.IsInstall, "IsInstall": options.IsInstall,
"Revision": options.Revision, "Revision": options.Revision,
"Service": "Tiller", "Service": "Helm",
}, },
"Chart": chrt.Metadata, "Chart": chrt.Metadata,
"Files": NewFiles(chrt.Files), "Files": NewFiles(chrt.Files),

@ -145,7 +145,7 @@ where:
t.Error("Expected Capabilities to have v1 as an API") t.Error("Expected Capabilities to have v1 as an API")
} }
if res["Capabilities"].(*Capabilities).HelmVersion.Version == "" { 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" { if res["Capabilities"].(*Capabilities).KubeVersion.Major != "1" {
t.Error("Expected Capabilities to have a Kube version") t.Error("Expected Capabilities to have a Kube version")

@ -57,10 +57,10 @@ type Metadata struct {
AppVersion string `json:"appVersion,omitempty"` AppVersion string `json:"appVersion,omitempty"`
// Whether or not this chart is deprecated // Whether or not this chart is deprecated
Deprecated bool `json:"deprecated,omitempty"` 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 // See SemVer ranges here: https://github.com/Masterminds/semver#basic-comparisons
HelmVersion string `json:"helmVersion,omitempty"` 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. // made available for inspection by other applications.
Annotations map[string]string `json:"annotations,omitempty"` Annotations map[string]string `json:"annotations,omitempty"`
// KubeVersion is a SemVer constraint specifying the version of Kubernetes required. // KubeVersion is a SemVer constraint specifying the version of Kubernetes required.

@ -26,8 +26,7 @@ import (
) )
// Option allows specifying various settings configurable by // Option allows specifying various settings configurable by
// the helm client user for overriding the defaults used when // the helm client user for overriding the defaults.
// issuing rpc's to the Tiller release server.
type Option func(*options) type Option func(*options)
// options specify optional settings used by the helm client. // options specify optional settings used by the helm client.
@ -60,9 +59,9 @@ type options struct {
before func(interface{}) error before func(interface{}) error
// release history options are applied directly to the get release history request // release history options are applied directly to the get release history request
histReq hapi.GetHistoryRequest histReq hapi.GetHistoryRequest
// resetValues instructs Tiller to reset values to their defaults. // resetValues instructs Helm to reset values to their defaults.
resetValues bool 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 reuseValues bool
// release test options are applied directly to the test release history request // release test options are applied directly to the test release history request
testReq hapi.TestReleaseRequest 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 { func InstallReuseName(reuse bool) InstallOption {
return func(opts *options) { return func(opts *options) {
opts.reuseName = reuse 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. // This is ignored if ResetValues is true.
func ReuseValues(reuse bool) UpdateOption { func ReuseValues(reuse bool) UpdateOption {
return func(opts *options) { return func(opts *options) {

@ -57,11 +57,7 @@ func LoadRepositoriesFile(path string) (*RepoFile, error) {
b, err := ioutil.ReadFile(path) b, err := ioutil.ReadFile(path)
if err != nil { if err != nil {
if os.IsNotExist(err) { if os.IsNotExist(err) {
return nil, errors.Errorf( return nil, errors.Errorf("couldn't load repositories file (%s).\nYou might need to run `helm init`", path)
"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, err return nil, err
} }

@ -86,7 +86,7 @@ func (cfgmaps *ConfigMaps) Get(key string) (*rspb.Release, error) {
// that filter(release) == true. An error is returned if the // that filter(release) == true. An error is returned if the
// configmap fails to retrieve the releases. // configmap fails to retrieve the releases.
func (cfgmaps *ConfigMaps) List(filter func(*rspb.Release) bool) ([]*rspb.Release, error) { 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()} opts := metav1.ListOptions{LabelSelector: lsel.String()}
list, err := cfgmaps.impl.List(opts) 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) // "createdAt" - timestamp indicating when this configmap was created. (set in Create)
// "version" - version of the release. // "version" - version of the release.
// "status" - status of the release (see proto/hapi/release.status.pb.go for variants) // "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. // "name" - name of the release.
// //
func newConfigMapsObject(key string, rls *rspb.Release, lbs labels) (*v1.ConfigMap, error) { func newConfigMapsObject(key string, rls *rspb.Release, lbs labels) (*v1.ConfigMap, error) {
const owner = "tiller" const owner = "helm"
// encode the release // encode the release
s, err := encodeRelease(rls) s, err := encodeRelease(rls)

@ -71,7 +71,7 @@ type Queryor interface {
// Driver is the interface composed of Creator, Updator, Deletor, and Queryor // Driver is the interface composed of Creator, Updator, Deletor, and Queryor
// interfaces. It defines the behavior for storing, updating, deleted, // 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. // e.g. memory, configmaps.
type Driver interface { type Driver interface {
Creator Creator

@ -125,7 +125,7 @@ func newRecord(key string, rls *rspb.Release) *record {
lbs.init() lbs.init()
lbs.set("name", rls.Name) lbs.set("name", rls.Name)
lbs.set("owner", "tiller") lbs.set("owner", "helm")
lbs.set("status", rls.Info.Status.String()) lbs.set("status", rls.Info.Status.String())
lbs.set("version", strconv.Itoa(rls.Version)) lbs.set("version", strconv.Itoa(rls.Version))

@ -79,7 +79,7 @@ func (secrets *Secrets) Get(key string) (*rspb.Release, error) {
// that filter(release) == true. An error is returned if the // that filter(release) == true. An error is returned if the
// secret fails to retrieve the releases. // secret fails to retrieve the releases.
func (secrets *Secrets) List(filter func(*rspb.Release) bool) ([]*rspb.Release, error) { 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()} opts := metav1.ListOptions{LabelSelector: lsel.String()}
list, err := secrets.impl.List(opts) 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) // "createdAt" - timestamp indicating when this secret was created. (set in Create)
// "version" - version of the release. // "version" - version of the release.
// "status" - status of the release (see proto/hapi/release.status.pb.go for variants) // "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. // "name" - name of the release.
// //
func newSecretsObject(key string, rls *rspb.Release, lbs labels) (*v1.Secret, error) { func newSecretsObject(key string, rls *rspb.Release, lbs labels) (*v1.Secret, error) {
const owner = "tiller" const owner = "helm"
// encode the release // encode the release
s, err := encodeRelease(rls) s, err := encodeRelease(rls)

@ -145,7 +145,7 @@ func (s *Storage) DeployedAll(name string) ([]*rspb.Release, error) {
ls, err := s.Driver.Query(map[string]string{ ls, err := s.Driver.Query(map[string]string{
"name": name, "name": name,
"owner": "tiller", "owner": "helm",
"status": "deployed", "status": "deployed",
}) })
if err == nil { 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) { func (s *Storage) History(name string) ([]*rspb.Release, error) {
s.Log("getting release history for %q", name) 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 // removeLeastRecent removes items from history until the lengh number of releases

@ -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) { 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() sver := version.GetVersion()
if ch.Metadata.HelmVersion != "" && if ch.Metadata.HelmVersion != "" &&
!version.IsCompatibleRange(ch.Metadata.HelmVersion, sver) { !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 != "" { if ch.Metadata.KubeVersion != "" {

Loading…
Cancel
Save