* 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 the Kube-OVN BGP page and a BGP option on subnets
Add an Overlay Networks > BGP page that edits spec.bgp of the
kube-system/kubeovn Configuration: speaker hosts, neighbor IPv4 and IPv6
addresses, neighbor and cluster AS, router ID and next hops. Add a BGP
option to the subnet form that sets or removes the ovn.kubernetes.io/bgp
annotation. Both need Harvester v1.10.0 or later.
* refactor: move the BGP settings into the kubeovn-operator add-on
Every entry under Overlay Networks is a list, and BGP is a single setting
for the whole Kube-OVN install, so show it as a BGP tab in the
kubeovn-operator add-on's config instead of its own page. The tab saves
spec.bgp of the kube-system/kubeovn Configuration before the add-on is
saved, only when it changed and the add-on stays enabled. The subnet BGP
tooltip now points to it.
* feat: make the BGP tab clearer and check each field as it is typed
- Add a BGP Speaker Enabled/Disabled switch. Disabled removes the speaker
hosts and keeps the other values. An untouched install opens as
disabled, with empty fields instead of the placeholder values.
- Neighbors are one list of IPv4 or IPv6 addresses, split by family on
save with duplicates dropped. Next hops are two single fields, one per
family, under Advanced.
- Show the errors under each field as it is typed, and keep the same
checks on save. A router ID is rejected when more than one host runs
the speaker, because every speaker needs its own.
- Only write the Configuration when the form changed.
* fix: save the BGP tab on top of the latest Kube-OVN Configuration
The operator rewrites the Configuration's status about every five minutes,
so the copy loaded with the form went stale and saving it failed with a
conflict when the form had been open for a while. Fetch the latest copy
at save time and apply only spec.bgp to it. After a successful save,
remember it, so pressing Save again after a failed add-on save doesn't
send the Configuration twice.
* feat: warn on the subnet form when no host runs the BGP speaker
Turning BGP on for a subnet has no effect until some host runs the BGP
speaker. When the subnet's BGP option is Enabled and the Kube-OVN
Configuration has no speaker hosts, show a warning that links to the BGP
tab of the kubeovn-operator add-on. If the Configuration can't be read,
show nothing.
The add-on form now shows its tabs once the BGP data is loaded, so a link
to its #bgp tab opens that tab: Tabbed only honours the URL hash when the
tabs first appear.
* refactor: move the BGP speaker to Overlay Networks > Settings
Keep the BGP configuration out of the kubeovn-operator add-on: add an
Overlay Networks > Settings page that lists cluster-wide overlay network
settings as cards, like Advanced > Settings. The BGP Speaker card shows
whether the speaker is off or where it runs and what it peers with, and
its Edit action opens the BGP form on its own page.
The page owns its Save button, so Save stays disabled while the form has
errors. The add-on goes back to its generic form, and the subnet BGP
warning links to the new page. The speaker state the card and the
warning need is read through a kubeovn.io.configuration model.
* fix: show why Save is disabled on the BGP Speaker page
Save stays disabled while the form is invalid, but an empty Speaker Hosts
or Neighbor Addresses showed no error anywhere, and the neighbor list had
no required mark. Mark Neighbor Addresses as required and flag both
fields when they are left empty, like the other required fields.
* fix: show load errors and fix the add-on link on the BGP pages
- The BGP Speaker page showed only its title when the Kube-OVN
Configuration could not be read, because the error was only shown
inside the form. Show it on the page. The Settings card now says
Unknown instead of Disabled in that case.
- The add-on link on the BGP Speaker page was a relative path, which
resolved under /overlay-network-settings/ and opened the fail-whale.
Both pages now link to the add-on by route name.
- The subnet form shows its BGP warning under the BGP option, like the
DHCP banner, instead of in a column of its own.
- The BGP page reads hosts, neighbors and next hops through the model's
getters instead of parsing them again.
- The "requires v1.10.0" message uses the product name token, and the
subnet BGP comment and tooltip no longer say that "local" advertises
the subnet's CIDR block.
* refactor: keep the Kube-OVN model's parsing helpers private
Nothing outside the model uses splitList or the placeholder neighbor
addresses since the BGP page reads the model's getters, so stop
exporting them.
* feat: tell users to label the external gateway hosts on BGP subnets
When BGP is enabled on a subnet, show a note under it: the hosts that
carry external traffic need the label ovn.kubernetes.io/external-gw=true.
It shows next to the existing warning about the BGP speaker having no
hosts.
* feat: separate the IPv4 and IPv6 BGP neighbors
- The BGP Speaker page now has one neighbor list per family, like the
next hops. Each list only takes addresses of its own family, and one
neighbor in either list is enough.
- Reject the placeholder neighbors Harvester installs (192.0.2.1 and
2001:db8::1). The page hides them on load, so a saved one disappeared
on the next visit and was dropped on the next save.
- Only treat the Configuration as never set up when it holds nothing
but the installed values. A speaker set up with the private AS numbers
64512/64513 and then disabled used to reopen with both AS fields blank.
* feat: edit the BGP speaker on the Overlay Network Settings page
Overlay Network Settings showed one card per setting and opened the BGP
speaker on a page of its own. Show the BGP speaker form on the settings
page instead, in an RcSection titled BGP Speaker, with Save and no
Cancel. Another setting would be another section on the same page, under
the same Save. Saving stays on the page and shows what was saved.
Inside the section, follow how the shell's own RcSection forms are
built: the Enabled/Disabled choice has no label of its own (the section
title names it), and the neighbors and the advanced options are nested
secondary sections, with the two neighbor lists under column headers
instead of their own headings.
* fix: reject IPv4 addresses with leading zeros in the BGP speaker
The speaker parses its addresses with Go, which rejects an IPv4 part
written with a leading zero, like 192.0.2.010. The form accepted those
in the IPv4 neighbors, the router ID and the next hops, and nothing on
the backend checks them, so saving one left the speaker unable to start.
Reject them on every address field, including an IPv6 address that ends
in an IPv4 one, and say how to write the address instead.
* feat: show the BGP speaker as its own entry under Overlay Networks
The backend owner asked for BGP to show in the menu by name rather than
behind a Settings entry. Replace Overlay Networks > Settings with an
Overlay Networks > BGP Speaker entry that opens the form directly,
titled BGP Speaker, and point the subnet's BGP warning and tooltip to
it. If more parts of the Kube-OVN Configuration get a form later, they
can move into a Configuration group under Overlay Networks.
---------
(cherry picked from commit 1b562cec41)
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
Co-authored-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* feat: page the VM list on the server when the API supports it
On clusters whose API serves lists from the Steve SQL cache, the VM list
uses PaginatedResourceTable: it loads one page of VMs, and the VMIs, pods,
PVCs, PVs, migrations, restores and backups of those VMs only. Sorting,
search and the namespace filter run on the server, so CPU, memory, IP and
node can't be sorted or searched there.
The feature is gated by the vmListPagination feature flag and enabled for
the VM list only, through a pagination context. Older clusters keep the
current list.
* feat: enable the VM list pagination from v1.10.0
The backend change that serves API lists from the SQL cache has to be on
the v1.10 branch before this is merged.
* fix: keep the paged VM list when adding a volume
The Add Volume dialog loaded every VM to find the volumes in use, which
replaced the page the VM list keeps in the store and emptied the list.
When the list is paged, the dialog now reads only the VMs of the
namespace and doesn't store them.
The requests for the resources of a page use one IN filter instead of
one filter per value, which keeps the URLs about a third as long.
* fix: keep the paged VM list intact in its dialogs and on older APIs
The Add Volume, Storage Migration and Restore dialogs read the VMs, PVCs
and backups of the VM's namespace through the VM. While the list keeps a
page of a type in the store they read the namespace without storing it,
so the list keeps its page and the dialogs' own lists don't shrink when
the page reloads. Storage Migration no longer offers volumes of VMs on
other pages as targets.
The list is paged only when the API lists the VM's printer columns as
metadata.fields, which the SQL cache does, so a missing or non-semver
server version can't turn it on against an API that can't filter.
One failed request for a page's resources no longer stops the others.
* fix: show the restart notice only when its VMs change
The list rebuilds the names of the VMs that need a restart on every
refresh, and when it pages also on every page, sort and search, so the
notice popped up again each time even when nothing new needed a
restart. Show it only when the set of VMs changes.
While paging it still covers only the VMs on the current page: the API
can't filter VMs by their RestartRequired condition.
* fix: find the launcher pods of every VM on the page
The paged list loaded the page's launcher pods by the harvesterhci.io/vmName
label, which only the Harvester VM form writes into a VM's template. VMs
created any other way, like an imported VM or one applied with kubectl,
got no pod, so their rows lost View Logs and the starting and pod error
states.
Load the pods after the page's VMIs instead, by the kubevirt.io/created-by
label KubeVirt puts on every launcher pod (the VMI's UID).
Also cover the paged mode in the tests: it must not load every VMI,
migration or pod, and a forced refresh must reach every request.
* fix: notify about restarts again when coming back to the VM list
The restart notice compared the VMs that need a restart with the
previous value of the list. Coming back from a page that loads every VM,
like Volumes or a VM's detail page, that previous value already held the
same VMs, so the notice didn't show. Remember what was notified on the
list itself instead, so each visit starts fresh, and compare by namespace
and name, so a VM of the same name in another namespace counts as a
change.
Also say which VMs lack Harvester's vmName label: the ones from Forklift
or plain manifests, not every VM created outside the UI.
* refactor: keep the VM list's paging helpers in the component
Only canPaginate stays outside, because ResourceList calls
$loadingResources(route, store) on the component options, where there is
no `this`. The pagination headers become a computed property and the
printer column lookup a method.
* refactor: always list VMs with PaginatedResourceTable
PaginatedResourceTable handles both modes. fetchSecondaryResources loads
every pod, volume, restore, backup, VMI and migration when the list isn't
paged, and only what every row shares when it is. VMIs without a VM are
added back through localFilter, which only runs without pagination.
The list passes the pagination context only when the cluster's API can
page, so older clusters keep the full list.
* refactor: register the VM list's columns with the product
Both column sets go through the product's headers(), with the paged set
next to the unpaged one in config/table-headers.js. The list only adds the
node and restore progress columns, which the API can't sort or search when
paging. State sorts by the VM's Status printer column, metadata.fields.2.
* fix: show the restart notice when coming back to the VM list
Since the list always uses PaginatedResourceTable it reads the VMs from
the store. Coming back to the list the store already holds them, so the
restart watcher never saw a change and the notice didn't show. Run it
when the list is created too.
While paging, the store can still hold the VMs another view loaded, like
every VM after Volumes or a VM's detail, so wait for the list's own page
before notifying.
* fix: let the namespace filter know the VM list is paged
The VMs were registered for pagination with a context that only the VM
list passed. The header's namespace filter asks without one, so it didn't
know the list was paged and kept offering "Not in a Project", which the
paged API can't filter by: picking it hid every VM.
Register the VMs in every context and answer per cluster in the store's
paginationEnabled getter instead: only when the feature is on and the
API lists the VM's printer columns as metadata.fields, as the SQL cache
does. The filter, the list and the store now agree, and clusters whose
API can't page keep the full list.
The filter is shared by every list, so Not in a Project can still be
picked on a list that doesn't page. The paged VM list then asks for
another option, like the shell's generic lists do, instead of showing
no rows.
* fix: keep the paged VM list when showing a VM's configuration
The Config tab of the Show Configuration drawer renders the VM form,
which loads every VM, PVC, PV, VMI and migration, and its device tabs
every VM again. On a paged list that replaced the list's page in the
store and emptied the list.
Hide the Config tab while the store keeps a page of VMs, so the drawer
shows the YAML. The VM's own page still shows its configuration, and a
drawer opened where every VM is loaded keeps its Config tab.
* refactor: define the VM list's node and restore columns with the others
The node and restore progress columns are now in VM_HEADERS, so the paged
set turns their sort and search off through VM_PAGINATION_FIELDS, like the
other columns the API can't index. The list only leaves them out when they
don't apply: the node column when the cluster's nodes can't be seen, the
restore progress while no backup is being restored.
---------
(cherry picked from commit 0c6eee1744)
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
Co-authored-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
Add a StorageClass selector to online and air-gapped upgrade pages when
the repositoryStorageClass feature is enabled (v1.10+).
- Online: stores selection in harvesterhci.io/upgrade-storage-class annotation
- Air-gapped: stores selection in image spec.targetStorageClassName
- Selector locked while uploaded image exists; unlocked on switch to URL
- Hidden on pre-v1.10 clusters
(cherry picked from commit aa5a501c29)
Signed-off-by: pohanhuang <pohan.huang@suse.com>
Co-authored-by: Po Han Huang <pohan.huang@suse.com>
* feat: expose KubeVirt high-performance storage features in VM and Volume UI
Adds UI to configure KubeVirt high-performance disk/storage settings that
were previously only reachable via VMBuilder/Terraform:
- Per-volume "Storage Performance Options": a performance profile
(Default / High Performance / Custom) exposing per-disk cache, io and
dedicatedIOThread on all disk types (VM image/root, new, existing,
container) and on the standalone Volume form.
- VM-wide "High Performance (I/O Threads and Multi-Queue)": blockMultiQueue
and ioThreadsPolicy (+ supplemental-pool thread count), shown only in the
VM section since these are domain-level and cannot be set per-PVC.
- Compatibility guardrails: io=native forces cache=none; cache=none on
Filesystem volumeMode warns; blockMultiQueue requires a virtio disk.
Ref: harvester/harvester#11550
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Alejandro Bonilla <abonilla@suse.com>
* fix: address review feedback on high-performance storage UI
Resolves the Copilot review comments on #1133:
- Gate the whole feature behind a new `highPerformanceStorage` release
feature flag (v1.9.0) so older supported clusters never render the
controls or receive unsupported KubeVirt fields.
- Force Cache Mode to "none" whenever Native I/O is selected, including
from the "Default" ('') cache value, and disable every non-"none" cache
option (Default included) while Native is active. Previously the empty
cache value slipped past the guardrail and produced an invalid combo.
- Clear an already-enabled blockMultiQueue when the last virtio disk is
removed, so a disabled checkbox can no longer persist an invalid setting.
- Strip stale cache/io/dedicatedIOThread fields from the merged disk spec
when a regenerated disk no longer requests them, so switching a disk back
to "Default" (or unchecking Dedicated I/O Thread) while editing no longer
silently preserves the previous values.
- Expose the disclosure toggle's state to assistive tech via aria-expanded
and an expand/collapse aria-label.
- Add unit tests for the profile transitions and the Native/cache guardrails.
Ref: harvester/harvester#11550
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Alejandro Bonilla <abonilla@suse.com>
* fix: address second-round review on high-performance storage UI
Resolves the two Copilot findings on #1133 and votdev's UX feedback on
harvester/harvester#11550:
- Restore the disk's original bus when the performance profile goes back
to "Default". The "High Performance" preset switches the bus to virtio,
but leaving the preset only cleared cache/io/dedicatedIOThread, so a
SATA/SCSI disk was silently left on virtio — a bus change that can make
an existing guest unbootable. The pre-preset bus is now remembered and
put back, unless the user picked a different bus themselves in the
meantime.
- Pass the VM-wide performance values from the VM detail page to the
shared Volume component. The mixin already parsed them via
getInitConfig(), but the detail caller never forwarded them, so
VMPerformanceOptions fell back to its prop defaults and hid itself in
view mode — configured blockMultiQueue / ioThreadsPolicy settings were
invisible. They are also refreshed in the value watcher so the panel
does not go stale.
- Make the VM-wide "High Performance" panel expandable/collapsible,
matching the per-volume "Storage Performance Options" disclosure. It
stays collapsed unless the VM already has something configured, so the
average user is not faced with specialist tuning controls by default.
- Fix the unit tests to use Vue Test Utils v2 mount options. They used
the v1 top-level `mocks` key, which VTU 2.x ignores, so every case
failed on mount. The repo has no jest config or test script, so this
was not caught. Add coverage for the bus save/restore behaviour.
Ref: harvester/harvester#11550
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Alejandro Bonilla <abonilla@suse.com>
---------
Signed-off-by: Alejandro Bonilla <abonilla@suse.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* feat: allow suer give static IP for VM
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add feature flag
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: allow user to select kube-system ns
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add NICs tab when creating overlay network
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: only show NIC tab if ns is kube-system
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add NAT & Internet tabs
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add provider networks / vlan edit pages
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add edit pages
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: review comments
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: copilot review
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add VM display name annotation support in edit and list views
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: add display name checkbox and input field
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: support advance option and creation from DataVolume
- advance option would let user change the accessMode/volumeMode
- creation from DataVolume could supports various scenario with
3rd-party storage
Signed-off-by: Vicente Cheng <freeze.bilsted@gmail.com>
* feat: add data migration action on volume page
Signed-off-by: Vicente Cheng <freeze.bilsted@gmail.com>
* refactor: use show advanced options link instead of checkbox
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add feature flag
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add feature flag for dataMigration action
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Vicente Cheng <freeze.bilsted@gmail.com>
Signed-off-by: Andy Lee <andy.lee@suse.com>
Co-authored-by: Andy Lee <andy.lee@suse.com>
* feat: ensure the state is pending when perform cloning the efi
Signed-off-by: pohanhuang <pohan.huang@suse.com>
* feat: define harvesterhci.io/clone-backend-storage-status in labels-annotations.js
Signed-off-by: pohanhuang <pohan.huang@suse.com>
---------
Signed-off-by: pohanhuang <pohan.huang@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>
* refactor: display addon name from addon.harvesterhci.io/displayName label
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: add descheduler description
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add maxCPU and maxMemory
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add hotplug dialog
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add restart message
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: let VM template support cpuMemoryHotplug
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add feature flag
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add max-hotplug-ratio setting
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* change condition to check isKVMDisable
Signed-off-by: Andy Lee <andy.lee@suse.com>
* change condition eq 0
Signed-off-by: Andy Lee <andy.lee@suse.com>
* add allNotExist back
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>