I am trying to add hpa to the Fluentd Statefulset,...
# fluent-operator
u
I am trying to add hpa to the Fluentd Statefulset, I am getting the following error at the initial creation:
Copy code
2024-01-23T18:04:33+03:00	ERROR	Reconciler error	{"controller": "fluentd", "controllerGroup": "<http://fluentd.fluent.io|fluentd.fluent.io>", "controllerKind": "Fluentd", "Fluentd": {"name":"fluentd-test","namespace":"default"}, "namespace": "default", "name": "fluentd-test", "reconcileID": "c7ec861c-2c02-4f26-8883-17c6f95db9a7", "error": "Operation cannot be fulfilled on <http://fluentds.fluentd.fluent.io|fluentds.fluentd.fluent.io> \"fluentd-test\": the object has been modified; please apply your changes to the latest version and try again"}
<http://sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler|sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler>
	/home/ucak/.go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.6/pkg/internal/controller/controller.go:329
<http://sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem|sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem>
	/home/ucak/.go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.6/pkg/internal/controller/controller.go:274
<http://sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2|sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2>
	/home/ucak/.go/pkg/mod/sigs.k8s.io/controller-runtime@v0.14.6/pkg/internal/controller/controller.go:235
Right now i can create the hpa but it gets into a loop where it repetadely prints
New size: 3;(...)
And it prints the above error. The issue seem to be around the finalizers but i cant quite figure out
it looks like when it does an r.Update in here:
Copy code
func (r *FluentdReconciler) addFinalizer(ctx context.Context, instance *fluentdv1alpha1.Fluentd) error {
	instance.AddFinalizer(fluentdv1alpha1.FluentdFinalizerName)
	return r.Update(ctx, instance)
}
there is another update for the same (fluentd) object?