refactor: Move all common reconcile logic to lister and reload handler

This commit is contained in:
TheiLLeniumStudios
2025-12-28 08:47:55 +01:00
parent 9d588cadb2
commit 3defc8bb29
9 changed files with 752 additions and 1091 deletions
+11
View File
@@ -66,6 +66,17 @@ type ReloadDecision struct {
Hash string
}
// FilterDecisions returns only decisions where ShouldReload is true.
func FilterDecisions(decisions []ReloadDecision) []ReloadDecision {
var result []ReloadDecision
for _, d := range decisions {
if d.ShouldReload {
result = append(result, d)
}
}
return result
}
// ProcessConfigMap evaluates all workloads to determine which should be reloaded.
func (s *Service) ProcessConfigMap(change ConfigMapChange, workloads []workload.WorkloadAccessor) []ReloadDecision {
if change.ConfigMap == nil {