Skip to content

Commit

Permalink
More logs
Browse files Browse the repository at this point in the history
  • Loading branch information
jbiers committed Feb 1, 2025
1 parent 3933d0e commit cc7c2c1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions internal/helm-locker/controllers/release/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func Register(
}

func (h *handler) OnObjectSetChange(setID string, obj runtime.Object) (runtime.Object, error) {
logrus.Infof("Handling ObjectSet %s", setID)
logrus.Debugf("Handling ObjectSet %s", setID)

helmReleases, err := h.helmReleaseCache.GetByIndex(HelmReleaseByReleaseKey, setID)
if err != nil {
Expand Down Expand Up @@ -199,9 +199,11 @@ func (h *handler) OnHelmRelease(_ string, helmRelease *v1alpha1.HelmRelease) (*v
if shouldManage, err := h.shouldManage(helmRelease); err != nil {
return helmRelease, err
} else if !shouldManage {
logrus.Debugf("HelmRelease %s/%s will not be managed by this operator.", helmRelease.Name, helmRelease.Namespace)
return helmRelease, nil
}
if helmRelease.DeletionTimestamp != nil {
logrus.Debugf("HelmRelease %s/%s has a non-nil deletion timestamp.", helmRelease.Name, helmRelease.Namespace)
return helmRelease, nil
}
releaseKey := releaseKeyFromRelease(helmRelease)
Expand All @@ -216,7 +218,9 @@ func (h *handler) OnHelmRelease(_ string, helmRelease *v1alpha1.HelmRelease) (*v
helmRelease.Status.Notes = ""
return h.helmReleases.UpdateStatus(helmRelease)
}
return helmRelease, fmt.Errorf("unable to find latest Helm Release Secret tied to Helm Release %s: %s", helmRelease.GetName(), err)
err = fmt.Errorf("unable to find latest Helm Release Secret tied to Helm Release %s: %s", helmRelease.GetName(), err)
logrus.Warnf("%v", err)
return helmRelease, err
}
logrus.Infof("loading latest release version %d of HelmRelease %s", latestRelease.Version, helmRelease.GetName())
releaseInfo := newReleaseInfo(latestRelease)
Expand Down

0 comments on commit cc7c2c1

Please sign in to comment.