Conversation
mock-dst-addr feature flag
mock-dst-addr feature flagmock-orig-dst feature flag
|
Technically, I don't think this should be a feature flag. Cargo features are intended to be strictly additive in nature, since they can be enabled by dependencies. It might be more correct to use With that said, I don't think this actually matters for linkerd. Since linkerd is a binary application rather than a library, we don't need to worry about dependent code enabling conflicting features. So, I am not sure if this actually matters at all; I just thought it was worth mentioning. |
hawkw
left a comment
There was a problem hiding this comment.
I think it seems possible to simplify things a bit more by removing the generics and the trait entirely. But, I'd be fine with merging this as is, if you don't think that's worth the extra effort.
I was wondering about this. The benefit to using feature flags is that the integration tests can just depend on the feature rather than requiring compiler settings. I'm going to merge as is but happy to revisit if it can be improved. |
Ah, yeah, I hadn't thought of that. Let's do it this way, then — since Linkerd is not a library with dependents, I doubt the feature flag will cause issues. |
This release restores the `route_actual_response_total` metric, which is needed for `linkerd routes -o wide`. --- * Update test certificates (linkerd/linkerd2-proxy#460) * Use strong_count instead of upgrade on weak Arcs in cache (linkerd/linkerd2-proxy#459) * Wire authority override coming from discovery (linkerd/linkerd2-proxy#462) * Update integration tests certs (linkerd/linkerd2-proxy#465) * Add a `mock-orig-dst` feature flag (linkerd/linkerd2-proxy#466) * http-metrics: Make latency export optional (linkerd/linkerd2-proxy#467) * Restore the route_actual_response_total metric (linkerd/linkerd2-proxy#468)
This release restores the `route_actual_response_total` metric, which is needed for `linkerd routes -o wide`. --- * Update test certificates (linkerd/linkerd2-proxy#460) * Use strong_count instead of upgrade on weak Arcs in cache (linkerd/linkerd2-proxy#459) * Wire authority override coming from discovery (linkerd/linkerd2-proxy#462) * Update integration tests certs (linkerd/linkerd2-proxy#465) * Add a `mock-orig-dst` feature flag (linkerd/linkerd2-proxy#466) * http-metrics: Make latency export optional (linkerd/linkerd2-proxy#467) * Restore the route_actual_response_total metric (linkerd/linkerd2-proxy#468)
The proxy code is generic over the strategy it uses for determining the original destination address for a given connection. In integration tests, the strategy is replaced with a configured version.
The
mock-orig-dstfeature modifies the implementation to be swappable at compile-time via feature flag. This removes integration-test specific test code, and makes it generally possible to start the proxy outside of Kubernetes (via the compile-time flag). When this feature is enabled, runtime configuration is required via a pair of new environment variables.There was an integration test that tested the proxy's behavior when an address could not be determined, but that test has been removed as that use case is not particularly important.
To build a proxy in this mode, one runs: