* feat: add the Kube-OVN VPC Egress Gateways page
List, create and edit VpcEgressGateway resources under Overlay Networks >
NAT & Internet, right below the NAT gateways, which are now labeled NAT
Gateways. The form covers the VPC, replicas, internal and external
subnets, SNAT policies, internal and external IPs, BFD and the bandwidth
limit, and keeps the fields it does not show.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* feat: add the VPC BFD port and link the Egress Gateway BFD warning to it
The VPC form gets a BFD Port tab with the enabled switch and its IP,
which an Egress Gateway with BFD needs. The gateway form now checks the
VPC's spec.bfdPort instead of a spec.bfd field that VPCs don't have, and
its warning links to the VPC. Bandwidth also takes quantities such as
1Gi, and a gateway that only uses selectors no longer needs a policy.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* feat: check the Egress Gateway and BFD port against what Kube-OVN accepts
Kube-OVN runs as a secondary CNI in Harvester, so an Egress Gateway's
internal subnet has to sit on a virtual machine network and its external
subnet on a network attachment; the subnet lists now offer only those.
The internal and external IPs must be unique and inside their subnet,
other than its gateway, and the two subnets must differ. Selectors don't
work in that mode, so a gateway needs a policy again. Policies set with
IP blocks show them, and BFD intervals hidden while BFD is off fall back
to their defaults.
Save stays disabled while either form is invalid, each field shows its
own error, and a tab with errors is marked. The VPC's BFD port IP can't
be in one of its subnets, its tab warns when it is turned off while
gateways of the VPC use BFD, and the gateway's BFD warning opens the
VPC's BFD Port tab in a new tab.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: show why Save is disabled on the Egress Gateway and VPC forms
Every field that can block Save shows its own message once touched:
the name, the VPC and both subnets, which have none when left empty.
When the chosen VPC has no subnet on a virtual machine network, the
Internal Subnet placeholder says so.
A subnet can only be in one policy: the gateway leaves a source out of
SNAT when any policy has SNAT off for it, so the same subnet in a second
policy would silently ignore one of them. Enable SNAT explains what
turning it off needs.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: keep one Egress Gateway policy for each SNAT setting
Kube-OVN merges the sources of every policy with the same SNAT setting,
so a second policy with SNAT on (or off) only adds to the first one.
The form now flags it on the second policy, Add Policy adds the setting
that isn't used yet and goes away once both exist, and the Policies tab
says a gateway has at most two policies. Policies with IP blocks are
left out of the check, since the form can't move those.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* refactor: ask for the Egress Gateway subnets with and without SNAT
Kube-OVN puts the sources of every policy into two sets, with SNAT and
without, and leaves a source out of SNAT when any policy has SNAT off
for it. A list of policies with a checkbox each let the form build
policies that only repeated or silently overrode each other, so the
Policies tab now asks for those two sets: Subnets with SNAT and Subnets
without SNAT, a subnet in one list only and at least one subnet in all.
Saving writes one policy for each list that has subnets.
Editing reads existing policies the way Kube-OVN applies them, so a
subnet that was in both lands in Subnets without SNAT, and IP blocks
set outside the form are kept and shown read-only.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* refactor: go back to the Egress Gateway policy list
The VpcEgressGateway CRD and the issue describe policies as a list,
each with snat and subnets, and Kube-OVN accepts any number of them:
policies with the same SNAT setting just work together. The two subnet
lists hid that shape and rewrote existing policies, and they couldn't
mark "one of these two" as required. This puts back the policy list,
where each policy needs a subnet and a subnet can be in one policy
only, which is the one case that changes what the gateway does. The
Policies tab now says how policies work together.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* refactor: ask for the Egress Gateway subnets with and without SNAT again
Kube-OVN only uses which subnets have SNAT and which don't, so two
lists, Subnets with SNAT and Subnets without SNAT, hold the same data
as the policy list, are clearer to fill in, and can't build a policy
that repeats or overrides another. Saving writes one policy for each
list that has subnets. Neither list is marked required: the Policies
tab says one subnet in either list is needed, and both lists show that
message once touched while they're empty.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: show the Egress Gateway policy rule once for both subnet lists
One subnet in either list is enough, but a warning on each list read as
if both lists were required. The lists no longer show a warning; one
message under them says to select at least one subnet in either list
while both are empty, next to the tab mark and the disabled Save.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: say why the Egress Gateway subnet lists are empty
The policy lists only offer subnets of the VPC chosen on the Basic tab,
so before a VPC is chosen they were empty with no reason given. They
now say to select a VPC on the Basic tab first, or that the chosen VPC
has no subnets.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: make the Egress Gateway fields that need a VPC say so
Internal Subnet and both policy lists only offer subnets of the chosen
VPC, so they're disabled until a VPC is chosen and say to select one
first. The policy lists keep their dropdown attached to the field, so
it follows the field when a chip is removed instead of leaving a gap.
The BFD intervals are labeled Receive Interval and Transmit Interval,
which fit next to their unit, with a tooltip each.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: keep the external subnet out of Egress Gateway policies and check usable IPs
Kube-OVN reroutes a policy's sources to the gateway, so the gateway's
own external subnet as a source would send its outbound traffic back
into it; the policy lists no longer offer it and the form flags it.
Static IPs must also be usable addresses: Kube-OVN assigns from the
network address + 1 to the broadcast address - 1, so those two are
rejected along with the gateway.
The policy rule is an error banner like the IP count rule, the BFD
multiplier has its own message, the IP Addresses and Bandwidth
instructions are hidden on the read-only page, and the VPC's warning
about gateways that need its BFD port reads right for one gateway.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* chore: declare ipaddr.js, which the subnet model imports
It was only installed as a dependency of webpack-dev-server.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* feat: support PrimaryCNI Egress Gateways
Kube-OVN v1.17 can send a gateway's traffic out through the pod network
when it isn't the primary CNI, as on Harvester. Such a gateway takes no
external subnet, external IPs or bandwidth, so the form couldn't save one.
The Basic tab now picks the external network, locked after creation, and
hides the fields PrimaryCNI doesn't take.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* fix: offer Primary CNI only when the cluster's CRD has it
Kube-OVN v1.16, in Harvester v1.10.0-rc1 and older, has no
externalNetworkMode and requires an external subnet, so a Primary CNI
gateway was rejected there. The form reads the CRD's schema definition
and only shows the External Network choice when the field exists.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
---------
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* chore(deps): align resolutions and yarn.lock with @rancher/shell 3.0.14
yarn only applies resolutions from the root package.json, so the ones
@rancher/shell 3.0.14 declares never reached the extension. Copy them
over, use the **/ form for diff2html/diff since diff2html sits under
@rancher/shell here, and drop the cronstrue pin so the extension and the
shell both use the 3.9.0 the shell depends on.
Re-resolve yarn.lock against the shell's own lockfile so every shared
package lands on the version the shell ships, and semver and
@types/node follow the shell's versions too.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
* chore(deps): keep the cronstrue pin
cronstrue 3 describes @reboot, so the backup schedule form enabled Create
for it while Harvester's webhook rejects it. The dashboard itself runs
cronstrue 2.53.0 and the shell went back to that after 3.0.14, so keep
our 2.59.0 pin.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@suse.com>
---------
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@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>
Clears 26 of the 54 open Dependabot alerts (axios, dompurify, serve-static, and
drops vulnerable send / @tootallnate/once copies).
3.0.13 ships the flat-config ESLint 10 toolchain, so lint now routes through the
@rancher/shell launcher (keeping the legacy .eslintrc on ESLint 7); a prelint step
installs an ESLint-7-compatible eslint-plugin-jest into the isolated toolchain.
Signed-off-by: Marcelo Fukumoto <marcelo.fukumoto@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>
* feat: add AGENNTS.md
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: update based on copilot feedback
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: update AGENTS.md
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: update based on AI suggestion
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: based on comments
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: some files
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: boundaries.md
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* chore: bump @rancher/shell to 3.0.12-rc.1
Signed-off-by: Andy Lee <andy.lee@suse.com>
* ci: update node version to 24
Signed-off-by: Andy Lee <andy.lee@suse.com>
* ci: update build catalog yaml
Signed-off-by: Andy Lee <andy.lee@suse.com>
* fix: nav items order
Signed-off-by: Andy Lee <andy.lee@suse.com>
* refactor: remove unneeded weightType
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>
* chore: add v1.8.1 and v1.9.0 feature flags
Signed-off-by: Andy Lee <andy.lee@suse.com>
* chore: bump to v1.9.0-dev
Signed-off-by: Andy Lee <andy.lee@suse.com>
---------
Signed-off-by: Andy Lee <andy.lee@suse.com>