Describe the bug
Attempting to apply a new configuration via config-operator.yaml for the Typesense StatefulSet results in an error. The Kubernetes API returns a 422 Unprocessable Entity status with the message that updates to fields other than 'replicas', 'ordinals', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy', and 'minReadySeconds' in the StatefulSet spec are forbidden.
To Reproduce
Steps to reproduce the behavior:
Create or update a config-operator.yaml with the following StatefulSet configuration:
2. Apply the configuration using `kubectl apply -f config-operator.yaml`.
3. Observe the error in the operator logs.
Expected behavior
The StatefulSet configuration should be updated successfully without any errors, allowing changes to the specified fields.
Please complete the following information:
Kubernetes version: [e.g., v1.25.0]
Typesense version: [e.g., 27.0.rc35]
Additional context
The error appears to be related to restrictions on updating specific fields in the StatefulSet spec. Full error message from the logs:
Exception: Kubernetes API Exception - StatefulSet: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"StatefulSet.apps \"typesense\" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'ordinals', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy' and 'minReadySeconds' are forbidden","reason":"Invalid","details":{"name":"typesense","group":"apps","kind":"StatefulSet","causes":[{"reason":"FieldValueForbidden","message":"Forbidden: updates to statefulset spec for fields other than 'replicas', 'ordinals', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy' and 'minReadySeconds' are forbidden","field":"spec"}]},"code":422}
If I want to update the settings, I just do kubectl delete-f operator-config.yaml and kubectl delete -f deploy/operator. yaml and apply them again with new properties.
In addition it is easier to manually configure StatefulSet and build your own container for installation
Describe the bug Attempting to apply a new configuration via
config-operator.yaml
for the Typesense StatefulSet results in an error. The Kubernetes API returns a422 Unprocessable Entity
status with the message that updates to fields other than 'replicas', 'ordinals', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy', and 'minReadySeconds' in the StatefulSet spec are forbidden.To Reproduce Steps to reproduce the behavior:
config-operator.yaml
with the following StatefulSet configuration:apiVersion: v1 kind: Service metadata: name: typesense-external-service namespace: typesense spec: type: LoadBalancer selector: app: typesense ports:
port: 8108 targetPort: 8108 protocol: TCP
Expected behavior The StatefulSet configuration should be updated successfully without any errors, allowing changes to the specified fields.
Please complete the following information:
Additional context The error appears to be related to restrictions on updating specific fields in the StatefulSet spec. Full error message from the logs:
If I want to update the settings, I just do
kubectl delete-f operator-config.yaml
andkubectl delete -f deploy/operator. yaml
and apply them again with new properties. In addition it is easier to manually configure StatefulSet and build your own container for installation