[feat acm-certs-mgmt] bug fixes and doc improvements - #4711
Merged
Conversation
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: shraddhabang The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Codecov Reportβ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4711 +/- ##
==========================================
+ Coverage 50.39% 56.13% +5.74%
==========================================
Files 205 388 +183
Lines 12109 30942 +18833
==========================================
+ Hits 6102 17369 +11267
- Misses 5590 12562 +6972
- Partials 417 1011 +594 β View full report in Codecov by Sentry. π New features to boost your workflow:
|
Collaborator
|
/approved |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Bug 1: Certificate dedup drops certs in ingress groups : For auto-created certs (ResourceFieldStringToken), Resolve() returns "" because the cert status isn't set until the synthesizer runs. This caused all auto-created certs after the first to be silently dropped in ingress groups.
Fix: Use resource identity (Type()/ID() from Dependencies()) for dedup on auto-created certs. Fall back to Resolve() only for literal tokens (e.g. certificate-arn), which always resolve to the actual ARN string.
Bug 2: Same hostname across ingresses in a group produces only one cert
Fix: Include a hash of the ingress namespace/name in the resource ID, ensuring each ingress gets its own cert even with shared hostnames.
Bug 3: Orphaned certs when hosted zone doesn't exist : certificate was requested from ACM before checking if a Route53 hosted zone exists. If no zone was found, the cert was left in PENDING_VALIDATION state for 30 minutes, blocking the reconcile loop.
Fix: Pre-check that hosted zones exist for all domains before calling RequestCertificate.
Bug 4: No hostname in Ingress provides weird error message : when create-acm-cert are set and ingress does not have any hostname, the API was called and failed requesting the new cert.
Fix: Added a check in builder before calling the API to fail fast when no hostname are specified.
Documentation updates
Manual testing
Single ingress: amazon-issued, PCA, cert-arn, cert discovery, multi-SAN, SAN update
Ingress groups: mixed strategies, dedup with different hostnames, same hostname, cert-arn backward compat
Error cases: no hostname, wrong domain pre-check, SAN quota exceeded, cert-arn precedence
Lifecycle: delete ingress β cert cleanup, switch create-acm-cert β certificate-arn
Checklist
README.md, or thedocsdirectory)BONUS POINTS checklist: complete for good vibes and maybe prizes?! π€―