Skip to content

CoderProvisioner

API identity

  • Group/version: coder.com/v1alpha1
  • Kind: CoderProvisioner
  • Resource: coderprovisioners
  • Scope: namespaced

Spec

Field Type Description
controlPlaneRef LocalObjectReference ControlPlaneRef identifies which CoderControlPlane instance to join. Provisioner key management uses operator-managed access from this control plane's status.operatorTokenSecretRef.
organizationName string OrganizationName is the Coder organization. Defaults to "default".
key CoderProvisionerKeySpec Key configures provisioner key naming and secret storage.
replicas integer Replicas is the desired number of provisioner pods.
tags object (keys:string, values:string) Tags are attached to the provisioner key for job routing.
image string Image is the container image. Defaults to the control plane image.
extraArgs string array ExtraArgs are appended after "provisioner start".
extraEnv EnvVar array ExtraEnv are injected into the provisioner container.
resources ResourceRequirements Resources for the provisioner container.
imagePullSecrets LocalObjectReference array ImagePullSecrets are used by the pod to pull private images.
terminationGracePeriodSeconds integer TerminationGracePeriodSeconds for the provisioner pods.

Status

Field Type Description
observedGeneration integer ObservedGeneration tracks the spec generation this status reflects.
readyReplicas integer ReadyReplicas is the number of ready pods observed in the deployment.
phase string Phase is a high-level readiness indicator.
conditions Condition array Conditions are Kubernetes-standard conditions for this resource.
organizationID string OrganizationID is the organization ID last applied to the provisioner key.
organizationName string OrganizationName is the organization name last applied to the provisioner key.
provisionerKeyID string ProvisionerKeyID is the provisioner key ID last applied in coderd.
provisionerKeyName string ProvisionerKeyName is the provisioner key name last applied in coderd.
tagsHash string TagsHash is a deterministic hash of spec.tags last applied to the provisioner key.
controlPlaneRefName string ControlPlaneRefName is the control plane ref name last applied to the provisioner key.
controlPlaneURL string ControlPlaneURL is the control plane URL last applied to the provisioner key.
controlPlaneUID string ControlPlaneUID is the UID of the control plane last applied to the provisioner key. The operator sends the operator token of the control plane with controlPlaneRefName for this key only while that control plane has this UID, and rotates the key when it has another UID. When it is empty, it sends that token only to the current Coder API URL of that control plane, and the next reconcile looks the key up there by organizationID and provisionerKeyID: it sets this field when Coder holds the key, and creates a new key when Coder answers that it has none.
secretRef SecretKeySelector SecretRef references the provisioner key secret data currently in use.
pendingKeys CoderProvisionerKeyRecord array PendingKeys lists the provisioner keys that can exist in Coder besides the key in provisionerKeyID: a key that the operator is about to create or has not yet written to the provisioner key Secret, and replaced keys whose deletion Coder has not confirmed. The operator deletes the key of each entry with organizationID and keyID at its coderURL with the operator token of its control plane, and removes the entry when Coder confirms that the key is gone.

Referenced types

CoderProvisionerKeyRecord

CoderProvisionerKeyRecord names a provisioner key that the operator created, or was about to create, at one Coder endpoint.

Field Type Description
controlPlaneRefName string ControlPlaneRefName is the CoderControlPlane whose operator token the operator used for the key.
controlPlaneUID string ControlPlaneUID is the UID of that CoderControlPlane. The operator sends its operator token for this entry only while the control plane with controlPlaneRefName has this UID. When it is empty, it sends that token only when coderURL is the current Coder API URL of that control plane. Otherwise it keeps the entry and sets the condition ControlPlaneChangedKeyKept. When a rotation replaces the key of status without status.controlPlaneUID, the entry of that key records the UID while coderURL is the current Coder API URL of that control plane.
coderURL string CoderURL is the Coder API URL that the operator sent the key request to.
organizationName string OrganizationName is the Coder organization of the key.
keyName string KeyName is the provisioner key name in Coder.
organizationID string OrganizationID is the organization ID that Coder returned for the key. When organizationID or keyID is empty, the operator deletes no key. It removes the entry when Coder has no key with keyName, or when that key is the key in provisionerKeyID. Otherwise it keeps the entry and sets the condition UnverifiedKeyKept.
keyID string KeyID is the provisioner key ID that Coder returned.
unpublished boolean Unpublished is true from before the create until the operator records a key as applied. While it is true, the Secret can hold this key, or a key that a rotation deleted, so the operator replaces the key in the Secret.

CoderProvisionerKeySpec

CoderProvisionerKeySpec configures provisioner key naming and storage.

Field Type Description
name string Name is the provisioner key name in coderd. Defaults to the CR name.
secretName string SecretName is the Kubernetes Secret to store the key. Defaults to "{crName}-provisioner-key".
secretKey string SecretKey is the data key in the Secret. Defaults to "key".

SecretKeySelector

SecretKeySelector identifies a key in a Secret.

Field Type Description
name string Name is the Kubernetes Secret name.
key string Key is the key inside the Secret data map.

Source

  • Go type: api/v1alpha1/coderprovisioner_types.go
  • Generated CRD: config/crd/bases/coder.com_coderprovisioners.yaml