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

Detect multiple certs pointed to the same secret #2941

Closed
gregsidelinger opened this issue May 22, 2020 · 13 comments
Closed

Detect multiple certs pointed to the same secret #2941

gregsidelinger opened this issue May 22, 2020 · 13 comments
Labels
area/monitoring Indicates a PR or issue relates to monitoring kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.

Comments

@gregsidelinger
Copy link

Is your feature request related to a problem? Please describe.
If two certs are pointed at the same secret cert-manager will go into a cert ordering loop as the secret's never match what the other cert expects.

Here is a log example of that happening

I0522 15:06:45.930979       1 controller.go:141] cert-manager/controller/certificates "msg"="syncing item" "key"="default/example-cert1"
I0522 15:06:45.931688       1 sync.go:304] cert-manager/controller/certificates "msg"="updated Secret resource metadata as it was out of date" "related_resource_kind"="Secret" "related_resource_name"="example-cert2" "related_resource_namespace"="default" "resource_kind"="Certificate" "resource_name"="example-cert2" "resource_namespace"="default"
I0522 15:06:45.931840       1 util.go:178] cert-manager/controller/certificates "msg"="certificate scheduled for renewal" "duration_until_renewal"="16781h10m11.068183419s" "related_resource_kind"="Secret" "related_resource_name"="example-cert2" "related_resource_namespace"="default" "resource_kind"="Certificate" "resource_name"="example-cert2" "resource_namespace"="default"
I0522 15:06:45.931896       1 sync.go:311] cert-manager/controller/certificates "msg"="certificate does not require re-issuance. certificate renewal scheduled near expiry time." "related_resource_kind"="Secret" "related_resource_name"="example-cert2" "related_resource_namespace"="default" "resource_kind"="Certificate" "resource_name"="example-cert2" "resource_namespace"="default"
I0522 15:06:45.932245       1 controller.go:147] cert-manager/controller/certificates "msg"="finished processing work item" "key"="default/example-cert2"
I0522 15:06:45.932275       1 controller.go:141] cert-manager/controller/certificates "msg"="syncing item" "key"="default/example-cert2"
I0522 15:06:45.932700       1 util.go:178] cert-manager/controller/certificates "msg"="certificate scheduled for renewal" "duration_until_renewal"="16781h10m11.067322348s" "related_resource_kind"="Secret" "related_resource_name"="example-cert2" "related_resource_namespace"="default" "resource_kind"="Certificate" "resource_name"="example-cert2" "resource_namespace"="default"
I0522 15:06:45.932733       1 sync.go:311] cert-manager/controller/certificates "msg"="certificate does not require re-issuance. certificate renewal scheduled near expiry time." "related_resource_kind"="Secret" "related_resource_name"="example-cert2" "related_resource_namespace"="default" "resource_kind"="Certificate" "resource_name"="example-cert2" "resource_namespace"="default"
I0522 15:06:45.933006       1 controller.go:147] cert-manager/controller/certificates "msg"="finished processing work item" "key"="default/example-cert2"


I0522 15:06:45.530648       1 controller.go:141] cert-manager/controller/certificates "msg"="syncing item" "key"="default/example-cert2"
I0522 15:06:45.531642       1 sync.go:304] cert-manager/controller/certificates "msg"="updated Secret resource metadata as it was out of date" "related_resource_kind"="CertificateRequest" "related_resource_name"="example-cert1-3874364632" "related_resource_namespace"="default" "resource_kind"="Certificate" "resource_name"="example-cert1" "resource_namespace"="default"
I0522 15:06:45.531787       1 util.go:178] cert-manager/controller/certificates "msg"="certificate scheduled for renewal" "duration_until_renewal"="16781h10m11.468236881s" "related_resource_kind"="Secret" "related_resource_name"="example-cert2" "related_resource_namespace"="default" "resource_kind"="Certificate" "resource_name"="example-cert1" "resource_namespace"="default"
I0522 15:06:45.531817       1 sync.go:311] cert-manager/controller/certificates "msg"="certificate does not require re-issuance. certificate renewal scheduled near expiry time." "related_resource_kind"="CertificateRequest" "related_resource_name"="example-cert1-3874364632" "related_resource_namespace"="default" "resource_kind"="Certificate" "resource_name"="example-cert1" "resource_namespace"="default"
I0522 15:06:45.532234       1 controller.go:147] cert-manager/controller/certificates "msg"="finished processing work item" "key"="default/example-cert1"
I0522 15:06:45.532263       1 controller.go:141] cert-manager/controller/certificates "msg"="syncing item" "key"="default/example-cert1"
I0522 15:06:45.532697       1 util.go:178] cert-manager/controller/certificates "msg"="certificate scheduled for renewal" "duration_until_renewal"="16781h10m11.4673245s" "related_resource_kind"="Secret" "related_resource_name"="example-cert2" "related_resource_namespace"="default" "resource_kind"="Certificate" "resource_name"="example-cert1" "resource_namespace"="default"
I0522 15:06:45.532728       1 sync.go:311] cert-manager/controller/certificates "msg"="certificate does not require re-issuance. certificate renewal scheduled near expiry time." "related_resource_kind"="CertificateRequest" "related_resource_name"="example-cert1-3874364632" "related_resource_namespace"="default" "resource_kind"="Certificate" "resource_name"="example-cert1" "resource_namespace"="default"
I0522 15:06:45.533035       1 controller.go:147] cert-manager/controller/certificates "msg"="finished processing work item" "key"="default/example-cert1"

Describe the solution you'd like
Detect this setup refuse to order new certs. Maybe send some events to the certs in question.

Describe alternatives you've considered
Make users smarter so they don't do stupid things.

Environment details (if applicable):

  • Kubernetes version (e.g. v1.10.2): 1.14.8
  • Cloud-provider/provisioner (e.g. GKE, kops AWS, etc): AWS
  • cert-manager version (e.g. v0.15.0): v0.15.0
  • Install method (e.g. helm or static manifests): helm

/kind feature

@jetstack-bot jetstack-bot added the kind/feature Categorizes issue or PR as related to a new feature. label May 22, 2020
@hzhou97
Copy link
Contributor

hzhou97 commented Aug 4, 2020

/area monitoring
/priority important-longterm

@jetstack-bot jetstack-bot added area/monitoring Indicates a PR or issue relates to monitoring priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. labels Aug 4, 2020
@jetstack-bot
Copy link
Collaborator

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to jetstack.
/lifecycle stale

@jetstack-bot jetstack-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 15, 2021
@jetstack-bot
Copy link
Collaborator

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close.
Send feedback to jetstack.
/lifecycle rotten
/remove-lifecycle stale

@jetstack-bot jetstack-bot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Oct 15, 2021
@jetstack-bot
Copy link
Collaborator

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.
Send feedback to jetstack.
/close

@jetstack-bot
Copy link
Collaborator

@jetstack-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.
Send feedback to jetstack.
/close

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.

@gregsidelinger
Copy link
Author

/reopen

@jetstack-bot
Copy link
Collaborator

@gregsidelinger: Reopened this issue.

In response to this:

/reopen

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.

@jetstack-bot jetstack-bot reopened this Jul 7, 2022
@jetstack-bot
Copy link
Collaborator

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.
Send feedback to jetstack.
/close

@jetstack-bot
Copy link
Collaborator

@jetstack-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.
Send feedback to jetstack.
/close

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.

@gregsidelinger
Copy link
Author

/reopen

@jetstack-bot
Copy link
Collaborator

@gregsidelinger: Reopened this issue.

In response to this:

/reopen

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.

@jetstack-bot jetstack-bot reopened this Nov 2, 2022
@jetstack-bot
Copy link
Collaborator

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.
Send feedback to jetstack.
/close

@jetstack-bot
Copy link
Collaborator

@jetstack-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.
Send feedback to jetstack.
/close

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/monitoring Indicates a PR or issue relates to monitoring kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
None yet
Development

No branches or pull requests

3 participants