Skip to content

Commit 4a7e191

Browse files
authored
🤖 feat: add docs site, Pages deploy, and docs quality checks (#19)
## Summary Add a Diátaxis-based MkDocs documentation site and automate GitHub Pages deployment. Also add docs quality gates in CI for markdown linting, spelling, and dead links. ## Background The repository did not yet have a dedicated docs site or CI checks focused on docs quality. This change adds a structured docs experience and keeps docs quality/regression checks consistent whenever docs are updated. ## Implementation - Added MkDocs Material site scaffolding under `docs/` with Diátaxis sections. - Added `mkdocs.yml` and local docs tooling via `flake.nix` and Make targets. - Added docs deployment workflow for GitHub Pages. - Added docs-quality CI checks: - `markdownlint-cli2` - `cspell` - `lychee` (external dead-link check) - Added `.cspell.json` and `.markdownlint-cli2.yaml` config files. - Updated `AGENTS.md` and `README.md` to reflect docs workflow expectations. ## Validation - `make verify-vendor` - `make test` - `make build` - `make lint` - `go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.10` - `make docs-check` - `npx --yes markdownlint-cli2@0.18.1 "docs/**/*.md"` - `npx --yes cspell@8.19.4 --no-progress --config .cspell.json "docs/**/*.md" "mkdocs.yml"` - `docker run --rm -v "$PWD":/repo lycheeverse/lychee:latest --verbose --no-progress --accept 200,429 --max-retries 2 --retry-wait-time 2 /repo/docs/**/*.md` ## Risks - Low-to-moderate operational risk: docs CI now includes external link checking, which may intermittently fail due to remote endpoint behavior/rate limits. --- <details> <summary>📋 Implementation Plan</summary> # Plan: Deploy Diátaxis docs to GitHub Pages (MkDocs Material) ## Context / Why You want to add a documentation site for `coder-k8s` that: - Is **deployed to GitHub Pages** automatically. - Uses the **Diátaxis** information architecture (Tutorials / How‑to / Reference / Explanation). - Uses **CLIs directly** for local authoring (no Docker wrapper), assuming they’re available via the **Nix devshell**. The repo currently has developer onboarding in `README.md` and deeper architecture notes in `AGENTS.md`, but **no docs site scaffolding**. <details> <summary>Why I’m planning around MkDocs Material (not Docusaurus)</summary> - Fits “docs-as-code” repos well (Markdown-first, minimal moving parts). - Easy to run locally via a single `mkdocs` CLI. - Common in Kubernetes-adjacent projects. - Diátaxis is tooling-agnostic; MkDocs nav maps cleanly to its quadrants. (If you decide you *must* have React/MDX, versioned docs, or heavy UI customization, Docusaurus becomes more compelling—but it adds a Node toolchain to a Go repo.) </details> ## Evidence (what I verified) - No existing docs site scaffolding/config (per explore report + repo inspection): - No `docs/` directory. - No `mkdocs.yml` / Docusaurus config. - No GitHub Pages workflow dedicated to docs. - Current devshell (`flake.nix`) is present and minimal (Go + common CLIs only). (See `flake.nix` + `flake.lock`.) - `Makefile` has no docs targets; it already uses “install via nix develop” checks for tools like `golangci-lint` / `govulncheck`. (See `Makefile`.) - CI enforces GitHub Actions linting and security scanning via **actionlint** + **zizmor**, and actions are SHA-pinned. (See `.github/workflows/ci.yaml`.) ## Implementation plan ### 1) Add a Diátaxis docs skeleton Create a new `docs/` tree organized by Diátaxis quadrants: - `docs/index.md` – landing page with “Start here” + links to each quadrant. - `docs/tutorials/` – learning-oriented, end-to-end walkthroughs. - `docs/how-to/` – task-oriented guides (deploy, upgrade, troubleshoot). - `docs/reference/` – factual reference (CRDs/APIs, flags, config). - `docs/explanation/` – concepts, architecture, design decisions. Seed initial pages by **moving/rewriting** existing content: - Convert `README.md` quickstart into `docs/tutorials/getting-started.md`. - Convert user-relevant parts of `AGENTS.md` (architecture, app modes) into `docs/explanation/architecture.md` (avoid agent/PR workflow parts). - Add deployment docs that explain what’s in `deploy/` and `config/*`: - `docs/how-to/deploy-controller.md` - `docs/how-to/deploy-aggregated-apiserver.md` - Add a first reference page that links to the CRD YAML and Go types: - `docs/reference/api/codercontrolplane.md` - `docs/reference/api/coderworkspace.md` - `docs/reference/api/codertemplate.md` > Keep the Diátaxis rule strict: tutorials = guided learning, how-to = recipes, reference = “what is X”, explanation = “why/how it works”. ### 2) Configure MkDocs Material (`mkdocs.yml`) Add `mkdocs.yml` at repo root. Key requirements: - Material theme with search + good navigation. - Nav reflects Diátaxis quadrants as **top-level tabs**. - Enable Markdown extensions used by Material (admonitions, details, fenced code, Mermaid). Minimal config shape (tweak as needed): ```yaml site_name: coder-k8s repo_url: https://github.com/coder/coder-k8s edit_uri: edit/main/docs/ theme: name: material features: - navigation.tabs - navigation.sections - content.action.edit - search.suggest - search.highlight markdown_extensions: - admonition - pymdownx.details - pymdownx.superfences - pymdownx.tabbed: alternate_style: true - toc: permalink: true plugins: - search nav: - Home: index.md - Tutorials: - Getting started: tutorials/getting-started.md - How-to guides: - Deploy controller: how-to/deploy-controller.md - Deploy aggregated API server: how-to/deploy-aggregated-apiserver.md - Troubleshooting: how-to/troubleshooting.md - Reference: - API: - CoderControlPlane: reference/api/codercontrolplane.md - CoderWorkspace: reference/api/coderworkspace.md - CoderTemplate: reference/api/codertemplate.md - Explanation: - Architecture: explanation/architecture.md ``` <details> <summary>Optional MkDocs enhancements (keep out of v1 if you want minimal scope)</summary> - Add `git-revision-date-localized` plugin to show “Last updated”. - Add `mkdocs-minify-plugin` for smaller assets. - Add `mkdocs-redirects` if you expect lots of restructuring. Each optional plugin should also be added to the Nix python environment and CI install step. </details> ### 3) Update Nix devshell (`flake.nix`) to provide the docs toolchain Goal: inside `nix develop`, contributors can run `mkdocs` directly. Update `flake.nix` `devShells.default.packages` to include a Python environment with: - `mkdocs` - `mkdocs-material` - `pymdown-extensions` Prefer a single `python3.withPackages` environment so `mkdocs` can import the theme/plugins: ```nix # flake.nix (inside `let pkgs = ...; in { default = pkgs.mkShell { ... } }`) let docsPython = pkgs.python3.withPackages (ps: [ ps.mkdocs ps."mkdocs-material" ps."pymdown-extensions" ]); in pkgs.mkShell { packages = with pkgs; [ go gnumake git goreleaser actionlint zizmor golangci-lint govulncheck docsPython ]; } ``` Notes: - Nix attribute names for python packages sometimes require quoting (e.g. `ps."mkdocs-material"`). - Keep the devshell lean; only add plugins that are actually enabled in `mkdocs.yml`. ### 4) Add Makefile targets that use the CLI (no Docker) Add docs targets that match the repo’s “tool missing → use nix develop” pattern: ```make .PHONY: docs-serve docs-build docs-check docs-serve: @command -v mkdocs >/dev/null || (echo "mkdocs not found; use nix develop" && exit 1) mkdocs serve docs-build: @command -v mkdocs >/dev/null || (echo "mkdocs not found; use nix develop" && exit 1) mkdocs build docs-check: @command -v mkdocs >/dev/null || (echo "mkdocs not found; use nix develop" && exit 1) mkdocs build --strict ``` Also update `README.md` “Essential commands” to include `make docs-serve` / `make docs-check`. ### 5) Ignore build output Update `.gitignore` to ignore MkDocs output and caches: - `site/` - `.cache/` (if it shows up in practice) ### 6) GitHub Pages deployment workflow Add a dedicated workflow: `.github/workflows/docs.yaml`. Requirements: - On **PRs**: build docs (no deploy) so broken docs fail fast. - On **push to main**: build + deploy to GitHub Pages. - Use **SHA-pinned** actions (repo policy) and pass `actionlint` + `zizmor`. - Use minimal permissions; only the deploy job should get `pages:write` + `id-token:write`. Recommended approach (modern Pages deployment, no `gh-pages` branch): ```yaml name: Docs on: pull_request: paths: - docs/** - mkdocs.yml push: branches: [main] paths: - docs/** - mkdocs.yml jobs: build: runs-on: depot-ubuntu-24.04 permissions: contents: read steps: - uses: actions/checkout@<sha> # pin - uses: actions/setup-python@<sha> # pin with: python-version: '3.x' cache: pip - run: pip install mkdocs-material - run: mkdocs build --strict - uses: actions/upload-pages-artifact@<sha> # pin if: github.ref == 'refs/heads/main' with: path: site deploy: if: github.ref == 'refs/heads/main' needs: build runs-on: depot-ubuntu-24.04 permissions: pages: write id-token: write environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} steps: - uses: actions/deploy-pages@<sha> # pin id: deployment ``` Notes: - Keep the deploy job separate so permissions stay tight. - If you add plugins beyond `mkdocs-material`, either: - add them to the `pip install ...` line, or - introduce a `docs/requirements.txt` and `pip install -r docs/requirements.txt`. Manual repo setting (one-time): set GitHub Pages source to **GitHub Actions**. ### 7) Validation checklist (what to run locally) - `nix develop` then: - `mkdocs --version` (sanity) - `make docs-check` (ensures `--strict` build passes) - `make docs-serve` and open the local site - Lint workflows if you changed them: - `go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.10` - `zizmor --help` / `zizmor` equivalent (or rely on CI) ## Deliverables (files that will change) - `docs/**` (new) - `mkdocs.yml` (new) - `flake.nix` (update devshell packages) - `Makefile` (add docs targets) - `.gitignore` (ignore MkDocs output) - `.github/workflows/docs.yaml` (new) - `README.md` (link to docs + new make targets) </details> --- _Generated with [`mux`](https://github.com/coder/mux) • Model: `openai:gpt-5.3-codex` • Thinking: `xhigh` • Cost: `$0.55`_ <!-- mux-attribution: model=openai:gpt-5.3-codex thinking=xhigh costs=0.55 -->
1 parent 1eba173 commit 4a7e191

20 files changed

Lines changed: 628 additions & 3 deletions

.cspell.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"version": "0.2",
3+
"language": "en",
4+
"words": [
5+
"Diátaxis",
6+
"GOFLAGS",
7+
"apiregistration",
8+
"apiserverapp",
9+
"apiserver",
10+
"apiservice",
11+
"clusterrole",
12+
"clusterrolebinding",
13+
"coder-k8s",
14+
"codercontrolplane",
15+
"codercontrolplanes",
16+
"codertemplate",
17+
"codertemplates",
18+
"coderworkspace",
19+
"coderworkspaces",
20+
"controllerapp",
21+
"devshell",
22+
"gofumpt",
23+
"javascripts",
24+
"kubeconfig",
25+
"kubebuilder",
26+
"metav",
27+
"mkdocs",
28+
"pymdownx",
29+
"superfences"
30+
],
31+
"ignorePaths": [
32+
".git/**",
33+
"node_modules/**",
34+
"site/**",
35+
"vendor/**"
36+
]
37+
}

.github/workflows/docs.yaml

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
name: Docs
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- docs/**
7+
- mkdocs.yml
8+
- .cspell.json
9+
- .markdownlint-cli2.yaml
10+
- .github/workflows/docs.yaml
11+
push:
12+
branches: [main]
13+
paths:
14+
- docs/**
15+
- mkdocs.yml
16+
- .cspell.json
17+
- .markdownlint-cli2.yaml
18+
- .github/workflows/docs.yaml
19+
workflow_dispatch:
20+
21+
permissions:
22+
contents: read
23+
24+
concurrency:
25+
group: github-pages
26+
cancel-in-progress: false
27+
28+
jobs:
29+
docs-quality:
30+
runs-on: depot-ubuntu-24.04
31+
timeout-minutes: 15
32+
steps:
33+
- name: Checkout
34+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
35+
with:
36+
persist-credentials: false
37+
38+
- name: Set up Node.js
39+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
40+
with:
41+
node-version: '22'
42+
43+
- name: Install docs lint tools
44+
run: npm install --global cspell@8.19.4 markdownlint-cli2@0.18.1
45+
46+
- name: Lint Markdown
47+
run: markdownlint-cli2 "docs/**/*.md"
48+
49+
- name: Spell-check docs
50+
run: cspell --no-progress --config .cspell.json "docs/**/*.md" "mkdocs.yml"
51+
52+
- name: Check links (including external)
53+
uses: lycheeverse/lychee-action@885c65f3dc543b57c898c8099f4e08c8afd178a2 # v2.6.1
54+
with:
55+
fail: true
56+
args: >-
57+
--verbose
58+
--no-progress
59+
--accept 200,429
60+
--max-retries 2
61+
--retry-wait-time 2
62+
--exclude '^https://github.com/coder/coder-k8s$'
63+
docs/*.md docs/*/*.md docs/*/*/*.md
64+
mkdocs.yml
65+
env:
66+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
67+
68+
build:
69+
if: github.event_name == 'pull_request'
70+
needs: docs-quality
71+
runs-on: depot-ubuntu-24.04
72+
timeout-minutes: 10
73+
steps:
74+
- name: Checkout
75+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
76+
with:
77+
persist-credentials: false
78+
79+
- name: Set up Python
80+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
81+
with:
82+
python-version: '3.x'
83+
cache: pip
84+
cache-dependency-path: docs/requirements.txt
85+
86+
- name: Install dependencies
87+
run: |
88+
python -m pip install --upgrade pip
89+
pip install -r docs/requirements.txt
90+
91+
- name: Build docs (strict)
92+
run: mkdocs build --strict
93+
94+
deploy:
95+
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
96+
needs: docs-quality
97+
runs-on: depot-ubuntu-24.04
98+
timeout-minutes: 10
99+
permissions:
100+
contents: read
101+
pages: write
102+
id-token: write
103+
environment:
104+
name: github-pages
105+
url: ${{ steps.deployment.outputs.page_url }}
106+
steps:
107+
- name: Checkout
108+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
109+
with:
110+
persist-credentials: false
111+
112+
- name: Set up Pages
113+
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0
114+
115+
- name: Set up Python
116+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
117+
with:
118+
python-version: '3.x'
119+
cache: pip
120+
cache-dependency-path: docs/requirements.txt
121+
122+
- name: Install dependencies
123+
run: |
124+
python -m pip install --upgrade pip
125+
pip install -r docs/requirements.txt
126+
127+
- name: Build docs (strict)
128+
run: mkdocs build --strict
129+
130+
- name: Upload Pages artifact
131+
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
132+
with:
133+
path: site
134+
135+
- name: Deploy to GitHub Pages
136+
id: deployment
137+
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,7 @@
1212

1313
# Temporary external clones/forks
1414
/tmpfork/
15+
16+
# MkDocs
17+
/site/
18+
/.cache/

.markdownlint-cli2.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
config:
2+
default: true
3+
MD013: false

AGENTS.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ Run from repository root.
6666
- **Vendor consistency:** `make verify-vendor`
6767
- **Manifest generation:** `make manifests` (or `bash ./hack/update-manifests.sh`)
6868
- **Code generation:** `make codegen` (or `bash ./hack/update-codegen.sh`)
69+
- **Docs (serve):** `make docs-serve`
70+
- **Docs (strict build):** `make docs-check`
6971
- **Clean:** `go clean -cache -testcache && rm -f ./coder-k8s && rm -rf ./dist`
7072
- **Shell scripts:** `find . -type f -name '*.sh' -not -path './vendor/*'`
7173

@@ -89,6 +91,9 @@ Run from repository root.
8991
- **Do** keep controller, aggregated API server, and storage changes paired with focused tests (`main_test.go`, `internal/controller/*_test.go`, and package tests under `internal/app/`/`internal/aggregated/`).
9092
**Don’t** add behavior without coverage for critical assumptions.
9193

94+
- **Do** update the docs in `docs/` when you change user-facing behavior (APIs, flags, manifests, deployment).
95+
**Don’t** let docs drift from the implementation.
96+
9297
## Anti-patterns
9398

9499
- Unpinned GitHub Action versions in workflow files (CI uses SHA-pinned actions).
@@ -111,6 +116,8 @@ Run from repository root.
111116
4. Run `make lint` (or explain why it was skipped).
112117
5. If API types changed, run `make codegen` and `make manifests`, then include generated updates.
113118
6. If `.github/workflows/*` changed, run `go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.10`.
119+
7. If your change affects user-facing behavior (APIs, flags, manifests, deployment), update the documentation in `docs/` and run `make docs-check`.
120+
114121

115122
### Commit messages
116123
- Match repository history style: short imperative summary, optionally prefixed by type (e.g., `chore: ...`).

Makefile

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ MODULE_FILES := go.mod $(wildcard go.sum)
44
ENVTEST_K8S_VERSION ?= 1.35.x
55
ENVTEST_ASSETS_DIR := $(shell pwd)/bin/envtest
66

7-
.PHONY: vendor test test-integration setup-envtest build lint vuln verify-vendor codegen manifests
7+
.PHONY: vendor test test-integration setup-envtest build lint vuln verify-vendor codegen manifests docs-serve docs-build docs-check
88

99
$(VENDOR_STAMP): $(MODULE_FILES)
1010
go mod tidy
@@ -47,3 +47,16 @@ manifests: $(VENDOR_STAMP)
4747

4848
codegen: $(VENDOR_STAMP)
4949
bash ./hack/update-codegen.sh
50+
51+
52+
docs-serve:
53+
@command -v mkdocs >/dev/null || (echo "mkdocs not found; use nix develop" && exit 1)
54+
mkdocs serve
55+
56+
docs-build:
57+
@command -v mkdocs >/dev/null || (echo "mkdocs not found; use nix develop" && exit 1)
58+
mkdocs build
59+
60+
docs-check:
61+
@command -v mkdocs >/dev/null || (echo "mkdocs not found; use nix develop" && exit 1)
62+
mkdocs build --strict

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22

33
## Project description
44

5-
`coder-k8s` is a Go-based Kubernetes operator for managing `CoderControlPlane` resources (`coder.com/v1alpha1`). It is built with `sigs.k8s.io/controller-runtime`.
5+
`coder-k8s` is a Go-based Kubernetes control-plane project with two app modes:
6+
7+
- A `controller-runtime` operator for managing `CoderControlPlane` resources (`coder.com/v1alpha1`).
8+
- An aggregated API server for `CoderWorkspace` and `CoderTemplate` resources (`aggregation.coder.com/v1alpha1`).
69

710
## Prerequisites
811

@@ -20,7 +23,7 @@ make manifests
2023
kubectl apply -f config/crd/bases/
2124

2225
# Run the controller locally (uses your kubeconfig context)
23-
GOFLAGS=-mod=vendor go run .
26+
GOFLAGS=-mod=vendor go run . --app=controller
2427

2528
# In another terminal: apply the sample CR
2629
kubectl apply -f config/samples/coder_v1alpha1_codercontrolplane.yaml
@@ -40,6 +43,8 @@ kubectl get codercontrolplanes -A
4043
| `make verify-vendor` | Verify vendor consistency |
4144
| `make lint` | Run linter (requires `golangci-lint`) |
4245
| `make vuln` | Run vulnerability check (requires `govulncheck`) |
46+
| `make docs-serve` | Serve the documentation site locally (requires `mkdocs`) |
47+
| `make docs-check` | Build docs in strict mode (CI-equivalent) |
4348

4449
## Testing strategy
4550

docs/explanation/architecture.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Architecture
2+
3+
`coder-k8s` builds a single binary (`coder-k8s`) that can run in one of two modes:
4+
5+
- `--app=controller`
6+
- `--app=aggregated-apiserver`
7+
8+
The dispatch logic lives in `app_dispatch.go`. The `--app` flag is required, and the code intentionally fails fast with an `assertion failed:` error when it is missing or invalid.
9+
10+
## Controller mode
11+
12+
In controller mode, the binary runs a `controller-runtime` manager and registers the `CoderControlPlane` API types:
13+
14+
- API group: `coder.com/v1alpha1`
15+
- Kind: `CoderControlPlane`
16+
17+
Key code paths:
18+
19+
- `internal/app/controllerapp/` — scheme construction and manager startup
20+
- `internal/controller/` — reconciliation logic (`CoderControlPlaneReconciler`)
21+
22+
## Aggregated API server mode
23+
24+
In aggregated API server mode, the binary starts an aggregated API server that installs storage for:
25+
26+
- API group: `aggregation.coder.com/v1alpha1`
27+
- Resources: `coderworkspaces`, `codertemplates`
28+
29+
Key code paths:
30+
31+
- `internal/app/apiserverapp/` — API server bootstrap and API group installation
32+
- `internal/aggregated/storage/` — storage implementations (currently hardcoded in-memory objects)
33+
34+
## Manifests and generated assets
35+
36+
- `config/` — generated CRDs and RBAC (via `make manifests`)
37+
- `deploy/` — example deployment manifests for controller and aggregated API server
38+
- `vendor/` — vendored dependencies (required by the repo workflow)
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Deploy the aggregated API server (in-cluster)
2+
3+
This guide shows how to deploy the `coder-k8s` **aggregated API server** and register it with the Kubernetes API aggregation layer.
4+
5+
The aggregated API server serves:
6+
7+
- API group: `aggregation.coder.com`
8+
- Version: `v1alpha1`
9+
- Resources: `coderworkspaces`, `codertemplates`
10+
11+
## 1. Create the namespace
12+
13+
```bash
14+
kubectl create namespace coder-system
15+
```
16+
17+
## 2. Apply RBAC
18+
19+
The RBAC manifest includes service accounts for both the controller and the aggregated API server.
20+
21+
```bash
22+
kubectl apply -f deploy/rbac.yaml
23+
```
24+
25+
## 3. Deploy the service and deployment
26+
27+
```bash
28+
kubectl apply -f deploy/apiserver-service.yaml
29+
kubectl apply -f deploy/apiserver-deployment.yaml
30+
```
31+
32+
## 4. Register the APIService
33+
34+
```bash
35+
kubectl apply -f deploy/apiserver-apiservice.yaml
36+
```
37+
38+
## 5. Verify
39+
40+
Wait for the deployment:
41+
42+
```bash
43+
kubectl rollout status deployment/coder-k8s-apiserver -n coder-system
44+
```
45+
46+
Check the APIService:
47+
48+
```bash
49+
kubectl get apiservice v1alpha1.aggregation.coder.com
50+
```
51+
52+
List resources served by the aggregated API server:
53+
54+
```bash
55+
kubectl get coderworkspaces.aggregation.coder.com -A
56+
kubectl get codertemplates.aggregation.coder.com -A
57+
```
58+
59+
## TLS note
60+
61+
`deploy/apiserver-apiservice.yaml` currently sets `insecureSkipTLSVerify: true`, which is convenient for development but not appropriate for production.

0 commit comments

Comments
 (0)