Skip to content

Commit

Permalink
Clarify docs: rename spec to desired conf
Browse files Browse the repository at this point in the history
In the S3 bucket, the file cluster.spec is not actually the spec, but the
actual configuration. The file config is the spec. To avoid confusion,
this commit changes spec/specification into 'desired configuration' in
the documentation, to avoid associating cluster.spec with a cluster
'specification' that the users should use.
  • Loading branch information
kenden committed Jun 11, 2017
1 parent 5aa9b5f commit fe08226
Show file tree
Hide file tree
Showing 20 changed files with 62 additions and 29 deletions.
8 changes: 4 additions & 4 deletions cmd/kops/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ var (
create_long = templates.LongDesc(i18n.T(`
Create a resource:` + validResources +
`
Create a cluster, instancegroup or secret using command line flags or
YAML cluster spec. Clusters and instancegroups can be created using the YAML
cluster spec.
Create a cluster, instancegroup or secret using command line parameters
or YAML configuration specification files.
(Note: secrets cannot be created from YAML config files yet).
`))

create_example = templates.Examples(i18n.T(`
# Create a cluster using a cluser spec file
# Create a cluster from the configuration specification in a YAML file
kops create -f my-cluster.yaml
# Create a cluster in AWS
Expand Down
2 changes: 1 addition & 1 deletion cmd/kops/edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (

var (
edit_long = templates.LongDesc(i18n.T(`Edit a resource configuration.
This command changes the cloud specification in the registry.
This command changes the desired configuration in the registry.
To set your preferred editor, you can define the EDITOR environment variable.
When you have done this, kops will use the editor that you have set.
Expand Down
2 changes: 1 addition & 1 deletion cmd/kops/edit_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ type EditClusterOptions struct {
var (
edit_cluster_long = templates.LongDesc(i18n.T(`Edit a cluster configuration.
This command changes the cluster cloud specification in the registry.
This command changes the desired cluster configuration in the registry.
To set your preferred editor, you can define the EDITOR environment variable.
When you have done this, kops will use the editor that you have set.
Expand Down
2 changes: 1 addition & 1 deletion cmd/kops/edit_federation.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import (
var (
edit_federation_long = templates.LongDesc(i18n.T(`Edit a cluster configuration.
This command changes the federation cloud specification in the registry.
This command changes the federation cloud desired configuration in the registry.
To set your preferred editor, you can define the EDITOR environment variable.
When you have done this, kops will use the editor that you have set.
Expand Down
4 changes: 2 additions & 2 deletions cmd/kops/edit_instancegroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ import (
var (
edit_instancegroup_long = templates.LongDesc(i18n.T(`Edit a cluster configuration.
This command changes the instancegroup cloud specification in the registry.
This command changes the instancegroup desired configuration in the registry.
To set your preferred editor, you can define the EDITOR environment variable.
When you have done this, kops will use the editor that you have set.
kops edit does not update the cloud resources, to apply the changes use "kops update cluster".`))

edit_instancegroup_example = templates.Examples(i18n.T(`
# Edit a instancegroup configuration.
# Edit an instancegroup desired configuration.
kops edit ig --name k8s-cluster.example.com node --state=s3://kops-state-1234
`))

Expand Down
8 changes: 7 additions & 1 deletion cmd/kops/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,15 @@ var (
# Get a cluster
kops get cluster k8s-cluster.example.com
# Get a cluster YAML cluster spec
# Get a cluster YAML cluster desired configuration
kops get cluster k8s-cluster.example.com -o yaml
# Get a cluster YAML cluster actual configuration
kops get cluster k8s-cluster.example.com --full -o yaml
# Save a cluster desired configuration to YAML file
kops get cluster k8s-cluster.example.com -o yaml > cluster-desired-config.yaml
# Get an instancegroup
kops get ig --name k8s-cluster.example.com nodes
Expand Down
9 changes: 8 additions & 1 deletion cmd/kops/get_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,14 @@ var (
kops get clusters
# Get a cluster
kops get cluster k8s-cluster.example.com`))
kops get cluster k8s-cluster.example.com
# Get a cluster YAML desired configuration
kops get cluster k8s-cluster.example.com -o yaml
# Save a cluster desired configuration to YAML file
kops get cluster k8s-cluster.example.com -o yaml > cluster-desired-config.yaml
`))

get_cluster_short = i18n.T(`Get one or many clusters.`)
)
Expand Down
11 changes: 8 additions & 3 deletions cmd/kops/get_instancegroups.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ import (
"strconv"
"strings"

"github.com/spf13/cobra"
"io"

"github.com/spf13/cobra"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/kops/cmd/kops/util"
api "k8s.io/kops/pkg/apis/kops"
Expand All @@ -40,8 +41,12 @@ var (
# Get all instancegroups in a state store
kops get ig
# Get a cluster
kops get ig --name k8s-cluster.example.com nodes`))
# Get a cluster's instancegroup
kops get ig --name k8s-cluster.example.com nodes
# Save a cluster's instancegroups desired configuration to YAML file
kops get ig --name k8s-cluster.example.com -o yaml > instancegroups-desired-config.yaml
`))

get_instancegroups_short = i18n.T(`Get one or many instancegroups`)
)
Expand Down
4 changes: 2 additions & 2 deletions cmd/kops/replace.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ import (

var (
replace_long = templates.LongDesc(i18n.T(`
Replace a resource specification by filename or stdin.`))
Replace a resource by filename or stdin.`))

replace_example = templates.Examples(i18n.T(`
# Replace a cluster specification using a file
# Replace a cluster desired configuration using a YAML file
kops replace -f my-cluster.yaml
`))

Expand Down
2 changes: 1 addition & 1 deletion cmd/kops/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (

var (
update_long = templates.LongDesc(i18n.T(`
Creates or updates cloud resources to match cluster spec.
Creates or updates cloud resources to match cluster desired configuration.
`))

update_example = templates.Examples(i18n.T(`
Expand Down
4 changes: 2 additions & 2 deletions docs/cli/kops_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Create a resource:
* secret
* federation

Create a cluster, instancegroup or secret using command line flags or YAML cluster spec. Clusters and instancegroups can be created using the YAML cluster spec.
Create a cluster, instancegroup or secret using command line parameters or YAML configuration specification files. (Note: secrets cannot be created from YAML config files yet).

```
kops create -f FILENAME
Expand All @@ -21,7 +21,7 @@ kops create -f FILENAME
### Examples

```
# Create a cluster using a cluser spec file
# Create a cluster from the configuration specification in a YAML file
kops create -f my-cluster.yaml
# Create a cluster in AWS
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/kops_edit.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Edit clusters and other resources.
### Synopsis


Edit a resource configuration. This command changes the cloud specification in the registry.
Edit a resource configuration. This command changes the desired configuration in the registry.

To set your preferred editor, you can define the EDITOR environment variable.
When you have done this, kops will use the editor that you have set.
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/kops_edit_cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Edit cluster.

Edit a cluster configuration.

This command changes the cluster cloud specification in the registry.
This command changes the desired cluster configuration in the registry.

To set your preferred editor, you can define the EDITOR environment variable.
When you have done this, kops will use the editor that you have set.
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/kops_edit_federation.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Edit federation.

Edit a cluster configuration.

This command changes the federation cloud specification in the registry.
This command changes the federation cloud desired configuration in the registry.

To set your preferred editor, you can define the EDITOR environment variable.
When you have done this, kops will use the editor that you have set.
Expand Down
4 changes: 2 additions & 2 deletions docs/cli/kops_edit_instancegroup.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Edit instancegroup.

Edit a cluster configuration.

This command changes the instancegroup cloud specification in the registry.
This command changes the instancegroup desired configuration in the registry.

To set your preferred editor, you can define the EDITOR environment variable.
When you have done this, kops will use the editor that you have set.
Expand All @@ -21,7 +21,7 @@ kops edit instancegroup
### Examples

```
# Edit a instancegroup configuration.
# Edit an instancegroup desired configuration.
kops edit ig --name k8s-cluster.example.com node --state=s3://kops-state-1234
```

Expand Down
8 changes: 7 additions & 1 deletion docs/cli/kops_get.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,15 @@ kops get
# Get a cluster
kops get cluster k8s-cluster.example.com
# Get a cluster YAML cluster spec
# Get a cluster YAML cluster desired configuration
kops get cluster k8s-cluster.example.com -o yaml
# Get a cluster YAML cluster actual configuration
kops get cluster k8s-cluster.example.com --full -o yaml
# Save a cluster desired configuration to YAML file
kops get cluster k8s-cluster.example.com -o yaml > cluster-desired-config.yaml
# Get an instancegroup
kops get ig --name k8s-cluster.example.com nodes
Expand Down
6 changes: 6 additions & 0 deletions docs/cli/kops_get_clusters.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ kops get clusters
# Get a cluster
kops get cluster k8s-cluster.example.com
# Get a cluster YAML desired configuration
kops get cluster k8s-cluster.example.com -o yaml
# Save a cluster desired configuration to YAML file
kops get cluster k8s-cluster.example.com -o yaml > cluster-desired-config.yaml
```

### Options
Expand Down
5 changes: 4 additions & 1 deletion docs/cli/kops_get_instancegroups.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ kops get instancegroups
# Get all instancegroups in a state store
kops get ig
# Get a cluster
# Get a cluster's instancegroup
kops get ig --name k8s-cluster.example.com nodes
# Save a cluster's instancegroups desired configuration to YAML file
kops get ig --name k8s-cluster.example.com -o yaml > instancegroups-desired-config.yaml
```

### Options inherited from parent commands
Expand Down
4 changes: 2 additions & 2 deletions docs/cli/kops_replace.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Replace cluster resources.
### Synopsis


Replace a resource specification by filename or stdin.
Replace a resource by filename or stdin.

```
kops replace -f FILENAME
Expand All @@ -14,7 +14,7 @@ kops replace -f FILENAME
### Examples

```
# Replace a cluster specification using a file
# Replace a cluster desired configuration using a YAML file
kops replace -f my-cluster.yaml
```

Expand Down
2 changes: 1 addition & 1 deletion docs/cli/kops_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Update a cluster.
### Synopsis


Creates or updates cloud resources to match cluster spec.
Creates or updates cloud resources to match cluster desired configuration.

### Examples

Expand Down

0 comments on commit fe08226

Please sign in to comment.