Skip to content

Druid operator fails with Forbidden: updates to statefulset spec #230

@cintoSunny

Description

@cintoSunny

I have a Druid cluster on Kubernetes. And I am trying to use ScalePVC feature to auto-increase PVC. When I try to run the operator from local, I see it works as expected - new sts gets created, PVC increases, pods don't restart.

The same code when I run via k8s in a pod, I see intermittent errors:

2025-07-10T20:39:04.203Z	DEBUG	events	Failed to update [druid-cold:*v1.StatefulSet] due to [StatefulSet.apps "druid-cold" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy' and 'minReadySeconds' are forbidden].	{"type": "Warning", "object": {"kind":"Druid","namespace":"druid-ns","name":"aa","uid":"26e2d0cf-cc54-4ef0-97e2-0e58beb69b32","apiVersion":"druid.apache.org/v1alpha1","resourceVersion":"27082726080"}, "reason": "DruidOperatorUpdateFail"}
2025-07-10T20:39:04.530Z	ERROR	Reconciler error	{"controller": "druid", "controllerGroup": "druid.apache.org", "controllerKind": "Druid", "Druid": {"name":"aa","namespace":"druid-ns"}, "namespace": "druid-ns", "name": "aa", "reconcileID": "169f2ed2-44bf-417b-8ede-ff97b1d6857a", "error": "StatefulSet.apps \"druid-cold\" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy' and 'minReadySeconds' are forbidden"}
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:265
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:226

And eventually, I see PVC getting patched

... successfully deleted with casacde=false

And I do see pod restarts in most cases. I am not sure how to debug this, since locally it works just fine.

Any pointers on what could be the issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions