Change sanitization message from error to warning (#7963)
Signed-off-by: Ricardo Pchevuzinske Katz <ricardo.katz@gmail.com>
This commit is contained in:
parent
d4a6ade65f
commit
c0814c6f78
2 changed files with 1 additions and 3 deletions
|
@ -246,7 +246,6 @@ func (n *NGINXController) CheckIngress(ing *networking.Ingress) error {
|
|||
|
||||
if cfg.AnnotationValueWordBlocklist != "" {
|
||||
arrayBadWords = strings.Split(strings.TrimSpace(cfg.AnnotationValueWordBlocklist), ",")
|
||||
klog.Warningf("Blocklist is %s", cfg.AnnotationValueWordBlocklist)
|
||||
}
|
||||
|
||||
for key, value := range ing.ObjectMeta.GetAnnotations() {
|
||||
|
@ -260,7 +259,6 @@ func (n *NGINXController) CheckIngress(ing *networking.Ingress) error {
|
|||
if strings.HasPrefix(key, fmt.Sprintf("%s/", parser.AnnotationsPrefix)) && len(arrayBadWords) != 0 {
|
||||
for _, forbiddenvalue := range arrayBadWords {
|
||||
if strings.Contains(value, strings.TrimSpace(forbiddenvalue)) {
|
||||
klog.Errorf("%s annotation contains invalid word %s", key, forbiddenvalue)
|
||||
return fmt.Errorf("%s annotation contains invalid word %s", key, forbiddenvalue)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -825,7 +825,7 @@ func (s *k8sStore) syncIngress(ing *networkingv1.Ingress) {
|
|||
|
||||
if s.backendConfig.AnnotationValueWordBlocklist != "" {
|
||||
if err := checkBadAnnotationValue(copyIng.Annotations, s.backendConfig.AnnotationValueWordBlocklist); err != nil {
|
||||
klog.Errorf("skipping ingress %s: %s", key, err)
|
||||
klog.Warningf("skipping ingress %s: %s", key, err)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue