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 methods annotation #609

Merged
merged 4 commits into from
Apr 23, 2020
Merged

Add methods annotation #609

merged 4 commits into from
Apr 23, 2020

Conversation

rainest
Copy link
Contributor

@rainest rainest commented Apr 17, 2020

What this PR does / why we need it:
Adds the konghq.com/methods annotation for Ingress resources.

Special notes for your reviewer:
This validates the methods array based on the upstream schema validation. It follows the pattern used for protocol validation: if any element is invalid, all elements are discarded and the controller logs an error.

Travis Raines added 2 commits April 17, 2020 13:18
Add a new "konghq.com/methods" annotation for Ingress resources. This
annotation sets the "methods" property of a Kong route.
Validate methods against the upstream pattern (all members must be
uppercase alpha strings).

Add error logs indicating the problem method.
@rainest rainest requested a review from hbagdi April 17, 2020 20:39
@rainest rainest changed the base branch from master to next April 17, 2020 20:39
Travis Raines added 2 commits April 22, 2020 17:03
When possible, convert malformed methods in annotations or KongIngresses
to valid methods by trimming whitespace and uppercasing. Some methods
(e.g. integers) will continue to fail.

Revert previous change to logging due to consistency issues.
@hbagdi hbagdi merged commit 0920e80 into next Apr 23, 2020
@hbagdi hbagdi deleted the feat/methods-annotation branch April 23, 2020 16:24
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.

2 participants