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

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

Open
pdabelf5 opened this issue Jan 20, 2025 · 4 comments
Open
Labels
bug An issue reporting a potential bug needs triage An issue that needs to be triaged
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

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 needs triage An issue that needs to be triaged
Projects
Status: Prioritized backlog
Development

No branches or pull requests

3 participants