Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add StatefulFormatter to ProxyConfig and mesh.ProxyConfig #3350

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

whitneygriffith
Copy link
Contributor

@whitneygriffith whitneygriffith requested a review from a team as a code owner November 6, 2024 07:49
@istio-policy-bot
Copy link

😊 Welcome @whitneygriffith! This is either your first contribution to the Istio api repo, or it's been
a while since you've been here.

You can learn more about the Istio working groups, Code of Conduct, and contribution guidelines
by referring to Contributing to Istio.

Thanks for contributing!

Courtesy of your friendly welcome wagon.

@istio-testing istio-testing added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 6, 2024
@whitneygriffith whitneygriffith changed the title Add StatefulFormatter to ProxyConfig Add StatefulFormatter to ProxyConfig and mesh.ProxyConfig Nov 6, 2024
Signed-off-by: whitneygriffith <[email protected]>
// To preserve the header case for HTTP 1.x requests, set the `statefulFormatter.preserveCase` field on the `ProxyConfig` resource:
// ```yaml
// apiVersion: networking.istio.io/v1beta1
// kind: ProxyConfig
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we want to add this to the ProxyConfig resource; only the proxyConfig annotation

Copy link
Contributor Author

@whitneygriffith whitneygriffith Nov 6, 2024

Choose a reason for hiding this comment

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

Can you point me to the proxyConfig annotation you are referring to? From what I understand to enable preserveCase at the namespace or workload level this feature should be apart of the proxyConfig resource. Where the annotation is used to apply a specific proxyConfig resource to a workload.

Copy link
Contributor

Choose a reason for hiding this comment

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

If you check the recording of the community meeting, the consensus was that we didn't want to make this too flexible/easy to use since we want to encourage users to adopt http2. Adding the field to the annotation and not the resource allows us to do so. Notice that the networking/v1beta1/proxy_config.proto file and the mesh/v1alpha1/proxy.proto files have different fields. The former is the CRD and the latter is the annotation struct; please add the new fields there

@@ -603,6 +603,9 @@ message ProxyConfig {
// Specifies the details of the proxy image.
istio.networking.v1beta1.ProxyImage image = 35;

// Defines options for stateful header formatters that maintain context or state across the processing of a request.
istio.networking.v1beta1.StatefulFormatter stateful_formatter = 40;
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure I like the idea of passing the complexity of "stateful formatters" to the users who just want to preserve their header casing. Can we utilize the proxyHeaders struct in some way to make this more intuitive?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree that we should avoid exposing the complexity of stateful formatters directly to users who are using the higher level meshConfig to enable header case preservation. I will look into adding preserveCase or preserveHeaderCase to the proxyHeaders struct.

Signed-off-by: whitneygriffith <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants