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

Refactor cert issuance code #9130

Merged
merged 8 commits into from
Jun 5, 2020
Merged

Conversation

johngmyers
Copy link
Member

@johngmyers johngmyers commented May 15, 2020

See #9110

Pull cert issuance code up into Keypair then push it down into pki where it can be shared by nodeup tasks.

Add up to 30 days skew to the lifetimes of nodeup-generated certs, to try to cause nodes generated around the same time to expire on different days.

Decrease the lifetime of the kube-apiserver-healthcheck and master kubelet certificates from 10 years to 455 days plus skew. Increases the lifetime of the etcd-clients-ca-cilium and apiserver-to-etcd client certs from 1 year to 455 days plus skew.

Make pki.SignNewCertificate() private.

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 15, 2020
@johngmyers johngmyers force-pushed the pki-refactor branch 3 times, most recently from 0034bbb to e59983c Compare May 16, 2020 04:05
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 16, 2020
@johngmyers johngmyers force-pushed the pki-refactor branch 2 times, most recently from 2f1562c to e2e4fcb Compare May 16, 2020 20:33
@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels May 16, 2020
@johngmyers johngmyers force-pushed the pki-refactor branch 4 times, most recently from 9c048df to e4f0b9b Compare May 17, 2020 18:43
@johngmyers johngmyers changed the title WIP: Refactor cert issuance code Refactor cert issuance code May 17, 2020
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 17, 2020
@olemarkus
Copy link
Member

This looks pretty good to me.
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 17, 2020
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 20, 2020
@johngmyers johngmyers changed the title Refactor cert issuance code WIP: Refactor cert issuance code May 21, 2020
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 21, 2020
@johngmyers johngmyers force-pushed the pki-refactor branch 2 times, most recently from fbc26b7 to 7038b43 Compare May 21, 2020 03:47
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 22, 2020
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 23, 2020
pkg/pki/issue.go Outdated Show resolved Hide resolved
@rdrgmnzs
Copy link
Contributor

rdrgmnzs commented Jun 4, 2020

Thanks @johngmyers !

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jun 4, 2020
@justinsb
Copy link
Member

justinsb commented Jun 4, 2020

Drive-by nit, but this is a big simplification of the code - thank you @johngmyers

/approve
/lgtm

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: johngmyers, justinsb, rdrgmnzs

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 4, 2020
@k8s-ci-robot k8s-ci-robot removed lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jun 4, 2020
@olemarkus
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 5, 2020
@k8s-ci-robot k8s-ci-robot merged commit d18e971 into kubernetes:master Jun 5, 2020
@k8s-ci-robot k8s-ci-robot added this to the v1.19 milestone Jun 5, 2020
@johngmyers johngmyers deleted the pki-refactor branch June 5, 2020 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/nodeup 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. 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.

6 participants