* 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>
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>
* 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: improve vnc console
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix: keep VNC console retries from kicking the active session
Builds on "feat: improve vnc console" (#1147) by Andy Lee.
- Keep retrying with preserveSession after a failed reconnect attempt, so a
displaced console waits for the other session to be released instead of
failing immediately or taking the console back.
- Close the RFB socket when noVNC asks for credentials, so a failed console
does not hold the VNC session.
- Restore Custom Shortcut Keys, which were removed in #1147.
- Add unit tests for the console reconnect behavior.
Related: harvester/harvester#10420
Signed-off-by: Alejandro Bonilla <abonilla@suse.com>
* fix: expose VNC quality and compression settings
- Add 0-9 sliders for the JPEG quality and compression level, which were
already passed to noVNC but could not be changed.
- Mark the connection status as a polite live region so screen readers
announce connection changes.
Related: harvester/harvester#10420
Signed-off-by: Alejandro Bonilla <abonilla@suse.com>
* fix: gate VNC session protection by version and rework the in-use screen
- Add the vncPreserveSession feature flag for Harvester v1.7.0, the first
release whose KubeVirt (1.6.3) honours preserveSession. Without it the
console connects as before, offers no Take Over and does not reconnect on
its own after the session drops, so two open consoles no longer keep
kicking each other out.
- Replace the error page with a short card that says when the console is in
use, and confirm Take Over in a modal instead of window.confirm.
- Keep the overlay text readable on its dark background.
- Show "Connected (view only)", translate the Ctrl+Alt+Del label and remove
unused translation keys.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* feat: show whether the VNC console has keyboard focus
noVNC hides the canvas focus outline, so nothing showed where typing would go.
Draw a ring around the console while it has focus, show a toolbar hint
("Typing goes to the virtual machine" / "Click the console to type"), focus
the console when it connects and return focus to it after sending keys from
the toolbar.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* feat: confirm Ctrl+Alt+Del and Soft Reboot in the VNC console
Both buttons can restart the virtual machine with one click: Soft Reboot
always, and Ctrl+Alt+Del on most Linux guests. Ask in a modal first, as the
VM list already does for Soft Reboot, and return focus to the console after.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: return focus to the VNC console after its confirm modal closes
The modal gave focus back to the toolbar button that opened it, so typing
did not reach the console until it was clicked again.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* refactor: drop the VNC keyboard focus hint from the toolbar
The ring around the console already shows when it has keyboard focus.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
Signed-off-by: Alejandro Bonilla <abonilla@suse.com>
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
Co-authored-by: Andy Lee <andy.lee@suse.com>
Co-authored-by: Alejandro Bonilla <abonilla@suse.com>
* feat: use prime logo when server-flavor is prime
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: expose server-flavor setting
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>
* deps: update rancher/shell to 3.0.12-rc.7
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix: move filter labels/schedule buttons position
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: improve serial console
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat(serial-console): add terminal search toolbar and highlight tuning
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: clear searach result after close
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: fine tune serial console
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix: VM migration tab not appear when first login
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add access/ volume mode model
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: add selected all | clear all actions for selected VM
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix: bugs in VM selection table
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 VMware VDDK image option to VM migration provider
Add an optional VMware VDDK Image field to the Configure Provider step of the VM migration wizard, bound to spec.settings.vddkInitImage when set and left unset when empty. Supports create and edit flows and populates from the existing provider when editing.
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>
* refactor: new design for review page
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: customize empty table rows message
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: fixed the table column
Signed-off-by: Andy Lee <andy.lee@suse.com>
* style: update header tag and align fixed header actions in review migration step
Signed-off-by: Andy Lee <andy.lee@suse.com>
* style: remove unneeded overflow css
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: modify relatedResources using ownerReferences uid
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: wordings
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix(vm-migration): keep completed VMs green and linkable in failed plans
When a plan fails overall, VMs that already reached 100% were marked with an error: their progress bar turned red while the label still read "Finished Successfully", and the migrated-VM detail link was hidden.
Skip the plan-level failure fallback for VMs at 100% and drop the !planFailed guard from the detail-link condition so successfully migrated VMs stay green and stay navigable.
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
formatDuration returned an empty value when a migration was in progress (started set but completed missing), causing the duration column to show an em-dash for all running plans. It now computes elapsed time up to Date.now() when completed is absent, only returning the placeholder when started is unset or timestamps are invalid.
Related issue: harvester/harvester#10417
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: improve VM migration dashboard mapping labels and VM detail link
- Display Management Network / Ignored labels via i18n in mappings column and review card
- Add clickable external-link icon to migrated VM detail page after successful migration
- Add tooltip to the VM detail external-link icon
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: modify duration column width
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: copilot review comment
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: allow user specify namespace for migrated VM
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: not pre-select target namespace
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: ignore option
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 migration plan duration time column
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: allow duration column to be sorted
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: add customized migration plan delete model
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: copilot review
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>
* fix: hide Virtul machine migration tabs if forklift addon is not enabled
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix: rename advanced to configurations
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix: fixed column width
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: review comment
Signed-off-by: Andy Lee <andy.lee@suse.com>
* revert: power on background color
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* feat: create related image SC before upgrade
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: update spec.targetStorageClassName
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: based on comment
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix error banner can't be dismissed
Signed-off-by: Andy Lee <andy.lee@suse.com>
* update all CruResource
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* Add failed and success banner after image uploaded
Signed-off-by: Andy Lee <andy.lee@suse.com>
* add delete image feature
Signed-off-by: Andy Lee <andy.lee@suse.com>
* add skip checking single-replica detached volumes checkbox
Signed-off-by: Andy Lee <andy.lee@suse.com>
* change delete image flow
Signed-off-by: Andy Lee <andy.lee@suse.com>
* Reuse ConfirmRelatedToRemoveDialog
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>