Skip to content

Commit

Permalink
fix: omit conditions for uninstalled plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerGillson committed Aug 31, 2023
1 parent 131e5d9 commit c9f430d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/controller/valid8orconfig_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,12 @@ func (r *Valid8orConfigReconciler) redeployIfNeeded(ctx context.Context, vc *v1a
}

// delete any plugins that have been removed
for i, c := range vc.Status.Conditions {
for _, c := range vc.Status.Conditions {
_, ok := specPlugins[c.PluginName]
if !ok && c.Type == v1alpha1.HelmChartDeployedCondition && c.Status == corev1.ConditionTrue {
r.Log.V(0).Info("Deleting plugin Helm chart", "namespace", vc.Namespace, "name", c.PluginName)
r.deletePlugin(vc, c.PluginName)
delete(vc.Annotations, getPluginHashKey(c.PluginName))
conditions[i] = getHelmChartCondition(c.PluginName, false)
}
}

Expand Down

0 comments on commit c9f430d

Please sign in to comment.