Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drop obsolete code - no need for field indexer any longer #152

Merged
merged 1 commit into from
Jan 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions controllers/githubactionrunner_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,6 @@ func (r *GithubActionRunnerReconciler) manageOutcome(ctx context.Context, instan

// SetupWithManager configures the controller by using the passed mgr
func (r *GithubActionRunnerReconciler) SetupWithManager(mgr ctrl.Manager) error {
// create an index for pod status since we filter on it
if err := mgr.GetFieldIndexer().IndexField(context.TODO(), &corev1.Pod{}, "status.phase", func(rawObj client.Object) []string {
pod := rawObj.(*corev1.Pod)
return []string{string(pod.Status.Phase)}
}); err != nil {
return err
}

return ctrl.NewControllerManagedBy(mgr).
For(&garov1alpha1.GithubActionRunner{}).
Owns(&corev1.Pod{}).
Expand Down