starrocks-kubernetes-operator icon indicating copy to clipboard operation
starrocks-kubernetes-operator copied to clipboard

[Bug] Fields can't be deleted

Open yandongxiao opened this issue 5 months ago • 0 comments

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

  1. Create a StarRocks cluster that includes the imagePullSecrets field
  2. Update the StarRocks cluster by deleting the imagePullSecrets field
  3. 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:

  1. The Operator uses merge operation to modify statefulset
  2. 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

yandongxiao avatar Aug 28 '24 09:08 yandongxiao