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

Fixed HelmRelease delete #229

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions internal/controller/deployment_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,15 @@ func (r *DeploymentReconciler) Delete(ctx context.Context, l logr.Logger, deploy
}
return ctrl.Result{}, err
}
uninstall := hr.GetUninstall()
if !uninstall.DisableHooks {
uninstall.DisableHooks = true
hr.Spec.Uninstall = &uninstall
l.Info("Disabling hooks for HelmRelease")
if err := r.Client.Update(ctx, hr); err != nil {
return ctrl.Result{}, err
}
}
err = helm.DeleteHelmRelease(ctx, r.Client, deployment.Name, deployment.Namespace)
if err != nil {
return ctrl.Result{}, err
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ spec:
apiServer:
default: false
description: APIServer indicates if the Kubernetes API Server log
(kube-apiserver) shoulkd be enabled
(kube-apiserver) should be enabled
type: boolean
audit:
default: false
Expand Down Expand Up @@ -2352,7 +2352,7 @@ spec:
apiServer:
default: false
description: APIServer indicates if the Kubernetes API Server log
(kube-apiserver) shoulkd be enabled
(kube-apiserver) should be enabled
type: boolean
audit:
default: false
Expand Down