Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement "kubedb edit" #34

Merged
merged 9 commits into from
May 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/kubedb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ Basic Commands (Beginner):

Basic Commands (Intermediate):
get Display one or many resources
delete Delete resources by filenames, stdin, resources and names, or by resources and label selector
edit Edit a resource on the server
delete Delete resources by file names, stdin, resources and names, or by resources and label selector

Troubleshooting and Debugging Commands:
describe Show details of a specific resource or group of resources
Expand Down
31 changes: 31 additions & 0 deletions docs/kubedb/edit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# kubedb edit

## Example

##### Help for edit command

```bash
$ kubedb edit --help

Edit a resource from the default editor.

The edit command allows you to directly edit any API resource you can retrieve via the command line tools. It will open
the editor defined by your KUBEDB _EDITOR, or EDITOR environment variables, or fall back to 'nano'

Examples:
# Edit the elastic named 'elasticsearch-demo':
kubedb edit es/elasticsearch-demo

# Use an alternative editor
KUBEDB_EDITOR="nano" kubedb edit es/elasticsearch-demo

Options:
--all=false: [-all] to select all the specified resources.
-o, --output='yaml': Output format. One of: yaml|json.
-l, --selector='': Selector (label query) to filter on.

Usage:
kubedb edit (RESOURCE/NAME) [flags] [options]

Use "kubedb edit options" for a list of global command-line options (applies to all commands).
```
7 changes: 4 additions & 3 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pkg/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ func NewKubedbCommand(in io.Reader, out, err io.Writer) *cobra.Command {
Message: "Basic Commands (Intermediate):",
Commands: []*cobra.Command{
NewCmdGet(out, err),
NewCmdEdit(out, err),
NewCmdDelete(out, err),
},
},
Expand Down
Loading