Skip to content

Commit

Permalink
Respond to Roland comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sixolet committed Aug 9, 2019
1 parent 3bd9371 commit aec6083
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/cmd/kn_service_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ kn service create NAME --image IMAGE [flags]
-p, --port int32 The port where application listens on.
--requests-cpu string The requested CPU (e.g., 250m).
--requests-memory string The requested memory (e.g., 64Mi).
--revision-name string The revision name to set. Must start with the service name and a dash as a prefix. Accepts golang templates, allowing {{.Service}} for the service name, {{.Generation}} for the generation, and {{.Random [n]}} for n random consonants. (default "{{.Service}}-{{.Random 5}}-{{.Generation}}")
--revision-name string The revision name to set. Must start with the service name and a dash as a prefix. Empty revision name will result in the server generating a name for the revision. Accepts golang templates, allowing {{.Service}} for the service name, {{.Generation}} for the generation, and {{.Random [n]}} for n random consonants. (default "{{.Service}}-{{.Random 5}}-{{.Generation}}")
--wait-timeout int Seconds to wait before giving up on waiting for service to be ready. (default 60)
```

Expand Down
2 changes: 1 addition & 1 deletion docs/cmd/kn_service_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ kn service update NAME [flags]
-p, --port int32 The port where application listens on.
--requests-cpu string The requested CPU (e.g., 250m).
--requests-memory string The requested memory (e.g., 64Mi).
--revision-name string The revision name to set. Must start with the service name and a dash as a prefix. Accepts golang templates, allowing {{.Service}} for the service name, {{.Generation}} for the generation, and {{.Random [n]}} for n random consonants. (default "{{.Service}}-{{.Random 5}}-{{.Generation}}")
--revision-name string The revision name to set. Must start with the service name and a dash as a prefix. Empty revision name will result in the server generating a name for the revision. Accepts golang templates, allowing {{.Service}} for the service name, {{.Generation}} for the generation, and {{.Random [n]}} for n random consonants. (default "{{.Service}}-{{.Random 5}}-{{.Generation}}")
--wait-timeout int Seconds to wait before giving up on waiting for service to be ready. (default 60)
```

Expand Down
1 change: 1 addition & 0 deletions pkg/kn/commands/service/configuration_edit_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ func (p *ConfigurationEditFlags) addSharedFlags(command *cobra.Command) {
p.markFlagMakesRevision("port")
command.Flags().StringVar(&p.RevisionName, "revision-name", "{{.Service}}-{{.Random 5}}-{{.Generation}}",
"The revision name to set. Must start with the service name and a dash as a prefix. "+
"Empty revision name will result in the server generating a name for the revision. "+
"Accepts golang templates, allowing {{.Service}} for the service name, "+
"{{.Generation}} for the generation, and {{.Random [n]}} for n random consonants.")
p.markFlagMakesRevision("revision-name")
Expand Down
10 changes: 5 additions & 5 deletions pkg/kn/commands/service/service_update_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ func TestServiceUpdateImage(t *testing.T) {
}

func TestServiceUpdateRevisionNameExplicit(t *testing.T) {
orig := newEmptyServiceBeta()
orig := newEmptyServiceBetaAPIStyle()

template, err := servinglib.RevisionTemplateOfService(orig)
if err != nil {
Expand All @@ -191,7 +191,7 @@ func TestServiceUpdateRevisionNameExplicit(t *testing.T) {
}

func TestServiceUpdateRevisionNameGenerated(t *testing.T) {
orig := newEmptyServiceBeta()
orig := newEmptyServiceBetaAPIStyle()

template, err := servinglib.RevisionTemplateOfService(orig)
if err != nil {
Expand All @@ -215,7 +215,7 @@ func TestServiceUpdateRevisionNameGenerated(t *testing.T) {
}

func TestServiceUpdateRevisionNameCleared(t *testing.T) {
orig := newEmptyServiceBeta()
orig := newEmptyServiceBetaAPIStyle()

template, err := servinglib.RevisionTemplateOfService(orig)
if err != nil {
Expand All @@ -237,7 +237,7 @@ func TestServiceUpdateRevisionNameCleared(t *testing.T) {
}

func TestServiceUpdateRevisionNameNoMutationNoChange(t *testing.T) {
orig := newEmptyServiceBeta()
orig := newEmptyServiceBetaAPIStyle()

template, err := servinglib.RevisionTemplateOfService(orig)
if err != nil {
Expand Down Expand Up @@ -491,7 +491,7 @@ func newEmptyService() *v1alpha1.Service {
}
}

func newEmptyServiceBeta() *v1alpha1.Service {
func newEmptyServiceBetaAPIStyle() *v1alpha1.Service {
ret := &v1alpha1.Service{
TypeMeta: metav1.TypeMeta{
Kind: "Service",
Expand Down

0 comments on commit aec6083

Please sign in to comment.