Skip to content

Commit

Permalink
Remove helmchartstatus after hook is finished
Browse files Browse the repository at this point in the history
Signed-off-by: Aniruddha Basak <[email protected]>
  • Loading branch information
aniruddha2000 committed Apr 25, 2024
1 parent 4e53848 commit 77b13f8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion internal/controller/clusteraddon_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,8 @@ func (r *ClusterAddonReconciler) Reconcile(ctx context.Context, req reconcile.Re

clusterAddon.Spec.ClusterStack = cluster.Spec.Topology.Class

// store the release kubernetes version and current hook
// remove the helm chart status from the status.
clusterAddon.Status.HelmChartStatus = make(map[string]csov1alpha1.HelmChartStatusConditions)
clusterAddon.Status.Ready = true

return ctrl.Result{}, nil
Expand Down Expand Up @@ -387,6 +388,11 @@ func (r *ClusterAddonReconciler) Reconcile(ctx context.Context, req reconcile.Re
// clusterAddon.Spec.Version = metadata.Versions.Components.ClusterAddon
conditions.MarkTrue(clusterAddon, csov1alpha1.HelmChartAppliedCondition)

// remove the helm chart status from the status.
clusterAddon.Status.HelmChartStatus = make(map[string]csov1alpha1.HelmChartStatusConditions)

// store the release kubernetes version and current hook
clusterAddon.Status.KubernetesVersion = releaseAsset.Meta.Versions.Kubernetes
clusterAddon.Status.CurrentHook = clusterAddon.Spec.Hook
clusterAddon.Status.Ready = true
}
Expand Down

0 comments on commit 77b13f8

Please sign in to comment.