Skip to content

CoderTemplateTest

API identity

  • Group/version: coder.com/v1alpha1
  • Kind: CoderTemplateTest
  • Resource: codertemplatetests
  • Scope: namespaced

Spec

Field Type Description
controlPlaneRef CoderControlPlaneReference ControlPlaneRef names the CoderControlPlane in the same namespace. The controller calls Coder with that control plane's operator token.
template string Template is the Coder template as <organization>.<template>, the same format as aggregated CoderTemplate names. Each name has at most 32 characters and is not one of Coder's reserved names new or create.
version CoderTemplateTestVersion Version selects the template version under test.
parameters CoderTemplateTestParameter array Parameters are rich parameter values for the start build.
timeoutSeconds integer TimeoutSeconds bounds the whole run: waiting for inputs, the start build, agent readiness, and the delete build. Cleanup continues after the deadline.
ttlSecondsAfterFinished integer TTLSecondsAfterFinished deletes the test this long after it finished and its workspace is gone, like Job. Do not set it under GitOps: the GitOps tool recreates the deleted object, which runs the test again.

Status

Field Type Description
observedGeneration integer ObservedGeneration is the generation the controller last processed.
phase string Phase is Pending, Running, Succeeded, or Failed. Succeeded and Failed are final.
reason string Reason is the current wait reason or the final result.
message string Message explains Reason. It never holds Coder error details, build logs, parameter values, or tokens.
startTime Time StartTime is when the controller first processed the test.
completionTime Time CompletionTime is when the phase became final.
organizationID string OrganizationID is the resolved Coder organization ID.
templateID string TemplateID is the resolved Coder template ID.
templateVersionID string TemplateVersionID is the pinned template version ID.
templateVersionName string TemplateVersionName is the name of the pinned template version.
ownerID string OwnerID is the Coder user that owns the test workspace.
workspaceName string WorkspaceName is the deterministic Coder workspace name of this test.
createAttemptTime Time CreateAttemptTime is set before every workspace create request. While it is set and WorkspaceID is empty, a create request can be in flight or already committed in Coder.
workspaceID string WorkspaceID is the Coder workspace ID.
startBuildID string StartBuildID is the ID of the start build that the controller requested.
deleteBuildID string DeleteBuildID is the ID of the current delete build.
agentsReadyTime Time AgentsReadyTime is when every top-level agent was ready.
deleteAttempts integer DeleteAttempts counts failed delete builds. It drives the retry backoff.
conditions Condition array Conditions are Ready, Reconciling, Stalled, and WorkspaceDeleted.

Referenced types

CoderControlPlaneReference

CoderControlPlaneReference names a CoderControlPlane in the same namespace.

Field Type Description
name string Name is the CoderControlPlane name.

CoderTemplateTestParameter

CoderTemplateTestParameter is one rich parameter value for the start build. Values are stored in plain text, so never put secrets here.

Field Type Description
name string Name is the parameter name.
value string Value is the parameter value.

CoderTemplateTestVersion

CoderTemplateTestVersion selects the template version under test. Set exactly one field. +kubebuilder:validation:XValidation:rule="(has(self.name) ? 1 : 0) + (has(self.id) ? 1 : 0) + (has(self.active) ? 1 : 0) == 1",message="set exactly one of name, id, or active" +kubebuilder:validation:XValidation:rule="!has(self.active) || self.active",message="active must be true when set"

Field Type Description
name string Name is the name of a version of the template. It follows Coder's template version name rules.
id string ID is the UUID of a version of the template.
active boolean Active selects the template's active version when the test starts. The controller resolves it once and records the version, so a later promotion does not change the version under test.

Source

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