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
084c0da5
Commit
084c0da5
authored
Mar 24, 2016
by
Matt Butcher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(cli): move 'helm dm' to 'helm server'
parent
3fe151a4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
48 deletions
+28
-48
server.go
cmd/helm/server.go
+28
-11
target.go
cmd/helm/target.go
+0
-37
No files found.
cmd/helm/
dm
.go
→
cmd/helm/
server
.go
View file @
084c0da5
...
...
@@ -18,6 +18,7 @@ package main
import
(
"errors"
"fmt"
"os"
"github.com/codegangsta/cli"
...
...
@@ -26,7 +27,7 @@ import (
"github.com/kubernetes/helm/pkg/kubectl"
)
// ErrAlreadyInstalled indicates that
DM
is already installed.
// ErrAlreadyInstalled indicates that
Helm Server
is already installed.
var
ErrAlreadyInstalled
=
errors
.
New
(
"Already Installed"
)
func
init
()
{
...
...
@@ -35,14 +36,17 @@ func init() {
func
dmCmd
()
cli
.
Command
{
return
cli
.
Command
{
Name
:
"
dm
"
,
Usage
:
"Manage
DM on Kubernete
s"
,
Name
:
"
server
"
,
Usage
:
"Manage
Helm server-side component
s"
,
Subcommands
:
[]
cli
.
Command
{
{
Name
:
"install"
,
Usage
:
"Install DM on Kubernetes."
,
ArgsUsage
:
""
,
Description
:
``
,
Name
:
"install"
,
Usage
:
"Install Helm server components on Kubernetes."
,
ArgsUsage
:
""
,
Description
:
`Use kubectl to install Helm components in their own namespace on Kubernetes.
Make sure your Kubernetes environment is pointed to the cluster on which you
wish to install.`
,
Flags
:
[]
cli
.
Flag
{
cli
.
BoolFlag
{
Name
:
"dry-run"
,
...
...
@@ -77,13 +81,13 @@ func dmCmd() cli.Command {
},
{
Name
:
"uninstall"
,
Usage
:
"Uninstall the
DM
from Kubernetes."
,
Usage
:
"Uninstall the
Helm server-side
from Kubernetes."
,
ArgsUsage
:
""
,
Description
:
``
,
Flags
:
[]
cli
.
Flag
{
cli
.
BoolFlag
{
Name
:
"dry-run"
,
Usage
:
"Show what would be
installed, but don't install
anything."
,
Usage
:
"Show what would be
uninstalled, but don't remove
anything."
,
},
},
Action
:
func
(
c
*
cli
.
Context
)
{
...
...
@@ -95,7 +99,7 @@ func dmCmd() cli.Command {
},
{
Name
:
"status"
,
Usage
:
"Show status of
DM
."
,
Usage
:
"Show status of
Helm server-side components
."
,
ArgsUsage
:
""
,
Flags
:
[]
cli
.
Flag
{
cli
.
BoolFlag
{
...
...
@@ -111,7 +115,7 @@ func dmCmd() cli.Command {
},
{
Name
:
"target"
,
Usage
:
"Displays information about cluster."
,
Usage
:
"Displays information about
the Kubernetes
cluster."
,
ArgsUsage
:
""
,
Action
:
func
(
c
*
cli
.
Context
)
{
if
err
:=
target
(
c
.
Bool
(
"dry-run"
));
err
!=
nil
{
...
...
@@ -177,3 +181,16 @@ func getKubectlRunner(dryRun bool) kubectl.Runner {
}
return
&
kubectl
.
RealRunner
{}
}
func
target
(
dryRun
bool
)
error
{
client
:=
kubectl
.
Client
if
dryRun
{
client
=
kubectl
.
PrintRunner
{}
}
out
,
err
:=
client
.
ClusterInfo
()
if
err
!=
nil
{
return
fmt
.
Errorf
(
"%s (%s)"
,
out
,
err
)
}
format
.
Msg
(
string
(
out
))
return
nil
}
cmd/helm/target.go
deleted
100644 → 0
View file @
3fe151a4
/*
Copyright 2016 The Kubernetes Authors All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package
main
import
(
"fmt"
"github.com/kubernetes/helm/pkg/format"
"github.com/kubernetes/helm/pkg/kubectl"
)
func
target
(
dryRun
bool
)
error
{
client
:=
kubectl
.
Client
if
dryRun
{
client
=
kubectl
.
PrintRunner
{}
}
out
,
err
:=
client
.
ClusterInfo
()
if
err
!=
nil
{
return
fmt
.
Errorf
(
"%s (%s)"
,
out
,
err
)
}
format
.
Msg
(
string
(
out
))
return
nil
}
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