-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Clarify docs: rename spec/specification into desired configuration #2542
Conversation
Hi @kenden. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
0690f2d
to
82704e0
Compare
Hi @kenden, you should rebase onto the current If you want a tighter feedback loop while making changes, use |
@WillemMali I rebased. But running the gen-cli-docs target is not that easy.
|
Hi @kenden, I recently modified the You need an up-to-date version of I'm not sure what the minimum version required is, I advise you to use a version built from the current The "right" fix is making sure we know where |
The problem is that you are making changes to documentation files that are generated from the go code. You need to modify the go code and run gen docs make target. These are automatically generated from the code see: https://github.com/kubernetes/kops/blob/master/cmd/kops/get_instancegroups.go#L36 Every command in that directory contains its help definitions. You have to make changes to the code. Here are some instructions
That will generate the new md file. Mac and Linux are supported dev environments. |
(I thought I had commented on this before but I can't find it - sorry) In general we don't encourage poking around the S3 bucket - the files in there might not be well named, and shouldn't drive this. The idea of calling it specification rather than configuration is that you specify the desired configurations, called It's part of the design of k8s that it is essentially just loops that try to reconcile the actual configuration with the desired configuration (spec). And so that's what I was / we are trying to get at by calling it specification. That said, some of these changes are separate from this debate, and good (other than being in the codegen) - I'll comment on the PR itself. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some random thoughts based on looking at kubectl & looking at a few cases here. I'd say we follow kubectl, which actually seems to side-step the problem.
docs/cli/kops_create.md
Outdated
@@ -12,7 +12,8 @@ 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 config files. | |||
(Note: secrets cannot be created from YAML config files yet). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this.
Maybe "or YAML configuration specification files" side-steps the issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, I used what you proposed.
docs/cli/kops_create.md
Outdated
@@ -21,7 +22,7 @@ kops create -f FILENAME | |||
### Examples | |||
|
|||
``` | |||
# Create a cluster using a cluser spec file | |||
# Create a cluster from the configuration in a YAML file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would stick with "...from the specification in...". Or maybe "configuration specification" again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed to configuration specification, as proposed.
docs/cli/kops_edit.md
Outdated
@@ -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 cloud configuration in the registry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be "desired configuration" - it's not really "cloud specification" anyway...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated as proposed. "Desired configuration" is really the same as "specification" but it avoids confusion.
docs/cli/kops_edit_cluster.md
Outdated
@@ -7,7 +7,7 @@ Edit cluster. | |||
|
|||
Edit a cluster configuration. | |||
|
|||
This command changes the cluster cloud specification in the registry. | |||
This command changes the cluster cloud configuration in the registry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say either "cluster specification" or "desired cluster configuration".
And I'm not even sure we need "in the registry", but that's just my opinion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated using "desired configuration" as proposed.
Regarding "in the registry", I think the word "registry" is a bit confusing, but I would still indicate where this is updated, I think it explains better what the command actually does.
"...in the S3 state config"?
docs/cli/kops_get.md
Outdated
@@ -21,9 +21,12 @@ Display one or many resources. | |||
# Get a cluster | |||
kops get cluster k8s-cluster.example.com | |||
|
|||
# Get a cluster YAML cluster spec | |||
# Get a cluster YAML configuration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would probably stick here with cluster specification, IMO.
kubectl get
just says e.g. "# List a single pod in JSON output format.", so avoids the whole question.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@justinsb
The problem here is that the command kops get cluster -o yaml
allows to get the desired configuration (the specification) AND also allows to get the actual configuration (cluster.spec
, which I'm not 100% sure this is the actual configuration), with -o yaml --full
.
To be clearer, I updated "cluster spec" to "cluster desired configuration" and added another example, "Get a cluster YAML cluster actual configuration".
How is that?
docs/cli/kops_replace.md
Outdated
@@ -5,7 +5,7 @@ Replace cluster resources. | |||
### Synopsis | |||
|
|||
|
|||
Replace a resource specification by filename or stdin. | |||
Replace a resource configuration by filename or stdin. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at what kubectl does, it just says Replace a resource by filename or stdin.
That does avoid the issue :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Used "Replace a resource by filename" as proposed as replaced specification by "desired configuration" in the example.
Update: I looked at kubectl help, and it just side-steps the issue with e.g. "Replace a resource by filename or stdin. ". I think we can probably just follow kubectl's examples.. |
@justinsb Even if people shouldn't poke wound the state s3 bucket, they will, and might get confused by the But also, it is possible to get:
Maybe I am just confused about what the
I understand this shows the result of the |
Maybe calling `--generated`, `--effective` or `--populated` would be
clearer than calling it `--full`?
…On Sun, Jun 11, 2017 at 3:25 PM, Quentin Nerden ***@***.***> wrote:
@justinsb <https://github.com/justinsb> Even if people shouldn't poke
wound the state s3 bucket, they will, and might get confused by the .spec
in cluster.spec: "Hmm, if this is the spec file, what's that config file
then?"
But also, it is possible to get:
- the config file, with kops get cluster -o yaml,
- the cluster.spec file, with kops get cluster --full -o yaml
Maybe I am just confused about what the --full flag does. The command
line help shows:
Flags:
--full Show fully populated configuration
I understand this shows the result of the kops update --yes command, so
the "actual" configuration?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2542 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AEePF74CfhI8ZaK3lUlV7fTIxoT8keInks5sC-rOgaJpZM4NWqVl>
.
|
73d080c
to
d918ad4
Compare
I updated my PR to change the docs directly in the go code and ran |
fe08226
to
891799e
Compare
@k8s-bot ok to test |
We problem need a rebase on this, and e2e will run again |
38ef7d1
to
535718b
Compare
40f884c
to
8e3a1ac
Compare
I think the test is (now) failing because it wants you to run |
@kenden PR needs rebase |
I rebased and ran |
/ok-to-test |
@kenden: you can't request testing unless you are a kubernetes member. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@chrislovecnm @justinsb Any idea why check "pull-kops-e2e-kubernetes-aws" is "Waiting for status to be reported" ? |
Not sure, but I'll close & reopen, that often gives things a kick... |
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.
I rebased, to try and re-trigger it |
/ok-to-test |
/approve no-issue |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: chrislovecnm, kenden The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
/test all [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue |
The cluster state in S3 has (among others) two files:
cluster.spec
andconfig
.When the documentation mentioned "create or update cluster spec" for example, it was confusing what was actually updated. It's not the cluster.spec file.
As I understand,
cluster.spec
should only be created/updated afterkops update --yes
is run.I changed the docs for
kops get
,kops create
,kops replace
,kops edit
.I did NOT change those files:
kops_rolling-update.md
,kops_rolling-update_cluster.md
as I think those actually usecluster.spec
.This change is![Reviewable](https://camo.githubusercontent.com/2d899f4291d07d3cd2fa4aaae1e3b243f164c23fce87d30a589ace0d496a444c/68747470733a2f2f72657669657761626c652e6b756265726e657465732e696f2f7265766965775f627574746f6e2e737667)