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 *_headers_to_add to ClusterWeight #441

Merged
merged 3 commits into from
Jan 30, 2018

Conversation

mandarjog
Copy link
Contributor

Add request_headers_to_add and response_headers_to_add to ClusterWeight.

The directives are processed when the cluster in selected through the enclosing RouteAction.

reference: envoyproxy/envoy#2455

Signed-off-by: Mandar U Jog [email protected]

Add request_headers_to_add and response_headers_to_add to ClusterWeight.

Signed-off-by: Mandar U Jog <[email protected]>
@mandarjog
Copy link
Contributor Author

/cc @zuercher

htuch
htuch previously approved these changes Jan 29, 2018
Copy link
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

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

LGTM, we should hold off on any merge until #438 is resolved.

@@ -208,6 +208,26 @@ message WeightedCluster {
// cluster with metadata matching that set in metadata_match will be
// considered. The filter name should be specified as *envoy.lb*.
Metadata metadata_match = 3;

// Specifies a list of headers to be added to requests when this cluster is selected
Copy link
Member

Choose a reason for hiding this comment

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

Please add the not implemented tags unless the associated Envoy PR is going to get posted at the same time.

@mandarjog
Copy link
Contributor Author

@htuch @mattklein123 Added not implemented tags.

@mattklein123
Copy link
Member

LGTM. Holding until the refactor is merged.

// :ref:`envoy_api_msg_route.RouteConfiguration`. For more information, including details on
// header value syntax, see the documentation on :ref:`custom request headers
// <config_http_conn_man_headers_custom_request_headers>`.
repeated HeaderValueOption response_headers_to_add = 5;
Copy link
Member

Choose a reason for hiding this comment

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

Should we go ahead an put response_headers_to_remove in here?

Copy link
Member

Choose a reason for hiding this comment

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

+1 might as well be consistent

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added response_headers_to_remove

Now it feels like it should be a separate proto, there is plenty of repetition in this file.

message HeaderAction {
   repeated HeaderValueOption request_headers_to_add = 1;
   repeated HeaderValueOption response_headers_to_add = 2;
   repeated string response_headers_to_remove = 3;
}

Copy link
Member

Choose a reason for hiding this comment

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

Unfortunately, we can't refactor, as the other locations that this occurs in are frozen.

@zuercher
Copy link
Member

Also, docs/root/configuration/http_conn_man/headers.rst will need a small update (but fine to do when the not-implemented tag is removed).

@mandarjog
Copy link
Contributor Author

@zuercher I will update docs/root/configuration/http_conn_man/headers.rst after implementation is done.

@mandarjog
Copy link
Contributor Author

@mattklein123 can this move forward now, #438 has merged.

@mattklein123 mattklein123 merged commit 6107893 into envoyproxy:master Jan 30, 2018
zuercher added a commit to envoyproxy/envoy that referenced this pull request Mar 13, 2018
…clusters (#2765)

Implements the request_headers_to_add, response_headers_to_add, and response_headers_to_remove fields added to weighted clusters by envoyproxy/data-plane-api#441.

Risk Level: Low - no change in behavior without configuration changes

Testing: unit and integration tests

Docs Changes: envoyproxy/data-plane-api#531

Release Notes: updated

Fixes: #2455

Signed-off-by: Stephan Zuercher [email protected]
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.

4 participants