mirror of
https://github.com/stakater/Reloader.git
synced 2026-08-23 22:16:45 +00:00
refactor: Move all common reconcile logic to lister and reload handler
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user