Skip to content

Commit b13abc6

Browse files
docs: add introduction section and improve content structure (#8)
- Add Introduction section with 'What is Forkspacer' and Core Concepts pages - Reorganize homepage cards for better flow (show examples first, then explain) - Add context to Quick Start explaining module definitions - Simplify Helm installation instructions - Update navigation to include Introduction as first section
1 parent d3a8a9f commit b13abc6

File tree

13 files changed

+1037
-215
lines changed

13 files changed

+1037
-215
lines changed

astro.config.mjs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,14 @@ export default defineConfig({
1111
social: [{ icon: 'github', label: 'GitHub', href: 'https://github.com/forkspacer' }],
1212
sidebar: [
1313
{
14-
label: 'Guides',
14+
label: 'Introduction',
15+
items: [
16+
{ label: 'What is Forkspacer?', link: '/introduction/overview/' },
17+
{ label: 'Core Concepts', link: '/introduction/concepts/' },
18+
],
19+
},
20+
{
21+
label: 'Getting Started',
1522
autogenerate: { directory: 'guides' },
1623
},
1724
{

src/content/docs/development/custom-module.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ sidebar:
55
order: 2
66
---
77

8-
# Custom Module Development
9-
108
Forkspacer supports custom modules that allow you to extend the operator with custom resource management logic. Custom modules enable you to integrate third-party tools, implement custom deployment strategies, or handle specialized workloads beyond the built-in Helm support.
119

1210
## What are Custom Modules?
@@ -32,6 +30,7 @@ Custom modules expose an HTTP server that the operator calls to manage Module li
3230
#### Required Endpoints
3331

3432
**Health Check:**
33+
3534
```
3635
GET /health
3736
Response: 200 OK
@@ -44,6 +43,7 @@ Response: 200 OK
4443
```
4544

4645
**Install:**
46+
4747
```
4848
POST /install
4949
Content-Type: application/json
@@ -52,6 +52,7 @@ Response: 201 Created (on success) or 400 Bad Request (on failure)
5252
```
5353

5454
**Uninstall:**
55+
5556
```
5657
POST /uninstall
5758
Content-Type: application/json
@@ -60,6 +61,7 @@ Response: 204 No Content (on success) or 400 Bad Request (on failure)
6061
```
6162

6263
**Sleep:**
64+
6365
```
6466
POST /sleep
6567
Content-Type: application/json
@@ -68,6 +70,7 @@ Response: 200 OK (on success) or 400 Bad Request (on failure)
6870
```
6971

7072
**Resume:**
73+
7174
```
7275
POST /resume
7376
Content-Type: application/json
@@ -95,6 +98,7 @@ go mod init my-module
9598
```
9699

97100
**Example `go.mod`:**
101+
98102
```go
99103
module my-module
100104

@@ -724,6 +728,7 @@ func (h *Handler) Health(w http.ResponseWriter, r *http.Request) {
724728
## Complete Example
725729

726730
See the complete example custom module in the repository:
731+
727732
- [Example Custom Module](https://github.com/forkspacer/modules/tree/main/custom/example)
728733

729734
## Next Steps

src/content/docs/development/overview.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ sidebar:
55
order: 1
66
---
77

8-
# Development Overview
9-
108
This guide covers the development workflow for contributing to the Forkspacer operator, including setting up your development environment, building, testing, and running the operator locally.
119

1210
## Prerequisites
@@ -61,11 +59,13 @@ make dev-host
6159
```
6260

6361
This runs the operator against your current kubeconfig context. It's useful for:
62+
6463
- Quick testing of controller logic
6564
- Debugging with your IDE
6665
- Fast iteration without image builds
6766

6867
**Important Notes:**
68+
6969
- **Webhooks are disabled** - The operator runs with `ENABLE_WEBHOOKS=false`, so validation and defaulting webhooks won't be active
7070
- **Use `local` connection type** - When creating Workspaces in dev-host mode, use `type: local` instead of `type: in-cluster` for the connection configuration
7171
- Your kubeconfig must point to a running cluster (Kind, minikube, etc.)
@@ -81,7 +81,7 @@ metadata:
8181
spec:
8282
type: kubernetes
8383
connection:
84-
type: local # Use 'local' when running with dev-host
84+
type: local # Use 'local' when running with dev-host
8585
secretReference:
8686
name: local
8787
```
@@ -95,6 +95,7 @@ make dev-kind
9595
```
9696

9797
This will:
98+
9899
1. Delete any existing `operator-dev` Kind cluster
99100
2. Create a fresh Kind cluster
100101
3. Install cert-manager
@@ -104,6 +105,7 @@ This will:
104105
7. Deploy the operator
105106

106107
**Benefits of Kind Development:**
108+
107109
- Isolated environment that won't affect other clusters
108110
- Tests the full deployment process
109111
- Validates webhook configurations
@@ -177,6 +179,7 @@ make test-e2e
177179
```
178180

179181
This will:
182+
180183
1. Create a Kind cluster named `operator-test-e2e` (if it doesn't exist)
181184
2. Run e2e tests using Ginkgo
182185
3. Clean up the Kind cluster after tests complete
@@ -247,12 +250,14 @@ Platforms: `linux/arm64`, `linux/amd64`, `linux/s390x`, `linux/ppc64le`
247250
### Debugging
248251

249252
1. **Enable verbose logging**: Set environment variable before running:
253+
250254
```bash
251255
export LOG_LEVEL=debug
252256
make dev-host
253257
```
254258

255259
2. **Use delve for debugging**:
260+
256261
```bash
257262
dlv debug ./cmd/main.go
258263
```

src/content/docs/guides/installation.md

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,21 @@
22
title: Installation
33
description: How to install the Forkspacer operator in your Kubernetes cluster
44
sidebar:
5-
order: 1
5+
order: 1
66
---
77

8-
# Installing Forkspacer
9-
10-
This guide walks you through installing the Forkspacer operator in your Kubernetes cluster.
8+
This guide walks you through installing the Forkspacer operator in your Kubernetes cluster using Helm (recommended).
119

1210
## Prerequisites
1311

1412
- Kubernetes cluster (v1.20 or later)
1513
- `kubectl` configured to access your cluster
14+
- `helm` (v3.0 or later)
1615
- Cluster admin permissions
1716

18-
## Installation Steps
17+
## Helm Installation
18+
19+
Forkspacer is installed using Helm charts for flexible and manageable deployments.
1920

2021
### 1. Install cert-manager
2122

@@ -33,31 +34,40 @@ kubectl wait --for=condition=available --timeout=300s deployment/cert-manager-ca
3334
kubectl wait --for=condition=available --timeout=300s deployment/cert-manager-webhook -n cert-manager
3435
```
3536

36-
### 2. Deploy Forkspacer
37+
### 2. Deploy Forkspacer with Helm
3738

38-
Install the Forkspacer operator using Helm:
39+
Add the Forkspacer Helm repository:
3940

4041
```bash
41-
# Add the Forkspacer Helm repository
4242
helm repo add forkspacer https://forkspacer.github.io/forkspacer
4343
helm repo update
44+
```
45+
46+
<!-- Choose your installation method: -->
47+
48+
<!-- **Option A: Operator Only (Minimal)** -->
49+
50+
**Operator Only (Minimal)**
51+
52+
Install just the core operator for managing workspaces and modules:
4453

45-
# Install Forkspacer
54+
```bash
4655
helm install forkspacer forkspacer/forkspacer \
4756
--namespace forkspacer-system \
4857
--create-namespace
4958
```
5059

51-
For advanced configuration options:
60+
<!-- **Option B: With Web UI and API Server**
61+
62+
Install with the web UI and API server enabled for a complete management experience:
5263
5364
```bash
54-
# Install with custom values
5565
helm install forkspacer forkspacer/forkspacer \
56-
--namespace forkspacer-system \
57-
--create-namespace \
5866
--set operator-ui.enabled=true \
59-
--set ingress.enabled=true
60-
```
67+
--set api-server.enabled=true \
68+
--namespace forkspacer-system \
69+
--create-namespace
70+
``` -->
6171

6272
### 3. Verify Installation
6373

src/content/docs/guides/quick-start.md

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@
22
title: Quick Start
33
description: Get started with Forkspacer in 5 minutes
44
sidebar:
5-
order: 2
5+
order: 2
66
---
77

8-
# Quick Start Guide
9-
108
This guide will help you create your first workspace and deploy a module in just a few minutes.
119

1210
## Prerequisites
@@ -86,6 +84,26 @@ NAME WORKSPACE PHASE AGE
8684
redis default ready 45s
8785
```
8886

87+
## Understanding What You Created
88+
89+
Before we continue, let's understand what just happened:
90+
91+
You now have three components working together:
92+
93+
1. **Workspace** (`default`): An isolated Kubernetes environment managed by Forkspacer
94+
2. **Module** (`redis`): A Kubernetes CRD that declares "install Redis in the default workspace"
95+
3. **Module Definition**: A YAML template hosted on GitHub that describes how to install Redis using a Helm chart
96+
97+
When you created the Module, the Forkspacer operator:
98+
99+
1. Detected the new Module CRD
100+
2. Fetched the module definition from the GitHub URL
101+
3. Parsed the Helm configuration in that definition
102+
4. Installed Redis using the Helm chart specified in the definition
103+
5. Applied your configuration values (`replicaCount`, `version`)
104+
105+
> **What's in that URL?** The GitHub URL points to a [module definition](/introduction/concepts/#module-definition) - a reusable template that describes how to install Redis. Module definitions can be shared across teams and stored in Git repositories. [View the Redis module definition →](https://raw.githubusercontent.com/forkspacer/modules/refs/heads/main/redis/1.0.0/module.yaml)
106+
89107
## Step 3: Verify the Deployment
90108

91109
Check the pods created by the module:
@@ -155,16 +173,18 @@ kubectl delete workspace default
155173
### Common Use Cases
156174

157175
**Development Environments:**
176+
158177
```yaml
159178
# Auto-hibernate outside business hours to save costs
160179
spec:
161180
autoHibernation:
162181
enabled: true
163-
schedule: "0 18 * * 1-5" # 6 PM weekdays
164-
wakeSchedule: "0 8 * * 1-5" # 8 AM weekdays
182+
schedule: "0 18 * * 1-5" # 6 PM weekdays
183+
wakeSchedule: "0 8 * * 1-5" # 8 AM weekdays
165184
```
166185
167186
**Testing Environments:**
187+
168188
```yaml
169189
# Fork from production workspace
170190
spec:
@@ -175,6 +195,7 @@ spec:
175195
```
176196
177197
**Staging Environments:**
198+
178199
```yaml
179200
# Deploy from HTTP-hosted resource definitions
180201
spec:

0 commit comments

Comments
 (0)