Skip to content

🤖 feat: remove provisioner bootstrap credentials#79

Merged
ThomasK33 merged 1 commit intomainfrom
provisioner-rh49
Feb 13, 2026
Merged

🤖 feat: remove provisioner bootstrap credentials#79
ThomasK33 merged 1 commit intomainfrom
provisioner-rh49

Conversation

@ThomasK33
Copy link
Member

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 • Model: $MUX_MODEL_STRING • Thinking: $MUX_THINKING_LEVEL • Cost: $$MUX_COSTS_USD

@ThomasK33
Copy link
Member Author

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 007ff79ac2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ThomasK33
Copy link
Member Author

@codex review

Addressed the namespace mismatch feedback by aligning the paired CoderControlPlane sample and tutorial commands to namespace: coder.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7f5e3cead1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Remove CoderProvisioner spec.bootstrap credentialsSecretRef and migrate provisioner key reconciliation to operator-managed access from the referenced CoderControlPlane status.

This updates API types/CRD/docs/samples and adjusts the provisioner controller and tests to require operatorAccessReady + operatorTokenSecretRef with clear requeueing status reasons when unavailable.

---
_Generated with [`mux`](https://github.com/coder/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 -->
@ThomasK33
Copy link
Member Author

@codex review

Addressed follow-up feedback:

  • default empty operator token ref key to token
  • add kubectl create namespace coder step in the getting-started tutorial

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Can't wait for the next one!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ThomasK33 ThomasK33 added this pull request to the merge queue Feb 13, 2026
@ThomasK33
Copy link
Member Author

Merged via the queue into main with commit ccfe0eb Feb 13, 2026
11 checks passed
@ThomasK33 ThomasK33 deleted the provisioner-rh49 branch February 13, 2026 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant