Skip to content

Commit 829198e

Browse files
committed
feat: improve navigation in vcluster configuration
1 parent a40a1f0 commit 829198e

File tree

7 files changed

+170
-0
lines changed

7 files changed

+170
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import React, {type ReactNode} from 'react';
2+
import Category from '@theme-original/DocSidebarItem/Category';
3+
import type CategoryType from '@theme/DocSidebarItem/Category';
4+
import type {WrapperProps} from '@docusaurus/types';
5+
import {useHistory} from '@docusaurus/router';
6+
7+
type Props = WrapperProps<typeof CategoryType>;
8+
9+
export default function CategoryWrapper(props: Props): ReactNode {
10+
const history = useHistory();
11+
const categoryRef = React.useRef<HTMLDivElement>(null);
12+
13+
React.useEffect(() => {
14+
if (!categoryRef.current || !props.item.href) return;
15+
16+
const handleClick = (e: MouseEvent) => {
17+
const target = e.target as HTMLElement;
18+
const categoryLink = categoryRef.current?.querySelector('a.menu__link--sublist');
19+
20+
if (!categoryLink || !categoryLink.contains(target)) {
21+
return;
22+
}
23+
24+
const clickedOnLink = target.tagName === 'A' || target.closest('a') === categoryLink;
25+
26+
if (clickedOnLink) {
27+
e.preventDefault();
28+
history.push(props.item.href);
29+
}
30+
};
31+
32+
const element = categoryRef.current;
33+
element.addEventListener('click', handleClick);
34+
35+
return () => {
36+
element.removeEventListener('click', handleClick);
37+
};
38+
}, [props.item.href, history]);
39+
40+
return (
41+
<div ref={categoryRef}>
42+
<Category {...props} />
43+
</div>
44+
);
45+
}

vcluster/configure/vcluster-yaml/experimental/README.mdx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,22 @@ import Experimental from '../../../_partials/config/experimental.mdx'
1111
These features are experimental! They may have breaking changes or be deprecated.
1212
:::
1313

14+
## Experimental features
15+
16+
vCluster provides several experimental features that extend its capabilities:
17+
18+
### Available features
19+
20+
- **[Deploy](./deploy.mdx)** - Configure deployment settings for experimental features
21+
- **[Isolated Control Plane](./isolated-control-plane.mdx)** - Run vCluster with an isolated control plane
22+
- **[Sync Settings](./sync-settings.mdx)** - Advanced synchronization configuration
23+
- **[Deny Proxy Requests](./deny-proxy-requests.mdx)** - Block proxy requests to the host cluster
24+
- **[Virtual Cluster KubeConfig](./virtual-cluster-kubeconfig.mdx)** - Customize virtual cluster kubeconfig generation
25+
26+
### Using experimental features
27+
28+
Experimental features are configured under the `experimental` section of your vCluster configuration. These features may change between releases, so use them with caution in production environments.
29+
1430
## Config reference
1531

1632
<Experimental/>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
title: External
3+
sidebar_label: external
4+
sidebar_position: 11
5+
description: Configure external tools and integrations.
6+
---
7+
8+
## External integrations
9+
10+
The `external` section configures tools and services that are external to vCluster itself. Currently, this includes platform-specific features.
11+
12+
### Platform integration
13+
14+
The platform integration enables advanced features when using vCluster with the vCluster Platform:
15+
16+
- **[API Key](./platform/api-key.mdx)** - Configure platform access credentials
17+
- **[Auto Sleep](./platform/auto-sleep.mdx)** - Automatically sleep inactive virtual clusters
18+
- **[Auto Delete](./platform/auto-delete.mdx)** - Automatically delete inactive virtual clusters
19+
- **[Project Settings](./platform/project.mdx)** - Configure project-specific settings
20+
21+
These features require a vCluster Platform installation and proper authentication.
22+
23+
:::info
24+
Platform features help manage virtual clusters at scale by automating lifecycle operations like sleep and deletion based on inactivity or schedules.
25+
:::

vcluster_versioned_docs/version-0.24.0/configure/vcluster-yaml/experimental/README.mdx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,24 @@ import Experimental from '../../../_partials/config/experimental.mdx'
1111
These features are experimental! They may have breaking changes or be deprecated.
1212
:::
1313

14+
## Experimental features
15+
16+
vCluster provides several experimental features that extend its capabilities:
17+
18+
### Available features
19+
20+
- **[Deploy](./deploy.mdx)** - Configure deployment settings for experimental features
21+
- **[Multi-Namespace Mode](./multi-namespace-mode.mdx)** - Run vCluster in multi-namespace mode
22+
- **[Generic Sync](./generic-sync.mdx)** - Configure generic resource synchronization
23+
- **[Isolated Control Plane](./isolated-control-plane.mdx)** - Run vCluster with an isolated control plane
24+
- **[Sync Settings](./sync-settings.mdx)** - Advanced synchronization configuration
25+
- **[Deny Proxy Requests](./deny-proxy-requests.mdx)** - Block proxy requests to the host cluster
26+
- **[Virtual Cluster KubeConfig](./virtual-cluster-kubeconfig.mdx)** - Customize virtual cluster kubeconfig generation
27+
28+
### Using experimental features
29+
30+
Experimental features are configured under the `experimental` section of your vCluster configuration. These features may change between releases, so use them with caution in production environments.
31+
1432
## Config reference
1533

1634
<Experimental/>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: External
3+
sidebar_label: external
4+
sidebar_position: 11
5+
description: Configure external tools and integrations.
6+
---
7+
8+
## External integrations
9+
10+
The `external` section configures tools and services that are external to vCluster itself. Currently, this includes platform-specific features.
11+
12+
### Platform integration
13+
14+
The platform integration enables advanced features when using vCluster with the vCluster Platform:
15+
16+
- **[API Key](./platform/api-key.mdx)** - Configure platform access credentials
17+
- **[Auto Sleep](./platform/auto-sleep.mdx)** - Automatically sleep inactive virtual clusters
18+
- **[Auto Delete](./platform/auto-delete.mdx)** - Automatically delete inactive virtual clusters
19+
20+
These features require a vCluster Platform installation and proper authentication.
21+
22+
:::info
23+
Platform features help manage virtual clusters at scale by automating lifecycle operations like sleep and deletion based on inactivity or schedules.
24+
:::

vcluster_versioned_docs/version-0.25.0/configure/vcluster-yaml/experimental/README.mdx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,24 @@ import Experimental from '../../../_partials/config/experimental.mdx'
1111
These features are experimental! They may have breaking changes or be deprecated.
1212
:::
1313

14+
## Experimental features
15+
16+
vCluster provides several experimental features that extend its capabilities:
17+
18+
### Available features
19+
20+
- **[Deploy](./deploy.mdx)** - Configure deployment settings for experimental features
21+
- **[Multi-Namespace Mode](./multi-namespace-mode.mdx)** - Run vCluster in multi-namespace mode
22+
- **[Generic Sync](./generic-sync.mdx)** - Configure generic resource synchronization
23+
- **[Isolated Control Plane](./isolated-control-plane.mdx)** - Run vCluster with an isolated control plane
24+
- **[Sync Settings](./sync-settings.mdx)** - Advanced synchronization configuration
25+
- **[Deny Proxy Requests](./deny-proxy-requests.mdx)** - Block proxy requests to the host cluster
26+
- **[Virtual Cluster KubeConfig](./virtual-cluster-kubeconfig.mdx)** - Customize virtual cluster kubeconfig generation
27+
28+
### Using experimental features
29+
30+
Experimental features are configured under the `experimental` section of your vCluster configuration. These features may change between releases, so use them with caution in production environments.
31+
1432
## Config reference
1533

1634
<Experimental/>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: External
3+
sidebar_label: external
4+
sidebar_position: 11
5+
description: Configure external tools and integrations.
6+
---
7+
8+
## External integrations
9+
10+
The `external` section configures tools and services that are external to vCluster itself. Currently, this includes platform-specific features.
11+
12+
### Platform integration
13+
14+
The platform integration enables advanced features when using vCluster with the vCluster Platform:
15+
16+
- **[API Key](./platform/api-key.mdx)** - Configure platform access credentials
17+
- **[Auto Sleep](./platform/auto-sleep.mdx)** - Automatically sleep inactive virtual clusters
18+
- **[Auto Delete](./platform/auto-delete.mdx)** - Automatically delete inactive virtual clusters
19+
20+
These features require a vCluster Platform installation and proper authentication.
21+
22+
:::info
23+
Platform features help manage virtual clusters at scale by automating lifecycle operations like sleep and deletion based on inactivity or schedules.
24+
:::

0 commit comments

Comments
 (0)