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

Add file paths to keys and certificates #28367

Merged
merged 9 commits into from
Oct 8, 2021

Conversation

chrisnegus
Copy link
Contributor

@chrisnegus chrisnegus commented Jun 10, 2021

The https://kubernetes.io/docs/setup/best-practices/certificates/ page provides excellent information on key and certificate files needed by Kubernetes. I felt it would help make it easier to consume that information if there were visual representations of the files contained in tables. So I added three tree outputs to illustrate:

  • Files needed for someone providing a single root CA from which all other files are automatically generated
  • All files required if you were generating all certs yourself
  • Which files contain user account certificates

This content is meant to address this issue: #28291

@k8s-ci-robot k8s-ci-robot added 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. labels Jun 10, 2021
@k8s-ci-robot k8s-ci-robot added language/en Issues or PRs related to English language sig/docs Categorizes an issue or PR as relevant to SIG Docs. labels Jun 10, 2021
@netlify
Copy link

netlify bot commented Jun 10, 2021

✔️ Deploy Preview for kubernetes-io-main-staging ready!

🔨 Explore the source changes: 0320d63

🔍 Inspect the deploy log: https://app.netlify.com/sites/kubernetes-io-main-staging/deploys/615f48d994915a0007ee34db

😎 Browse the preview: https://deploy-preview-28367--kubernetes-io-main-staging.netlify.app

@chrisnegus
Copy link
Contributor Author

It looks like I need to crop the images better. I'll fix them and do a new commit.

@fabriziopandini
Copy link
Member

/cc

@chrisnegus
Copy link
Contributor Author

chrisnegus commented Jun 10, 2021

Preview page: https://deploy-preview-28367--kubernetes-io-master-staging.netlify.app/docs/setup/best-practices/certificates/
The images are cropped now the way I intended, so it is ready for review.

Copy link
Member

@fabriziopandini fabriziopandini left a comment

Choose a reason for hiding this comment

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

Thanks for this PR.
I left some comments, most of them considerations about the graphic format; feel free to ask for more opinions (opinion on graphs are usually very personal 😄)

content/en/docs/setup/best-practices/certificates.md Outdated Show resolved Hide resolved
content/en/docs/setup/best-practices/certificates.md Outdated Show resolved Hide resolved
content/en/docs/setup/best-practices/certificates.md Outdated Show resolved Hide resolved
content/en/docs/setup/best-practices/certificates.md Outdated Show resolved Hide resolved
@neolit123
Copy link
Member

@kubernetes/sig-auth-pr-reviews
this document is owned by a group called SIG Auth.

/hold for their review

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. sig/auth Categorizes an issue or PR as relevant to SIG Auth. labels Jun 11, 2021
@sftim
Copy link
Contributor

sftim commented Jun 14, 2021

Would it be reasonable to mark this as a work-in-progress @chrisnegus ?

I'm keen on adding diagrams; we're also keen to get the content and style of those diagrams right (content more than style, if I'm honest).

@chrisnegus
Copy link
Contributor Author

chrisnegus commented Jun 14, 2021

@sftim My original thought was just to have an easy way to visualize the locations of the files described on this page. I went to some trouble creating the diagrams (even trying to match the Kubernetes color scheme). But the feedback from @fabriziopandini and others I've shown them to is that they needed to be simpler. I'm thinking of reducing this PR to tree output of the files described, as suggested, and leaving it at that. Perhaps we can get agreement on that fairly quickly without making it a WIP.

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jun 14, 2021
@chrisnegus
Copy link
Contributor Author

When the branch changed to main, the netlify output moved as well. You can view the PR changes here: https://deploy-preview-28367--kubernetes-io-main-staging.netlify.app/docs/setup/best-practices/certificates/

@jimangel
Copy link
Member

/lgtm
/approve

I see this change being minimal, @neolit123 do you think it requires a hold for @kubernetes/sig-auth-pr-reviews? Reverting or correcting the change seems to be similar low impact.

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

LGTM label has been added.

Git tree hash: bb026f4a66ae0039616dfc036427e7eb13126bc2

@deads2k
Copy link
Contributor

deads2k commented Aug 2, 2021

If more is needed to describe that (like pointing to which keys and certs are which)

Yes, it is this. Once you have divided the signers, you have to be sure the correct cert/key pairs are being signed and that the CAs match properly.

@sftim
Copy link
Contributor

sftim commented Sep 24, 2021

Hi @chrisnegus

What are your intentions with this PR? Would you like to get help from SIG Auth on revising this?

@chrisnegus
Copy link
Contributor Author

What are your intentions with this PR? Would you like to get help from SIG Auth on revising this?

It seems that the consensus is to change this visualization to a full path file view that can be copied and pasted. So I did that. If it not ready to merge at this point, I suggest we abandon the PR and move on to something else.

@sftim
Copy link
Contributor

sftim commented Sep 30, 2021

These changes seem reasonable, they don't seem misleading. #28367 (comment) mentioned that “the locations are kubeadm specific” and I think that's still true. I also think that's fine given the added context that these are just examples.

I'd still like a review on this from SIG Auth (@kubernetes/sig-auth-misc FYI) - see also #28367 (comment)

@chrisnegus
Copy link
Contributor Author

These changes seem reasonable, they don't seem misleading. #28367 (comment) mentioned that “the locations are kubeadm specific” and I think that's still true. I also think that's fine given the added context that these are just examples.

I'd still like a review on this from SIG Auth (@kubernetes/sig-auth-misc FYI) - see also #28367 (comment)

I'd be glad to open a separate issue to address the concerns from #28367 (comment). Should we have @deads2k look at this again, with the understanding that his comment about separating CAs that sign server and client certificates could be addressed in another issue?

@kbhawkey
Copy link
Contributor

kbhawkey commented Oct 2, 2021

@@ -162,4 +198,11 @@ These files are used as follows:
| controller-manager.conf | kube-controller-manager | Must be added to manifest in `manifests/kube-controller-manager.yaml` |
| scheduler.conf | kube-scheduler | Must be added to manifest in `manifests/kube-scheduler.yaml` |

The following illustrates the files listed in the previous table that contain client user certificates and keys:
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: The following ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay. I updated it to say: "The following files illustrate full paths to the files listed in the previous table:"

@kbhawkey
Copy link
Contributor

kbhawkey commented Oct 2, 2021

👋 @chrisnegus .
Are you waiting for a technical review or other feedback?

@chrisnegus
Copy link
Contributor Author

👋 @chrisnegus . Are you waiting for a technical review or other feedback?

I don't think any further review is needed since the technical reviewer has already agreed that simply having listings from the files illustrated in the tables was okay. There was one other, separate issue raised. But I'm going to add that to a separate issue. Once that is done, I'll note the new issue here. I would be happy if this could be merged.

@chrisnegus
Copy link
Contributor Author

I added Issue 29962 to request the change described in the comment above

Copy link
Member

@neolit123 neolit123 left a comment

Choose a reason for hiding this comment

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

overall LGTM. this reflects the current state of kubeadm. as noted in the Certificate paths section the examples in this page seem to cover kubeadm mostly.

suggested to move https://github.com/kubernetes/website/issues/29962 to a k/kubeadm issue instead.

@kbhawkey
Copy link
Contributor

kbhawkey commented Oct 8, 2021

/retitle Add file paths to keys and certificates

@k8s-ci-robot k8s-ci-robot changed the title Adding diagrams to certificates page Add file paths to keys and certificates Oct 8, 2021
@kbhawkey
Copy link
Contributor

kbhawkey commented Oct 8, 2021

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 8, 2021
@kbhawkey
Copy link
Contributor

kbhawkey commented Oct 8, 2021

/label tide/merge-method-squash

@k8s-ci-robot k8s-ci-robot added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Oct 8, 2021
@kbhawkey
Copy link
Contributor

kbhawkey commented Oct 8, 2021

Thanks @chrisnegus .
/lgtm

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

LGTM label has been added.

Git tree hash: 491c160d65e8ff86d7063891ebda994affa26408

@k8s-ci-robot k8s-ci-robot merged commit 2a84b55 into kubernetes:main Oct 8, 2021
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. language/en Issues or PRs related to English language lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/docs Categorizes an issue or PR as relevant to SIG Docs. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

9 participants