|
|
|
@ -26,7 +26,10 @@ import (
|
|
|
|
|
"github.com/kubernetes/helm/pkg/format"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
var errMissingDeploymentArg = errors.New("First argument, deployment name, is required. Try 'helm get --help'")
|
|
|
|
|
var (
|
|
|
|
|
errMissingDeploymentArg = errors.New("First argument, deployment name, is required. Try 'helm get --help'")
|
|
|
|
|
errTooManyArgs = errors.New("Too many arguments provided. Try 'helm dep describe [DEPLOYMENT]'")
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
const defaultShowFormat = `Name: {{.Name}}
|
|
|
|
|
Status: {{.State.Status}}
|
|
|
|
@ -57,6 +60,12 @@ func deploymentCommands() cli.Command {
|
|
|
|
|
ArgsUsage: "DEPLOYMENT [DEPLOYMENT [...]]",
|
|
|
|
|
Action: func(c *cli.Context) { run(c, deleteDeployment) },
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
Name: "describe",
|
|
|
|
|
Usage: "Describes the kubernetes resources for the named deployment(s).",
|
|
|
|
|
ArgsUsage: "DEPLOYMENT",
|
|
|
|
|
Action: func(c *cli.Context) { run(c, describeDeployment) },
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
Name: "manifest",
|
|
|
|
|
Usage: "Dump the Kubernetes manifest file for this deployment.",
|
|
|
|
@ -125,6 +134,25 @@ func deleteDeployment(c *cli.Context) error {
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func describeDeployment(c *cli.Context) error {
|
|
|
|
|
args := c.Args()
|
|
|
|
|
if len(args) < 1 {
|
|
|
|
|
return errMissingDeploymentArg
|
|
|
|
|
}
|
|
|
|
|
if len(args) > 1 {
|
|
|
|
|
return errTooManyArgs
|
|
|
|
|
}
|
|
|
|
|
name := args[0]
|
|
|
|
|
_, err := NewClient(c).DescribeDeployment(name)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
format.Info("TO BE IMPLEMENTED")
|
|
|
|
|
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func showDeployment(c *cli.Context) error {
|
|
|
|
|
args := c.Args()
|
|
|
|
|
if len(args) < 1 {
|
|
|
|
|