Skip to content

Commit 57f9f19

Browse files
committed
Refactor: remove DefaultsConfigReconciler
The DefaultsConfigReconciler maintained config-hash annotations on workloads with kagenti.io/type that were not managed by an AgentRuntime CR. With the new ValidatingAdmissionPolicy enforcing that the label can only be set via an AgentRuntime, no unmanaged workloads can exist. The reconciler was effectively a no-op and is now removed along with its tests and the ComputeDefaultsOnlyHash helper. Signed-off-by: Daniels Nagornuks <dnagornu@redhat.com> Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
1 parent a5dca32 commit 57f9f19

3 files changed

Lines changed: 0 additions & 1002 deletions

File tree

kagenti-operator/cmd/main.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -770,15 +770,6 @@ func main() {
770770
os.Exit(1)
771771
}
772772

773-
// Defaults-only config reconciler: propagates ConfigMap changes to
774-
// workloads that have kagenti.io/type but no AgentRuntime CR.
775-
if err = (&injector.DefaultsConfigReconciler{
776-
Client: mgr.GetClient(),
777-
Scheme: mgr.GetScheme(),
778-
}).SetupWithManager(mgr); err != nil {
779-
setupLog.Error(err, "unable to create controller", "controller", "DefaultsConfig")
780-
os.Exit(1)
781-
}
782773
}
783774
// +kubebuilder:scaffold:builder
784775

kagenti-operator/internal/webhook/injector/defaults_config_reconciler.go

Lines changed: 0 additions & 300 deletions
This file was deleted.

0 commit comments

Comments
 (0)