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

fix: Fix service export example doc #1006

Merged
merged 3 commits into from
Sep 11, 2020
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
12 changes: 12 additions & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@
| https://github.com/knative/client/pull/[#]
////

## Unreleased

[cols="1,10,3", options="header", width="100%"]
|===
| | Description | PR

| 🐛
| Fix service export example documentation
| https://github.com/knative/client/pull/1006[#1006]

|===

## v0.17.0 (2020-08-26)

[cols="1,10,3", options="header", width="100%"]
Expand Down
7 changes: 5 additions & 2 deletions docs/cmd/kn_service_export.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,15 @@ kn service export NAME

# Export a service in YAML format
kn service export foo -n bar -o yaml

# Export a service in JSON format
kn service export foo -n bar -o json

# Export a service with revisions
kn service export foo --with-revisions --mode=resources -n bar -o json
kn service export foo --with-revisions --mode=export -n bar -o json

# Export services in kubectl friendly format, as a list kind, one service item for each revision
kn service export foo --with-revisions --mode=kubernetes -n bar -o json
kn service export foo --with-revisions --mode=replay -n bar -o json
```

### Options
Expand Down
7 changes: 5 additions & 2 deletions pkg/kn/commands/service/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,15 @@ func NewServiceExportCommand(p *commands.KnParams) *cobra.Command {
Example: `
# Export a service in YAML format
kn service export foo -n bar -o yaml

# Export a service in JSON format
kn service export foo -n bar -o json

# Export a service with revisions
kn service export foo --with-revisions --mode=resources -n bar -o json
kn service export foo --with-revisions --mode=export -n bar -o json

# Export services in kubectl friendly format, as a list kind, one service item for each revision
kn service export foo --with-revisions --mode=kubernetes -n bar -o json`,
kn service export foo --with-revisions --mode=replay -n bar -o json`,
RunE: func(cmd *cobra.Command, args []string) error {
if len(args) != 1 {
return errors.New("'kn service export' requires name of the service as single argument")
Expand Down