-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
update default block list,docs, tests #7942
Conversation
/ok-to-test |
/kind bug |
/assign @rikatz |
/lgtm Thanks!!! |
/hold |
I left the tests in there with a custom list, just added one with the no setting so the new default empty string. |
I'm checking here why the tests are failing |
https://github.com/kubernetes/ingress-nginx/pull/7874/files#diff-9dcbb8eba12c61d6f3dde188c0b8d8332365139e5062995d322795e02710fb6cR45 Probably being caused by this, happened locally... strange as this was going just fine, will check it again with bigger timeout just to remove this as something that may happen |
In https://github.com/kubernetes/ingress-nginx/blob/main/internal/ingress/controller/store/store.go#L826-L830 you can remove/replace for the following block (I have left a klog.Errorf that should be removed as well...) if s.backendConfig.AnnotationValueWordBlocklist != "" {
if err := checkBadAnnotationValue(copyIng.Annotations, s.backendConfig.AnnotationValueWordBlocklist); err != nil {
klog.Errorf("skipping ingress %s: %s", key, err)
return
}
} In https://github.com/kubernetes/ingress-nginx/blob/main/internal/ingress/controller/controller.go#L245 var arraybadWords []string
if s.backendConfig.AnnotationValueWordBlocklist != "" {
arraybadWords = strings.Split(strings.TrimSpace(cfg.AnnotationValueWordBlocklist), ",")
} |
One more: As we are turning the default value as empty string, on our tests (like /go/src/k8s.io/ingress-nginx/test/e2e/settings/badannotationvalues.go:65) you probably want to configure with the default values (or remove this test) |
/label tide/merge-method-squash |
/retest |
return | ||
if s.backendConfig.AnnotationValueWordBlocklist != "" { | ||
if err := checkBadAnnotationValue(copyIng.Annotations, s.backendConfig.AnnotationValueWordBlocklist); err != nil { | ||
klog.Errorf("skipping ingress %s: %s", key, err) |
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.
nit/followup: turn this into a warning (my bad, I left as error, people complained!)
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
Thanks.
Left a small followup/cleanup to move the error into warning, but IMO we can merge this, just do the small fix later and release
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rikatz, strongjz The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/hold cancel |
* update default block list,docs, tests * fix config for admin test * gofmt * remove the err return
* update default block list,docs, tests (#7942) * update default block list,docs, tests * fix config for admin test * gofmt * remove the err return * Change sanitization message from error to warning (#7963) Signed-off-by: Ricardo Pchevuzinske Katz <ricardo.katz@gmail.com> * duplicate test Co-authored-by: Ricardo Katz <rikatz@users.noreply.github.com>
* update default block list,docs, tests * fix config for admin test * gofmt * remove the err return
1.0.5 created a breaking change with a default blocklist for user, this PR reverts that and makes the default blocklist an empty string.
What this PR does / why we need it:
fixes #7939
Types of changes
How Has This Been Tested?
make test and e2e-test locally
Checklist: