fix: Fix service export example doc (#1006)

* fix: Fix service export example doc

* chore: Update changelog

* fix: Add newline divider
This commit is contained in:
David Simansky 2020-09-11 13:07:00 +02:00 committed by GitHub
parent 77564112df
commit a1b4f39814
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 4 deletions

View File

@ -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%"]

View File

@ -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

View File

@ -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")