Skip to content

fix(gateway): treat missing backend TLS secret as pending - #502

Merged
Dav-14 merged 1 commit into
fix/connectivity-finalizerfrom
fix/gateway-tls-pending
Aug 6, 2026
Merged

fix(gateway): treat missing backend TLS secret as pending#502
Dav-14 merged 1 commit into
fix/connectivity-finalizerfrom
fix/gateway-tls-pending

Conversation

@Dav-14

@Dav-14 Dav-14 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

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 CLIGive Feedback 💬

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • main

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6880fe56-a177-4a83-9dba-3161e19c1f2b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Comment thread internal/resources/gateways/deployment.go
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.
@Dav-14
Dav-14 force-pushed the fix/gateway-tls-pending branch from a8057a0 to 97e85f8 Compare August 3, 2026 08:46
@Dav-14
Dav-14 marked this pull request as ready for review August 3, 2026 10:02
@Dav-14
Dav-14 requested a review from a team as a code owner August 3, 2026 10:02
@NumaryBot

Copy link
Copy Markdown
Contributor

✅ Approve — automated review

The 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.

@flemzord flemzord left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@Dav-14
Dav-14 merged commit 87f1530 into feat/connectivity-module Aug 6, 2026
22 of 32 checks passed
@Dav-14
Dav-14 deleted the fix/gateway-tls-pending branch August 6, 2026 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants