Skip to content

Conversation

@crstrn13
Copy link
Contributor

Description

This PR introduces EnvoyWaitMixin which leverages the kuadrant_configs metric exposed by the WASM shim. This metric increments each time the WASM
configuration changes, providing a reliable indicator of actual data plane readiness.

Two-phase wait mechanism:

  1. Control Plane: Wait for K8s policy status (Enforced: True, observedGeneration match)
  2. Data Plane: Wait for kuadrant_configs metric to increase (confirms WASM config applied)

Changes

  • Added EnvoyWaitMixin
    • Provides set_metrics_route() to capture baseline metric value
    • Provides wait_for_envoy_applied() to poll for metric increase
    • Automatically integrated into Policy.wait_for_ready()
  • Updated fixtures
    • Route fixture sets metrics_route to enable Envoy waiting
    • Proper fixture ordering ensures routes exist before policies are committed

Closes: #846

@crstrn13 crstrn13 force-pushed the envoy_wait_mixin branch 2 times, most recently from 80700f6 to 24acf6d Compare January 20, 2026 08:31
@crstrn13 crstrn13 self-assigned this Jan 20, 2026
@crstrn13 crstrn13 requested review from averevki and azgabur January 20, 2026 09:10
if not kuadrant:
return None

route = OpenshiftRoute.create_instance(
Copy link
Contributor

Choose a reason for hiding this comment

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

Using OpenshiftRoute for every gateway will make the testsuite incompatible with Kind/Kubernetes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you are right. I should use the exposer to expose that.

@crstrn13 crstrn13 force-pushed the envoy_wait_mixin branch 2 times, most recently from e304df5 to 5c2b364 Compare January 20, 2026 11:37
Signed-off-by: Alexander Cristurean <acristur@redhat.com>
Signed-off-by: Alexander Cristurean <acristur@redhat.com>
Signed-off-by: Alexander Cristurean <acristur@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhance wait_for_ready() on policies

3 participants