Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
helm3
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
helm3
Commits
5aedea16
Commit
5aedea16
authored
Mar 25, 2016
by
Michelle Noorali
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(deployment): add describe command to helm cli
parent
f7e66da9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
1 deletion
+36
-1
deployment.go
cmd/helm/deployment.go
+29
-1
deployments.go
pkg/client/deployments.go
+7
-0
No files found.
cmd/helm/deployment.go
View file @
5aedea16
...
...
@@ -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
{
...
...
pkg/client/deployments.go
View file @
5aedea16
...
...
@@ -100,6 +100,13 @@ func (c *Client) DeleteDeployment(name string) (*common.Deployment, error) {
return
deployment
,
err
}
// DescribDeployment describes the kubernetes resources of the supplied deployment
func
(
c
*
Client
)
DescribeDeployment
(
name
string
)
(
*
common
.
Deployment
,
error
)
{
var
deployment
*
common
.
Deployment
//TODO: implement
return
deployment
,
nil
}
// PostDeployment posts a deployment object to the manager service.
func
(
c
*
Client
)
PostDeployment
(
res
*
common
.
Resource
)
error
{
// This is a stop-gap until we get this API cleaned up.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment