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

ingress-nginx annotation rewrite compliance with k8s docs #1961

Closed
boazj opened this issue Jan 23, 2018 · 4 comments
Closed

ingress-nginx annotation rewrite compliance with k8s docs #1961

boazj opened this issue Jan 23, 2018 · 4 comments

Comments

@boazj
Copy link

boazj commented Jan 23, 2018

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

NGINX Ingress controller version:
0.10.0

What happened:
The Kubernetes documentation of Ingress provide the following example (https://kubernetes.io/docs/concepts/services-networking/ingress/)
and link directly to ingress-nginx documentation (https://github.com/kubernetes/ingress-nginx/blob/master/docs/examples/rewrite/README.md)

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: test-ingress
  annotations:
    **ingress.kubernetes.io**/rewrite-target: /
spec:
  rules:
  - http:
      paths:
      - path: /testpath
        backend:
          serviceName: test
          servicePort: 80

Though in the file ingress-nginx/internal/ingress/annotations/parser/main.go
We have hardcoded annotation prefix AnnotationsPrefix = "nginx.ingress.kubernetes.io"
Though it can be overridden by
annotationsPrefix = flags.String("annotations-prefix", "nginx.ingress.kubernetes.io", Prefix of the ingress annotations.)

IMHO, either the example should change or ingress-nginx should support ingress.kubernetes.io/rewrite-target OOB.
Note #683 and @delacroixe @colemickens comments, I doubt they execute the controller with --annotations-prefix.
What do you guys think?

@aledbf
Copy link
Member

aledbf commented Jan 23, 2018

@boazj the change in the prefix of the annotations was an specific request here #1436

@aledbf
Copy link
Member

aledbf commented Jan 23, 2018

@boazj you can change the prefix using a flag the flag --annotations-prefix in the deployment

@aledbf
Copy link
Member

aledbf commented Jan 23, 2018

Closing. You are more than welcome to open a PR in the docs repo to change the prefix.

@aledbf aledbf closed this as completed Jan 23, 2018
@aledbf
Copy link
Member

aledbf commented Jan 23, 2018

@boazj just in case the annotation ingress.kubernetes.io/rewrite-target was created in this repository and landed in the docs giving the impression it was supported by all the ingress controllers.

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

No branches or pull requests

2 participants