Skip to content
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

Api doc update #297

Merged
merged 1 commit into from
Jan 30, 2017
Merged

Api doc update #297

merged 1 commit into from
Jan 30, 2017

Conversation

MHBauer
Copy link
Contributor

@MHBauer MHBauer commented Jan 26, 2017

This is some small updates that are complete as it is. I can turn it into a long running WIP, but I'd rather we focus on small incremental additions for now.

@pmorie @deads2k @lavalamp Is apis/authentication still a good base to template off of for newcomers?

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jan 26, 2017
[pkg/apis/authentication/v1beta1/register.go](https://github.com/kubernetes/kubernetes/blob/master/pkg/apis/authentication/v1beta1/register.go);
The register files must have a var called SchemeBuilder for the
generated code to reference. There must be an AddToScheme method for
the installer to reference.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional: suggest you add something like, "You can look at a group under pkg/apis/... for example register.go files to use as a template, but do not copy the register.go files under pkg/api/...--they are not general."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree based on my experiences. Do we have a blurb somewhere about the history of the api group definitions? It is my understanding that api/ is the old stuff and apis/ is the new stuff, but I don't have more specific information or understanding.

@lavalamp
Copy link
Member

consider this an lgtm from me with or without my suggested change

@liggitt
Copy link
Member

liggitt commented Jan 30, 2017

@pmorie @deads2k @lavalamp Is apis/authentication still a good base to template off of for newcomers?

I think so, it's reasonably small, and adheres to the k8s.io API group suffix

[pkg/apis/authentication/v1beta1/register.go](../../pkg/apis/authentication/v1beta1/register.go);

3. Add a pkg/apis/`<group>`/install/install.go, which is responsible for adding
the group to the `latest` package, so that other packages can access the group's
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having written an api group recently, I have no idea what this latest and latest.Group text is talking about.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It turned into the registered package.

@MHBauer
Copy link
Contributor Author

MHBauer commented Jan 30, 2017

@lavalamp your text included. Additional text and changes in further sections.

modified by a controller, the status field can be left off and the fields inside
the `Spec` can be inlined directly into the struct.

For each type there should also be a `List` struct. The `List` struct should
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I would qualify with "top-level type".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lavalamp agree. done.

@lavalamp
Copy link
Member

lgtm if you fix that nit.

@lavalamp lavalamp self-assigned this Jan 30, 2017
@lavalamp lavalamp added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 30, 2017
@lavalamp lavalamp merged commit 6d487db into kubernetes:master Jan 30, 2017
@lavalamp
Copy link
Member

Thanks a bunch!

@MHBauer
Copy link
Contributor Author

MHBauer commented Jan 30, 2017

@lavalamp Thanks for feedback. I'll be around soon with an apiserver specific change.

@MHBauer MHBauer deleted the api-doc-update branch January 30, 2017 21:09
danehans pushed a commit to danehans/community that referenced this pull request Jul 18, 2023
If you are joining the org, please fill out the template below:

 - [x] I have reviewed the community membership guidelines
 - [x] I have reviewed the contribution guidelines
 - [x] I have enabled 2FA on my GitHub account
 - [x] I have joined the Istio discussion board and subscribed to the Contributors category
 - [x] I have joined Istio's Slack workspace (fill-out this form to join)
List your company name, or indicate Individual if you're not affiliated with a company:

IBM

Provide a link to at least one PR that you have successfully pushed to one
of the Istio repos:
istio/istio.io#22051 (Merged)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants