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

CRD Upgrade Issue from v1alpha1 to v1 in Nginx Ingress Controller Helm Chart #4931

Closed
nikolaigut opened this issue Jan 16, 2024 · 6 comments · Fixed by #4953
Closed

CRD Upgrade Issue from v1alpha1 to v1 in Nginx Ingress Controller Helm Chart #4931

nikolaigut opened this issue Jan 16, 2024 · 6 comments · Fixed by #4953
Assignees

Comments

@nikolaigut
Copy link

nikolaigut commented Jan 16, 2024

Describe the bug

After upgrading from the Nginx Ingress Controller Helm Chart version 1.0.0 to 1.1.0, the CRDs globalconfigurations.k8s.nginx.org and transportservers.k8s.nginx.org do not upgrade from version v1alpha1 to version v1 as expected. This issue is evident in the Kubernetes logs, which show errors indicating that the system cannot find the requested resource for transportservers.k8s.nginx.org.

Log Error

W0116 08:41:22.223067       1 reflector.go:539] pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:229: failed to list *v1.TransportServer: the server could not find the requested resource (get transportservers.k8s.nginx.org)
E0116 08:41:22.223099       1 reflector.go:147] pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:229: Failed to watch *v1.TransportServer: failed to list *v1.TransportServer: the server could not find the requested resource (get transportservers.k8s.nginx.org)

To Reproduce

Steps to reproduce the behavior:

  1. Deploy the Nginx Ingress Controller using Helm Chart version 1.0.0 with a specific configuration.
  2. Upgrade to Helm Chart version 1.1.0 following the standard upgrade procedure.
  3. Check the versions of CRDs globalconfigurations.k8s.nginx.org and transportservers.k8s.nginx.org.
  4. Observe the log errors related to transportservers.k8s.nginx.org.
  5. Expected behavior
  6. The CRDs globalconfigurations.k8s.nginx.org and transportservers.k8s.nginx.org should upgrade from version v1alpha1 to v1 without issues. The Kubernetes system should correctly recognize and interact with these resources post-upgrade.

The problem also occurs if the release of Helm Chart version 1.0.0 is uninstalled first.

Your environment

Version of the Ingress Controller: nginx/nginx-ingress:3.4.0
Version of Kubernetes: v1.26.10
Kubernetes platform: Azure Kubernetes Service
Using NGINX or NGINX Plus: NGINX
Additional relevant environment details: Helm Version v3.13.1

Additional context

Add any other context about the problem here, such as additional log files, error messages, or screenshots that might help diagnose the issue.

Copy link

Hi @nikolaigut thanks for reporting!

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

Cheers!

@oseoin
Copy link
Contributor

oseoin commented Jan 16, 2024

Hi @nikolaigut, the CRDs are not upgraded automatically by Helm and need to be applied manually. Please see this document on upgrading the CRDs.

@nikolaigut
Copy link
Author

Thank you for your prompt answer. This is correct, but should be made clear in the documentation so that there is no confusion. Perhaps you could add a note in the documentation that the CRDs are installed but not updated.

@oseoin
Copy link
Contributor

oseoin commented Jan 16, 2024

@nikolaigut I will get the documentation updated as soon as possible and will leave this issue open until it is available, thank you for the feedback!

@oseoin oseoin self-assigned this Jan 16, 2024
@brianehlert
Copy link
Collaborator

I am trying to think about the best way to make this highly visible.
I don't like adding "Notes" to docs as readers tend to skip right over them.

https://docs.nginx.com/nginx-ingress-controller/installation/installing-nic/installation-with-helm/#upgrading-the-crds
Does cover the situation.
However, it seems that Helm not upgrading CRDs is being lost as common knowledge; #4856 (comment)

@vepatel
Copy link
Contributor

vepatel commented Jan 17, 2024

@oseoin @brianehlert @nikolaigut https://docs.nginx.com/nginx-ingress-controller/installation/installing-nic/installation-with-helm/#upgrading-the-chart and https://github.com/nginxinc/kubernetes-ingress/tree/main/charts/nginx-ingress#upgrading-the-chart does say to upgrade the CRDs first, maybe we can highlight it better and add Helm's explanation around the same.
cc @ADubhlaoich

@oseoin oseoin linked a pull request Jan 22, 2024 that will close this issue
6 tasks
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.

4 participants