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 back --cert-dir option for kubeadm init phase certs sa #73239

Merged

Conversation

mattkelly
Copy link

@mattkelly mattkelly commented Jan 24, 2019

What type of PR is this?
/kind bug

What this PR does / why we need it:
This fixes a regression that was introduced that got rid of the --cert-dir option for service account key pair generation. More info available in kubernetes/kubeadm#1354.

Which issue(s) this PR fixes:
Fixes kubernetes/kubeadm#1354

Special notes for your reviewer:
N/A

Does this PR introduce a user-facing change?:

kubeadm: add back `--cert-dir` option for `kubeadm init phase certs sa`

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Jan 24, 2019
@k8s-ci-robot
Copy link
Contributor

Hi @mattkelly. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. area/kubeadm sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jan 24, 2019
@mattkelly
Copy link
Author

/assign @neolit123

@mattkelly
Copy link
Author

Testing details:

_output/bin/kubeadm version
kubeadm version: &version.Info{Major:"1", Minor:"14+", GitVersion:"v1.14.0-alpha.1.236+35faaab5708d01", GitCommit:"35faaab5708d01068e8a8e829b8033d81b2313c6", GitTreeState:"clean", BuildDate:"2019-01-24T00:45:23Z", GoVersion:"go1.11.4", Compiler:"gc", Platform:"darwin/amd64"}
_output/bin/kubeadm init phase certs sa -h
Generates the private key for signing service account tokens along with its public key, and saves them into sa.key and sa.pub files. If both files already exist, kubeadm skips the generation step and existing files will be used.

Alpha Disclaimer: this command is currently alpha.

Usage:
  kubeadm init phase certs sa [flags]

Flags:
      --cert-dir string   The path where to save and store the certificates. (default "/etc/kubernetes/pki")
  -h, --help              help for sa

Global Flags:
      --log-file string   If non-empty, use this log file
      --rootfs string     [EXPERIMENTAL] The path to the 'real' host root filesystem.
      --skip-headers      If true, avoid header prefixes in the log messages
  -v, --v Level           log level for V logs
_output/bin/kubeadm init phase certs sa --cert-dir /tmp/pki
[certs] Generating "sa" key and public key
ll /tmp/pki
total 16
-rw-------  1 matt  wheel  1675 Jan 23 19:47 sa.key
-rw-------  1 matt  wheel   451 Jan 23 19:47 sa.pub

@mattkelly mattkelly changed the title Add back --cert-dir option for init phase certs sa Add back --cert-dir option for kubeadm init phase certs sa Jan 24, 2019
Copy link
Contributor

@rosti rosti 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 your contribution @mattkelly !
/lgtm
/priority important-soon
/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. lgtm "Looks good to me", indicates that a PR is ready to be merged. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Jan 24, 2019
@rosti
Copy link
Contributor

rosti commented Jan 24, 2019

@mattkelly one tiny nit, you have double 'd' in Read in the release note.
/assign @fabriziopandini

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.

thanks @mattkelly
/approve
/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 24, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mattkelly, neolit123

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 Jan 24, 2019
Copy link
Member

@yagonobre yagonobre left a comment

Choose a reason for hiding this comment

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

Thanks @mattkelly
can you add kubeadm: prefix to release note?

@neolit123
Copy link
Member

neolit123 commented Jan 24, 2019

can you add kubeadm: prefix to release note?

the kubeadm: prefix is nice for the RN, yes.

@mattkelly
Copy link
Author

@rosti the word was actually readd as in re-add, but I changed it to add back as I can see why that's confusing :)

@yagonobre @neolit123 I added the kubeadm: prefix to the release note even though I see that comment is crossed off now. If I should remove it again, just let me know.

@neolit123
Copy link
Member

/hold cancel
thanks for the update @mattkelly

@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 Jan 24, 2019
@k8s-ci-robot k8s-ci-robot merged commit 20a11ac into kubernetes:master Jan 24, 2019
@mattkelly mattkelly deleted the bugfix/kubeadm-sa-cert-dir branch January 24, 2019 16:47
k8s-ci-robot added a commit that referenced this pull request Jan 30, 2019
…239-upstream-release-1.13

Automated cherry pick of #73239: Add back --cert-dir option for init phase certs sa
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/kubeadm cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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