-
Notifications
You must be signed in to change notification settings - Fork 2k
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 support for headers in action return #5204
Add support for headers in action return #5204
Conversation
👷 Deploy request for nginx-kubernetes-ingress pending review.Visit the deploys page to approve it
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM docs-wise but the majority of the PR is code, so I will not approve.
I think to be self critical of this PR; What is done;
What is not done;
|
3769030
to
9175d98
Compare
I've updated the PR to passing unit tests |
9175d98
to
b5076da
Compare
b5076da
to
977ee4b
Compare
I think this needs someone from nginx to weigh in. With the PR as it is now, the generated/expected spec isn't correct - it would generate errorPages as; headers:
allOf:
- items:
description: Header defines an HTTP Header.
properties:
name:
type: string
value:
type: string
type: object
- items:
description: Header defines an HTTP Header.
properties:
name:
type: string
value:
type: string
type: object
type: array This is because
After some initial testing, these struct changes to produce the expected results. I think these changes could break any existing PRs but vice versa, if we decide one of these routes then it would make sense to try and merge quickly to prevent conflicts. |
Just trying to make it clearer, in the current API, I like the first solution more, because I don't think Also, I saw
Therefore, I feel we should be consistent and remove
As we are not changing the API for |
977ee4b
to
4598c26
Compare
That makes the most sense, I've made the change, updated tests and generated the new config. |
@haywoodsh @andrew-s I think we can add some assertions in following tests: |
@haywoodsh @vepatel Added the suite tests, this should cover the three scenarios for both
|
docs/content/configuration/virtualserver-and-virtualserverroute-resources.md
Outdated
Show resolved
Hide resolved
docs/content/configuration/virtualserver-and-virtualserverroute-resources.md
Outdated
Show resolved
Hide resolved
for more information, see https://pre-commit.ci
c7df110
to
3ba4f27
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Thank you for your contribution @andrew-s! |
Proposed changes
This PR adds support for headers in the action return object. This closes/fixes #2420
Checklist
Before creating a PR, run through this checklist and mark each as complete.
Notes
I've added in unit tests, but it looks like there are other tests within the repo - I have also validated by compiling and running on a local cluster.