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

Allow "kops create keypair" to stage next CA cert #11252

Merged
merged 6 commits into from
Jun 19, 2021

Conversation

johngmyers
Copy link
Member

@johngmyers johngmyers commented Apr 18, 2021

Next step after #11219

  • Renames kops create secret keypair ca to kops create keypair ca
  • Adds support for adding a secondary CA, which it now does by default.
  • The new --primary flag instead adds the CA as primary.
  • The --cert flag may now be omitted, in which case it will issue a new cert.
  • The --key flag may now be omitted if either the --cert or --primary flags are omitted, in which case it will create a new key.

@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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. area/api labels Apr 18, 2021
@johngmyers johngmyers changed the title WIP: Allow "kops create secret" to stage next CA cert Allow "kops create secret" to stage next CA cert Apr 19, 2021
@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 Apr 19, 2021
@johngmyers
Copy link
Member Author

/retest

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 1, 2021
@johngmyers johngmyers changed the title Allow "kops create secret" to stage next CA cert WIP Allow "kops create secret" to stage next CA cert May 4, 2021
@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 4, 2021
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jun 12, 2021
@johngmyers johngmyers changed the title WIP Allow "kops create secret" to stage next CA cert Allow "kops create secret" to stage next CA cert Jun 12, 2021
@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 Jun 12, 2021
@johngmyers
Copy link
Member Author

The other way we could go with this is kops create keypair ca, moving all keysets out of kops get secrets and kops delete secret into new kops get keypairs and kops delete keypair.

@justinsb what do you think?

@johngmyers
Copy link
Member Author

Office Hours decision: Change to kops create keypair ca

@johngmyers johngmyers force-pushed the rotate-4 branch 2 times, most recently from f31a858 to 0fee909 Compare June 18, 2021 17:40
@johngmyers johngmyers changed the title Allow "kops create secret" to stage next CA cert Allow "kops create keypair" to stage next CA cert Jun 18, 2021
@johngmyers
Copy link
Member Author

Will address kops get secrets and kops delete secret keypair ca in later PR.

@johngmyers
Copy link
Member Author

/assign @olemarkus

Copy link
Member

@olemarkus olemarkus left a comment

Choose a reason for hiding this comment

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

I think perhaps the documentation is a bit unclear, but that can be sorted out later when all the pieces are in place.


cmd.Flags().StringVar(&options.CertPath, "cert", options.CertPath, "Path to CA certificate")
cmd.Flags().StringVar(&options.PrivateKeyPath, "key", options.PrivateKeyPath, "Path to CA private key")
cmd.Flags().BoolVar(&options.Primary, "primary", options.Primary, "Make the CA used to issue certificates")
Copy link
Member

Choose a reason for hiding this comment

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

I am struggling a bit with understanding this description.
Maybe it also makes sense to provide an example using --primary

Copy link
Member

Choose a reason for hiding this comment

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

Should there also be a warning around this one? If primary is set, and you create a new primary key directly, the rotation will not be graceful?

Copy link
Member Author

Choose a reason for hiding this comment

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

That will indeed be a disruptive change. It might be used in new-cluster situations, such as the integration tests.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 19, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: olemarkus

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 approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 19, 2021
@k8s-ci-robot k8s-ci-robot merged commit 41a1c0d into kubernetes:master Jun 19, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.22 milestone Jun 19, 2021
@johngmyers johngmyers deleted the rotate-4 branch June 19, 2021 07:12
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/api area/documentation area/kops-controller area/nodeup area/provider/aws Issues or PRs related to aws provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/office-hours lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants