Reduce cylcomatic complexity

Actually, the reconcile function in the main branch has a cyclomatic complexity of 28 (see https://en.wikipedia.org/wiki/Cyclomatic_complexity#Interpretation)

The golang-ci-linter threshold is 30

>.../sylva-units-operator (main ✔) ~/go/bin/gocyclo -over 10 .
28 controller (*SylvaUnitsReleaseReconciler).reconcile internal/controller/sylvaunitsrelease_controller.go:125:1
21 helmrelease GenerateHelmRelease pkg/helmrelease/helmrelease.go:49:1

The present issue is about reducing the cylcomatic compexity of this function. Bascially, according to the gocyclo package, it means that we need to reduce if / case / for key words in the function

Edited Jul 15, 2025 by vladimir braquet
Assignee Loading
Time tracking Loading