-
Notifications
You must be signed in to change notification settings - Fork 350
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
webhook: validate skipper annotations in ingress #2493
webhook: validate skipper annotations in ingress #2493
Conversation
cmd/webhook/admission/testdata/ingress/invalid-filters-and-predicates.json
Outdated
Show resolved
Hide resolved
cmd/webhook/admission/testdata/ingress/valid-ingress-with-annotations.json
Outdated
Show resolved
Hide resolved
f5698b8
to
ecf9af6
Compare
@@ -0,0 +1,50 @@ | |||
package admission |
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.
Lets name the file ingress.go as it is in the admission folder.
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.
I wonder if we should rename admission to validation, because we do not plan to change documents but to validate them.
In Kubernetes docs this is not really great documented, but there are both and there are (or were?) both registered as admission webhook AFAIK.
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.
There are exported symbols. If we rename I propose we unexport everything to allow active development.
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.
Maybe we wait to see in the next steps, it make sense because we may move this package to another place for filter registry, maybe we can rename with the movement?
cmd/webhook/admission/testdata/ingress/valid-ingress-with-annotations.json
Outdated
Show resolved
Hide resolved
cmd/webhook/admission/testdata/ingress/valid-ingress-with-annotations.json
Outdated
Show resolved
Hide resolved
fdc381e
to
42afc18
Compare
4e0ac28
to
9e8c82a
Compare
Signed-off-by: Mustafa Abdelrahman <[email protected]>
Signed-off-by: Mustafa Abdelrahman <[email protected]>
address comments Signed-off-by: Mustafa Abdelrahman <[email protected]>
Signed-off-by: Mustafa Abdelrahman <[email protected]>
…ded for backward comptiability Signed-off-by: Mustafa Abdelrahman <[email protected]>
Signed-off-by: Mustafa Abdelrahman <[email protected]>
Add validatior to admitter Export skipper ingress annotations Signed-off-by: Mustafa Abdelrahman <[email protected]>
Signed-off-by: Mustafa Abdelrahman <[email protected]>
Clean admitter functions Signed-off-by: Mustafa Abdelrahman <[email protected]>
Signed-off-by: Mustafa Abdelrahman <[email protected]>
This reverts commit 0cd73f2. Signed-off-by: Mustafa Abdelrahman <[email protected]>
9e8c82a
to
53f054d
Compare
👍 |
1 similar comment
👍 |
This should introduce the custom
ValidationWebhook
for skipper ingress annotations (e.gzalando.org/skipper-routes
,zalando.org/skipper-filter
andzalando.org/skipper-predicate
), currently we skip the annotation if something is wrong from skipper side at https://github.com/zalando/skipper/blob/master/dataclients/kubernetes/ingress.go#L227-L271This is also a followup to #1618 & #2478