Skip to content

Commit d5b9dae

Browse files
committed
🤖 docs: refocus product docs and tutorial flow
Move contributor workflow out of README, add CONTRIBUTING, and align tutorials/samples with the product deployment path (coder namespace, external provisioner tutorial, clearer example naming). --- _Generated with `mux` • Model: `openai:gpt-5.3-codex` • Thinking: `xhigh` • Cost: `$0.00`_ <!-- mux-attribution: model=openai:gpt-5.3-codex thinking=xhigh costs=0.00 -->
1 parent b4535b3 commit d5b9dae

11 files changed

Lines changed: 277 additions & 181 deletions

‎CONTRIBUTING.md‎

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Contributing to coder-k8s
2+
3+
Thanks for contributing to `coder-k8s`.
4+
5+
> [!NOTE]
6+
> The root [`README.md`](./README.md) is end-user focused. This guide contains local development and contribution workflows.
7+
8+
## Development prerequisites
9+
10+
- Go 1.25+ (`go.mod` currently declares Go 1.25.7)
11+
- A Kubernetes cluster (OrbStack, KIND, or any conformant cluster)
12+
- `kubectl` configured for your target cluster
13+
14+
## Local development quick start (controller mode)
15+
16+
```bash
17+
# Generate and apply CRDs
18+
make manifests
19+
kubectl apply -f config/crd/bases/
20+
21+
# Run controller locally against your kubeconfig context
22+
GOFLAGS=-mod=vendor go run . --app=controller
23+
24+
# In another terminal, apply a sample control plane
25+
kubectl apply -f config/samples/coder_v1alpha1_codercontrolplane.yaml
26+
27+
# Verify resource creation
28+
kubectl get codercontrolplanes -A
29+
```
30+
31+
## KIND development cluster (k9s demos)
32+
33+
Bootstrap a KIND cluster and install CRDs/RBAC (**this switches current kubectl context**):
34+
35+
```bash
36+
make kind-dev-up
37+
```
38+
39+
Useful helpers:
40+
41+
```bash
42+
make kind-dev-status
43+
make kind-dev-ctx
44+
make kind-dev-load-image
45+
make kind-dev-k9s
46+
make kind-dev-down
47+
```
48+
49+
## Essential development commands
50+
51+
| Command | Description |
52+
| --- | --- |
53+
| `make build` | Build all packages |
54+
| `make test` | Run unit + integration tests |
55+
| `make test-integration` | Run focused controller integration tests |
56+
| `make manifests` | Generate CRD and RBAC manifests |
57+
| `make codegen` | Run deepcopy generation |
58+
| `make docs-reference` | Regenerate API reference docs from Go types |
59+
| `make docs-check` | Build docs in strict mode (CI-equivalent) |
60+
| `make verify-vendor` | Verify vendored dependency consistency |
61+
| `make lint` | Run linter + formatting checks |
62+
| `make vuln` | Run vulnerability scan |
63+
64+
## Before opening a PR
65+
66+
Run at least:
67+
68+
```bash
69+
make verify-vendor
70+
make test
71+
make build
72+
make lint
73+
make docs-check
74+
```

‎README.md‎

Lines changed: 28 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,26 @@
1111
1212
`coder-k8s` is a Kubernetes control-plane project for managing Coder-related resources with native Kubernetes APIs.
1313

14+
## Documentation
15+
16+
Start with the published docs: **https://coder.github.io/coder-k8s/**
17+
18+
Helpful entry points:
19+
20+
- Getting started: <https://coder.github.io/coder-k8s/tutorials/getting-started/>
21+
- Deploy the controller: <https://coder.github.io/coder-k8s/how-to/deploy-controller/>
22+
- Deploy the workspace/template API server: <https://coder.github.io/coder-k8s/how-to/deploy-aggregated-apiserver/>
23+
- API reference: <https://coder.github.io/coder-k8s/reference/api/codercontrolplane/>
24+
25+
Prefer reading docs in-repo? See [`docs/`](docs/) and run `make docs-serve`.
26+
1427
## What this project provides
1528

1629
- A controller-runtime operator for `coder.com/v1alpha1` resources:
1730
- `CoderControlPlane`
1831
- `CoderProvisioner`
1932
- `CoderWorkspaceProxy`
20-
- An aggregated API server for `aggregation.coder.com/v1alpha1` resources:
33+
- A workspace/template API server for `aggregation.coder.com/v1alpha1` resources:
2134
- `CoderWorkspace`
2235
- `CoderTemplate`
2336
- An MCP HTTP server for operational tooling.
@@ -27,113 +40,35 @@
2740

2841
| Mode | Description | Typical usage |
2942
| --- | --- | --- |
30-
| `all` (default) | Runs controller + aggregated API + MCP HTTP together | Local dev, demos, simple cluster deployment |
31-
| `controller` | Runs only Kubernetes reconcilers | Controller-focused debugging and e2e smoke flows |
32-
| `aggregated-apiserver` | Runs only aggregated API server | Split deployments with explicit Coder backend flags |
43+
| `all` (default) | Runs controller + workspace/template API + MCP HTTP together | Single deployment for evaluation environments |
44+
| `controller` | Runs only Kubernetes reconcilers | Controller-only deployments |
45+
| `aggregated-apiserver` | Runs only the workspace/template API server | Split deployments with dedicated API serving |
3346
| `mcp-http` | Runs only MCP HTTP server | MCP-focused integrations |
3447

35-
## Prerequisites
48+
## Quick start (brief, in-cluster)
3649

37-
- Go 1.25+ (`go.mod` currently declares Go 1.25.7)
38-
- A Kubernetes cluster (OrbStack, KIND, or any conformant cluster)
39-
- `kubectl` configured for your target cluster
40-
41-
## Quick start (local controller run)
50+
For a full setup guide, use the docs links above. For a quick smoke deploy:
4251

4352
```bash
44-
# Generate and apply CRDs
45-
make manifests
53+
kubectl create namespace coder-system
4654
kubectl apply -f config/crd/bases/
47-
48-
# Run controller locally against your kubeconfig context
49-
GOFLAGS=-mod=vendor go run . --app=controller
50-
51-
# In another terminal, apply a sample control plane
52-
kubectl apply -f config/samples/coder_v1alpha1_codercontrolplane.yaml
53-
54-
# Verify resource creation
55-
kubectl get codercontrolplanes -A
56-
```
57-
58-
## Documentation
59-
60-
The project docs follow Diátaxis and live in `docs/`.
61-
62-
- Home: [`docs/index.md`](docs/index.md)
63-
- Tutorial: [`docs/tutorials/getting-started.md`](docs/tutorials/getting-started.md)
64-
- How-to guides: [`docs/how-to/`](docs/how-to/)
65-
- Architecture: [`docs/explanation/architecture.md`](docs/explanation/architecture.md)
66-
- API reference: [`docs/reference/api/`](docs/reference/api/)
67-
68-
Serve docs locally:
69-
70-
```bash
71-
make docs-serve
55+
kubectl apply -f config/rbac/
56+
kubectl apply -f deploy/deployment.yaml
57+
kubectl apply -f deploy/apiserver-service.yaml
58+
kubectl apply -f deploy/apiserver-apiservice.yaml
59+
kubectl apply -f deploy/mcp-service.yaml
60+
kubectl rollout status deployment/coder-k8s -n coder-system
7261
```
7362

7463
## Examples
7564

7665
- [`examples/cloudnativepg/`](examples/cloudnativepg/) — Deploy a `CoderControlPlane` with a CloudNativePG-managed PostgreSQL backend.
7766
- [`examples/argocd/`](examples/argocd/) — Bootstrap CloudNativePG + `coder-k8s` + PostgreSQL + `CoderControlPlane` from one Argo CD `ApplicationSet`.
78-
79-
- [`examples/aggregated/`](examples/aggregated/) - Reusable `CoderTemplate` manifests for aggregated API testing.
80-
81-
## KIND development cluster (k9s demos)
82-
83-
Bootstrap a KIND cluster and install CRDs/RBAC (**this switches current kubectl context**):
84-
85-
```bash
86-
make kind-dev-up
87-
```
88-
89-
Useful helpers:
90-
91-
```bash
92-
make kind-dev-status
93-
make kind-dev-ctx
94-
make kind-dev-load-image
95-
make kind-dev-k9s
96-
make kind-dev-down
97-
```
98-
99-
## Essential commands
100-
101-
| Command | Description |
102-
| --- | --- |
103-
| `make build` | Build all packages |
104-
| `make test` | Run unit + integration tests |
105-
| `make test-integration` | Run focused controller integration tests |
106-
| `make manifests` | Generate CRD and RBAC manifests |
107-
| `make codegen` | Run deepcopy generation |
108-
| `make docs-reference` | Regenerate API reference docs from Go types |
109-
| `make docs-check` | Build docs in strict mode (CI-equivalent) |
110-
| `make verify-vendor` | Verify vendored dependency consistency |
111-
| `make lint` | Run linter + formatting checks |
112-
| `make vuln` | Run vulnerability scan |
113-
114-
## Repository layout
115-
116-
- `api/v1alpha1/` — CRD API types (`coder.com/v1alpha1`)
117-
- `api/aggregation/v1alpha1/` — aggregated API types (`aggregation.coder.com/v1alpha1`)
118-
- `internal/app/` — app mode entrypoints (`allapp`, `controllerapp`, `apiserverapp`, `mcpapp`)
119-
- `internal/controller/` — controller reconcilers
120-
- `internal/aggregated/` — aggregated storage + Coder client/provider logic
121-
- `config/` — generated CRDs, RBAC, samples
122-
- `deploy/` — deployable manifests for all-in-one, APIService, and MCP service
123-
- `docs/` — user-facing documentation site content
124-
- `hack/` — code generation and maintenance scripts
67+
- [`examples/coder-templates/`](examples/coder-templates/) — Reusable `CoderTemplate` manifests for workspace/template API testing.
12568

12669
## Contributing
12770

128-
Before opening a PR, run at least:
129-
130-
```bash
131-
make verify-vendor
132-
make test
133-
make build
134-
make lint
135-
make docs-check
136-
```
71+
For local development workflows, validation commands, and PR guidance, see [CONTRIBUTING.md](./CONTRIBUTING.md).
13772

13873
## License
13974

‎config/samples/coder_v1alpha1_codercontrolplane.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: coder.com/v1alpha1
22
kind: CoderControlPlane
33
metadata:
44
name: codercontrolplane-sample
5-
namespace: default
5+
namespace: coder
66
spec:
77
image: "ghcr.io/coder/coder:latest"
88
# Optional Enterprise license upload:

‎config/samples/coder_v1alpha1_coderprovisioner.yaml‎

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,16 @@
22
#
33
# Prerequisites:
44
# 1. A CoderControlPlane resource must exist in the same namespace.
5-
# 2. Create the bootstrap credentials Secret with a valid Coder session token:
5+
# 2. Operator access on that control plane is enabled and ready.
66
#
7-
# kubectl create secret generic coder-bootstrap-token \
8-
# --namespace=default \
9-
# --from-literal=token=<YOUR_SESSION_TOKEN>
10-
#
11-
# IMPORTANT: Never commit real tokens to source control.
127
apiVersion: coder.com/v1alpha1
138
kind: CoderProvisioner
149
metadata:
1510
name: coderprovisioner-sample
16-
namespace: default
11+
namespace: coder
1712
spec:
1813
controlPlaneRef:
1914
name: codercontrolplane-sample
20-
bootstrap:
21-
credentialsSecretRef:
22-
name: coder-bootstrap-token
23-
key: token
2415
# key:
2516
# name: my-provisioner-key # Provisioner key name in coderd (defaults to CR name)
2617
# secretName: my-key-secret # K8s Secret to store the key (defaults to "{name}-provisioner-key")

‎config/samples/coder_v1alpha1_coderworkspaceproxy.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: coder.com/v1alpha1
22
kind: CoderWorkspaceProxy
33
metadata:
44
name: coderworkspaceproxy-sample
5-
namespace: default
5+
namespace: coder
66
spec:
77
image: "ghcr.io/coder/coder:latest"
88
primaryAccessURL: "https://coder.example.com"

‎docs/index.md‎

Lines changed: 25 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,33 @@
44
**Highly experimental / alpha software**
55
This project is an active prototype. Do not use it in production.
66

7-
`coder-k8s` is a Kubernetes control-plane project for running and managing Coder through Kubernetes APIs.
7+
`coder-k8s` is a Kubernetes control-plane stack for running and managing Coder through Kubernetes APIs.
88

9-
## What is in this repository?
9+
## What you can deploy
1010

1111
`coder-k8s` ships one binary with four app modes:
1212

13-
- **`all` (default)**: controller + aggregated API server + MCP server in one process.
14-
- **`controller`**: reconciles `CoderControlPlane`, `CoderProvisioner`, `CoderWorkspaceProxy` (`coder.com/v1alpha1`).
13+
- **`all` (default)**: operator + workspace/template API server + MCP server in one process.
14+
- **`controller`**: reconciles `CoderControlPlane`, `CoderProvisioner`, and `CoderWorkspaceProxy` (`coder.com/v1alpha1`).
1515
- **`aggregated-apiserver`**: serves `CoderWorkspace` + `CoderTemplate` (`aggregation.coder.com/v1alpha1`).
16-
- **`mcp-http`**: serves MCP tooling over HTTP.
17-
18-
## Documentation map (Diátaxis)
19-
20-
- **Tutorials**: guided learning path
21-
- [Getting started](tutorials/getting-started.md)
22-
- **How-to guides**: task-focused operations
23-
- [Deploy controller](how-to/deploy-controller.md)
24-
- [Deploy aggregated API server](how-to/deploy-aggregated-apiserver.md)
25-
- [Run MCP server](how-to/mcp-server.md)
26-
- [Troubleshooting](how-to/troubleshooting.md)
27-
- **Reference**: generated API reference
28-
- [API reference](reference/api/codercontrolplane.md)
29-
- **Explanation**: conceptual internals
30-
- [Architecture](explanation/architecture.md)
31-
32-
## Quick commands
33-
34-
```bash
35-
make manifests
36-
make test
37-
make build
38-
make docs-serve
39-
```
40-
41-
New here? Start with the [Getting started tutorial](tutorials/getting-started.md).
16+
- **`mcp-http`**: serves operational MCP tooling over HTTP.
17+
18+
## Quick start path
19+
20+
If you want to deploy quickly and validate the end-to-end flow:
21+
22+
1. Follow [Deploy a Coder Control Plane](tutorials/getting-started.md).
23+
2. Verify the managed Coder Deployment and Service.
24+
3. If you need external provisioners, continue with [Deploy an External Provisioner](tutorials/deploy-coderprovisioner.md).
25+
26+
## Learn more
27+
28+
- [Deploy an External Provisioner](tutorials/deploy-coderprovisioner.md)
29+
- [Deploy controller](how-to/deploy-controller.md)
30+
- [Deploy aggregated API server](how-to/deploy-aggregated-apiserver.md)
31+
- [Run MCP server](how-to/mcp-server.md)
32+
- [Troubleshooting](how-to/troubleshooting.md)
33+
- [API reference](reference/api/codercontrolplane.md)
34+
- [Architecture](explanation/architecture.md)
35+
36+
Start with [Deploy a Coder Control Plane](tutorials/getting-started.md).

0 commit comments

Comments
 (0)