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: helm-uninstall task/goal #2666

Closed
manusa opened this issue Feb 14, 2024 · 3 comments
Closed

Helm: helm-uninstall task/goal #2666

manusa opened this issue Feb 14, 2024 · 3 comments
Assignees
Labels
component/helm ⎈ enhancement New feature or request
Milestone

Comments

@manusa
Copy link
Member

manusa commented Feb 14, 2024

Helm: helm-uninstall task/goal

#2666

Description

As an Eclipse JKube user, I want to be able to uninstall a chart I've previously installed using helm-install, so that I can remove it from my Kubernetes/OpenShift cluster.

Proposal

JKube Kit

JKube Kit exposes a new method uninstall that uninstalls the chart release with the name provided in the HelmConfig argument (or the one inferred from the project's configuration).

The chart should have been previously installed using the install method.

  • The uninstallation is performed by executing helm-java uninstall command.
  • The user is able to provide the following uninstallation options through the HelmConfig:
    • releaseName: jkube.helm.release.name

      Optional, if not specified, the release name should be inferred following the same procedure used to compute default image and resource names.
  • If the uninstallation succeeds a message ${installName} uninstalled is logged.
  • If the uninstallation fails, error message is logged.

Maven plugins

The Kubernetes Maven Plugin and OpenShift Maven Plugin expose a new helm-uninstall goal in a HelmUninstallMojo and OpenshiftHelmUninstallMojo that extends the basic HelmMojo (following a similar approach to that of HelmPushMojo and HelmLintMojo).

The mojos are bound by default to the LifecyclePhase.INSTALL phase.

Tests should be added for each of the mojos and also for KubernetesPluginTest, OpenShiftPluginTest, and GeneratedPluginDescriptorTest.

Gradle plugins

The Kubernetes Gradle Plugin and OpenShift Gradle Plugin expose a new helmUninstall task in a KubernetesHelmUninstallTask and OpenShiftHelmUninstallTask that extends the basic AbstractJKubeTask task.

Individual tests should be added for the new tasks and also for the plugins to verify task precedence.

An e2e test proves that the task can be executed both, with a successful and a failed installation.

Documentation

The documentation exposes for each of the Maven, Gradle, Kubernetes, and OpenShift plugins the new uninstall goal/task.

It includes a section with the (un)installation options that can be provided in the HelmConfig argument and properties.

Documentation should be reviewed to replace any reference to the helm uninstall CLI command with the new helm-uninstall goal/task.
If no such reference exists, maybe we should consider adding one, especially in the context of the helm-install goal/task.

@rohanKanojia
Copy link
Member

Shall we close this issue?

@manusa
Copy link
Member Author

manusa commented Aug 12, 2024

Shall we close this issue?

Is it done?

@rohanKanojia
Copy link
Member

From what I can infer from issue description, these tasks have been completed

  • Integrate Helm Uninstall functionality in plugins
    • Maven Plugins have new k8s:helm-uninstall goal
    • Gradle Plugins have new k8sHelmUninstall task
  • Add documentation
    • Add documentation for helm install
    • Replace any reference of helm uninstall with k8s:helm-uninstall/k8sHelmUninstall (No such reference found)
    • Add sections for uninstalling helm chart alongside chart installation k8s:helm docs
  • Write E2E test for helm install and uninstall

I don't think there is anything left to do in scope of this issue.

@manusa manusa closed this as completed Aug 12, 2024
@github-project-automation github-project-automation bot moved this from Review to Done in Eclipse JKube Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/helm ⎈ enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants