Extract single place to set up indexers (#3454)

This commit is contained in:
Nikola Jokic
2024-05-17 14:42:46 +02:00
committed by GitHub
parent 9b51f25800
commit fa7a4f584e
9 changed files with 82 additions and 70 deletions

View File

@@ -815,7 +815,6 @@ func (r *EphemeralRunnerReconciler) deleteRunnerFromService(ctx context.Context,
// SetupWithManager sets up the controller with the Manager.
func (r *EphemeralRunnerReconciler) SetupWithManager(mgr ctrl.Manager) error {
// TODO(nikola-jokic): Add indexing and filtering fields on corev1.Pod{}
return ctrl.NewControllerManagedBy(mgr).
For(&v1alpha1.EphemeralRunner{}).
Owns(&corev1.Pod{}).