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

certmanager: solve CannotRegenerateKey #28787

Merged
merged 1 commit into from Oct 31, 2023
Merged

Conversation

universam1
Copy link
Contributor

@universam1 universam1 commented Oct 25, 2023

CertManager throws a warning with the current Helm chart because the .spec.privateKey.rotationPolicy is unset.

This will set the field to Always which allows rotation in case there is a need for, which can resolve potential issues of an invalid cert.

  Type     Reason               Age   From                                   Message
  ----     ------               ----  ----                                   -------
  Warning  CannotRegenerateKey  12m   cert-manager-certificates-key-manager  User intervention required: existing private key in Secret "hubble-relay-client-certs" does not match requirements on Certificate resource, mismatching fields: [spec.privateKey.algorithm[], but cert-manager cannot create new private key as the Certificate's .spec.privateKey.rotationPolicy is unset or set to Never. To allow cert-manager to create a new private key you can set .spec.privateKey.rotationPolicy to 'Always' (this will result in the private key being regenerated every time a cert is renewed)

Please ensure your pull request adheres to the following guidelines:

  • For first time contributors, read Submitting a pull request
  • All code is covered by unit and/or runtime tests where feasible.
  • All commits contain a well written commit description including a title,
    description and a Fixes: #XXX line if the commit addresses a particular
    GitHub issue.
  • If your commit description contains a Fixes: <commit-id> tag, then
    please add the commit author[s] as reviewer[s] to this issue.
  • All commits are signed off. See the section Developer’s Certificate of Origin
  • Provide a title or release-note blurb suitable for the release notes.
  • Are you a user of Cilium? Please add yourself to the Users doc
  • Thanks for contributing!

@maintainer-s-little-helper
Copy link

Commit 4b2184a does not match "(?m)^Signed-off-by:".

Please follow instructions provided in https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#developer-s-certificate-of-origin

@maintainer-s-little-helper maintainer-s-little-helper bot added dont-merge/needs-sign-off The author needs to add signoff to their commits before merge. dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. labels Oct 25, 2023
@maintainer-s-little-helper
Copy link

Commit 4b2184a does not match "(?m)^Signed-off-by:".

Please follow instructions provided in https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#developer-s-certificate-of-origin

@github-actions github-actions bot added the kind/community-contribution This was a contribution made by a community member. label Oct 25, 2023
Copy link
Member

@gandro gandro 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 the PR! Looks good to me!

I had to look it up, but for context, this is what certmanager also recommends: https://cert-manager.io/docs/usage/certificate/

@gandro gandro added release-note/minor This PR changes functionality that users may find relevant to operating Cilium. area/clustermesh Relates to multi-cluster routing functionality in Cilium. sig/hubble Impacts hubble server or relay area/helm Impacts helm charts and user deployment experience needs-backport/1.14 This PR / issue needs backporting to the v1.14 branch and removed dont-merge/needs-sign-off The author needs to add signoff to their commits before merge. dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. labels Oct 25, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot added this to Needs backport from main in 1.14.4 Oct 25, 2023
@gandro gandro removed the area/clustermesh Relates to multi-cluster routing functionality in Cilium. label Oct 25, 2023
@gandro
Copy link
Member

gandro commented Oct 30, 2023

/test

@gandro
Copy link
Member

gandro commented Oct 30, 2023

@universam1 It seems the failed CI test in Gateway API is due your branch lagging behind main a bit. Could you rebase on origin/main? Thanks!

`CertManager` throws a warning with the current Helm chart because the `.spec.privateKey.rotationPolicy` is unset.

```
  Type     Reason               Age   From                                   Message
  ----     ------               ----  ----                                   -------
  Warning  CannotRegenerateKey  12m   cert-manager-certificates-key-manager  User intervention required: existing private key in Secret "hubble-relay-client-certs" does not match requirements on Certificate resource, mismatching fields: [spec.privateKey.algorithm[], but cert-manager cannot create new private key as the Certificate's .spec.privateKey.rotationPolicy is unset or set to Never. To allow cert-manager to create a new private key you can set .spec.privateKey.rotationPolicy to 'Always' (this will result in the private key being regenerated every time a cert is renewed)
```

Signed-off-by: Samuel Lang <gh@lang-sam.de>
@universam1
Copy link
Contributor Author

@universam1 It seems the failed CI test in Gateway API is due your branch lagging behind main a bit. Could you rebase on origin/main? Thanks!

Thanks for the heads up @gandro - rebased on current main

@gandro
Copy link
Member

gandro commented Oct 31, 2023

/test

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Oct 31, 2023
@aanm aanm merged commit da12133 into cilium:main Oct 31, 2023
60 of 62 checks passed
@universam1 universam1 deleted the cannotRegenerateKey branch October 31, 2023 13:53
@jibi jibi mentioned this pull request Nov 7, 2023
15 tasks
@jibi jibi added backport-pending/1.14 The backport for Cilium 1.14.x for this PR is in progress. and removed needs-backport/1.14 This PR / issue needs backporting to the v1.14 branch labels Nov 7, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Needs backport from main to Backport pending to v1.14 in 1.14.4 Nov 7, 2023
@github-actions github-actions bot added backport-done/1.14 The backport for Cilium 1.14.x for this PR is done. and removed backport-pending/1.14 The backport for Cilium 1.14.x for this PR is in progress. labels Nov 8, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Backport pending to v1.14 to Backport done to v1.14 in 1.14.4 Nov 8, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot removed this from Backport done to v1.14 in 1.14.4 Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/helm Impacts helm charts and user deployment experience backport-done/1.14 The backport for Cilium 1.14.x for this PR is done. kind/community-contribution This was a contribution made by a community member. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/minor This PR changes functionality that users may find relevant to operating Cilium. sig/hubble Impacts hubble server or relay
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants