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

HCCM does not remove/update managed certificate #596

Open
Tracked by #612
micheljung opened this issue Jan 6, 2024 · 2 comments
Open
Tracked by #612

HCCM does not remove/update managed certificate #596

micheljung opened this issue Jan 6, 2024 · 2 comments
Labels
bug Something isn't working pinned

Comments

@micheljung
Copy link

micheljung commented Jan 6, 2024

Version 1.18.0

If you create a service like this:

annotations:
    load-balancer.hetzner.cloud/name: "ingress-nginx"
    load-balancer.hetzner.cloud/location: "nbg1"
    load-balancer.hetzner.cloud/certificate-type: "managed"
    load-balancer.hetzner.cloud/http-managed-certificate-name: "example.com"
    load-balancer.hetzner.cloud/http-managed-certificate-domains: "example.com"

A load balancer and certificate will be created successfully. The certificate will be labeled with the service UID:

image

However, when the load balancer is removed, the certificate is not. The next time a load balancer is created, HCCM sees that the certificate already exists and won't create it - but it also won't reuse it, because the service UID changed and doesn't match the certificate's label anymore. The HCCM logs:

controller.go:298] error processing service example/ingress-nginx-controller (retrying with exponential backoff): failed to ensure load balancer: hcloud/loadBalancers.EnsureLoadBalancer: hcops/LoadBalancerOps.ReconcileHCLBServices: hcops/hclbServiceOptsBuilder.buildAddServiceOpts: hcops/CertificateOps.GetCertificateByLabel: not found

This could be avoided if:

  • HCCM would remove managed certificates when removing the load balancer (potentially undesired)
  • HCCM would remove the service label from the certificate when removing the load balancer
  • HCCM would add the service label to an existing certificate
  • HCCM would match the certificate by name and not by label
Copy link
Contributor

github-actions bot commented Apr 5, 2024

This issue has been marked as stale because it has not had recent activity. The bot will close the issue if no further action occurs.

@github-actions github-actions bot added the stale label Apr 5, 2024
@micheljung
Copy link
Author

Still an issue

@github-actions github-actions bot removed the stale label Apr 7, 2024
@apricote apricote added bug Something isn't working pinned labels Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pinned
Projects
None yet
Development

No branches or pull requests

2 participants