starrocks-kubernetes-operator
starrocks-kubernetes-operator copied to clipboard
[Bug] Fields can't be deleted
Describe the bug
When we delete the imagePullSecrets field from StarRockCluster, imagePullSecrets still exists in the statefulset of the component and has not been deleted.
To Reproduce
- Create a StarRocks cluster that includes the imagePullSecrets field
- Update the StarRocks cluster by deleting the imagePullSecrets field
- Check the status of the
Statefulset
component
Expected behavior
The imagePullSecrets field in the Statefulset component should also be deleted.
The reason it was not deleted is:
- The Operator uses merge operation to modify statefulset
- Different from kubectl, because there is a
kubectl.kubernetes.io/last-applied-configuration
Annotation, it will perform a three way merge. So kubectl can delete a field.
Please complete the following information
- Operator Version: v1.9.6