Skip to content

Keycloak Operator 26.3.0 fails to update to 26.3.0 #40890

@bo0ts

Description

@bo0ts

Before reporting an issue

  • I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.

Area

operator

Describe the bug

When upgrading the Keycloak Operator to 26.3.0 on an existing Keycloak instance the Keycloak StatefulSet is not updated to the new version. The operator logs the following error:

2025-07-03 11:16:25,467 ERROR [io.jav.ope.pro.eve.EventProcessor] (ReconcilerExecutor-keycloakcontroller-96) Error during event processing ExecutionScope{ resource id: ResourceID{name='keycloak', namespace='keycloak'}, version: 1543606041}: io.javaoperatorsdk.operator.AggregatedOperatorException: Exception(s) during workflow execution. Details:
keycloak-operator-5c854d47ff-xzk42 keycloak-operator  - org.keycloak.operator.controllers.KeycloakDeploymentDependentResource -> io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: PATCH at: https://.../apis/apps/v1/namespaces/keycloak/statefulsets/keycloak?fieldManager=keycloakcontroller&force=true. Message: StatefulSet.apps "keycloak" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'ordinals', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy' and 'minReadySeconds' are forbidden. Received status: Status(apiVersion=v1, code=422, details=StatusDetails(causes=[StatusCause(field=spec, message=Forbidden: updates to statefulset spec for fields other than 'replicas', 'ordinals', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy' and 'minReadySeconds' are forbidden, reason=FieldValueForbidden, additionalProperties={})], group=apps, kind=StatefulSet, name=keycloak, retryAfterSeconds=null, uid=null, additionalProperties={}), kind=Status, message=StatefulSet.apps "keycloak" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'ordinals', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy' and 'minReadySeconds' are forbidden, metadata=ListMeta(_continue=null, remainingItemCount=null, resourceVersion=null, selfLink=null, additionalProperties={}), reason=Invalid, status=Failure, additionalProperties={}).

Version

26.3.0

Regression

  • The issue is a regression

Expected behavior

The StatefulSet is updated to the new image or automatically recreated.

Actual behavior

The update does not happen.

How to Reproduce?

Install Keycloak Operator 26.2.5, create Keycloak, update to 26.3.0.

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions