Open hoyhbx opened 2 years ago
Hi! I'm new to this repo and would like to take this as my first issue. However I failed to reproduce the bug. After setting ingress.ui.annotation
to null
, I ran kubectl apply -f test.yaml -n cockroach-operator-system
and kubectl get CrdbCluster test-cluster -o yaml
gives
ingress:
ui:
host: localhost
which seems correct. Have this bug been fixed?
What version of operator are you using? commit 561cf47d783c368fd8795acb82a5a39099a35984 (HEAD -> master)
What operating system and processor architecture are you using (
kubectl version
)? Ubuntu. 20.04kubectl version
OutputWhat did you do?
We are trying to delete the annotations of the
ingress.ui
by setting theingress.ui.annotations
tonull
I first deployed the operator using the example yaml file and crd yaml file. Then I created the cluster by applying the following custom resource file:(All files were applied using
kubectl apply -f <filename> -n cockroach-operator-system
)Then I deleted the
ingress.ui.annotation
field (basically, deleting "annotations"), as follows:What did you expect to see and what did you see instead?
I expect to see annotations being deleted, but they are still present.
Root cause The way annotations are updated is merging new annotations into old ones, as this function suggests. However, when a field is deleted (i.e. being changed to null), the key and value pair will not show up in the new annotations, resulting in the old annotations leaving unchanged.