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] Helm uninstall does not remove all resources #887

Closed
bnallapeta opened this issue Jan 13, 2025 · 3 comments
Closed

[bug] Helm uninstall does not remove all resources #887

bnallapeta opened this issue Jan 13, 2025 · 3 comments
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@bnallapeta
Copy link
Collaborator

Describe the bug

Once you uninstall hmc by running helm uninstall, it does not do a clean uninstall and leaves behind certain resources.

k get ns hmc-system
NAME         STATUS        AGE
hmc-system   Terminating   23m

And the reason it gets stuck in Terminating is because of this:

k get ns hmc-system -oyaml
apiVersion: v1
kind: Namespace
metadata:
  creationTimestamp: "2025-01-13T07:19:20Z"
  deletionTimestamp: "2025-01-13T07:35:35Z"
  labels:
    kubernetes.io/metadata.name: hmc-system
    name: hmc-system
  name: hmc-system
  resourceVersion: "7147330"
  uid: c7c887fb-fb2d-40df-8a2d-c88135a3b2ec
spec:
  finalizers:
  - kubernetes
status:
  conditions:
  - lastTransitionTime: "2025-01-13T07:35:41Z"
    message: All resources successfully discovered
    reason: ResourcesDiscovered
    status: "False"
    type: NamespaceDeletionDiscoveryFailure
  - lastTransitionTime: "2025-01-13T07:35:41Z"
    message: All legacy kube types successfully parsed
    reason: ParsedGroupVersions
    status: "False"
    type: NamespaceDeletionGroupVersionParsingFailure
  - lastTransitionTime: "2025-01-13T07:35:41Z"
    message: All content successfully deleted, may be waiting on finalization
    reason: ContentDeleted
    status: "False"
    type: NamespaceDeletionContentFailure
  - lastTransitionTime: "2025-01-13T07:35:41Z"
    message: 'Some resources are remaining: helmcharts.source.toolkit.fluxcd.io has
      20 resource instances, helmreleases.helm.toolkit.fluxcd.io has 1 resource instances'
    reason: SomeResourcesRemain
    status: "True"
    type: NamespaceContentRemaining
  - lastTransitionTime: "2025-01-13T07:35:41Z"
    message: 'Some content in the namespace has finalizers remaining: finalizers.fluxcd.io
      in 21 resource instances'
    reason: SomeFinalizersRemain
    status: "True"
    type: NamespaceFinalizersRemaining
  phase: Terminating

There are HelmReleases (and HelmCharts) resources left behind stopping the deletion of the namespace.

To Reproduce
Steps to reproduce the behavior:

Install HMC following the helm install command given in readme

helm install hmc oci://ghcr.io/k0rdent/kcm/charts/hmc --version 0.0.6 -n hmc-system --create-namespace

Wait for all resources to be provisioned. Now, run the below command:

helm uninstall hmc

Expected behavior
A clean uninstall removing all the resources related to HMC

Additional context
Add any other context about the problem here.

@bnallapeta bnallapeta added the bug Something isn't working label Jan 13, 2025
@github-project-automation github-project-automation bot moved this to Todo in k0rdent Jan 13, 2025
@bnallapeta
Copy link
Collaborator Author

Same for mgmt and projectsveltos namespaces.

@a13x5
Copy link
Collaborator

a13x5 commented Jan 13, 2025

Related to #724 .
TL;DR helm operations should only be used to install kcm for the first time. Upgrade/Uninstall will not be covered for a number of reasons and design decisions.

The proper uninstall procedure will be documented in scope of k0rdent/docs#49

Closing.

cc: @Kshatrix @DinaBelova

@a13x5 a13x5 closed this as completed Jan 13, 2025
@github-project-automation github-project-automation bot moved this from Todo to Done in Project 2A Jan 13, 2025
@github-project-automation github-project-automation bot moved this from Todo to Done in k0rdent Jan 13, 2025
@bnallapeta
Copy link
Collaborator Author

@a13x5 any chance these reasons are documented? as to why we don't want to support helm uninstall?

@DinaBelova DinaBelova added the wontfix This will not be worked on label Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
Archived in project
Development

No branches or pull requests

3 participants