Commit ccfe0eb
authored
🤖 feat: remove provisioner bootstrap credentials (#79)
## Summary
Remove `CoderProvisioner` bootstrap credential configuration
(`spec.bootstrap.credentialsSecretRef`) and make provisioner key
management rely exclusively on operator-managed access from the
referenced `CoderControlPlane` status.
## Background
`CoderProvisioner` accepted user-supplied bootstrap tokens while
`CoderControlPlane` now manages an operator token lifecycle. This change
aligns provisioner reconciliation with the operator-managed token source
and removes duplicate credential wiring in v1alpha1.
## Implementation
- API/schema
- Removed `CoderProvisionerBootstrapSpec`
- Removed `CoderProvisionerSpec.Bootstrap`
- Replaced `CoderProvisionerConditionBootstrapSecretReady` with
`CoderProvisionerConditionOperatorAccessReady`
- Regenerated deepcopy and CRD artifacts
- Controller behavior
- Provisioner reconciliation now resolves session token only from
referenced control plane status:
- `status.operatorAccessReady == true`
- `status.operatorTokenSecretRef` present and valid
- Added explicit condition reasons/messages and requeue behavior for
not-ready/missing/invalid token-ref states
- Kept defensive assertion style and best-effort deletion semantics
- Samples/docs
- Updated provisioner sample to remove `spec.bootstrap`
- Kept sample namespace as `coder`
- Regenerated API reference docs for `CoderProvisioner`
- Tests
- Removed provisioner bootstrap secret setup assumptions
- Added/updated coverage for:
- operator access ready path
- operator access not ready
- missing/invalid `operatorTokenSecretRef`
## Validation
- `make verify-vendor`
- `make test`
- `make build`
- `make lint`
- `make codegen`
- `make manifests`
- `KUBEBUILDER_ASSETS="$(GOFLAGS=-mod=vendor go run
./vendor/sigs.k8s.io/controller-runtime/tools/setup-envtest use 1.35.x
--bin-dir $(pwd)/bin/envtest -p path)" GOFLAGS=-mod=vendor go test
./internal/controller/...`
- `mkdocs build --strict`
## Risks
- **Backward-incompatible API behavior for v1alpha1**: clients/manifests
still setting `spec.bootstrap` on `CoderProvisioner` must be updated.
- Runtime dependency is now explicitly on referenced `CoderControlPlane`
operator access status/secret ref readiness.
- `CoderWorkspaceProxy` bootstrap credential semantics were
intentionally left unchanged.
---
_Generated with [`mux`](https://github.com/coder/mux) • Model:
`$MUX_MODEL_STRING` • Thinking: `$MUX_THINKING_LEVEL` • Cost:
`$$MUX_COSTS_USD`_
<!-- mux-attribution: model=$MUX_MODEL_STRING
thinking=$MUX_THINKING_LEVEL costs=$MUX_COSTS_USD -->1 parent c82ff7c commit ccfe0eb
File tree
9 files changed
+271
-227
lines changed- api/v1alpha1
- config
- crd/bases
- samples
- docs
- reference/api
- tutorials
- internal/controller
9 files changed
+271
-227
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | 36 | | |
43 | 37 | | |
44 | 38 | | |
| |||
55 | 49 | | |
56 | 50 | | |
57 | 51 | | |
| 52 | + | |
| 53 | + | |
58 | 54 | | |
59 | 55 | | |
60 | 56 | | |
61 | 57 | | |
62 | | - | |
63 | | - | |
64 | 58 | | |
65 | 59 | | |
66 | 60 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | 53 | | |
75 | | - | |
76 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
77 | 58 | | |
78 | 59 | | |
79 | 60 | | |
| |||
369 | 350 | | |
370 | 351 | | |
371 | 352 | | |
372 | | - | |
373 | 353 | | |
374 | 354 | | |
375 | 355 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
| 5 | + | |
| 6 | + | |
12 | 7 | | |
13 | 8 | | |
14 | 9 | | |
15 | 10 | | |
16 | | - | |
| 11 | + | |
17 | 12 | | |
18 | 13 | | |
19 | 14 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | 15 | | |
25 | 16 | | |
26 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | | - | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
| |||
45 | 44 | | |
46 | 45 | | |
47 | 46 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | 47 | | |
57 | 48 | | |
58 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
37 | 43 | | |
38 | 44 | | |
39 | 45 | | |
| |||
58 | 64 | | |
59 | 65 | | |
60 | 66 | | |
61 | | - | |
| 67 | + | |
62 | 68 | | |
63 | 69 | | |
64 | 70 | | |
65 | 71 | | |
66 | 72 | | |
67 | | - | |
| 73 | + | |
68 | 74 | | |
69 | 75 | | |
70 | 76 | | |
71 | 77 | | |
72 | 78 | | |
73 | | - | |
| 79 | + | |
74 | 80 | | |
75 | 81 | | |
76 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
171 | 172 | | |
172 | 173 | | |
173 | 174 | | |
174 | | - | |
| 175 | + | |
175 | 176 | | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
176 | 180 | | |
177 | 181 | | |
178 | | - | |
| 182 | + | |
179 | 183 | | |
180 | | - | |
181 | | - | |
| 184 | + | |
| 185 | + | |
182 | 186 | | |
183 | 187 | | |
184 | | - | |
| 188 | + | |
185 | 189 | | |
186 | 190 | | |
187 | 191 | | |
188 | | - | |
| 192 | + | |
189 | 193 | | |
190 | | - | |
191 | | - | |
| 194 | + | |
| 195 | + | |
192 | 196 | | |
193 | 197 | | |
194 | 198 | | |
| |||
643 | 647 | | |
644 | 648 | | |
645 | 649 | | |
646 | | - | |
| 650 | + | |
647 | 651 | | |
648 | 652 | | |
649 | 653 | | |
650 | | - | |
| 654 | + | |
651 | 655 | | |
652 | | - | |
653 | | - | |
654 | | - | |
655 | | - | |
656 | | - | |
657 | | - | |
658 | | - | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
659 | 668 | | |
660 | 669 | | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
661 | 673 | | |
662 | | - | |
663 | | - | |
664 | | - | |
665 | | - | |
666 | | - | |
667 | | - | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
668 | 684 | | |
669 | 685 | | |
670 | 686 | | |
| |||
726 | 742 | | |
727 | 743 | | |
728 | 744 | | |
729 | | - | |
730 | | - | |
731 | | - | |
732 | | - | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
733 | 755 | | |
734 | 756 | | |
735 | | - | |
736 | | - | |
737 | | - | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
738 | 782 | | |
739 | 783 | | |
740 | | - | |
| 784 | + | |
741 | 785 | | |
742 | | - | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
743 | 790 | | |
744 | 791 | | |
745 | | - | |
| 792 | + | |
746 | 793 | | |
747 | 794 | | |
748 | 795 | | |
| |||
761 | 808 | | |
762 | 809 | | |
763 | 810 | | |
764 | | - | |
| 811 | + | |
765 | 812 | | |
766 | 813 | | |
767 | 814 | | |
| |||
806 | 853 | | |
807 | 854 | | |
808 | 855 | | |
809 | | - | |
| 856 | + | |
810 | 857 | | |
811 | 858 | | |
812 | 859 | | |
| |||
0 commit comments