refactor(workload): centralize workload listing with registry-based listers and add Argo Rollouts support

This commit is contained in:
TheiLLeniumStudios
2025-12-28 08:47:56 +01:00
parent c19058a66e
commit 3cf0119748
10 changed files with 808 additions and 123 deletions
+10 -1
View File
@@ -4,6 +4,7 @@ import (
"fmt"
"strings"
"github.com/stakater/Reloader/internal/pkg/workload"
"k8s.io/apimachinery/pkg/labels"
)
@@ -102,8 +103,16 @@ func (c *Config) Validate() error {
// Normalize IgnoredResources to lowercase for consistent comparison
c.IgnoredResources = normalizeToLower(c.IgnoredResources)
// Normalize IgnoredWorkloads to lowercase
// Validate and normalize IgnoredWorkloads
c.IgnoredWorkloads = normalizeToLower(c.IgnoredWorkloads)
for _, w := range c.IgnoredWorkloads {
if _, err := workload.KindFromString(w); err != nil {
errs = append(errs, ValidationError{
Field: "IgnoredWorkloads",
Message: fmt.Sprintf("unknown workload type %q", w),
})
}
}
if len(errs) > 0 {
return errs