Offer to clear namespace cache for managed clusters when namespace prefix is changed
Follow up of #27149 (comment 25342665)
We have already updated the wording to inform users of the option to clear the namespace cache, but we can go one step further and offer them to automatically clean the namespace cache.
Problem to solve
GitLab's namespace prefix updating logic for managed clusters only affects not-yet created namespaces. If a cluster's namespace is updated after the cluster is provisioned, existing namespaces remain untouched. This can confuse users when they inspect their clusters, as they might expect all namespaces to match the currently set prefix.
Intended users
Further details
This was originally a ~bug #27149 (closed), but as of !20411 (merged) we have an acceptable workaround, and as of !20935 (merged) we have updated copy around the namespace update form.
Since this can cause GitLab to lose track of active deployments, this should be optional. As @tauriedavis said in #27149 (comment 25342665):
... If we are concerned that this could be problematic because of permanent deletion of resources or breaking a users workflow, we could present a modal for confirmation of clearing the cache.
Proposal
Present the user with the option to clear the namespace cache when the namespace prefix is updated (via a modal or checkbox or ..., TBD by UX)
Note: The option must also warn the user that GitLab will lose track of active namespaces this way. If !20983 (merged) goes through, we will retain record of already deployed namespaces, but we would need to update our code to make use of it before that warning can be removed.