Skip to content

Conversation

elijah-rou
Copy link
Contributor

@elijah-rou elijah-rou commented Sep 12, 2025

Adds the ability to optionally disable ClusterIP routing on a per-revision basis through the 'serving.knative.dev/disable-clusterip-routing' annotation.

When this annotation is set to 'true' on a revision, the activator will bypass ClusterIP routing and use direct pod IP routing exclusively, even when a healthy ClusterIP is available.

Key changes:

  • Add DisableClusterIPRoutingAnnotationKey constant for the new
    annotation
  • Extend revisionThrottler to track and respect the disableClusterIP
    setting
  • Modify routing logic to skip ClusterIP when disabled
  • Read annotation value during throttler creation from revision metadata
  • Maintain full backward compatibility (ClusterIP routing enabled by
    default)

This feature is useful for scenarios where direct pod routing is preferred over ClusterIP load balancing, such as for debugging, performance testing, or when specific routing behaviors are required.

Includes comprehensive tests to verify both disabled and default behaviors.

Copy link

knative-prow bot commented Sep 12, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: elijah-rou
Once this PR has been reviewed and has the lgtm label, please assign dprotaso for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow bot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 12, 2025
Copy link

knative-prow bot commented Sep 12, 2025

Hi @elijah-rou. Thanks for your PR.

I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@knative-prow knative-prow bot requested review from dsimansk and skonto September 12, 2025 15:22
Copy link

codecov bot commented Sep 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.17%. Comparing base (973fcba) to head (9c8f884).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16081      +/-   ##
==========================================
+ Coverage   80.14%   80.17%   +0.03%     
==========================================
  Files         214      214              
  Lines       16877    16883       +6     
==========================================
+ Hits        13526    13536      +10     
+ Misses       2989     2985       -4     
  Partials      362      362              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Adds the ability to optionally disable ClusterIP routing on a
per-revision basis
through the 'serving.knative.dev/disable-clusterip-routing' annotation.

When this annotation is set to 'true' on a revision, the activator will
bypass
ClusterIP routing and use direct pod IP routing exclusively, even when a
healthy
ClusterIP is available.

Key changes:
- Add DisableClusterIPRoutingAnnotationKey constant for the new
annotation
- Extend revisionThrottler to track and respect the disableClusterIP
setting
- Modify routing logic to skip ClusterIP when disabled
- Read annotation value during throttler creation from revision metadata
- Maintain full backward compatibility (ClusterIP routing enabled by
default)

This feature is useful for scenarios where direct pod routing is
preferred over
ClusterIP load balancing, such as for debugging, performance testing, or
when
specific routing behaviors are required.

Includes comprehensive tests to verify both disabled and default
behaviors.
@elijah-rou elijah-rou force-pushed the feat/optional-disable-clusterip-routing branch from 9a8ccd9 to 9c8f884 Compare September 12, 2025 15:41
@elijah-rou elijah-rou changed the title Optional disabling of clusterip routing Optional disabling of ClusterIP routing in the activator Sep 12, 2025
@dprotaso
Copy link
Member

You might want to take a look at #10751

The intent was to remove the cluster IP routing completely. It's there because of Istio Mesh.

But back then I discovered our mesh tests weren't actually setting up mesh properly. That's since been fixed but Markus left the project before revisiting the work.

I think I'd prefer to revisit that with the hope of removing these fallbacks completely.

Also supposedly this isn't needed in Istio ambient mode at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants