Repository: helm/helm
Pull request #6625 (2019-10-09 22:06:52)

fix(cmd): Add --output option to get values
<!--  Thanks for sending a pull request!  Here are some tips for you:
1. Make sure to read the Contributing Guide before submitting your PR: https://github.com/helm/helm/blob/master/CONTRIBUTING.md
2. If this PR closes another issue, add 'closes #<issue number>' somewhere in the PR summary. GitHub will automatically close that issue when this PR gets merged. Alternatively, adding 'refs #<issue number>' will not close the issue, but help provide the reviewer more context.-->
Fixes: https://github.com/helm/helm/issues/6546

v3 is currently missing the `helm get values --output` flag. This PR adds that functionality back

- [ ] this PR contains documentation
- [x] this PR contains unit tests
- [ ] this PR has been tested for backwards compatibility


Huge thanks to @thomastaylor312 for their help in this PR


Patch:
diff --git a/cmd/helm/get_values.go b/cmd/helm/get_values.go
index 31e1e3711..2cccaeace 100644
--- a/cmd/helm/get_values.go
+++ b/cmd/helm/get_values.go
@@ -24,13 +24,20 @@ import (
 
 	"helm.sh/helm/v3/cmd/helm/require"
 	"helm.sh/helm/v3/pkg/action"
+	"helm.sh/helm/v3/pkg/cli/output"
 )
 
 var getValuesHelp = `
 This command downloads a values file for a given release.
 `
 
+type valuesWriter struct {
+	vals      map[string]interface{}
+	allValues bool
+}
+
 func newGetValuesCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
+	var outfmt output.Format
 	client := action.NewGetValues(cfg)
 
 	cmd := &cobra.Command{
@@ -39,17 +46,35 @@ func newGetValuesCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
 		Long:  getValuesHelp,
 		Args:  require.ExactArgs(1),
 		RunE: func(cmd *cobra.Command, args []string) error {
-			res, err := client.Run(args[0])
+			vals, err := client.Run(args[0])
 			if err != nil {
 				return err
 			}
-			fmt.Fprintln(out, res)
-			return nil
+			return outfmt.Write(out, &valuesWriter{vals, client.AllValues})
 		},
 	}
 
 	f := cmd.Flags()
 	f.IntVar(&client.Version, "revision", 0, "get the named release with revision")
 	f.BoolVarP(&client.AllValues, "all", "a", false, "dump all (computed) values")
+	bindOutputFlag(cmd, &outfmt)
+
 	return cmd
 }
+
+func (v valuesWriter) WriteTable(out io.Writer) error {
+	if v.allValues {
+		fmt.Fprintln(out, "COMPUTED VALUES:")
+	} else {
+		fmt.Fprintln(out, "USER-SUPPLIED VALUES:")
+	}
+	return output.EncodeYAML(out, v.vals)
+}
+
+func (v valuesWriter) WriteJSON(out io.Writer) error {
+	return output.EncodeJSON(out, v.vals)
+}
+
+func (v valuesWriter) WriteYAML(out io.Writer) error {
+	return output.EncodeYAML(out, v.vals)
+}
diff --git a/internal/resolver/resolver.go b/internal/resolver/resolver.go
index 79238b22f..c902b0134 100644
--- a/internal/resolver/resolver.go
+++ b/internal/resolver/resolver.go
@@ -53,19 +53,6 @@ func (r *Resolver) Resolve(reqs []*chart.Dependency, repoNames map[string]string
 	locked := make([]*chart.Dependency, len(reqs))
 	missing := []string{}
 	for i, d := range reqs {
-		if d.Repository == "" {
-			// Local chart subfolder
-			if _, err := GetLocalPath(filepath.Join("charts", d.Name), r.chartpath); err != nil {
-				return nil, err
-			}
-
-			locked[i] = &chart.Dependency{
-				Name:       d.Name,
-				Repository: "",
-				Version:    d.Version,
-			}
-			continue
-		}
 		if strings.HasPrefix(d.Repository, "file://") {
 
 			if _, err := GetLocalPath(d.Repository, r.chartpath); err != nil {
diff --git a/pkg/action/get_values.go b/pkg/action/get_values.go
index e5f4f4f04..5bc3a7005 100644
--- a/pkg/action/get_values.go
+++ b/pkg/action/get_values.go
@@ -17,8 +17,6 @@ limitations under the License.
 package action
 
 import (
-	"sigs.k8s.io/yaml"
-
 	"helm.sh/helm/v3/pkg/chartutil"
 )
 
@@ -40,29 +38,19 @@ func NewGetValues(cfg *Configuration) *GetValues {
 }
 
 // Run executes 'helm get values' against the given release.
-func (g *GetValues) Run(name string) (string, error) {
-	res, err := g.cfg.releaseContent(name, g.Version)
+func (g *GetValues) Run(name string) (map[string]interface{}, error) {
+	rel, err := g.cfg.releaseContent(name, g.Version)
 	if err != nil {
-		return "", err
+		return nil, err
 	}
 
 	// If the user wants all values, compute the values and return.
 	if g.AllValues {
-		cfg, err := chartutil.CoalesceValues(res.Chart, res.Config)
-		if err != nil {
-			return "", err
-		}
-		cfgStr, err := cfg.YAML()
+		cfg, err := chartutil.CoalesceValues(rel.Chart, rel.Config)
 		if err != nil {
-			return "", err
+			return nil, err
 		}
-		return cfgStr, nil
+		return cfg, nil
 	}
-
-	resConfig, err := yaml.Marshal(res.Config)
-	if err != nil {
-		return "", err
-	}
-
-	return string(resConfig), nil
+	return rel.Config, nil
 }
diff --git a/pkg/action/hooks.go b/pkg/action/hooks.go
index d0498c9c6..a8a27a5a2 100644
--- a/pkg/action/hooks.go
+++ b/pkg/action/hooks.go
@@ -44,7 +44,7 @@ func (cfg *Configuration) execHook(rl *release.Release, hook release.HookEvent,
 			return err
 		}
 
-		resources, err := cfg.KubeClient.Build(bytes.NewBufferString(h.Manifest), true)
+		resources, err := cfg.KubeClient.Build(bytes.NewBufferString(h.Manifest))
 		if err != nil {
 			return errors.Wrapf(err, "unable to build kubernetes object for %s hook %s", hook, h.Path)
 		}
@@ -111,7 +111,7 @@ func (x hookByWeight) Less(i, j int) bool {
 // deleteHookByPolicy deletes a hook if the hook policy instructs it to
 func (cfg *Configuration) deleteHookByPolicy(h *release.Hook, policy release.HookDeletePolicy) error {
 	if hookHasDeletePolicy(h, policy) {
-		resources, err := cfg.KubeClient.Build(bytes.NewBufferString(h.Manifest), false)
+		resources, err := cfg.KubeClient.Build(bytes.NewBufferString(h.Manifest))
 		if err != nil {
 			return errors.Wrapf(err, "unable to build kubernetes object for deleting hook %s", h.Path)
 		}
diff --git a/pkg/action/install.go b/pkg/action/install.go
index e1a55618d..6d9cb2a3e 100644
--- a/pkg/action/install.go
+++ b/pkg/action/install.go
@@ -113,7 +113,7 @@ func (i *Install) installCRDs(crds []*chart.File) error {
 	totalItems := []*resource.Info{}
 	for _, obj := range crds {
 		// Read in the resources
-		res, err := i.cfg.KubeClient.Build(bytes.NewBuffer(obj.Data), false)
+		res, err := i.cfg.KubeClient.Build(bytes.NewBuffer(obj.Data))
 		if err != nil {
 			return errors.Wrapf(err, "failed to install CRD %s", obj.Name)
 		}
@@ -225,7 +225,7 @@ func (i *Install) Run(chrt *chart.Chart, vals map[string]interface{}) (*release.
 	// Mark this release as in-progress
 	rel.SetStatus(release.StatusPendingInstall, "Initial install underway")
 
-	resources, err := i.cfg.KubeClient.Build(bytes.NewBufferString(rel.Manifest), true)
+	resources, err := i.cfg.KubeClient.Build(bytes.NewBufferString(rel.Manifest))
 	if err != nil {
 		return nil, errors.Wrap(err, "unable to build kubernetes objects from release manifest")
 	}
diff --git a/pkg/action/rollback.go b/pkg/action/rollback.go
index b565aa9b0..3d1ecb295 100644
--- a/pkg/action/rollback.go
+++ b/pkg/action/rollback.go
@@ -140,11 +140,11 @@ func (r *Rollback) performRollback(currentRelease, targetRelease *release.Releas
 		return targetRelease, nil
 	}
 
-	current, err := r.cfg.KubeClient.Build(bytes.NewBufferString(currentRelease.Manifest), false)
+	current, err := r.cfg.KubeClient.Build(bytes.NewBufferString(currentRelease.Manifest))
 	if err != nil {
 		return targetRelease, errors.Wrap(err, "unable to build kubernetes objects from current release manifest")
 	}
-	target, err := r.cfg.KubeClient.Build(bytes.NewBufferString(targetRelease.Manifest), false)
+	target, err := r.cfg.KubeClient.Build(bytes.NewBufferString(targetRelease.Manifest))
 	if err != nil {
 		return targetRelease, errors.Wrap(err, "unable to build kubernetes objects from new release manifest")
 	}
diff --git a/pkg/action/uninstall.go b/pkg/action/uninstall.go
index c5aaba629..22123ad82 100644
--- a/pkg/action/uninstall.go
+++ b/pkg/action/uninstall.go
@@ -188,7 +188,7 @@ func (u *Uninstall) deleteRelease(rel *release.Release) (string, []error) {
 	for _, file := range filesToDelete {
 		builder.WriteString("\n---\n" + file.Content)
 	}
-	resources, err := u.cfg.KubeClient.Build(strings.NewReader(builder.String()), false)
+	resources, err := u.cfg.KubeClient.Build(strings.NewReader(builder.String()))
 	if err != nil {
 		return "", []error{errors.Wrap(err, "unable to build kubernetes objects for delete")}
 	}
diff --git a/pkg/action/upgrade.go b/pkg/action/upgrade.go
index e89ad6050..1b7b19557 100644
--- a/pkg/action/upgrade.go
+++ b/pkg/action/upgrade.go
@@ -189,11 +189,11 @@ func (u *Upgrade) prepareUpgrade(name string, chart *chart.Chart, vals map[strin
 }
 
 func (u *Upgrade) performUpgrade(originalRelease, upgradedRelease *release.Release) (*release.Release, error) {
-	current, err := u.cfg.KubeClient.Build(bytes.NewBufferString(originalRelease.Manifest), false)
+	current, err := u.cfg.KubeClient.Build(bytes.NewBufferString(originalRelease.Manifest))
 	if err != nil {
 		return upgradedRelease, errors.Wrap(err, "unable to build kubernetes objects from current release manifest")
 	}
-	target, err := u.cfg.KubeClient.Build(bytes.NewBufferString(upgradedRelease.Manifest), true)
+	target, err := u.cfg.KubeClient.Build(bytes.NewBufferString(upgradedRelease.Manifest))
 	if err != nil {
 		return upgradedRelease, errors.Wrap(err, "unable to build kubernetes objects from new release manifest")
 	}
@@ -372,7 +372,7 @@ func (u *Upgrade) reuseValues(chart *chart.Chart, current *release.Release, newV
 }
 
 func validateManifest(c kube.Interface, manifest []byte) error {
-	_, err := c.Build(bytes.NewReader(manifest), true)
+	_, err := c.Build(bytes.NewReader(manifest))
 	return err
 }
 
diff --git a/pkg/downloader/manager.go b/pkg/downloader/manager.go
index f1dea342f..4b49a7911 100644
--- a/pkg/downloader/manager.go
+++ b/pkg/downloader/manager.go
@@ -203,31 +203,6 @@ func (m *Manager) downloadAll(deps []*chart.Dependency) error {
 	fmt.Fprintf(m.Out, "Saving %d charts\n", len(deps))
 	var saveError error
 	for _, dep := range deps {
-		// No repository means the chart is in charts directory
-		if dep.Repository == "" {
-			fmt.Fprintf(m.Out, "Dependency %s did not declare a repository. Assuming it exists in the charts directory\n", dep.Name)
-			chartPath := filepath.Join(tmpPath, dep.Name)
-			ch, err := loader.LoadDir(chartPath)
-			if err != nil {
-				return fmt.Errorf("Unable to load chart: %v", err)
-			}
-
-			constraint, err := semver.NewConstraint(dep.Version)
-			if err != nil {
-				return fmt.Errorf("Dependency %s has an invalid version/constraint format: %s", dep.Name, err)
-			}
-
-			v, err := semver.NewVersion(ch.Metadata.Version)
-			if err != nil {
-				return fmt.Errorf("Invalid version %s for dependency %s: %s", dep.Version, dep.Name, err)
-			}
-
-			if !constraint.Check(v) {
-				saveError = fmt.Errorf("Dependency %s at version %s does not satisfy the constraint %s", dep.Name, ch.Metadata.Version, dep.Version)
-				break
-			}
-			continue
-		}
 		if strings.HasPrefix(dep.Repository, "file://") {
 			if m.Debug {
 				fmt.Fprintf(m.Out, "Archiving %s from repo %s\n", dep.Name, dep.Repository)
@@ -272,11 +247,8 @@ func (m *Manager) downloadAll(deps []*chart.Dependency) error {
 	if saveError == nil {
 		fmt.Fprintln(m.Out, "Deleting outdated charts")
 		for _, dep := range deps {
-			// Chart from local charts directory stays in place
-			if dep.Repository != "" {
-				if err := m.safeDeleteDep(dep.Name, tmpPath); err != nil {
-					return err
-				}
+			if err := m.safeDeleteDep(dep.Name, tmpPath); err != nil {
+				return err
 			}
 		}
 		if err := move(tmpPath, destPath); err != nil {
@@ -388,10 +360,6 @@ func (m *Manager) getRepoNames(deps []*chart.Dependency) (map[string]string, err
 	// by Helm.
 	missing := []string{}
 	for _, dd := range deps {
-		// Don't map the repository, we don't need to download chart from charts directory
-		if dd.Repository == "" {
-			continue
-		}
 		// 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/kube/client.go b/pkg/kube/client.go
index 1513c72d2..3f228a583 100644
--- a/pkg/kube/client.go
+++ b/pkg/kube/client.go
@@ -122,14 +122,9 @@ func (c *Client) newBuilder() *resource.Builder {
 }
 
 // Build validates for Kubernetes objects and returns unstructured infos.
-func (c *Client) Build(reader io.Reader, validate bool) (ResourceList, error) {
-	schema, err := c.Factory.Validator(validate)
-	if err != nil {
-		return nil, err
-	}
+func (c *Client) Build(reader io.Reader) (ResourceList, error) {
 	result, err := c.newBuilder().
 		Unstructured().
-		Schema(schema).
 		Stream(reader, "").
 		Do().Infos()
 	return result, scrubValidationError(err)
diff --git a/pkg/kube/fake/fake.go b/pkg/kube/fake/fake.go
index b3f7a393b..938f43364 100644
--- a/pkg/kube/fake/fake.go
+++ b/pkg/kube/fake/fake.go
@@ -83,11 +83,11 @@ func (f *FailingKubeClient) Update(r, modified kube.ResourceList, ignoreMe bool)
 }
 
 // Build returns the configured error if set or prints
-func (f *FailingKubeClient) Build(r io.Reader, _ bool) (kube.ResourceList, error) {
+func (f *FailingKubeClient) Build(r io.Reader) (kube.ResourceList, error) {
 	if f.BuildError != nil {
 		return []*resource.Info{}, f.BuildError
 	}
-	return f.PrintingKubeClient.Build(r, false)
+	return f.PrintingKubeClient.Build(r)
 }
 
 // WaitAndGetCompletedPodPhase returns the configured error if set or prints
diff --git a/pkg/kube/fake/printer.go b/pkg/kube/fake/printer.go
index ec75aa790..4e8344171 100644
--- a/pkg/kube/fake/printer.go
+++ b/pkg/kube/fake/printer.go
@@ -82,7 +82,7 @@ func (p *PrintingKubeClient) Update(_, modified kube.ResourceList, _ bool) (*kub
 }
 
 // Build implements KubeClient Build.
-func (p *PrintingKubeClient) Build(_ io.Reader, _ bool) (kube.ResourceList, error) {
+func (p *PrintingKubeClient) Build(_ io.Reader) (kube.ResourceList, error) {
 	return []*resource.Info{}, nil
 }
 
diff --git a/pkg/kube/interface.go b/pkg/kube/interface.go
index 4bf61211e..fc4189cc9 100644
--- a/pkg/kube/interface.go
+++ b/pkg/kube/interface.go
@@ -51,9 +51,7 @@ type Interface interface {
 	//
 	// reader must contain a YAML stream (one or more YAML documents separated
 	// by "\n---\n")
-	//
-	// Validates against OpenAPI schema if validate is true.
-	Build(reader io.Reader, validate bool) (ResourceList, error)
+	Build(reader io.Reader) (ResourceList, error)
 
 	// WaitAndGetCompletedPodPhase waits up to a timeout until a pod enters a completed phase
 	// and returns said phase (PodSucceeded or PodFailed qualify).


Test patch:
diff --git a/cmd/helm/get_values_test.go b/cmd/helm/get_values_test.go
index ee77053e4..da3cc9e39 100644
--- a/cmd/helm/get_values_test.go
+++ b/cmd/helm/get_values_test.go
@@ -32,7 +32,23 @@ func TestGetValuesCmd(t *testing.T) {
 		name:      "get values requires release name arg",
 		cmd:       "get values",
 		golden:    "output/get-values-args.txt",
+		rels:      []*release.Release{release.Mock(&release.MockReleaseOptions{Name: "thomas-guide"})},
 		wantError: true,
+	}, {
+		name:   "get values thomas-guide (all)",
+		cmd:    "get values thomas-guide --all",
+		golden: "output/get-values-all.txt",
+		rels:   []*release.Release{release.Mock(&release.MockReleaseOptions{Name: "thomas-guide"})},
+	}, {
+		name:   "get values to json",
+		cmd:    "get values thomas-guide --output json",
+		golden: "output/values.json",
+		rels:   []*release.Release{release.Mock(&release.MockReleaseOptions{Name: "thomas-guide"})},
+	}, {
+		name:   "get values to yaml",
+		cmd:    "get values thomas-guide --output yaml",
+		golden: "output/values.yaml",
+		rels:   []*release.Release{release.Mock(&release.MockReleaseOptions{Name: "thomas-guide"})},
 	}}
 	runTestCmd(t, tests)
 }
diff --git a/cmd/helm/testdata/output/get-values-all.txt b/cmd/helm/testdata/output/get-values-all.txt
new file mode 100644
index 000000000..b7e9696bc
--- /dev/null
+++ b/cmd/helm/testdata/output/get-values-all.txt
@@ -0,0 +1,2 @@
+COMPUTED VALUES:
+name: value
diff --git a/cmd/helm/testdata/output/get-values.txt b/cmd/helm/testdata/output/get-values.txt
index de601163c..b7d146b15 100644
--- a/cmd/helm/testdata/output/get-values.txt
+++ b/cmd/helm/testdata/output/get-values.txt
@@ -1,2 +1,2 @@
+USER-SUPPLIED VALUES:
 name: value
-
diff --git a/cmd/helm/testdata/output/values.json b/cmd/helm/testdata/output/values.json
new file mode 100644
index 000000000..ea8308627
--- /dev/null
+++ b/cmd/helm/testdata/output/values.json
@@ -0,0 +1,1 @@
+{"name":"value"}
diff --git a/cmd/helm/testdata/output/values.yaml b/cmd/helm/testdata/output/values.yaml
new file mode 100644
index 000000000..54ab03c93
--- /dev/null
+++ b/cmd/helm/testdata/output/values.yaml
@@ -0,0 +1,1 @@
+name: value
diff --git a/internal/resolver/resolver_test.go b/internal/resolver/resolver_test.go
index 6bb29ba9a..3c402aaea 100644
--- a/internal/resolver/resolver_test.go
+++ b/internal/resolver/resolver_test.go
@@ -85,29 +85,6 @@ func TestResolve(t *testing.T) {
 			},
 			err: true,
 		},
-		{
-			name: "repo from valid path under charts path",
-			req: []*chart.Dependency{
-				{Name: "localdependency", Repository: "", Version: "0.1.0"},
-			},
-			expect: &chart.Lock{
-				Dependencies: []*chart.Dependency{
-					{Name: "localdependency", Repository: "", Version: "0.1.0"},
-				},
-			},
-		},
-		{
-			name: "repo from invalid path under charts path",
-			req: []*chart.Dependency{
-				{Name: "nonexistentdependency", Repository: "", Version: "0.1.0"},
-			},
-			expect: &chart.Lock{
-				Dependencies: []*chart.Dependency{
-					{Name: "nonexistentlocaldependency", Repository: "", Version: "0.1.0"},
-				},
-			},
-			err: true,
-		},
 	}
 
 	repoNames := map[string]string{"alpine": "kubernetes-charts", "redis": "kubernetes-charts"}
diff --git a/internal/resolver/testdata/chartpath/charts/localdependency/Chart.yaml b/internal/resolver/testdata/chartpath/charts/localdependency/Chart.yaml
deleted file mode 100644
index 083c51ee5..000000000
--- a/internal/resolver/testdata/chartpath/charts/localdependency/Chart.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
-description: A Helm chart for Kubernetes
-name: localdependency
-version: 0.1.0
diff --git a/pkg/action/release_testing.go b/pkg/action/release_testing.go
index 0f594512b..40dddf061 100644
--- a/pkg/action/release_testing.go
+++ b/pkg/action/release_testing.go
@@ -74,7 +74,7 @@ func (r *ReleaseTesting) Run(name string) error {
 				}
 			}
 		}
-		hooks, err := r.cfg.KubeClient.Build(bytes.NewBufferString(manifestsToDelete.String()), false)
+		hooks, err := r.cfg.KubeClient.Build(bytes.NewBufferString(manifestsToDelete.String()))
 		if err != nil {
 			return fmt.Errorf("unable to build test hooks: %v", err)
 		}
diff --git a/pkg/downloader/manager_test.go b/pkg/downloader/manager_test.go
index 7939771c9..06c62ecaa 100644
--- a/pkg/downloader/manager_test.go
+++ b/pkg/downloader/manager_test.go
@@ -147,13 +147,6 @@ func TestGetRepoNames(t *testing.T) {
 			},
 			expect: map[string]string{"oedipus-rex": "testing"},
 		},
-		{
-			name: "repo from local chart under charts path",
-			req: []*chart.Dependency{
-				{Name: "local-subchart", Repository: ""},
-			},
-			expect: map[string]string{},
-		},
 	}
 
 	for _, tt := range tests {
diff --git a/pkg/downloader/testdata/local-subchart/Chart.yaml b/pkg/downloader/testdata/local-subchart/Chart.yaml
deleted file mode 100644
index 1e17203e5..000000000
--- a/pkg/downloader/testdata/local-subchart/Chart.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
-description: A Helm chart for Kubernetes
-name: local-subchart
-version: 0.1.0
diff --git a/pkg/kube/client_test.go b/pkg/kube/client_test.go
index a0c678b50..a425a8e12 100644
--- a/pkg/kube/client_test.go
+++ b/pkg/kube/client_test.go
@@ -153,11 +153,11 @@ func TestUpdate(t *testing.T) {
 			}
 		}),
 	}
-	first, err := c.Build(objBody(&listA), false)
+	first, err := c.Build(objBody(&listA))
 	if err != nil {
 		t.Fatal(err)
 	}
-	second, err := c.Build(objBody(&listB), false)
+	second, err := c.Build(objBody(&listB))
 	if err != nil {
 		t.Fatal(err)
 	}
@@ -222,7 +222,7 @@ func TestBuild(t *testing.T) {
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
 			// Test for an invalid manifest
-			infos, err := c.Build(tt.reader, false)
+			infos, err := c.Build(tt.reader)
 			if err != nil && !tt.err {
 				t.Errorf("Got error message when no error should have occurred: %v", err)
 			} else if err != nil && strings.Contains(err.Error(), "--validate=false") {
@@ -266,7 +266,7 @@ func TestPerform(t *testing.T) {
 			}
 
 			c := newTestClient()
-			infos, err := c.Build(tt.reader, false)
+			infos, err := c.Build(tt.reader)
 			if err != nil && err.Error() != tt.errMessage {
 				t.Errorf("Error while building manifests: %v", err)
 			}
@@ -289,7 +289,7 @@ func TestPerform(t *testing.T) {
 func TestReal(t *testing.T) {
 	t.Skip("This is a live test, comment this line to run")
 	c := New(nil)
-	resources, err := c.Build(strings.NewReader(guestbookManifest), false)
+	resources, err := c.Build(strings.NewReader(guestbookManifest))
 	if err != nil {
 		t.Fatal(err)
 	}
@@ -299,7 +299,7 @@ func TestReal(t *testing.T) {
 
 	testSvcEndpointManifest := testServiceManifest + "\n---\n" + testEndpointManifest
 	c = New(nil)
-	resources, err = c.Build(strings.NewReader(testSvcEndpointManifest), false)
+	resources, err = c.Build(strings.NewReader(testSvcEndpointManifest))
 	if err != nil {
 		t.Fatal(err)
 	}
@@ -307,7 +307,7 @@ func TestReal(t *testing.T) {
 		t.Fatal(err)
 	}
 
-	resources, err = c.Build(strings.NewReader(testEndpointManifest), false)
+	resources, err = c.Build(strings.NewReader(testEndpointManifest))
 	if err != nil {
 		t.Fatal(err)
 	}
@@ -316,7 +316,7 @@ func TestReal(t *testing.T) {
 		t.Fatal(errs)
 	}
 
-	resources, err = c.Build(strings.NewReader(testSvcEndpointManifest), false)
+	resources, err = c.Build(strings.NewReader(testSvcEndpointManifest))
 	if err != nil {
 		t.Fatal(err)
 	}