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

Should be able to set --cert-dir for service account key generation (kubeadm init phase certs sa) #1354

Closed
mattkelly opened this issue Jan 17, 2019 · 3 comments · Fixed by kubernetes/kubernetes#73239
Labels
area/security help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug.
Milestone

Comments

@mattkelly
Copy link

mattkelly commented Jan 17, 2019

What keywords did you search in kubeadm issues before filing this one?

cert-dir, init phase certs

Is this a BUG REPORT or FEATURE REQUEST?

BUG REPORT

Versions

kubeadm version (use kubeadm version): v1.13.2

Environment:

  • Kubernetes version (use kubectl version): v1.13.2
  • Cloud provider or hardware configuration: N/A
  • OS (e.g. from /etc/os-release): N/A
  • Kernel (e.g. uname -a): N/A
  • Others: N/A

What happened?

For all other kubeadm init phase certs subcommands, I can set --cert-dir. For kubeadm init phase certs sa, I cannot.

The reasoning for this (I assume) is that the sa command does not actually relate to certificates - just a public/private key pair. See the code here.

This used to be possible when these subcommands were still under kubeadm alpha phase certs.

What you expected to happen?

Since I can change the target location for other PKI assets, I should be able to do the same for these assets.

How to reproduce it (as minimally and precisely as possible)?

kubeadm init phase certs sa --cert-dir <anything> should error due to --cert-dir not being a valid flag for the sa subcommand at this time.

Anything else we need to know?

I'm also in favor of renaming --cert-dir to --pki-dir if possible, as that seems more logical given the assets that are generated. We could also name the flag differently for just he sa subcommand, I suppose.

@mattkelly mattkelly changed the title Should be able to set --cert-dir for service account key generation kubeadm init phase certs sa Should be able to set --cert-dir for service account key generation (kubeadm init phase certs sa) Jan 17, 2019
@mattkelly
Copy link
Author

I'm happy to pick this up as well after we discuss the best path forward.

@neolit123 neolit123 added this to the v1.14 milestone Jan 17, 2019
@neolit123 neolit123 added kind/bug Categorizes issue or PR as related to a bug. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. area/security labels Jan 17, 2019
@neolit123
Copy link
Member

hi, @mattkelly please feel free to send a PR.

this does indeed look like a regression in 1.13:
https://v1-12.docs.kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-alpha/#cmd-phase-certs

@mattkelly
Copy link
Author

@neolit123 I'll assume we'll just make it use --cert-dir again then. I'll have a PR up soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/security help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants