rancher / dashboard

The Rancher UI
https://rancher.com
Apache License 2.0
450 stars 256 forks source link

[AKS][2.9] Dashboard ignores empty tags #11612

Open valaparthvi opened 2 months ago

valaparthvi commented 2 months ago

Version

~Rancher version: v2.9-d2fa8a7d6116c48a814ee7983af522d614461e49-head~ ~Operator version: rancher/aks-operator:v1.9.0-rc.9~

Rancher Version: v2.9-0ab20e8fe6275887c52b97e94e15365f33b8afab-head Dashboard: release-2.9 https://github.com/rancher/dashboard/commit/6e45e2fabb473335ca8975560b57d1657554ff27 aks-operator: rancher-aks-operator:104.1.0+up1.9.1-rc.4

Description

Add a tag with empty value is not recognized by aks-operator, hence not added, even though it is possible to do so via Azure cloud console.

Steps to reproduce

  1. Create a cluster with an empty-tag:. The tag is ignored. OR
  2. Update an existing cluster tags by adding an empty-tag:; this also removes any existing empty tags present in the cluster.
  3. Check the logs; no change is detected.
yiannistri commented 1 month ago

This will likely need a change in the UI: when adding a tag with only a key but not a value, the UI seems to ignore the entry and does not pass it to the API via the PUT request so the controller never sees those entries.

Before passing this to another team, I will ensure that the controller behaves as expected when empty tags are used.

yiannistri commented 1 month ago

I've verified that the controller accepts empty tags and updates the cluster accordingly.

valaparthvi commented 1 month ago

Tested this again on Rancher (v2.9-0ab20e8fe6275887c52b97e94e15365f33b8afab-head); Dashboard(release-2.9 6e45e2f), aks-operator(rancher-aks-operator:104.1.0+up1.9.1-rc.4).

UI does not seem to accept the empty tags and removes it before passing it to the operator. Transferring this to rancher/dashboard.