Skip to content

Conversation

@sanikachavan5
Copy link
Contributor

@sanikachavan5 sanikachavan5 commented Oct 23, 2025

This pull request introduces per-Gateway health probe configuration for API Gateway pods in Consul on Kubernetes, allowing users to set custom liveness, readiness, and startup probes via annotations on Gateway resources. The implementation includes parsing and validation logic for these probe annotations, integration into the deployment reconciliation flow, and documentation for users. Minor related improvements and tests are also included.

API Gateway Probe Configuration

  • Added support for configuring Kubernetes liveness, readiness, and startup probes per-Gateway using the consul.hashicorp.com/liveness-probe, consul.hashicorp.com/readiness-probe, and consul.hashicorp.com/startup-probe annotations, with JSON-formatted probe configuration. This allows fine-grained health checking tailored to each Gateway. [1] [2]
  • Implemented ProbesFromGateway in control-plane/api-gateway/gatekeeper/probes.go to parse and validate probe annotations, ensuring only one probe handler is set and normalizing successThreshold for liveness/startup probes.

Deployment Reconciliation and Propagation

  • Modified deployment merge logic in control-plane/api-gateway/gatekeeper/deployment.go to apply parsed probe configurations from Gateway annotations to the primary container in Gateway deployments. This ensures probe changes trigger rollout and are reflected in the running pods. [1] [2]
  • Updated deployment comparison to include probe initial delay seconds, improving rollout detection when probe configs change.

Testing and Documentation

  • Added unit tests to verify that probe annotations on Gateways are correctly parsed and propagated to deployments, and that probe handler changes are applied as expected.
  • Updated charts/consul/README.md with documentation and examples for configuring Gateway probes using annotations.### Changes proposed in this PR ###
  • include initialDelaySeconds as a field to be updated by gateway controller

How I've tested this PR

  • Created a kind cluster and then added annotations to the gateway and seen them reflect in the deployment and gateway pod.

How I expect reviewers to test this PR

Checklist

PCI review checklist

  • I have documented a clear reason for, and description of, the change I am making.

  • If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.

  • If applicable, I've documented the impact of any changes to security controls.

    Examples of changes to security controls include using new access control methods, adding or removing logging pipelines, etc.

@sanikachavan5 sanikachavan5 requested a review from a team as a code owner October 23, 2025 05:51
@sanikachavan5 sanikachavan5 changed the title demo code demo code for a customer issue Oct 23, 2025
@sanikachavan5 sanikachavan5 added pr/no-changelog PR does not need a corresponding .changelog entry pr/no-backport signals that a PR will not contain a backport label labels Oct 23, 2025
@sanikachavan5 sanikachavan5 force-pushed the sanikachavan5/include-inital-delay-seconds-as-field--for-gateway-controller-update branch 2 times, most recently from b15b906 to a4bec48 Compare October 28, 2025 19:16
@sanikachavan5 sanikachavan5 changed the title demo code for a customer issue enable updates to probes in gateways Oct 28, 2025
@sanikachavan5 sanikachavan5 force-pushed the sanikachavan5/include-inital-delay-seconds-as-field--for-gateway-controller-update branch from 314774b to b402cf9 Compare November 4, 2025 06:07
srahul3
srahul3 previously approved these changes Nov 18, 2025
Copy link
Contributor

@srahul3 srahul3 left a comment

Choose a reason for hiding this comment

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

✅ LGTM. Thanks for the great job 🚀

@sanikachavan5 sanikachavan5 force-pushed the sanikachavan5/include-inital-delay-seconds-as-field--for-gateway-controller-update branch from 90248ec to f45f18e Compare November 19, 2025 08:24
@sanikachavan5 sanikachavan5 added backport/1.8.x Backport to release/1.8.x branch and removed pr/no-changelog PR does not need a corresponding .changelog entry pr/no-backport signals that a PR will not contain a backport label labels Nov 19, 2025
Copy link
Contributor

@srahul3 srahul3 left a comment

Choose a reason for hiding this comment

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

✅ LGTM

@sanikachavan5 sanikachavan5 merged commit 7b2babf into main Nov 20, 2025
44 of 45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/1.8.x Backport to release/1.8.x branch backport/1.9.x

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants