-
Notifications
You must be signed in to change notification settings - Fork 3
🤖 refactor: refocus docs for product deployment flow #78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
09fa6a0
🤖 docs: refocus product docs and tutorial flow
ThomasK33 4c44ad6
🤖 fix: satisfy docs-quality spell check in provisioner tutorial
ThomasK33 e232bc6
🤖 docs: align Argo CD tutorial naming with tutorial set
ThomasK33 3597579
🤖 docs: create coder namespace in contributing quick start
ThomasK33 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| # Contributing to coder-k8s | ||
|
|
||
| Thanks for contributing to `coder-k8s`. | ||
|
|
||
| > [!NOTE] | ||
| > The root [`README.md`](./README.md) is end-user focused. This guide contains local development and contribution workflows. | ||
|
|
||
| ## Development prerequisites | ||
|
|
||
| - Go 1.25+ (`go.mod` currently declares Go 1.25.7) | ||
| - A Kubernetes cluster (OrbStack, KIND, or any conformant cluster) | ||
| - `kubectl` configured for your target cluster | ||
|
|
||
| ## Local development quick start (controller mode) | ||
|
|
||
| ```bash | ||
| # Generate and apply CRDs | ||
| make manifests | ||
| kubectl apply -f config/crd/bases/ | ||
|
|
||
| # Run controller locally against your kubeconfig context | ||
| GOFLAGS=-mod=vendor go run . --app=controller | ||
|
|
||
| # In another terminal, create the sample namespace and apply a sample control plane | ||
| kubectl create namespace coder | ||
| kubectl apply -f config/samples/coder_v1alpha1_codercontrolplane.yaml | ||
|
|
||
| # Verify resource creation | ||
| kubectl get codercontrolplanes -A | ||
| ``` | ||
|
|
||
| ## KIND development cluster (k9s demos) | ||
|
|
||
| Bootstrap a KIND cluster and install CRDs/RBAC (**this switches current kubectl context**): | ||
|
|
||
| ```bash | ||
| make kind-dev-up | ||
| ``` | ||
|
|
||
| Useful helpers: | ||
|
|
||
| ```bash | ||
| make kind-dev-status | ||
| make kind-dev-ctx | ||
| make kind-dev-load-image | ||
| make kind-dev-k9s | ||
| make kind-dev-down | ||
| ``` | ||
|
|
||
| ## Essential development commands | ||
|
|
||
| | Command | Description | | ||
| | --- | --- | | ||
| | `make build` | Build all packages | | ||
| | `make test` | Run unit + integration tests | | ||
| | `make test-integration` | Run focused controller integration tests | | ||
| | `make manifests` | Generate CRD and RBAC manifests | | ||
| | `make codegen` | Run deepcopy generation | | ||
| | `make docs-reference` | Regenerate API reference docs from Go types | | ||
| | `make docs-check` | Build docs in strict mode (CI-equivalent) | | ||
| | `make verify-vendor` | Verify vendored dependency consistency | | ||
| | `make lint` | Run linter + formatting checks | | ||
| | `make vuln` | Run vulnerability scan | | ||
|
|
||
| ## Before opening a PR | ||
|
|
||
| Run at least: | ||
|
|
||
| ```bash | ||
| make verify-vendor | ||
| make test | ||
| make build | ||
| make lint | ||
| make docs-check | ||
| ``` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| # Deploy an External Provisioner | ||
|
|
||
| This tutorial deploys a `CoderProvisioner` for an existing `CoderControlPlane` managed by `coder-k8s`. | ||
|
|
||
| Estimated time: **5 minutes**. | ||
|
|
||
| ## Prerequisite | ||
|
|
||
| Complete [Deploy a Coder Control Plane](getting-started.md) first. | ||
|
|
||
| This tutorial assumes the setup from that guide: | ||
|
|
||
| - `CoderControlPlane` **`codercontrolplane-sample`** exists in namespace **`coder`** and is `Ready`. | ||
| - Operator access is enabled and ready (default behavior): | ||
| `.status.operatorAccessReady=true`. | ||
|
|
||
| Quick check: | ||
|
|
||
| ```bash | ||
| kubectl get codercontrolplane codercontrolplane-sample -n coder \ | ||
| -o jsonpath='{.status.phase}{"\n"}{.status.operatorAccessReady}{"\n"}' | ||
| ``` | ||
|
|
||
| Expected output: | ||
|
|
||
| ```text | ||
| Ready | ||
| true | ||
| ``` | ||
|
|
||
| ## 1) Confirm external provisioner entitlement | ||
|
|
||
| `CoderProvisioner` requires external provisioner entitlement in the referenced Coder deployment. | ||
|
|
||
| ```bash | ||
| kubectl get codercontrolplane codercontrolplane-sample -n coder \ | ||
| -o jsonpath='{.status.externalProvisionerDaemonsEntitlement}{"\n"}' | ||
| ``` | ||
|
|
||
| Expected values to proceed: `entitled` or `grace_period`. | ||
|
|
||
| If the value is `not_entitled`, update the control-plane license before continuing. | ||
|
|
||
| ## 2) Deploy the `CoderProvisioner` | ||
|
|
||
| Apply the sample manifest: | ||
|
|
||
| ```bash | ||
| kubectl apply -f "https://raw.githubusercontent.com/coder/coder-k8s/main/config/samples/coder_v1alpha1_coderprovisioner.yaml" | ||
| ``` | ||
|
|
||
| ## 3) Verify reconciliation | ||
|
|
||
| ```bash | ||
| kubectl get coderprovisioner coderprovisioner-sample -n coder | ||
| kubectl get coderprovisioner coderprovisioner-sample -n coder -o jsonpath='{.status.phase}{"\n"}' | ||
| kubectl get coderprovisioner coderprovisioner-sample -n coder -o jsonpath='{range .status.conditions[*]}{.type}={.status} {.reason}{"\n"}{end}' | ||
| ``` | ||
|
|
||
| Verify generated resources: | ||
|
|
||
| ```bash | ||
| kubectl get deployment provisioner-coderprovisioner-sample -n coder | ||
| kubectl get sa coderprovisioner-sample-provisioner -n coder | ||
| kubectl get role provisioner-coderprovisioner-sample -n coder | ||
| kubectl get rb provisioner-coderprovisioner-sample -n coder | ||
| kubectl get secret coderprovisioner-sample-provisioner-key -n coder | ||
| ``` | ||
|
|
||
| Expected: `status.phase=Ready`, `DeploymentReady=True`, and a ready provisioner pod. | ||
|
|
||
| ## 4) Clean up (optional) | ||
|
|
||
| ```bash | ||
| kubectl delete coderprovisioner coderprovisioner-sample -n coder | ||
| ``` | ||
|
|
||
| To tear down the full stack, follow cleanup in | ||
| [Deploy a Coder Control Plane](getting-started.md#5-clean-up-optional). |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.