rancher / backup-restore-operator

Apache License 2.0
98 stars 67 forks source link

[BUG][v2.9] Rancher Backups not persisting installed UI extensions #483

Closed mallardduck closed 6 days ago

mallardduck commented 2 months ago

Rancher Server Setup

Describe the bug When using BRO to migrate Rancher to a new cluster the UI extensions do not persist. This is because the CRD responsible for UI plugins are not being backed up. Those are uiplugins.catalog.cattle.io and seem to be under cattle-ui-plugin-system namespace.

To Reproduce Steps to reproduce the behavior:

  1. Install a Rancher UI plugin,
  2. Take a backup,
  3. Migrate to a new cluster,
  4. Observe the UI plugin is not active/installed.

Expected behavior I believe we can expect these to be installed after a migration. However we will want to work with UI team (anyone more expert on UI plugins than us) to understand this. For instance, if UI plugins/extensions must be installed via clicking the UI buttons and applying CRDs won't work.

Note: For more context, we got word of the CRD needed via a slack thread (must be SUSE employee to see). Might be useful for other SME to reach out to.

jbiers commented 1 month ago

Adding a UI extension to Rancher is done in two steps:

  1. Fist the Admin has to enable extensions. This means installing the UI plugin operator chart, with all of its resources as listed here.
  2. Then the desired extensions can be installed and will be persisted in the form of a uiplugins.catalog.cattle.io resource under the cattle-ui-plugin-system namespace.

Adding a new rule to the default ResourceSet to include uiplugins.catalog.cattle.io resources makes sure that these extensions will be included in a backup and can be restored into an empty cluster. However, this does not include the first step of enabling extensions. Once enabled manually, all of the installed extensions will be visible and ready to go.

It might also be possible to include backup rules for all of the resources created by the ui-plugin-operator chart, so the manual step of enabling extensions would be unnecessary. However, I'm not sure if this would be in the scope of this issue or even if this behavior should be expected, since enabling extensions is a very straightforward stateless 1-step task.

mallardduck commented 1 month ago

This change can be found in:

And any pre-releases higher than these.

Note: Charts are not published in rancher/charts repo yet. They are however available as release artifacts on each tag linked. Look for the .tgz files and those are the CRD and non-crd chart.

mallardduck commented 6 days ago

/backport v2.8-Next2

cc: @MKlimuszka - example of backport command

github-actions[bot] commented 6 days ago

Not creating port issue, milestone v2.8-Next2MKlimuszka does not exist or is not an open milestone

mallardduck commented 6 days ago

/backport v2.8-Next2

nickwsuse commented 6 days ago

Verified on v2.9-head ID: e65fefc and Rancher Backups v104.0.1+up5.0.1 ✅

All checks completed on fresh installs and upgrades from 2.8.7 -> 2.9-head