fix(gateway): treat missing backend TLS secret as pending - #502
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
When a backend module has not yet provisioned its TLS Secret, the Gateway deployment reconciler fetched the Secret and returned any error as a hard failure. A NotFound during this race surfaced the Gateway as errored rather than pending. Return core.NewPendingError() on apierrors.IsNotFound so the framework treats it as pending (matching how other 'not ready yet' conditions are handled) and retries. All other Get errors remain hard errors.
a8057a0 to
97e85f8
Compare
✅ Approve — automated reviewThe change correctly handles missing backend TLS secrets by converting Kubernetes NotFound errors into pending (non-retrying) errors while preserving hard-failure propagation for all other error types. The reconciliation watch mechanism (via the GatewayBackendTLSSecretLabel) ensures the controller re-enqueues correctly when the secret is eventually created, so no self-requeue is needed. Unit tests cover the missing, present, and non-NotFound error cases. The prior inline discussion confirmed correct watch-driven retry behavior and was resolved by the PR author. No actionable issues were identified by reviewers. No findings. |
When a backend module has not yet provisioned its TLS Secret, the Gateway
deployment reconciler fetched the Secret and returned any error as a hard
failure. A NotFound during this race surfaced the Gateway as errored rather
than pending.
Return core.NewPendingError() on apierrors.IsNotFound so the framework treats
it as pending (matching how other 'not ready yet' conditions are handled) and
retries. All other Get errors remain hard errors.
Stack created with GitHub Stacks CLI • Give Feedback 💬