|
11 | 11 |
|
12 | 12 | `coder-k8s` is a Kubernetes control-plane project for managing Coder-related resources with native Kubernetes APIs. |
13 | 13 |
|
| 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 | + |
14 | 27 | ## What this project provides |
15 | 28 |
|
16 | 29 | - A controller-runtime operator for `coder.com/v1alpha1` resources: |
17 | 30 | - `CoderControlPlane` |
18 | 31 | - `CoderProvisioner` |
19 | 32 | - `CoderWorkspaceProxy` |
20 | | -- An aggregated API server for `aggregation.coder.com/v1alpha1` resources: |
| 33 | +- A workspace/template API server for `aggregation.coder.com/v1alpha1` resources: |
21 | 34 | - `CoderWorkspace` |
22 | 35 | - `CoderTemplate` |
23 | 36 | - An MCP HTTP server for operational tooling. |
|
27 | 40 |
|
28 | 41 | | Mode | Description | Typical usage | |
29 | 42 | | --- | --- | --- | |
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 | |
33 | 46 | | `mcp-http` | Runs only MCP HTTP server | MCP-focused integrations | |
34 | 47 |
|
35 | | -## Prerequisites |
| 48 | +## Quick start (brief, in-cluster) |
36 | 49 |
|
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: |
42 | 51 |
|
43 | 52 | ```bash |
44 | | -# Generate and apply CRDs |
45 | | -make manifests |
| 53 | +kubectl create namespace coder-system |
46 | 54 | 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 |
72 | 61 | ``` |
73 | 62 |
|
74 | 63 | ## Examples |
75 | 64 |
|
76 | 65 | - [`examples/cloudnativepg/`](examples/cloudnativepg/) — Deploy a `CoderControlPlane` with a CloudNativePG-managed PostgreSQL backend. |
77 | 66 | - [`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. |
125 | 68 |
|
126 | 69 | ## Contributing |
127 | 70 |
|
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). |
137 | 72 |
|
138 | 73 | ## License |
139 | 74 |
|
|
0 commit comments