Skip to content

Commit

Permalink
Unify description spelling in cmd and pkg/apis. (#1172)
Browse files Browse the repository at this point in the history
  • Loading branch information
porridge authored and kensipe committed Dec 16, 2019
1 parent a90277d commit 537dc98
Show file tree
Hide file tree
Showing 9 changed files with 100 additions and 94 deletions.
2 changes: 1 addition & 1 deletion config/crds/kudo_v1beta1_instance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spec:
properties:
OperatorVersion:
description: OperatorVersion specifies a reference to a specific OperatorVersion
object
object.
type: object
parameters:
type: object
Expand Down
29 changes: 15 additions & 14 deletions config/crds/kudo_v1beta1_operatorversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ spec:
spec:
properties:
connectionString:
description: ConnectionString defines a mustached string that can be
used to connect to an instance of the Operator
description: ConnectionString defines a templated string that can be
used to connect to an instance of the Operator.
type: string
crdVersion:
type: string
Expand All @@ -37,35 +37,36 @@ spec:
properties:
default:
description: Default is a default value if no parameter is provided
by the instance
by the instance.
type: string
description:
description: Description captures a longer description of how
the variable will be used
the parameter will be used.
type: string
displayName:
description: Human friendly crdVersion of the parameter name
description: DisplayName can be used by UIs.
type: string
name:
description: 'Name is the string that should be used in the template
file for example, if `name: COUNT` then using the variable `.Params.COUNT`'
description: "Name is the string that should be used in the template
file for example, if `name: COUNT` then using the variable in
a spec like: \n spec: replicas: {{ .Params.COUNT }}"
type: string
required:
description: Required specifies if the parameter is required to
be provided by all instances, or whether a default can suffice
be provided by all instances, or whether a default can suffice.
type: boolean
trigger:
description: Trigger identifies the plan that gets executed when
this parameter changes in the Instance object. Default is `update`
if present, or `deploy` if not present
if a plan with that name exists, otherwise it's `deploy`.
type: string
type: object
type: array
plans:
description: Plans specify a map a plans that specify how to
description: Plans maps a plan name to a plan.
type: object
tasks:
description: List of all tasks available in this OperatorVersions
description: List of all tasks available in this OperatorVersion.
items:
properties:
kind:
Expand All @@ -77,12 +78,12 @@ spec:
type: object
type: array
templates:
description: List of go templates YAML files that define the application
operator instance
description: Templates is a list of references to YAML templates located
in the templates folder and later referenced from tasks.
type: object
upgradableFrom:
description: UpgradableFrom lists all OperatorVersions that can upgrade
to this OperatorVersion
to this OperatorVersion.
items:
type: object
type: array
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/kudo/v1beta1/instance_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const instanceCleanupFinalizerName = "kudo.dev.instance.cleanup"

// InstanceSpec defines the desired state of Instance.
type InstanceSpec struct {
// OperatorVersion specifies a reference to a specific Operator object.
// OperatorVersion specifies a reference to a specific OperatorVersion object.
OperatorVersion corev1.ObjectReference `json:"operatorVersion,omitempty"`

Parameters map[string]string `json:"parameters,omitempty"`
Expand Down
13 changes: 7 additions & 6 deletions pkg/apis/kudo/v1beta1/operatorversion_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ type OperatorVersionSpec struct {

// Yaml captures a templated yaml list of elements that define the application operator instance.
Templates map[string]string `json:"templates,omitempty"`
Tasks []Task `json:"tasks,omitempty"`
// List of all tasks available in this OperatorVersion.
Tasks []Task `json:"tasks,omitempty"`

Parameters []Parameter `json:"parameters,omitempty"`

Expand Down Expand Up @@ -68,14 +69,14 @@ type Plan struct {

// Parameter captures the variability of an OperatorVersion being instantiated in an instance.
type Parameter struct {
// DisplayName can be used by UI's.
// DisplayName can be used by UIs.
DisplayName string `json:"displayName,omitempty"`

// Name is the string that should be used in the templated file for example,
// Name is the string that should be used in the template file for example,
// if `name: COUNT` then using the variable in a spec like:
//
// spec:
// replicas: {{COUNT}}
// replicas: {{ .Params.COUNT }}
Name string `json:"name,omitempty"`

// Description captures a longer description of how the parameter will be used.
Expand All @@ -88,7 +89,7 @@ type Parameter struct {
Default *string `json:"default,omitempty"`

// Trigger identifies the plan that gets executed when this parameter changes in the Instance object.
// Default is `update` if a plan with that name exists, otherwise it's `deploy`
// Default is `update` if a plan with that name exists, otherwise it's `deploy`.
Trigger string `json:"trigger,omitempty"`
}

Expand Down Expand Up @@ -129,7 +130,7 @@ type ResourceTaskSpec struct {
Resources []string `json:"resources"`
}

// DummyTaskSpec can succeed of fail on demand and is very useful for testing operators
// DummyTaskSpec can succeed or fail on demand and is very useful for testing operators
type DummyTaskSpec struct {
WantErr bool `json:"wantErr"`
Fatal bool `json:"fatal"`
Expand Down
31 changes: 16 additions & 15 deletions pkg/kudoctl/cmd/testdata/deploy-kudo-ns.yaml.golden
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ spec:
spec:
properties:
connectionString:
description: ConnectionString defines a mustached string that can be
used to connect to an instance of the Operator
description: ConnectionString defines a templated string that can be
used to connect to an instance of the Operator.
type: string
crdVersion:
type: string
Expand All @@ -94,35 +94,36 @@ spec:
properties:
default:
description: Default is a default value if no parameter is provided
by the instance
by the instance.
type: string
description:
description: Description captures a longer description of how
the variable will be used
the parameter will be used.
type: string
displayName:
description: Human friendly crdVersion of the parameter name
description: DisplayName can be used by UIs.
type: string
name:
description: 'Name is the string that should be used in the template
file for example, if `name: COUNT` then using the variable `.Params.COUNT`'
description: "Name is the string that should be used in the template
file for example, if `name: COUNT` then using the variable in
a spec like: \n spec: replicas: {{ .Params.COUNT }}"
type: string
required:
description: Required specifies if the parameter is required to
be provided by all instances, or whether a default can suffice
be provided by all instances, or whether a default can suffice.
type: boolean
trigger:
description: Trigger identifies the plan that gets executed when
this parameter changes in the Instance object. Default is `update`
if present, or `deploy` if not present
if a plan with that name exists, otherwise it's `deploy`.
type: string
type: object
type: array
plans:
description: Plans specify a map a plans that specify how to
description: Plans maps a plan name to a plan.
type: object
tasks:
description: List of all tasks available in this OperatorVersions
description: List of all tasks available in this OperatorVersion.
items:
properties:
kind:
Expand All @@ -134,12 +135,12 @@ spec:
type: object
type: array
templates:
description: List of go templates YAML files that define the application
operator instance
description: Templates is a list of references to YAML templates located
in the templates folder and later referenced from tasks.
type: object
upgradableFrom:
description: UpgradableFrom lists all OperatorVersions that can upgrade
to this OperatorVersion
to this OperatorVersion.
items:
type: object
type: array
Expand Down Expand Up @@ -186,7 +187,7 @@ spec:
properties:
OperatorVersion:
description: OperatorVersion specifies a reference to a specific OperatorVersion
object
object.
type: object
parameters:
type: object
Expand Down
31 changes: 16 additions & 15 deletions pkg/kudoctl/cmd/testdata/deploy-kudo-sa.yaml.golden
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ spec:
spec:
properties:
connectionString:
description: ConnectionString defines a mustached string that can be
used to connect to an instance of the Operator
description: ConnectionString defines a templated string that can be
used to connect to an instance of the Operator.
type: string
crdVersion:
type: string
Expand All @@ -94,35 +94,36 @@ spec:
properties:
default:
description: Default is a default value if no parameter is provided
by the instance
by the instance.
type: string
description:
description: Description captures a longer description of how
the variable will be used
the parameter will be used.
type: string
displayName:
description: Human friendly crdVersion of the parameter name
description: DisplayName can be used by UIs.
type: string
name:
description: 'Name is the string that should be used in the template
file for example, if `name: COUNT` then using the variable `.Params.COUNT`'
description: "Name is the string that should be used in the template
file for example, if `name: COUNT` then using the variable in
a spec like: \n spec: replicas: {{ .Params.COUNT }}"
type: string
required:
description: Required specifies if the parameter is required to
be provided by all instances, or whether a default can suffice
be provided by all instances, or whether a default can suffice.
type: boolean
trigger:
description: Trigger identifies the plan that gets executed when
this parameter changes in the Instance object. Default is `update`
if present, or `deploy` if not present
if a plan with that name exists, otherwise it's `deploy`.
type: string
type: object
type: array
plans:
description: Plans specify a map a plans that specify how to
description: Plans maps a plan name to a plan.
type: object
tasks:
description: List of all tasks available in this OperatorVersions
description: List of all tasks available in this OperatorVersion.
items:
properties:
kind:
Expand All @@ -134,12 +135,12 @@ spec:
type: object
type: array
templates:
description: List of go templates YAML files that define the application
operator instance
description: Templates is a list of references to YAML templates located
in the templates folder and later referenced from tasks.
type: object
upgradableFrom:
description: UpgradableFrom lists all OperatorVersions that can upgrade
to this OperatorVersion
to this OperatorVersion.
items:
type: object
type: array
Expand Down Expand Up @@ -186,7 +187,7 @@ spec:
properties:
OperatorVersion:
description: OperatorVersion specifies a reference to a specific OperatorVersion
object
object.
type: object
parameters:
type: object
Expand Down
31 changes: 16 additions & 15 deletions pkg/kudoctl/cmd/testdata/deploy-kudo-webhook.yaml.golden
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ spec:
spec:
properties:
connectionString:
description: ConnectionString defines a mustached string that can be
used to connect to an instance of the Operator
description: ConnectionString defines a templated string that can be
used to connect to an instance of the Operator.
type: string
crdVersion:
type: string
Expand All @@ -94,35 +94,36 @@ spec:
properties:
default:
description: Default is a default value if no parameter is provided
by the instance
by the instance.
type: string
description:
description: Description captures a longer description of how
the variable will be used
the parameter will be used.
type: string
displayName:
description: Human friendly crdVersion of the parameter name
description: DisplayName can be used by UIs.
type: string
name:
description: 'Name is the string that should be used in the template
file for example, if `name: COUNT` then using the variable `.Params.COUNT`'
description: "Name is the string that should be used in the template
file for example, if `name: COUNT` then using the variable in
a spec like: \n spec: replicas: {{ .Params.COUNT }}"
type: string
required:
description: Required specifies if the parameter is required to
be provided by all instances, or whether a default can suffice
be provided by all instances, or whether a default can suffice.
type: boolean
trigger:
description: Trigger identifies the plan that gets executed when
this parameter changes in the Instance object. Default is `update`
if present, or `deploy` if not present
if a plan with that name exists, otherwise it's `deploy`.
type: string
type: object
type: array
plans:
description: Plans specify a map a plans that specify how to
description: Plans maps a plan name to a plan.
type: object
tasks:
description: List of all tasks available in this OperatorVersions
description: List of all tasks available in this OperatorVersion.
items:
properties:
kind:
Expand All @@ -134,12 +135,12 @@ spec:
type: object
type: array
templates:
description: List of go templates YAML files that define the application
operator instance
description: Templates is a list of references to YAML templates located
in the templates folder and later referenced from tasks.
type: object
upgradableFrom:
description: UpgradableFrom lists all OperatorVersions that can upgrade
to this OperatorVersion
to this OperatorVersion.
items:
type: object
type: array
Expand Down Expand Up @@ -186,7 +187,7 @@ spec:
properties:
OperatorVersion:
description: OperatorVersion specifies a reference to a specific OperatorVersion
object
object.
type: object
parameters:
type: object
Expand Down
Loading

0 comments on commit 537dc98

Please sign in to comment.