diff --git a/docusaurus.config.js b/docusaurus.config.js index 5d976cb3..6b3167da 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -70,7 +70,8 @@ const config = { }, "v1.6": { label: 'v1.6 (Latest)', - path: 'v1.6', + path: '', + // path: 'v1.6', }, "v1.5": { label: 'v1.5', @@ -233,10 +234,26 @@ const config = { * @returns {RedirectsReturn} */ createRedirects(existingPath) { - if (typeof existingPath === 'string' && existingPath.includes('/v1.6')) { - return [existingPath.replace('/v1.6', '/latest')]; + if (typeof existingPath !== 'string') { + return undefined; } - return undefined; + + if (/^\/(?:api|dev\/api)(?:\/|$)/.test(existingPath)) { + return undefined; + } + + if (/^\/v\d+\.\d+\/(?:api)(?:\/|$)/.test(existingPath)) { + return undefined; + } + + if (existingPath === '/') { + return ['/v1.6/', '/v1.6', '/latest/', '/latest']; + } + + return [ + `/v1.6${existingPath}`, + `/latest${existingPath}`, + ]; } }, ], diff --git a/src/pages/index.js b/src/pages/index.js deleted file mode 100644 index f49e4fcb..00000000 --- a/src/pages/index.js +++ /dev/null @@ -1,6 +0,0 @@ -import React from 'react'; -import {Redirect} from '@docusaurus/router'; - -export default function Home(context) { - return ; -} \ No newline at end of file diff --git a/src/pages/v1.6/[...slug].js b/src/pages/v1.6/[...slug].js new file mode 100644 index 00000000..42604439 --- /dev/null +++ b/src/pages/v1.6/[...slug].js @@ -0,0 +1,15 @@ +import React from 'react'; +import {Redirect, useLocation} from '@docusaurus/router'; + +function toLatestPath(pathname) { + const rewritten = pathname.replace(/\/v1\.6(?=\/|$)/, ''); + return rewritten === '' ? '/' : rewritten; +} + +export default function LegacyV16PathRedirect() { + const location = useLocation(); + const pathname = toLatestPath(location.pathname); + const target = `${pathname}${location.search || ''}${location.hash || ''}`; + + return ; +} diff --git a/src/pages/v1.6/index.js b/src/pages/v1.6/index.js new file mode 100644 index 00000000..1d0006f2 --- /dev/null +++ b/src/pages/v1.6/index.js @@ -0,0 +1,15 @@ +import React from 'react'; +import {Redirect, useLocation} from '@docusaurus/router'; + +function toLatestPath(pathname) { + const rewritten = pathname.replace(/\/v1\.6(?=\/|$)/, ''); + return rewritten === '' ? '/' : rewritten; +} + +export default function LegacyV16RootRedirect() { + const location = useLocation(); + const pathname = toLatestPath(location.pathname); + const target = `${pathname}${location.search || ''}${location.hash || ''}`; + + return ; +} diff --git a/versioned_docs/version-v1.6/advanced/settings.md b/versioned_docs/version-v1.6/advanced/settings.md index c1c3db46..96dbacc4 100644 --- a/versioned_docs/version-v1.6/advanced/settings.md +++ b/versioned_docs/version-v1.6/advanced/settings.md @@ -364,7 +364,7 @@ A VM that is configured to have `1 CPU, 64 Gi Memory, 1 Volume and 1 NIC` will g The yaml output of this setting on a new cluster: ``` -apypervisor: harvesterhci.io/v1beta1 +apypervisor: hypervisorhci.io/v1beta1 default: "1.5" kind: Setting metadata: @@ -467,7 +467,7 @@ Changing the `additional-guest-memory-overhead-ratio` setting affects the VMs pe ::: -### `release-download-url` + ### `server-version` @@ -766,7 +766,7 @@ If the collection process is not completed within the allotted time, Hypervisor false ``` -### `upgrade-checker-url` + ### `upgrade-config` diff --git a/versioned_docs/version-v1.6/getting-started/deploy-singlenode-cluster.md b/versioned_docs/version-v1.6/getting-started/deploy-singlenode-cluster.md index d4d2862c..810ad884 100644 --- a/versioned_docs/version-v1.6/getting-started/deploy-singlenode-cluster.md +++ b/versioned_docs/version-v1.6/getting-started/deploy-singlenode-cluster.md @@ -35,7 +35,8 @@ You can download the installation files from the [Hypervisor Releases](https://g | --- | --- | --- | | [ISO](../install/iso-install.md) | ISO | N/A | | [USB](../install/usb-install.md) | ISO | USB flash drive; utility such as [balenaEtcher](https://etcher.balena.io/) or the Linux [dd command](https://man7.org/linux/man-pages/man1/dd.1.html) | -| [PXE](../install/pxe-boot-install.md) | ISO, Linux kernel image (vmlinuz), initrd, SquashFS image | Directory on the HTTP server (for serving boot files); iPXE boot scripts (for automatic installation); DHCP server configuration | + + ## 3. Prepare the cluster configuration requirements. @@ -100,7 +101,8 @@ You can create [Linux VMs](../vm/create-vm.md) using one of the following method - Hypervisor UI: On the **Virtual Machines** screen, click **Create** and configure the settings on each tab. - Kubernetes API: Create a `VirtualMachine` object. -- [Hypervisor Terraform Provider](../terraform/terraform-provider.md): Define a `harvester_virtualmachine` resource block. + + Creating [Windows VMs](../vm/create-windows-vm.md) on the Hypervisor UI involves slightly different steps. Hypervisor provides a VM template named `windows-iso-image-base-template` that adds a volume with the Virtio drivers for Windows, which streamlines the VM configuration process. If you require Virtio devices but choose to not use the template, you must add your own Virtio drivers for Windows to enable correct hardware detection. diff --git a/versioned_docs/version-v1.6/networking/best-practice.md b/versioned_docs/version-v1.6/networking/best-practice.md index 65104e33..52959c4a 100644 --- a/versioned_docs/version-v1.6/networking/best-practice.md +++ b/versioned_docs/version-v1.6/networking/best-practice.md @@ -128,10 +128,10 @@ Before any action is taken, it is important to collect the current network infor ``` $ grep "renamed" kernel.log - Jan 08 00:34:48 localhost kernel: tg3 0000:02:00.0 eno1: renamed from eth2 // eth2 / eno1 is not used by Harvester - Jan 08 00:34:48 localhost kernel: tg3 0000:02:00.3 eno4: renamed from eth6 // eth6 / eno4 is not used by Harvester - Jan 08 00:34:48 localhost kernel: tg3 0000:02:00.2 eno3: renamed from eth5 // eth5 / eno3 is not used by Harvester - Jan 08 00:34:48 localhost kernel: tg3 0000:02:00.1 eno2: renamed from eth3 // eth3 / eno2 is not used by Harvester + Jan 08 00:34:48 localhost kernel: tg3 0000:02:00.0 eno1: renamed from eth2 // eth2 / eno1 is not used by Hypervisor + Jan 08 00:34:48 localhost kernel: tg3 0000:02:00.3 eno4: renamed from eth6 // eth6 / eno4 is not used by Hypervisor + Jan 08 00:34:48 localhost kernel: tg3 0000:02:00.2 eno3: renamed from eth5 // eth5 / eno3 is not used by Hypervisor + Jan 08 00:34:48 localhost kernel: tg3 0000:02:00.1 eno2: renamed from eth3 // eth3 / eno2 is not used by Hypervisor Jan 08 00:34:49 localhost kernel: i40e 0000:5d:00.0 eno5: renamed from eth0 Jan 08 00:34:49 localhost kernel: i40e 0000:af:00.0 ens4f0: renamed from eth4 Jan 08 00:34:49 localhost kernel: i40e 0000:5d:00.1 eno6: renamed from eth1 diff --git a/versioned_docs/version-v1.6/networking/deep-dive.md b/versioned_docs/version-v1.6/networking/deep-dive.md index b28acb8e..0c162bcf 100644 --- a/versioned_docs/version-v1.6/networking/deep-dive.md +++ b/versioned_docs/version-v1.6/networking/deep-dive.md @@ -76,7 +76,7 @@ We leverage [multus CNI](https://github.com/k8snetworkplumbingwg/multus-cni) and 3. To achieve high availability and fault tolerance, a bond device where the real NICs are bound is created to serve as the uplink of the bridge. By default, this bond device will allow the target tagged traffic/packets to pass through. ```shell - harvester-0:/home/rancher # bridge -c vlan show dev oob-bo + hypervisor-0:/home/rancher # bridge -c vlan show dev oob-bo port vlan ids oob-bo 1 PVID Egress Untagged 100 diff --git a/versioned_docs/version-v1.6/troubleshooting/vm.md b/versioned_docs/version-v1.6/troubleshooting/vm.md index 80836559..b5ca481d 100644 --- a/versioned_docs/version-v1.6/troubleshooting/vm.md +++ b/versioned_docs/version-v1.6/troubleshooting/vm.md @@ -395,7 +395,7 @@ Node level operation, node by node: 1. [Uncordon](../host/host.md#cordoning-a-node) this node. -1. [Start](#vm-general-operations) the affected VMs from harvester UI. +1. [Start](#vm-general-operations) the affected VMs from hypervisor UI. Wait some time, the VM will run successfully. @@ -563,7 +563,7 @@ metadata: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - - key: network.harvesterhci.io/cn2 + - key: network.hypervisorhci.io/cn2 operator: In values: - 'true' @@ -588,7 +588,7 @@ spec: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - - key: network.harvesterhci.io/cn2 + - key: network.hypervisorhci.io/cn2 operator: In values: - "true" @@ -610,11 +610,11 @@ status: ### Root Cause -Hypervisor migtht [automatically apply affinity rules](../vm/create-vm.md#automatically-applied-affinity-rules) based on the definition of a virtual machine. In the above example, the virtual machine `vm100` attaches to the cluster network `cn2`, and Hypervisor applies the affinity rule `network.harvesterhci.io/cn2`. However, no nodes meet the rule's criteria, so the virtual machine cannot be scheduled. +Hypervisor migtht [automatically apply affinity rules](../vm/create-vm.md#automatically-applied-affinity-rules) based on the definition of a virtual machine. In the above example, the virtual machine `vm100` attaches to the cluster network `cn2`, and Hypervisor applies the affinity rule `network.hypervisorhci.io/cn2`. However, no nodes meet the rule's criteria, so the virtual machine cannot be scheduled. ### Solution -Ensure there are active nodes which sets up the cluster network `cn2` successfully, then these nodes are labeled with `network.harvesterhci.io/cn2`, finally the pending pod can be scheduled to them. +Ensure there are active nodes which sets up the cluster network `cn2` successfully, then these nodes are labeled with `network.hypervisorhci.io/cn2`, finally the pending pod can be scheduled to them. ## Unintentional Virtual Machine Template Modification via Cloud Config YAML