ingress-nginx
ingress-nginx copied to clipboard
Changing of cors-* annotations has no effect
NGINX Ingress controller version (exec into the pod and run nginx-ingress-controller --version.): 1.1.0, 1.1.1
Kubernetes version (use kubectl version
): 1.21.5
Environment:
-
Cloud provider or hardware configuration: GCP
-
How was the ingress-nginx-controller installed: kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.1.1/deploy/static/provider/cloud/deploy.yaml
What happened:
I set these annotations for an ingress of my application:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/cors-allow-methods: PUT, GET, POST, OPTIONS
nginx.ingress.kubernetes.io/cors-allow-origin: 'http://localhost:3000'
nginx.ingress.kubernetes.io/enable-cors: 'true'
When I'm trying to change any CORS-related annotation, these sections of nginx.conf of the controller doesn't change. For applying needed changes I need to delete and recreate the Ingress manifest.
What you expected to happen:
The changes was applied successfully.
How to reproduce it:
- Install nginx ingress as usual
- Create an Ingress resource with annotations mentioned above
- Check your server configuration at
nginx.conf
in the pod of the controller - Make some changes in the CORS* annotations (except
enable-cors
) - Go to step 3
@vnesbee: This issue is currently awaiting triage.
If Ingress contributors determines this is a relevant issue, they will accept it by applying the triage/accepted
label and provide further guidance.
The triage/accepted
label can be added by org members by writing /triage accepted
in a comment.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
/remove-kind bug /kind support
@vnesbee It should be nginx.ingress.kubernetes.io/enable-cors: "true" update and check once
@vnesbee
please check and close issue if resolved
I think this might be related if not the same issue: https://github.com/kubernetes/ingress-nginx/issues/8469
curious, do you have any of these error / warning logs in your ingress-controller logs? https://github.com/kubernetes/ingress-nginx/blob/32306381606c249b86cb2d5015c79f994251dad8/internal/ingress/annotations/cors/main.go#L136
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied - After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied - After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle stale
- Mark this issue or PR as rotten with
/lifecycle rotten
- Close this issue or PR with
/close
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied - After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied - After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle rotten
- Close this issue or PR with
/close
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
i have the same problem. my setup is with latest microk8s snap on ubuntu 22.04
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied - After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied - After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closed
You can:
- Reopen this issue with
/reopen
- Mark this issue as fresh with
/remove-lifecycle rotten
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
@k8s-triage-robot: Closing this issue, marking it as "Not Planned".
In response to this:
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied- After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied- After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closedYou can:
- Reopen this issue with
/reopen
- Mark this issue as fresh with
/remove-lifecycle rotten
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.