You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To avoid HelmReleases being stuck in finalization when a tenant is deleted, we should skip the uninstall action if the service account is no longer available.
To make helm-controller play nice with multi-tenancy, we could adapt this logic from kustomize-controller:
func (r*KustomizationReconciler) finalize(ctx context.Context, kustomization kustomizev1.Kustomization) (ctrl.Result, error) {
ifimpersonation.CanFinalize(ctx) {
// purne
} else {
// when the account to impersonate is gone, log the stale objects and continue with the finalizationmsg:=fmt.Sprintf("unable to prune objects: \n%s", ssa.FmtUnstructuredList(objects))
log.Error(fmt.Errorf("skiping pruning, failed to find account to impersonate"), msg)
}
To avoid HelmReleases being stuck in finalization when a tenant is deleted, we should skip the uninstall action if the service account is no longer available.
To make helm-controller play nice with multi-tenancy, we could adapt this logic from kustomize-controller:
Ref: https://github.com/fluxcd/kustomize-controller/blob/main/controllers/kustomization_controller.go#L916-L974
The text was updated successfully, but these errors were encountered: