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

[helm chart] enableSnippets should not depend from enableCustomResources #2210

Closed
AlessioCasco opened this issue Nov 24, 2021 · 2 comments · Fixed by #2215
Closed

[helm chart] enableSnippets should not depend from enableCustomResources #2210

AlessioCasco opened this issue Nov 24, 2021 · 2 comments · Fixed by #2215

Comments

@AlessioCasco
Copy link
Contributor

Hello!

Describe the bug
Within helm, controller.enableSnippets should not require to also have controller.enableCustomResources.
In our case we don't use CRDs at all, only ingress resources, so we should not need to enable them.

To Reproduce
Steps to reproduce the behavior:

  1. set controller.enableSnippets: true into the values.yaml
  2. helm install/upgrade
  3. kubectl describe any ingress that uses annotations snippet and you will see the following error nginx-ingress-controller annotations.nginx.org/server-snippets: Forbidden: snippet specified but snippets feature is not enabled

Expected behavior
controller.enableSnippets should not depend from controller.enableCustomResources

Your environment

  • Chart version: 0.11.3
  • Version of the Ingress Controller : 2.0.3
  • Version of Kubernetes: v1.20.12
  • Using NGINX

If you agree with the above I can open a pr to move the parameter above line 146

Thanks
Alessio

@github-actions
Copy link

Hi @AlessioCasco thanks for reporting!

Be sure to check out the docs while you wait for a human to take a look at this 🙂

Cheers!

@AlessioCasco
Copy link
Contributor Author

Adding some more info

We tried to enable the CDRs in order to be able to move forward with the upgrade but one cluster can't be upgraded because we think some CDRs were not installed when the ingress was first deployed since we always kept the parameter set to false:

E1125 10:33:32.628288       1 reflector.go:138] pkg/mod/k8s.io/client-go@v0.22.2/tools/cache/reflector.go:167: Failed to watch *v1.Policy: failed to list *v1.Policy: the server could not find the requested resource (get policies.k8s.nginx.org)

tomasohaodha pushed a commit that referenced this issue Nov 30, 2021
* In helm, controller.enableSnippets should not depend from controller.enableCustomResources

Tests pass, merge approved by two team members.
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

Successfully merging a pull request may close this issue.

1 participant