Skip to content

Commit

Permalink
Update pkg/index/operator/service/operator.go
Browse files Browse the repository at this point in the history
Co-authored-by: Yusuke Kato <[email protected]>
Signed-off-by: Yusuke Kadowaki <[email protected]>
  • Loading branch information
ykadowak and kpango authored Feb 27, 2024
1 parent 8a51a3f commit 63533cd
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions pkg/index/operator/service/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,17 @@ func New(agentName string, opts ...Option) (o Operator, err error) {
}
}

var k8sOpts []k8s.Option
podLabelSelector := map[string]string{
"app": agentName,
}
podOpts := k8s.WithResourceController(pod.New(
k8sOpts := k8s.WithResourceController(pod.New(
pod.WithControllerName("pod reconciler for index operator"),
pod.WithOnErrorFunc(func(err error) {
log.Error("failed to reconcile:", err)
}),
pod.WithNamespace(operator.namespace),
pod.WithOnReconcileFunc(operator.podOnReconcile),
pod.WithLabels(podLabelSelector),
pod.WithLabels(map[string]string{
"app": agentName,
}),
))
k8sOpts = append(k8sOpts, podOpts)

jobController, err := job.New(
job.WithControllerName("job reconciler for index operator"),
Expand Down

0 comments on commit 63533cd

Please sign in to comment.