Skip to content

[Bug]: Uninstalling helm chart can cause issues with NGINX Plus mgmt config #7166

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

Closed
pdabelf5 opened this issue Jan 20, 2025 · 7 comments · Fixed by #7691
Closed

[Bug]: Uninstalling helm chart can cause issues with NGINX Plus mgmt config #7166

pdabelf5 opened this issue Jan 20, 2025 · 7 comments · Fixed by #7691
Assignees
Labels
bug An issue reporting a potential bug
Milestone

Comments

@pdabelf5
Copy link
Collaborator

Version

edge

What Kubernetes platforms are you running on?

Kind

Steps to reproduce

When running NIC installed with NGINX plus and configured to deliver usage reports to a custom endpoint. If the helm chart is uninstalled the nginx instance can send a usage report to the default endpoint.

This occurs when the pod is marked by the Kubernetes cluster for deletion, Kubernetes then deletes the MGMT ConfigMap. NIC applies the default ConfigMap values and restarts NGINX. Eventually the pod is garbage collected and NIC/NGINX are stopped.

@pdabelf5 pdabelf5 added bug An issue reporting a potential bug needs triage An issue that needs to be triaged labels Jan 20, 2025
@pdabelf5
Copy link
Collaborator Author

running helm with --cascade foreground makes sure the Pod is garbage collected before the ConfigMap is removed and mitigates the issue

@pdabelf5
Copy link
Collaborator Author

Using OwnerReferences on the ConfigMap will also likely address the problem.

@pdabelf5
Copy link
Collaborator Author

Possible solution using helm hooks

@shaun-nx shaun-nx moved this from Todo ☑ to Prioritized backlog in NGINX Ingress Controller Jan 21, 2025
@shaun-nx shaun-nx added this to the v4.1.0 milestone Jan 21, 2025
@tstraley
Copy link

Helm Hooks are managed differently from other resources, and often lead to headaches over object ownership and lifecycle. I'd push for avoiding adding helm hooks to the chart if it can be avoided https://helm.sh/docs/topics/charts_hooks/#hook-resources-are-not-managed-with-corresponding-releases

@danielnginx danielnginx moved this from Prioritized backlog to Todo ☑ in NGINX Ingress Controller Jan 22, 2025
@AlexFenlon AlexFenlon removed the needs triage An issue that needs to be triaged label Jan 27, 2025
@shaun-nx shaun-nx moved this from Todo ☑ to Prioritized backlog in NGINX Ingress Controller Feb 17, 2025
@shaun-nx shaun-nx modified the milestones: v4.1.0, Candidates Mar 12, 2025
@shaun-nx shaun-nx removed this from the Candidates milestone Mar 28, 2025
@AlexFenlon AlexFenlon moved this from Prioritized backlog to Todo ☑ in NGINX Ingress Controller Apr 2, 2025
@AlexFenlon
Copy link
Contributor

some investiagtion -
tried adding OwnerReference to the mgmtConfigMap for Pod, Replicaset or Configmap and nothing semes to work, it still gets reset to the default mgmt block just before the deployment is uninstalled via helm.

@vepatel vepatel moved this from Todo ☑ to In Progress 🛠 in NGINX Ingress Controller Apr 16, 2025
@vepatel vepatel linked a pull request Apr 23, 2025 that will close this issue
6 tasks
@vepatel vepatel moved this from In Progress 🛠 to In Review 👀 in NGINX Ingress Controller Apr 23, 2025
@vepatel vepatel added this to the v5.1.0 milestone Apr 23, 2025
@github-project-automation github-project-automation bot moved this from In Review 👀 to Done 🚀 in NGINX Ingress Controller Apr 28, 2025
@shaun-nx
Copy link
Contributor

@tstraley the team managed to get a fix in for this. Plan is to either v5.1.0 or v5.0.1 if we do a patch release before then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue reporting a potential bug
Projects
Status: Done 🚀
Development

Successfully merging a pull request may close this issue.

5 participants