Skip to content

Commit 844985c

Browse files
committed
⚡ faster reconcile
modified: controllers/pod_controller_functions.go
1 parent be1240b commit 844985c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

controllers/pod_controller_functions.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import (
1818
"k8s.io/klog"
1919
ctrl "sigs.k8s.io/controller-runtime"
2020
"sigs.k8s.io/controller-runtime/pkg/client"
21+
"sigs.k8s.io/controller-runtime/pkg/controller"
2122
)
2223

2324
func (r *PodReconciler) NamespaceOrPodHaveAnnotation(pod corev1.Pod, ctx context.Context) (bool, error) {
@@ -95,6 +96,9 @@ func UpdatePodController(podspec *corev1.PodSpec, Requests []NewContainerRequest
9596
// SetupWithManager sets up the controller with the Manager.
9697
func (r *PodReconciler) SetupWithManager(mgr ctrl.Manager) error {
9798
return ctrl.NewControllerManagedBy(mgr).
99+
WithOptions(controller.Options{
100+
MaxConcurrentReconciles: 4,
101+
}).
98102
For(&corev1.Pod{}).
99103
Complete(r)
100104
}

0 commit comments

Comments
 (0)