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

TLS bootstrap API group (alpha) #25562

Merged
merged 8 commits into from
Jun 28, 2016

Conversation

gtank
Copy link

@gtank gtank commented May 13, 2016

This PR only covers the new types and related client/storage code- the vast majority of the line count is codegen. The implementation differs slightly from the current proposal document based on discussions in design thread (#20439). The controller logic and kubelet support mentioned in the proposal are forthcoming in separate requests.

I submit that #18762 ("Creating a new API group is really hard") is, if anything, understating it. I've tried to structure the commits to illustrate the process.

@mikedanese @erictune @smarterclayton @deads2k

An alpha implementation of the the TLS bootstrap API described in docs/proposals/kubelet-tls-bootstrap.md.

Analytics

@k8s-github-robot k8s-github-robot added kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/new-api size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels May 13, 2016
@mikedanese
Copy link
Member

@k8s-bot ok to test: #IGNORE

@mikedanese
Copy link
Member

@kubernetes/sig-api-machinery @bgrant0607 this change contains an alpha apigroup addition and exposure. I will do my best to review the csi changes but would appreciate if someone skimmed.

Fingerprint string `json:"fingerprint,omitempty"`

// Subject fields from the request
Subject Subject `json:"subject,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

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

I think subject should be moved into this file and have json struct tags so it serializes with the api-convention lower camecase.

Copy link
Author

@gtank gtank May 16, 2016

Choose a reason for hiding this comment

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

Sounds good to me. I don't want it to be processed as a top-level API object though, will inclusion in types.go but not in register.go be fine for that?

Copy link
Member

Choose a reason for hiding this comment

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

Yes that is ok. Most types in types files are not top level api objects. e.g. CertificateSignedRequestStatus

@mikedanese
Copy link
Member

placement of fields in Spec vs Status looks very good. Thanks!

optional string message = 3;

// timestamp for the last update to this condition
optional k8s.io.kubernetes.pkg.api.unversioned.Time lastupdatetime = 4;
Copy link
Member

Choose a reason for hiding this comment

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

@smarterclayton have you considered converting field names from lowerCamelCase to snake_case during proto gen?

Copy link
Member

Choose a reason for hiding this comment

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

I guess this is dicated from struct tags. What is the convention?

@mikedanese
Copy link
Member

cc @liggitt

func NewREST(opts generic.RESTOptions) (*REST, *StatusREST, *ApprovalREST) {
prefix := "/certificatesigningrequests"

newListFunc := func() runtime.Object { return &certificates.CertificateSigningRequestList{} }
Copy link
Member

Choose a reason for hiding this comment

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

nit: why is this extracted? why not inline like the others

Copy link
Author

Choose a reason for hiding this comment

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

no particular reason. i'll inline it.

Copy link
Author

Choose a reason for hiding this comment

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

oh, right- this is used in the the opts.Decorator initialization as well as the registry store.

@mikedanese
Copy link
Member

@gtank If you rebase and fixup commit histroy, I will LGTM this.

@gtank gtank force-pushed the certificates-api-v9 branch from 9f144f4 to bcc7bdd Compare June 27, 2016 20:14
@k8s-github-robot k8s-github-robot removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. kind/old-docs labels Jun 27, 2016
@k8s-bot
Copy link

k8s-bot commented Jun 27, 2016

GCE e2e build/test failed for commit bcc7bdd9e8e0ed5f4ce74439882cfe9ccfd6c3f0.

Please reference the list of currently known flakes when examining this failure. If you request a re-test, you must reference the issue describing the flake.

@gtank gtank force-pushed the certificates-api-v9 branch from bcc7bdd to d74278e Compare June 27, 2016 22:48
@k8s-bot
Copy link

k8s-bot commented Jun 27, 2016

GCE e2e build/test passed for commit d74278e761399ee297b54b7a88bd5e22f8c8a838.

@gtank gtank force-pushed the certificates-api-v9 branch from d74278e to c9c6fff Compare June 28, 2016 19:06
@k8s-bot
Copy link

k8s-bot commented Jun 28, 2016

GCE e2e build/test passed for commit c9c6fff.

@mikedanese mikedanese added lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. labels Jun 28, 2016
@mikedanese
Copy link
Member

p0 to get out of rebase hell

@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-bot
Copy link

k8s-bot commented Jun 28, 2016

GCE e2e build/test passed for commit c9c6fff.

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@aronchick
Copy link
Contributor

This is awesome! Can you make sure to get a proposal in the features repo for this? I know it all derives from an existing proposal, but we should definitely highlight this work.

k8s-github-robot pushed a commit that referenced this pull request Jul 20, 2016
Automatic merge from submit-queue

Certificate signing controller for TLS bootstrap (alpha)

The controller handles generating and signing certificates when a CertificateSigningRequest has the "Approved" condition. Uses cfssl to support a wide set of possible keys and algorithms. Depends on PR #25562, only the last two commits are relevant to this PR.

cc @mikedanese

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.