Skip to content

rewrite-target lint only checks for $1 #4282

@majodev

Description

@majodev

Is this a request for help? (If yes, you should use our troubleshooting guide and community support channels, see https://kubernetes.io/docs/tasks/debug-application-cluster/troubleshooting/.):

no

What keywords did you search in NGINX Ingress controller issues before filing this one? (If you have found any duplicates, you should instead reply there.):

rewrite-target, rewrite-target lint


Is this a BUG REPORT or FEATURE REQUEST? (choose one):

NGINX Ingress controller version: 0.24.1

Kubernetes version (use kubectl version): v1.13.7-gke.8

Environment:

  • Cloud provider or hardware configuration: GKE
  • OS (e.g. from /etc/os-release): Ubuntu

What happened:

When running kubectl ingress-nginx lint --verbose --all-namespaces and using the exact same samples from here (change from here), the following error happens:

✗ ns/ingress-name
  - The rewrite-target annotation value does not reference a capture group
      Lint added for version 0.22.0
      https://github.com/kubernetes/ingress-nginx/issues/3174

It seems that the linter only checks for the occurence of "$1" within the rewrite-target annotation, not "$2" (or anything else thats also supported). See here.

What you expected to happen:

No lint error.

How to reproduce it (as minimally and precisely as possible):

Use the rewrite-target sample from here und run the linter command (kubectl ingress-nginx lint --verbose --all-namespaces).

Anything else we need to know:

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.¯\_(ツ)_/¯¯\\\_(ツ)_/¯

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions