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 components to generate certificates in-memory #69884

Merged
merged 1 commit into from
Oct 30, 2018

Conversation

liggitt
Copy link
Member

@liggitt liggitt commented Oct 16, 2018

What this PR does / why we need it:
Allows components to generate self-signed certificates in-memory if no certificate directory is specified. Defaults kube-controller-manager and cloud-controller manager to doing so.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #68973

Special notes for your reviewer:

Release note:

kube-controller-manager and cloud-controller-manager now hold generated serving certificates in-memory unless a writeable location is specified with --cert-dir

/assign @sttts

@k8s-ci-robot k8s-ci-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Oct 16, 2018
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. area/apiserver sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Oct 16, 2018
@liggitt
Copy link
Member Author

liggitt commented Oct 16, 2018

/kind bug

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. and removed needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Oct 16, 2018
@liggitt liggitt force-pushed the self-sign-in-memory branch 2 times, most recently from 540b1ba to b087c65 Compare October 17, 2018 00:38
@sttts
Copy link
Contributor

sttts commented Oct 17, 2018

Looks good overall. One question.

@liggitt
Copy link
Member Author

liggitt commented Oct 17, 2018

/retest

@liggitt
Copy link
Member Author

liggitt commented Oct 17, 2018

@sttts comments addressed

@@ -282,15 +301,21 @@ func (s *SecureServingOptions) MaybeDefaultWithSelfSignedCerts(publicAddress str

if cert, key, err := certutil.GenerateSelfSignedCertKeyWithFixtures(publicAddress, alternateIPs, alternateDNS, s.ServerCert.FixtureDirectory); err != nil {
return fmt.Errorf("unable to generate self signed cert: %v", err)
} else {
} else if len(keyCert.CertFile) > 0 && len(keyCert.KeyFile) > 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

can one be set and not the other?

Copy link
Member Author

Choose a reason for hiding this comment

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

no, line 263 keeps us from getting here in that case.

@sttts
Copy link
Contributor

sttts commented Oct 23, 2018

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 23, 2018
@liggitt liggitt added this to the v1.13 milestone Oct 23, 2018
@liggitt
Copy link
Member Author

liggitt commented Oct 24, 2018

/assign @mikedanese @luxas
for controller manager approvals

@mikedanese
Copy link
Member

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: liggitt, mikedanese, sttts

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 Oct 30, 2018
@k8s-ci-robot k8s-ci-robot merged commit d196d63 into kubernetes:master Oct 30, 2018
@liggitt liggitt deleted the self-sign-in-memory branch November 1, 2018 04:49
dghubble added a commit to poseidon/terraform-render-bootstrap that referenced this pull request Dec 4, 2018
* Remove controller-manager empty dir mount added for v1.12
kubernetes/kubernetes#68973
* No longer required kubernetes/kubernetes#69884
dghubble added a commit to poseidon/terraform-render-bootstrap that referenced this pull request Dec 4, 2018
* Remove controller-manager empty dir mount added for v1.12
kubernetes/kubernetes#68973
* No longer required kubernetes/kubernetes#69884
dghubble added a commit to poseidon/terraform-render-bootstrap that referenced this pull request Dec 4, 2018
* Remove controller-manager empty dir mount added for v1.12
kubernetes/kubernetes#68973
* No longer required kubernetes/kubernetes#69884
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/apiserver 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. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kube-controller-manager: error creating self-signed certificates, permission denied on v1.12.0-rc.2
5 participants