Commit 70a9e4aa authored by Matt Butcher's avatar Matt Butcher Committed by GitHub

Merge pull request #1364 from technosophos/fix/1135-output-consistency

fix(helm): make 'helm install' output more consistent
parents 1a7373e5 70c453c4
......@@ -143,7 +143,7 @@ func setupConnection(c *cobra.Command, args []string) error {
// Set up the gRPC config.
if flagDebug {
fmt.Printf("Server: %q\n", tillerHost)
fmt.Printf("SERVER: %q\n", tillerHost)
}
return nil
}
......
......@@ -36,7 +36,6 @@ import (
"k8s.io/helm/cmd/helm/helmpath"
"k8s.io/helm/pkg/helm"
"k8s.io/helm/pkg/proto/hapi/release"
"k8s.io/helm/pkg/timeconv"
)
const installDesc = `
......@@ -143,7 +142,7 @@ func newInstallCmd(c helm.Interface, out io.Writer) *cobra.Command {
func (i *installCmd) run() error {
if flagDebug {
fmt.Fprintf(i.out, "Chart path: %s\n", i.chartPath)
fmt.Fprintf(i.out, "CHART PATH: %s\n", i.chartPath)
}
rawVals, err := i.vals()
......@@ -158,7 +157,7 @@ func (i *installCmd) run() error {
return err
}
// Print the final name so the user knows what the final name of the release is.
fmt.Printf("Final name: %s\n", i.name)
fmt.Printf("FINAL NAME: %s\n", i.name)
}
res, err := i.client.InstallRelease(
......@@ -226,12 +225,11 @@ func (i *installCmd) printRelease(rel *release.Release) {
// TODO: Switch to text/template like everything else.
if flagDebug {
fmt.Fprintf(i.out, "NAME: %s\n", rel.Name)
fmt.Fprintf(i.out, "NAMESPACE: %s\n", rel.Namespace)
fmt.Fprintf(i.out, "INFO: %s %s\n", timeconv.String(rel.Info.LastDeployed), rel.Info.Status)
fmt.Fprintf(i.out, "TARGET NAMESPACE: %s\n", rel.Namespace)
fmt.Fprintf(i.out, "CHART: %s %s\n", rel.Chart.Metadata.Name, rel.Chart.Metadata.Version)
fmt.Fprintf(i.out, "MANIFEST: %s\n", rel.Manifest)
} else {
fmt.Fprintln(i.out, rel.Name)
fmt.Fprintf(i.out, "NAME: %s\n", rel.Name)
}
}
......
......@@ -79,18 +79,18 @@ func (s *statusCmd) run() error {
// 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, "NAMESPACE: %s\n", res.Namespace)
fmt.Fprintf(out, "STATUS: %s\n", res.Info.Status.Code)
if res.Info.Status.Details != nil {
fmt.Fprintf(out, "Details: %s\n", res.Info.Status.Details)
}
fmt.Fprintf(out, "\n")
if len(res.Info.Status.Resources) > 0 {
fmt.Fprintf(out, "Resources:\n%s\n", res.Info.Status.Resources)
fmt.Fprintf(out, "RESOURCES:\n%s\n", res.Info.Status.Resources)
}
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)
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment