* feat: add Restic and Kopia VM backups
Add a type to Take Backup so VMs on third-party storage or Longhorn v2
can be backed up to S3. Native stays on the backup action, which has no
type field. Restic and Kopia create the VirtualMachineBackup directly.
Types a VM can't use stay in the dropdown, disabled, with the reason.
Treat Restic and Kopia as remote backups in the restore routes, the
schedule filter and the snapshot list. Show the type in the backup list.
Add a form for the third-party-backup-config setting and the Kopia
garbage collection option on the backup target, and stop resetting
virtualHostedStyle when the backup target form opens.
All of it sits behind a v1.10 feature flag.
* fix: refine Take Backup for NFS targets and non-admin users
Hide Take Backup on VMs that only have the snapshot action when the
backup target is known not to be S3. Nothing can back those VMs up
there, so they match the menu on main again.
Only block Restic and Kopia on a backup target type the user can read.
Non-admin users can't read the backup-target setting, so they were
always told an S3 target was required. The webhook still decides.
List why a type is unavailable under the Type select. Disabled options
can't be reached by keyboard, so the reasons inside them were hidden
from screen readers.
Fall back to the default when third-party-backup-config doesn't parse,
like the other settings forms, instead of showing a parse error banner.
* fix: tighten Take Backup and backup config inputs after review
- Offer Take Backup without the backup action only on VMs whose volumes
Restic and Kopia support. The snapshot action isn't gated on a backup
target, so users who can't read backup-target saw the menu on every VM.
- Take the third-party-backup-config sizes in MiB, so a bare number is no
longer saved as bytes.
- Merge csi-driver-config value and default like the backend does, with
the default's entries winning.
* feat: add the Restic and Kopia switch to the backup target
The backend now rejects Restic and Kopia backups unless the S3 backup
target has thirdPartyBackupEnabled set, and it is off by default. While
it is on, every save of the target needs the repository password.
- Add an "Enable Restic and Kopia Backups" checkbox to the S3 backup
target form, dropped on NFS like Kopia garbage collection.
- Show a required Repository Password field while the switch is on, and
drop the password when the switch is off or the target is NFS, where
the backend rejects it.
- When the target is readable and the switch is off, Restic and Kopia
are unavailable with a reason, after any volume reason, and Take
Backup follows the same rule.
- Rename the feature flag getter in the form and the dialog so it isn't
confused with the setting field.
* fix: offer Kopia garbage collection only while Restic and Kopia are on
The backend removes the Kopia maintenance jobs whenever Restic and Kopia
are turned off, so the option could be saved as on while nothing ran.
Show it only while the switch is ticked, and drop it from the setting
when the switch is turned off, like the repository password.
---------
(cherry picked from commit 0a49829658)
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
Co-authored-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* feat: add shutdownVMOnMigrationFailure to the upgrade-config setting
Add a control for the new field, which decides whether a VM that fails
to live migrate during the node pre-drain phase is shut down so that the
upgrade can continue. The field is only shown and defaulted on v1.10.0
or later clusters.
* fix: name the upgrade-config radio groups for screen readers
Pass the labels of the Restore VM and Shut Down VM on Migration Failure
radio groups as their aria-label, so that screen readers can tell them
apart. Select the value through the radio group in the tests, so that
they catch a group that isn't bound to its field.
---------
Signed-off-by: Tim Liou <tim.liou@suse.com>
Co-authored-by: Tim Liou <tim.liou@suse.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* chore(deps): bump @rancher/shell to 3.0.14
3.0.14 resolves [[name]] tokens in translations from values registered
as l10n globals, which the standalone UI needs to pick the product name.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: save cloud-config template edits with @rancher/shell 3.0.14
The YamlEditor of shell 3.0.14 no longer emits onChanges, so editing a
template saved its old cloud config. Copy the text from update:value,
which both shell versions emit.
Jest transforms @replit/codemirror-vim-core, an ESM-only dependency of
the new YamlEditor, like the dashboard does.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: keep the YAML editor heights with CodeMirror 6
The min-height rules targeted the CodeMirror 5 element, so the editors
shrank to their text.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: reject IP ranges the network settings don't support
The CIDR check of @rancher/shell 3.0.14 also accepts short forms such as
10.1/16, extra parts and IPv6, so the VM migration, RWX and storage
network settings saved them. Use a strict IPv4 CIDR check of our own.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: keep the look of the file selector buttons
The FileSelector of @rancher/shell 3.0.14 no longer takes button classes
and renders a medium secondary button. Pass the variant and size that
match the previous primary and secondary buttons.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: keep Enter in a migration wizard field on the same step
The Wizard of @rancher/shell 3.0.14 renders its step headers as submit
buttons, so Enter in a text field clicked the first one and jumped back
to step 1.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: show the created message after a restore, upgrade or upload
Since @rancher/shell 3.0.14, save() no longer shows the message for
resources with a generated name; callers show it with
notifyGeneratedName().
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* refactor: fold the logging output buffer with the CodeMirror 6 helpers
The YAML editor of @rancher/shell 3.0.14 is CodeMirror 6, and its
CodeMirror 5 methods are deprecated.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: keep the shell's table views off in standalone
@rancher/shell 3.0.14 turns its table views on for every list in the
standalone UI, as the server has no ui-configurable-tables feature and
the default is on. The table views drop the filters the lists put in the
table header, which also left the Images list empty. Add the feature,
disabled, to the management store in standalone only.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: reject zero-padded octets in IP ranges
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
---------
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* feat: add PodSecurity Standard setting
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: unneeded change
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: filter by isSystem namespace
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: add fallback logic
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add Insecure Skip TLS Verify checkbox
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: set insecureSkipTLSVerify default to false
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix: conflict
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: remove unneeded change
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix: get the feature flag in data()
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: make data logic simpler
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: put tip in info banner
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add nodeUpgradeOption setting
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add resume button when node paused
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add feature flag in v1.7.0
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>