Documentation
¶
Overview ¶
Package v1alpha1 contains API schema definitions for the coder.com API group.
+k8s:deepcopy-gen=package +groupName=coder.com
Index ¶
- Constants
- Variables
- type AIGatewaySpec
- type CertSecretSelector
- type CertsSpec
- type CoderAIGatewayKey
- type CoderAIGatewayKeyCurrent
- type CoderAIGatewayKeyList
- type CoderAIGatewayKeyPending
- type CoderAIGatewayKeyRetiring
- type CoderAIGatewayKeyRotationSpec
- type CoderAIGatewayKeySpec
- type CoderAIGatewayKeyStatus
- type CoderAIProvider
- type CoderAIProviderCredentialStatus
- type CoderAIProviderList
- type CoderAIProviderSpec
- type CoderAIProviderStatus
- type CoderControlPlane
- type CoderControlPlaneList
- type CoderControlPlaneReference
- type CoderControlPlaneSpec
- type CoderControlPlaneStatus
- type CoderMCPServer
- type CoderMCPServerAPIKeyAuth
- type CoderMCPServerAccess
- type CoderMCPServerAuth
- type CoderMCPServerCredentialStatus
- type CoderMCPServerHeader
- type CoderMCPServerList
- type CoderMCPServerOAuth2Auth
- type CoderMCPServerSpec
- type CoderMCPServerStatus
- type CoderProvisioner
- type CoderProvisionerKeySpec
- type CoderProvisionerList
- type CoderProvisionerSpec
- type CoderProvisionerStatus
- type CoderTemplateTest
- type CoderTemplateTestList
- type CoderTemplateTestParameter
- type CoderTemplateTestSpec
- type CoderTemplateTestStatus
- type CoderTemplateTestVersion
- type CoderWorkspaceClaim
- type CoderWorkspaceClaimList
- type CoderWorkspaceClaimReference
- type CoderWorkspaceClaimSpec
- type CoderWorkspaceClaimStatus
- type CoderWorkspacePool
- type CoderWorkspacePoolClaims
- type CoderWorkspacePoolFailure
- type CoderWorkspacePoolList
- type CoderWorkspacePoolMember
- type CoderWorkspacePoolMemberList
- type CoderWorkspacePoolMemberParameter
- type CoderWorkspacePoolMemberSpec
- type CoderWorkspacePoolMemberStatus
- type CoderWorkspacePoolParameter
- type CoderWorkspacePoolResolved
- type CoderWorkspacePoolSpec
- type CoderWorkspacePoolStatus
- type CoderWorkspacePoolVersion
- type CoderWorkspaceProxy
- type CoderWorkspaceProxyList
- type DatabaseSpec
- type ExposeSpec
- type GatewayExposeSpec
- type GatewayParentRef
- type IngressExposeSpec
- type IngressTLSExposeSpec
- type MCPServersSpec
- type OperatorAccessSpec
- type ProbeSpec
- type ProxyBootstrapSpec
- type RBACSpec
- type SecretKeySelector
- type ServiceAccountSpec
- type ServiceSpec
- type TLSSpec
- type TemplateTestsSpec
- type WorkspacePoolOwner
- type WorkspacePoolsSpec
- type WorkspaceProxySpec
- type WorkspaceProxyStatus
Constants ¶
const ( // CoderAIGatewayKeyConditionReady is True when the output Secret holds a // key that Coder lists. CoderAIGatewayKeyConditionReady = "Ready" // CoderAIGatewayKeyConditionReconciling is True while the controller // issues, rotates, or retires keys. CoderAIGatewayKeyConditionReconciling = "Reconciling" // CoderAIGatewayKeyConditionStalled is True when the controller creates no // key until the spec or an input changes. CoderAIGatewayKeyConditionStalled = "Stalled" // CoderAIGatewayKeyCleanupFinalizer keeps a CoderAIGatewayKey until every // Coder key that it created is deleted. CoderAIGatewayKeyCleanupFinalizer = "coder.com/ai-gateway-key-cleanup" // CoderAIGatewayKeySecretDataKey is the data key that holds the AI Gateway // key in the output Secret. It is the default of the Coder AI Gateway Helm // chart (aigateway.keySecret.key). CoderAIGatewayKeySecretDataKey = "key" )
const ( // CoderAIProviderConditionReady is True when Coder holds the provider as // the spec describes. CoderAIProviderConditionReady = "Ready" // CoderAIProviderConditionReconciling is True while the controller works // toward the spec. CoderAIProviderConditionReconciling = "Reconciling" // CoderAIProviderConditionStalled is True when the controller stops until // the spec or an input changes. CoderAIProviderConditionStalled = "Stalled" // CoderAIProviderCleanupFinalizer keeps a provider until its Coder // provider is deleted. CoderAIProviderCleanupFinalizer = "coder.com/ai-provider-cleanup" )
const ( // CoderControlPlanePhasePending indicates the control plane has not reported ready yet. CoderControlPlanePhasePending = "Pending" // CoderControlPlanePhaseReady indicates at least one control plane pod is ready. CoderControlPlanePhaseReady = "Ready" // CoderControlPlaneConditionLicenseApplied indicates whether the operator uploaded the configured license. CoderControlPlaneConditionLicenseApplied = "LicenseApplied" // CoderControlPlaneConditionDatabaseSecretResolved indicates whether the // spec.database.connectionSecretRef configuration can be resolved. It does // not report database health or reachability. CoderControlPlaneConditionDatabaseSecretResolved = "DatabaseSecretResolved" // CoderControlPlaneConditionOperatorTokenSecretOwned indicates whether the // operator token Secret is owned by this control plane, or does not exist // yet. The operator does not read or write an operator token Secret that // another owner, or no owner, controls. CoderControlPlaneConditionOperatorTokenSecretOwned = "OperatorTokenSecretOwned" // CoderControlPlaneLicenseTierNone indicates no license is currently installed. CoderControlPlaneLicenseTierNone = "none" // CoderControlPlaneLicenseTierTrial indicates a trial license is currently installed. CoderControlPlaneLicenseTierTrial = "trial" // CoderControlPlaneLicenseTierEnterprise indicates an enterprise license is currently installed. CoderControlPlaneLicenseTierEnterprise = "enterprise" // CoderControlPlaneLicenseTierPremium indicates a premium license is currently installed. CoderControlPlaneLicenseTierPremium = "premium" // CoderControlPlaneLicenseTierUnknown indicates the controller could not determine the current license tier. CoderControlPlaneLicenseTierUnknown = "unknown" // CoderControlPlaneEntitlementUnknown indicates the controller could not determine a feature entitlement. CoderControlPlaneEntitlementUnknown = "unknown" )
const ( // CoderMCPServerConditionReady is True when Coder holds the MCP server // config as the spec describes. CoderMCPServerConditionReady = "Ready" // CoderMCPServerConditionReconciling is True while the controller works // toward the spec. CoderMCPServerConditionReconciling = "Reconciling" // CoderMCPServerConditionStalled is True when the controller stops until // the spec or an input changes. CoderMCPServerConditionStalled = "Stalled" // CoderMCPServerCleanupFinalizer keeps an MCP server until its Coder // config is deleted. CoderMCPServerCleanupFinalizer = "coder.com/mcp-server-cleanup" )
const ( // CoderProvisionerPhasePending indicates the provisioner deployment is not ready. CoderProvisionerPhasePending = "Pending" // CoderProvisionerPhaseReady indicates at least one provisioner pod is ready. CoderProvisionerPhaseReady = "Ready" // CoderProvisionerConditionControlPlaneReady indicates whether the referenced control plane is reachable. CoderProvisionerConditionControlPlaneReady = "ControlPlaneReady" // CoderProvisionerConditionOperatorAccessReady indicates whether operator-managed // access from the referenced control plane is ready for provisioner key management. CoderProvisionerConditionOperatorAccessReady = "OperatorAccessReady" // CoderProvisionerConditionProvisionerKeyReady indicates whether the provisioner key exists in coderd. CoderProvisionerConditionProvisionerKeyReady = "ProvisionerKeyReady" // CoderProvisionerConditionProvisionerKeySecretReady indicates whether the provisioner key secret is populated. CoderProvisionerConditionProvisionerKeySecretReady = "ProvisionerKeySecretReady" // CoderProvisionerConditionExternalProvisionersEntitled indicates whether the // referenced Coder deployment is entitled to run external provisioner daemons. CoderProvisionerConditionExternalProvisionersEntitled = "ExternalProvisionersEntitled" // CoderProvisionerConditionDeploymentReady indicates whether the provisioner deployment has ready replicas. CoderProvisionerConditionDeploymentReady = "DeploymentReady" // CoderProvisionerConditionCredentialsReady indicates whether every // referenced credential Secret and setting passed the operator's checks. // When it is False, the operator keeps the last applied Deployment. CoderProvisionerConditionCredentialsReady = "CredentialsReady" // DefaultProvisionerKeySecretKey is the default data key for provisioner key secrets. DefaultProvisionerKeySecretKey = "key" // ProvisionerKeyCleanupFinalizer is applied to ensure coderd key cleanup on deletion. ProvisionerKeyCleanupFinalizer = "coder.com/provisioner-key-cleanup" )
const ( // CoderTemplateTestPhasePending means the test waits for its inputs and has // not sent a create request. CoderTemplateTestPhasePending = "Pending" // CoderTemplateTestPhaseRunning means a workspace create request was sent or // the test workspace exists. CoderTemplateTestPhaseRunning = "Running" // CoderTemplateTestPhaseSucceeded means the start build succeeded, every // top-level agent became ready, and the delete build succeeded. It is final. CoderTemplateTestPhaseSucceeded = "Succeeded" // CoderTemplateTestPhaseFailed means the test failed. It is final. CoderTemplateTestPhaseFailed = "Failed" // CoderTemplateTestConditionReady is True when the phase is Succeeded. CoderTemplateTestConditionReady = "Ready" // CoderTemplateTestConditionReconciling is True while the phase is Pending or Running. CoderTemplateTestConditionReconciling = "Reconciling" // CoderTemplateTestConditionStalled is True when the phase is Failed. CoderTemplateTestConditionStalled = "Stalled" // CoderTemplateTestConditionWorkspaceDeleted reports whether a workspace of // this test can still exist in Coder. Unknown means the controller cannot // prove it either way. CoderTemplateTestConditionWorkspaceDeleted = "WorkspaceDeleted" // CoderTemplateTestCleanupFinalizer keeps a test until its workspace is // deleted in Coder. CoderTemplateTestCleanupFinalizer = "coder.com/template-test-cleanup" )
const ( // CoderWorkspaceClaimPhasePending means no member holds the claim yet. CoderWorkspaceClaimPhasePending = "Pending" // CoderWorkspaceClaimPhaseBound means a member holds the claim. CoderWorkspaceClaimPhaseBound = "Bound" // CoderWorkspaceClaimPhaseLost means someone deleted the claim's // workspace. It is final: a claim never binds again. CoderWorkspaceClaimPhaseLost = "Lost" // CoderWorkspaceClaimConditionReady is True when the claim is bound and // its workspace is ready. CoderWorkspaceClaimConditionReady = "Ready" // CoderWorkspaceClaimConditionReconciling is True while the claim waits. CoderWorkspaceClaimConditionReconciling = "Reconciling" // CoderWorkspaceClaimConditionStalled is True when the claim cannot // progress until an input changes. CoderWorkspaceClaimConditionStalled = "Stalled" )
const ( // CoderWorkspacePoolConditionReady is True when at least spec.replicas // current members are ready, no outdated unclaimed member remains, and the // controller observed the latest generation. CoderWorkspacePoolConditionReady = "Ready" // CoderWorkspacePoolConditionReconciling is True while the controller // works toward the spec. CoderWorkspacePoolConditionReconciling = "Reconciling" // CoderWorkspacePoolConditionStalled is True when the controller stops // until the spec or an input changes, for example after too many member // failures in a row. CoderWorkspacePoolConditionStalled = "Stalled" // CoderWorkspacePoolStrategyManaged keeps the pool's workspaces with the // operator: it creates them for the pool owner, waits until they are // ready, and hands them out through claims. CoderWorkspacePoolStrategyManaged = "Managed" // CoderWorkspacePoolClaimModeReserve binds a ready workspace to a claim. // The consumer connects with credentials it already holds for the pool // owner. CoderWorkspacePoolClaimModeReserve = "Reserve" // CoderWorkspacePoolSelectorLabel is the label key of the pool's // status.selector: <key>=<pool UID>. CoderWorkspacePoolSelectorLabel = "coder.com/workspace-pool-uid" )
const ( // CoderWorkspacePoolMemberPhasePending means the member has sent no // workspace create request, or a request had provably no effect. CoderWorkspacePoolMemberPhasePending = "Pending" // CoderWorkspacePoolMemberPhaseCreating means a create request was sent // and the workspace is not ready yet. CoderWorkspacePoolMemberPhaseCreating = "Creating" // CoderWorkspacePoolMemberPhaseReady means the start build succeeded and // every agent is ready. CoderWorkspacePoolMemberPhaseReady = "Ready" // CoderWorkspacePoolMemberPhaseFailed means the workspace failed. The // pool replaces the member. CoderWorkspacePoolMemberPhaseFailed = "Failed" // CoderWorkspacePoolMemberPhaseDeleting means the member deletes its // workspace. CoderWorkspacePoolMemberPhaseDeleting = "Deleting" // CoderWorkspacePoolMemberConditionReady is True when the workspace is ready. CoderWorkspacePoolMemberConditionReady = "Ready" // CoderWorkspacePoolMemberConditionUsed is True when someone used the // workspace without a claim. The pool then releases the member. CoderWorkspacePoolMemberConditionUsed = "Used" // CoderWorkspacePoolMemberConditionWorkspaceDeleted reports whether the // member's workspace is gone, with the CoderTemplateTest reasons. CoderWorkspacePoolMemberConditionWorkspaceDeleted = "WorkspaceDeleted" // CoderWorkspacePoolMemberCleanupFinalizer keeps a member until its // workspace is deleted. CoderWorkspacePoolMemberCleanupFinalizer = "coder.com/workspace-pool-member-cleanup" )
const ( // WorkspaceProxyPhasePending indicates the proxy deployment is not ready. WorkspaceProxyPhasePending = "Pending" // WorkspaceProxyPhaseReady indicates at least one proxy pod is ready. WorkspaceProxyPhaseReady = "Ready" // CoderWorkspaceProxyConditionCredentialsReady indicates whether every // referenced credential Secret and setting passed the operator's checks. // When it is False, the operator keeps the last applied Deployment. CoderWorkspaceProxyConditionCredentialsReady = "CredentialsReady" )
const ( // DefaultTokenSecretKey is the default key used for proxy session tokens. DefaultTokenSecretKey = "token" // DefaultLicenseSecretKey is the default key used for Coder license JWTs. DefaultLicenseSecretKey = "license" )
Variables ¶
var ( // GroupVersion is group version used to register these objects. GroupVersion = schema.GroupVersion{Group: "coder.com", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme. SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the provided scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
This section is empty.
Types ¶
type AIGatewaySpec ¶ added in v0.1.4
type AIGatewaySpec struct {
// AllowKeys lets CoderAIGatewayKey objects in this namespace create and
// rotate Coder AI Gateway keys with this control plane's operator token.
// A gateway key lets its holder load the API key of every enabled AI
// provider, so this delegates that power to everyone who can create
// CoderAIGatewayKey objects here. When false (the default), the
// controller creates no key. Setting it back to false stops new keys and
// rotations. The current key of each CoderAIGatewayKey stays until that
// object is deleted.
// +optional
AllowKeys bool `json:"allowKeys,omitempty"`
}
AIGatewaySpec configures CoderAIGatewayKey objects that use a CoderControlPlane (CoderControlPlane.spec.aiGateway).
func (*AIGatewaySpec) DeepCopy ¶ added in v0.1.4
func (in *AIGatewaySpec) DeepCopy() *AIGatewaySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIGatewaySpec.
func (*AIGatewaySpec) DeepCopyInto ¶ added in v0.1.4
func (in *AIGatewaySpec) DeepCopyInto(out *AIGatewaySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CertSecretSelector ¶
type CertSecretSelector struct {
// Name is the Secret name.
Name string `json:"name"`
// Key is the key within the Secret data map.
Key string `json:"key"`
}
CertSecretSelector identifies a key within a Secret for CA cert mounting.
func (*CertSecretSelector) DeepCopy ¶
func (in *CertSecretSelector) DeepCopy() *CertSecretSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertSecretSelector.
func (*CertSecretSelector) DeepCopyInto ¶
func (in *CertSecretSelector) DeepCopyInto(out *CertSecretSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CertsSpec ¶
type CertsSpec struct {
// Secrets lists Secret key selectors for CA certificates.
// Each is mounted at `/etc/ssl/certs/{name}.crt`.
Secrets []CertSecretSelector `json:"secrets,omitempty"`
}
CertsSpec configures additional CA certificate mounts.
func (*CertsSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertsSpec.
func (*CertsSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CoderAIGatewayKey ¶ added in v0.1.4
type CoderAIGatewayKey struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec CoderAIGatewayKeySpec `json:"spec"`
Status CoderAIGatewayKeyStatus `json:"status,omitempty"`
}
CoderAIGatewayKey manages a Coder AI Gateway key for standalone AI Gateway replicas and stores it in a Secret that this object owns. A gateway key lets its holder load the API key of every enabled AI provider, so write access to this kind is admin-only. Deleting the object deletes every key that it created in Coder: after the 5-minute settle window of its last key create, and only while the control plane can reach Coder. A failed deletion keeps the object and retries. When the control plane is gone, the object goes and its keys stay valid in Coder. A gateway stops within a minute after its key is deleted.
func (*CoderAIGatewayKey) DeepCopy ¶ added in v0.1.4
func (in *CoderAIGatewayKey) DeepCopy() *CoderAIGatewayKey
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderAIGatewayKey.
func (*CoderAIGatewayKey) DeepCopyInto ¶ added in v0.1.4
func (in *CoderAIGatewayKey) DeepCopyInto(out *CoderAIGatewayKey)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CoderAIGatewayKey) DeepCopyObject ¶ added in v0.1.4
func (in *CoderAIGatewayKey) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CoderAIGatewayKeyCurrent ¶ added in v0.1.4
type CoderAIGatewayKeyCurrent struct {
// Serial is the key serial.
// +kubebuilder:validation:Minimum=0
Serial int64 `json:"serial"`
// ID is the Coder key ID. It is not the key.
// +kubebuilder:validation:Format=uuid
// +kubebuilder:validation:MaxLength=36
ID string `json:"id"`
// Name is the Coder key name.
// +kubebuilder:validation:MaxLength=64
Name string `json:"name"`
// IssuedAt is when the controller wrote the key to the Secret.
IssuedAt metav1.Time `json:"issuedAt"`
}
CoderAIGatewayKeyCurrent records the key that the output Secret holds. It holds no secret data and nothing derived from it.
func (*CoderAIGatewayKeyCurrent) DeepCopy ¶ added in v0.1.4
func (in *CoderAIGatewayKeyCurrent) DeepCopy() *CoderAIGatewayKeyCurrent
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderAIGatewayKeyCurrent.
func (*CoderAIGatewayKeyCurrent) DeepCopyInto ¶ added in v0.1.4
func (in *CoderAIGatewayKeyCurrent) DeepCopyInto(out *CoderAIGatewayKeyCurrent)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CoderAIGatewayKeyList ¶ added in v0.1.4
type CoderAIGatewayKeyList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []CoderAIGatewayKey `json:"items"`
}
CoderAIGatewayKeyList contains a list of CoderAIGatewayKey objects.
func (*CoderAIGatewayKeyList) DeepCopy ¶ added in v0.1.4
func (in *CoderAIGatewayKeyList) DeepCopy() *CoderAIGatewayKeyList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderAIGatewayKeyList.
func (*CoderAIGatewayKeyList) DeepCopyInto ¶ added in v0.1.4
func (in *CoderAIGatewayKeyList) DeepCopyInto(out *CoderAIGatewayKeyList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CoderAIGatewayKeyList) DeepCopyObject ¶ added in v0.1.4
func (in *CoderAIGatewayKeyList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CoderAIGatewayKeyPending ¶ added in v0.1.4
type CoderAIGatewayKeyPending struct {
// Serial is the key serial of the create request.
// +kubebuilder:validation:Minimum=0
Serial int64 `json:"serial"`
// Name is the Coder key name of the create request.
// +kubebuilder:validation:MaxLength=64
Name string `json:"name"`
// CreateAttemptTime is when the controller wrote this marker.
CreateAttemptTime metav1.Time `json:"createAttemptTime"`
}
CoderAIGatewayKeyPending is the create marker. The controller writes it before every key create request. It holds no secret data.
func (*CoderAIGatewayKeyPending) DeepCopy ¶ added in v0.1.4
func (in *CoderAIGatewayKeyPending) DeepCopy() *CoderAIGatewayKeyPending
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderAIGatewayKeyPending.
func (*CoderAIGatewayKeyPending) DeepCopyInto ¶ added in v0.1.4
func (in *CoderAIGatewayKeyPending) DeepCopyInto(out *CoderAIGatewayKeyPending)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CoderAIGatewayKeyRetiring ¶ added in v0.1.4
type CoderAIGatewayKeyRetiring struct {
// Serial is the key serial.
// +kubebuilder:validation:Minimum=0
Serial int64 `json:"serial"`
// ID is the Coder key ID. It is not the key.
// +kubebuilder:validation:Format=uuid
// +kubebuilder:validation:MaxLength=36
ID string `json:"id"`
// Name is the Coder key name.
// +kubebuilder:validation:MaxLength=64
Name string `json:"name"`
// ReplacedAt is when a newer key replaced this key in the Secret. The
// grace period counts from this time.
ReplacedAt metav1.Time `json:"replacedAt"`
}
CoderAIGatewayKeyRetiring records a replaced key that waits for deletion in Coder. It holds no secret data and nothing derived from it.
func (*CoderAIGatewayKeyRetiring) DeepCopy ¶ added in v0.1.4
func (in *CoderAIGatewayKeyRetiring) DeepCopy() *CoderAIGatewayKeyRetiring
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderAIGatewayKeyRetiring.
func (*CoderAIGatewayKeyRetiring) DeepCopyInto ¶ added in v0.1.4
func (in *CoderAIGatewayKeyRetiring) DeepCopyInto(out *CoderAIGatewayKeyRetiring)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CoderAIGatewayKeyRotationSpec ¶ added in v0.1.4
type CoderAIGatewayKeyRotationSpec struct {
// IntervalSeconds is the time between scheduled rotations, counted from
// the time the current key was written to the Secret. 0 turns scheduled
// rotation off. Otherwise it is between 1 day and 365 days. The default is
// 30 days, because Coder keys never expire.
// +kubebuilder:default=2592000
// +kubebuilder:validation:Minimum=0
// +kubebuilder:validation:Maximum=31536000
// +kubebuilder:validation:XValidation:rule="self == 0 || self >= 86400",message="intervalSeconds must be 0 or at least 86400 (1 day)"
// +optional
IntervalSeconds *int32 `json:"intervalSeconds,omitempty"`
// GracePeriodSeconds is the minimum time between writing a new key to the
// Secret and deleting the replaced key in Coder. Consumers must reload
// within it. Between 10 minutes and 7 days, default 1 hour.
// +kubebuilder:default=3600
// +kubebuilder:validation:Minimum=600
// +kubebuilder:validation:Maximum=604800
// +optional
GracePeriodSeconds *int32 `json:"gracePeriodSeconds,omitempty"`
// ConsumerWaitSeconds is how long after the grace period the controller
// keeps a replaced key while Coder still reports connections that use it.
// After that time the controller deletes the key, and gateways that still
// use it exit and restart with the key from the Secret. 0 deletes the key
// when the grace period ends. At most 7 days, default 1 day.
// +kubebuilder:default=86400
// +kubebuilder:validation:Minimum=0
// +kubebuilder:validation:Maximum=604800
// +optional
ConsumerWaitSeconds *int32 `json:"consumerWaitSeconds,omitempty"`
// Trigger starts one rotation each time it changes to a new non-empty
// value. The value set when the object is created starts no rotation.
// +kubebuilder:validation:MaxLength=63
// +optional
Trigger string `json:"trigger,omitempty"`
}
CoderAIGatewayKeyRotationSpec configures key rotation. +kubebuilder:validation:XValidation:rule="!has(self.intervalSeconds) || !has(self.gracePeriodSeconds) || self.intervalSeconds == 0 || self.gracePeriodSeconds < self.intervalSeconds",message="gracePeriodSeconds must be shorter than intervalSeconds"
func (*CoderAIGatewayKeyRotationSpec) DeepCopy ¶ added in v0.1.4
func (in *CoderAIGatewayKeyRotationSpec) DeepCopy() *CoderAIGatewayKeyRotationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderAIGatewayKeyRotationSpec.
func (*CoderAIGatewayKeyRotationSpec) DeepCopyInto ¶ added in v0.1.4
func (in *CoderAIGatewayKeyRotationSpec) DeepCopyInto(out *CoderAIGatewayKeyRotationSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CoderAIGatewayKeySpec ¶ added in v0.1.4
type CoderAIGatewayKeySpec struct {
// ControlPlaneRef names the CoderControlPlane in the same namespace. The
// controller creates and deletes keys with that control plane's operator
// token. The control plane must allow keys in spec.aiGateway.allowKeys.
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="controlPlaneRef is immutable"
ControlPlaneRef CoderControlPlaneReference `json:"controlPlaneRef"`
// SecretName is the Secret in the same namespace that receives the key,
// under the data key "key". The controller creates the Secret and owns it.
// It never writes a Secret that already exists and that this object does
// not own. To move the key to another Secret, delete and re-create this
// object.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=253
// +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="secretName is immutable"
SecretName string `json:"secretName"`
// Rotation configures when the controller replaces the key and how long a
// replaced key stays valid.
// +kubebuilder:default={}
// +optional
Rotation CoderAIGatewayKeyRotationSpec `json:"rotation"`
}
CoderAIGatewayKeySpec defines a Coder AI Gateway key and its rotation.
func (*CoderAIGatewayKeySpec) DeepCopy ¶ added in v0.1.4
func (in *CoderAIGatewayKeySpec) DeepCopy() *CoderAIGatewayKeySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderAIGatewayKeySpec.
func (*CoderAIGatewayKeySpec) DeepCopyInto ¶ added in v0.1.4
func (in *CoderAIGatewayKeySpec) DeepCopyInto(out *CoderAIGatewayKeySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CoderAIGatewayKeyStatus ¶ added in v0.1.4
type CoderAIGatewayKeyStatus struct {
// ObservedGeneration is the generation the controller last processed.
// +optional
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// AppliedGeneration is the last generation that the controller fully
// applied. A spec change re-arms a stall that waits for one.
// +optional
AppliedGeneration int64 `json:"appliedGeneration,omitempty"`
// NextSerial is the serial of the next key create request. It never
// decreases, so the controller never reuses a key name.
// +kubebuilder:validation:Minimum=0
// +optional
NextSerial int64 `json:"nextSerial,omitempty"`
// LastCreateAttemptTime is when the controller last sent a key create
// request. Orphaned keys are deleted only after a settle window from this
// time.
// +optional
LastCreateAttemptTime *metav1.Time `json:"lastCreateAttemptTime,omitempty"`
// PendingKey is set before every key create request and cleared after it.
// While it is set, a create request can be in flight or already committed
// in Coder.
// +optional
PendingKey *CoderAIGatewayKeyPending `json:"pendingKey,omitempty"`
// CurrentKey is the key that the output Secret holds.
// +optional
CurrentKey *CoderAIGatewayKeyCurrent `json:"currentKey,omitempty"`
// RetiringKeys are replaced keys that wait for deletion in Coder.
// +listType=map
// +listMapKey=serial
// +kubebuilder:validation:MaxItems=3
// +optional
RetiringKeys []CoderAIGatewayKeyRetiring `json:"retiringKeys,omitempty"`
// LastHandledTrigger is the spec.rotation.trigger value that the
// controller last acted on.
// +kubebuilder:validation:MaxLength=63
// +optional
LastHandledTrigger string `json:"lastHandledTrigger,omitempty"`
// NextRotationTime is when the next scheduled rotation is due.
// +optional
NextRotationTime *metav1.Time `json:"nextRotationTime,omitempty"`
// ConsecutiveIssueFailures counts create requests in a row whose outcome
// was uncertain, and failed Secret writes. A success resets it.
// +kubebuilder:validation:Minimum=0
// +optional
ConsecutiveIssueFailures int32 `json:"consecutiveIssueFailures,omitempty"`
// LastDriftReissueTime is when the controller last issued a key because
// the Secret no longer held the current key.
// +optional
LastDriftReissueTime *metav1.Time `json:"lastDriftReissueTime,omitempty"`
// KillSwitchGeneration is the generation in which the controller found
// the current key deleted in Coder. The controller creates no key until
// the generation changes. 0 means the kill switch is not active.
// +kubebuilder:validation:Minimum=0
// +optional
KillSwitchGeneration int64 `json:"killSwitchGeneration,omitempty"`
// AnswerMismatchGeneration is the generation in which Coder answered a
// create with a key that did not match the request. The controller
// creates no key until the generation changes. 0 means no mismatch.
// +kubebuilder:validation:Minimum=0
// +optional
AnswerMismatchGeneration int64 `json:"answerMismatchGeneration,omitempty"`
// Conditions are Ready, Reconciling, and Stalled.
// +listType=map
// +listMapKey=type
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
CoderAIGatewayKeyStatus defines the observed state of a CoderAIGatewayKey. It holds Coder key IDs, names, serials, and times only. It never holds a key, a key prefix, a hash, or a masked key.
func (*CoderAIGatewayKeyStatus) DeepCopy ¶ added in v0.1.4
func (in *CoderAIGatewayKeyStatus) DeepCopy() *CoderAIGatewayKeyStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderAIGatewayKeyStatus.
func (*CoderAIGatewayKeyStatus) DeepCopyInto ¶ added in v0.1.4
func (in *CoderAIGatewayKeyStatus) DeepCopyInto(out *CoderAIGatewayKeyStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CoderAIProvider ¶ added in v0.1.4
type CoderAIProvider struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec CoderAIProviderSpec `json:"spec"`
Status CoderAIProviderStatus `json:"status,omitempty"`
}
CoderAIProvider manages one AI provider in Coder. The object name is the Coder provider name. It cannot be a UUID, because Coder looks up a UUID-shaped name as a provider ID.
func (*CoderAIProvider) DeepCopy ¶ added in v0.1.4
func (in *CoderAIProvider) DeepCopy() *CoderAIProvider
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderAIProvider.
func (*CoderAIProvider) DeepCopyInto ¶ added in v0.1.4
func (in *CoderAIProvider) DeepCopyInto(out *CoderAIProvider)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CoderAIProvider) DeepCopyObject ¶ added in v0.1.4
func (in *CoderAIProvider) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CoderAIProviderCredentialStatus ¶ added in v0.1.4
type CoderAIProviderCredentialStatus struct {
// SecretName is the Secret name that was read.
// +optional
SecretName string `json:"secretName,omitempty"`
// SecretKey is the key in the Secret that was read.
// +optional
SecretKey string `json:"secretKey,omitempty"`
// SecretUID is the UID of the Secret that was read.
// +optional
SecretUID string `json:"secretUID,omitempty"`
// SecretResourceVersion is the resourceVersion of the Secret that was read.
// +optional
SecretResourceVersion string `json:"secretResourceVersion,omitempty"`
// KeyID is the ID that Coder gave the key. It is not the key.
// +optional
KeyID string `json:"keyID,omitempty"`
// ResendAttemptTime is set before every key resend. While it is set, a
// resend can be in flight or already committed in Coder.
// +optional
ResendAttemptTime *metav1.Time `json:"resendAttemptTime,omitempty"`
}
CoderAIProviderCredentialStatus records which Secret value was last sent to Coder. It holds no secret data and nothing derived from it.
func (*CoderAIProviderCredentialStatus) DeepCopy ¶ added in v0.1.4
func (in *CoderAIProviderCredentialStatus) DeepCopy() *CoderAIProviderCredentialStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderAIProviderCredentialStatus.
func (*CoderAIProviderCredentialStatus) DeepCopyInto ¶ added in v0.1.4
func (in *CoderAIProviderCredentialStatus) DeepCopyInto(out *CoderAIProviderCredentialStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CoderAIProviderList ¶ added in v0.1.4
type CoderAIProviderList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []CoderAIProvider `json:"items"`
}
CoderAIProviderList contains a list of CoderAIProvider objects.
func (*CoderAIProviderList) DeepCopy ¶ added in v0.1.4
func (in *CoderAIProviderList) DeepCopy() *CoderAIProviderList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderAIProviderList.
func (*CoderAIProviderList) DeepCopyInto ¶ added in v0.1.4
func (in *CoderAIProviderList) DeepCopyInto(out *CoderAIProviderList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CoderAIProviderList) DeepCopyObject ¶ added in v0.1.4
func (in *CoderAIProviderList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CoderAIProviderSpec ¶ added in v0.1.4
type CoderAIProviderSpec struct {
// ControlPlaneRef names the CoderControlPlane in the same namespace. The
// controller calls Coder with that control plane's operator token.
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="controlPlaneRef is immutable"
ControlPlaneRef CoderControlPlaneReference `json:"controlPlaneRef"`
// Type is the Coder provider type. Coder cannot change it after create.
// +kubebuilder:validation:Enum=openai;anthropic;azure;google;openai-compat;openrouter;vercel
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="type is immutable"
Type string `json:"type"`
// BaseURL is the http:// or https:// URL that Coder sends model requests
// to. It must not hold user info. The Secret in apiKeySecretRef must list
// its origin as an allowed destination.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=2048
// +kubebuilder:validation:XValidation:rule="isURL(self) && url(self).getHostname() != ”",message="baseURL must be a valid URL with a host"
// +kubebuilder:validation:XValidation:rule="self.matches('^https?://[^/?#@\\\\s]+([/?#].*)?$')",message="baseURL must be an http:// or https:// URL with a host and no user info"
BaseURL string `json:"baseURL"`
// DisplayName is the name that Coder shows. When empty, Coder shows the
// provider name.
// +kubebuilder:validation:MaxLength=128
// +optional
DisplayName string `json:"displayName,omitempty"`
// Icon is the icon URL or path that Coder shows.
// +kubebuilder:validation:MaxLength=2048
// +optional
Icon string `json:"icon,omitempty"`
// Enabled turns the provider on or off in Coder. When omitted, the
// default is true.
// +kubebuilder:default=true
// +optional
Enabled *bool `json:"enabled,omitempty"`
// APIKeySecretRef references the key in a Secret in the same namespace
// that holds the provider API key. The Secret must opt in to the
// credential Secret contract.
// +kubebuilder:validation:XValidation:rule="size(self.name) > 0",message="apiKeySecretRef.name must not be empty"
// +kubebuilder:validation:XValidation:rule="has(self.key) && size(self.key) > 0",message="apiKeySecretRef.key must not be empty"
APIKeySecretRef SecretKeySelector `json:"apiKeySecretRef"`
}
CoderAIProviderSpec defines one AI provider in Coder.
func (*CoderAIProviderSpec) DeepCopy ¶ added in v0.1.4
func (in *CoderAIProviderSpec) DeepCopy() *CoderAIProviderSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderAIProviderSpec.
func (*CoderAIProviderSpec) DeepCopyInto ¶ added in v0.1.4
func (in *CoderAIProviderSpec) DeepCopyInto(out *CoderAIProviderSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CoderAIProviderStatus ¶ added in v0.1.4
type CoderAIProviderStatus struct {
// ObservedGeneration is the generation the controller last processed.
// +optional
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// AppliedGeneration is the last generation whose spec Coder fully holds.
// +optional
AppliedGeneration int64 `json:"appliedGeneration,omitempty"`
// ProviderID is the Coder provider ID.
// +optional
ProviderID string `json:"providerID,omitempty"`
// CreateAttemptTime is set before every provider create request. While it
// is set and ProviderID is empty, a create request can be in flight or
// already committed in Coder.
// +optional
CreateAttemptTime *metav1.Time `json:"createAttemptTime,omitempty"`
// Credential records the Secret value last sent to Coder.
// +optional
Credential *CoderAIProviderCredentialStatus `json:"credential,omitempty"`
// Conditions are Ready, Reconciling, and Stalled.
// +listType=map
// +listMapKey=type
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
CoderAIProviderStatus defines the observed state of a CoderAIProvider.
func (*CoderAIProviderStatus) DeepCopy ¶ added in v0.1.4
func (in *CoderAIProviderStatus) DeepCopy() *CoderAIProviderStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderAIProviderStatus.
func (*CoderAIProviderStatus) DeepCopyInto ¶ added in v0.1.4
func (in *CoderAIProviderStatus) DeepCopyInto(out *CoderAIProviderStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CoderControlPlane ¶
type CoderControlPlane struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec CoderControlPlaneSpec `json:"spec,omitempty"`
Status CoderControlPlaneStatus `json:"status,omitempty"`
}
CoderControlPlane is the schema for Coder control plane resources.
func (*CoderControlPlane) DeepCopy ¶
func (in *CoderControlPlane) DeepCopy() *CoderControlPlane
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderControlPlane.
func (*CoderControlPlane) DeepCopyInto ¶
func (in *CoderControlPlane) DeepCopyInto(out *CoderControlPlane)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CoderControlPlane) DeepCopyObject ¶
func (in *CoderControlPlane) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CoderControlPlaneList ¶
type CoderControlPlaneList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []CoderControlPlane `json:"items"`
}
CoderControlPlaneList contains a list of CoderControlPlane objects.
func (*CoderControlPlaneList) DeepCopy ¶
func (in *CoderControlPlaneList) DeepCopy() *CoderControlPlaneList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderControlPlaneList.
func (*CoderControlPlaneList) DeepCopyInto ¶
func (in *CoderControlPlaneList) DeepCopyInto(out *CoderControlPlaneList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CoderControlPlaneList) DeepCopyObject ¶
func (in *CoderControlPlaneList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CoderControlPlaneReference ¶ added in v0.1.3
type CoderControlPlaneReference struct {
// Name is the CoderControlPlane name.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=253
// +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`
Name string `json:"name"`
}
CoderControlPlaneReference names a CoderControlPlane in the same namespace.
func (*CoderControlPlaneReference) DeepCopy ¶ added in v0.1.3
func (in *CoderControlPlaneReference) DeepCopy() *CoderControlPlaneReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderControlPlaneReference.
func (*CoderControlPlaneReference) DeepCopyInto ¶ added in v0.1.3
func (in *CoderControlPlaneReference) DeepCopyInto(out *CoderControlPlaneReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CoderControlPlaneSpec ¶
type CoderControlPlaneSpec struct {
// Image is the container image used for the Coder control plane pod.
// +kubebuilder:default="ghcr.io/coder/coder:latest"
Image string `json:"image,omitempty"`
// Replicas is the desired number of control plane pods.
// +kubebuilder:default=1
Replicas *int32 `json:"replicas,omitempty"`
// Service controls the service created in front of the control plane.
// +kubebuilder:default={}
Service ServiceSpec `json:"service,omitempty"`
// ExtraArgs are appended to the default Coder server arguments.
ExtraArgs []string `json:"extraArgs,omitempty"`
// ExtraEnv are injected into the Coder control plane container.
ExtraEnv []corev1.EnvVar `json:"extraEnv,omitempty"`
// ImagePullSecrets are used by the pod to pull private images.
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
// Database configures the external PostgreSQL database for Coder.
// When set, CODER_PG_CONNECTION_URL must not also be set in extraEnv.
// +optional
Database *DatabaseSpec `json:"database,omitempty"`
// OperatorAccess configures bootstrap API access to the coderd instance.
// +kubebuilder:default={}
OperatorAccess OperatorAccessSpec `json:"operatorAccess,omitempty"`
// LicenseSecretRef references a Secret key containing a Coder Enterprise
// license JWT. When set, the controller uploads the license after the
// control plane is ready and re-uploads when the Secret value changes.
// +optional
LicenseSecretRef *SecretKeySelector `json:"licenseSecretRef,omitempty"`
// ServiceAccount configures the ServiceAccount for the control plane pod.
// +kubebuilder:default={}
ServiceAccount ServiceAccountSpec `json:"serviceAccount,omitempty"`
// RBAC configures namespace-scoped RBAC for workspace provisioning.
// +kubebuilder:default={}
RBAC RBACSpec `json:"rbac,omitempty"`
// Resources sets resource requests/limits for the control plane container.
// +optional
Resources *corev1.ResourceRequirements `json:"resources,omitempty"`
// SecurityContext sets the container security context.
// +optional
SecurityContext *corev1.SecurityContext `json:"securityContext,omitempty"`
// PodSecurityContext sets the pod-level security context.
// +optional
PodSecurityContext *corev1.PodSecurityContext `json:"podSecurityContext,omitempty"`
// TLS configures Coder built-in TLS.
// +kubebuilder:default={}
TLS TLSSpec `json:"tls,omitempty"`
// ReadinessProbe configures the readiness probe for the control plane container.
// +kubebuilder:default={enabled:true}
ReadinessProbe ProbeSpec `json:"readinessProbe,omitempty"`
// LivenessProbe configures the liveness probe for the control plane container.
// +kubebuilder:default={enabled:false}
LivenessProbe ProbeSpec `json:"livenessProbe,omitempty"`
// EnvUseClusterAccessURL injects a default CODER_ACCESS_URL when not explicitly set.
// +kubebuilder:default=true
EnvUseClusterAccessURL *bool `json:"envUseClusterAccessURL,omitempty"`
// Expose configures external exposure via Ingress or Gateway API.
// +optional
Expose *ExposeSpec `json:"expose,omitempty"`
// +kubebuilder:validation:XValidation:rule="self.all(e, !(has(e.configMapRef) && has(e.secretRef)))",message="each envFrom entry may specify at most one of configMapRef or secretRef"
// EnvFrom injects environment variables from ConfigMaps/Secrets.
EnvFrom []corev1.EnvFromSource `json:"envFrom,omitempty"`
// Volumes are additional volumes to add to the pod.
Volumes []corev1.Volume `json:"volumes,omitempty"`
// VolumeMounts are additional volume mounts for the control plane container.
VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"`
// Certs configures additional CA certificate mounts.
// +kubebuilder:default={}
Certs CertsSpec `json:"certs,omitempty"`
// NodeSelector constrains pod scheduling to nodes matching labels.
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
// Tolerations are applied to the control plane pod.
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
// Affinity configures pod affinity/anti-affinity rules.
// +optional
Affinity *corev1.Affinity `json:"affinity,omitempty"`
// TopologySpreadConstraints control pod topology spread.
TopologySpreadConstraints []corev1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
// MCPServers configures CoderMCPServer objects that use this control
// plane. Removing it disables in Coder each server config that a
// CoderMCPServer created through this control plane.
// +optional
MCPServers *MCPServersSpec `json:"mcpServers,omitempty"`
// AIGateway configures CoderAIGatewayKey objects that use this control
// plane.
// +optional
AIGateway *AIGatewaySpec `json:"aiGateway,omitempty"`
// WorkspacePools configures CoderWorkspacePool objects that use this
// control plane. It has no effect yet: the CoderWorkspacePool controller
// is not shipped.
// +optional
WorkspacePools *WorkspacePoolsSpec `json:"workspacePools,omitempty"`
// TemplateTests configures CoderTemplateTest runs against this control plane.
// +optional
TemplateTests *TemplateTestsSpec `json:"templateTests,omitempty"`
}
CoderControlPlaneSpec defines the desired state of a CoderControlPlane. +kubebuilder:validation:XValidation:rule="!has(self.database) || !has(self.extraEnv) || !self.extraEnv.exists(e, e.name == 'CODER_PG_CONNECTION_URL')",message="spec.extraEnv must not set CODER_PG_CONNECTION_URL when spec.database.connectionSecretRef is set"
func (*CoderControlPlaneSpec) DeepCopy ¶
func (in *CoderControlPlaneSpec) DeepCopy() *CoderControlPlaneSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderControlPlaneSpec.
func (*CoderControlPlaneSpec) DeepCopyInto ¶
func (in *CoderControlPlaneSpec) DeepCopyInto(out *CoderControlPlaneSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CoderControlPlaneStatus ¶
type CoderControlPlaneStatus struct {
// ObservedGeneration tracks the spec generation this status reflects.
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// ReadyReplicas is the number of ready pods observed in the deployment.
ReadyReplicas int32 `json:"readyReplicas,omitempty"`
// URL is the in-cluster URL for the control plane service.
URL string `json:"url,omitempty"`
// OperatorTokenSecretRef points to the Secret key containing the `coder-k8s-operator` API token.
OperatorTokenSecretRef *SecretKeySelector `json:"operatorTokenSecretRef,omitempty"`
// OperatorAccessReady reports whether operator API access bootstrap succeeded.
OperatorAccessReady bool `json:"operatorAccessReady,omitempty"`
// LicenseLastApplied is the timestamp of the most recent successful
// operator-managed license upload.
// +optional
LicenseLastApplied *metav1.Time `json:"licenseLastApplied,omitempty"`
// LicenseLastAppliedHash is the SHA-256 hex hash of the trimmed license JWT
// that LicenseLastApplied refers to.
// +optional
LicenseLastAppliedHash string `json:"licenseLastAppliedHash,omitempty"`
// LicenseTier is a best-effort classification of the currently applied license.
// Values: none, trial, enterprise, premium, unknown.
// +optional
LicenseTier string `json:"licenseTier,omitempty"`
// EntitlementsLastChecked is when the operator last queried coderd entitlements.
// +optional
EntitlementsLastChecked *metav1.Time `json:"entitlementsLastChecked,omitempty"`
// ExternalProvisionerDaemonsEntitlement is the entitlement value for feature
// "external_provisioner_daemons".
// Values: entitled, grace_period, not_entitled, unknown.
// +optional
ExternalProvisionerDaemonsEntitlement string `json:"externalProvisionerDaemonsEntitlement,omitempty"`
// Phase is a high-level readiness indicator.
Phase string `json:"phase,omitempty"`
// Conditions are Kubernetes-standard conditions for this resource.
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
CoderControlPlaneStatus defines the observed state of a CoderControlPlane.
func (*CoderControlPlaneStatus) DeepCopy ¶
func (in *CoderControlPlaneStatus) DeepCopy() *CoderControlPlaneStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderControlPlaneStatus.
func (*CoderControlPlaneStatus) DeepCopyInto ¶
func (in *CoderControlPlaneStatus) DeepCopyInto(out *CoderControlPlaneStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CoderMCPServer ¶ added in v0.1.4
type CoderMCPServer struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec CoderMCPServerSpec `json:"spec"`
Status CoderMCPServerStatus `json:"status,omitempty"`
}
CoderMCPServer manages one MCP server config in a Coder organization.
func (*CoderMCPServer) DeepCopy ¶ added in v0.1.4
func (in *CoderMCPServer) DeepCopy() *CoderMCPServer
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderMCPServer.
func (*CoderMCPServer) DeepCopyInto ¶ added in v0.1.4
func (in *CoderMCPServer) DeepCopyInto(out *CoderMCPServer)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CoderMCPServer) DeepCopyObject ¶ added in v0.1.4
func (in *CoderMCPServer) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CoderMCPServerAPIKeyAuth ¶ added in v0.1.4
type CoderMCPServerAPIKeyAuth struct {
// Header is the HTTP header name.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=128
// +kubebuilder:validation:Pattern=`^[!#$%&'*+.^_\x60|~0-9A-Za-z-]+$`
// +kubebuilder:validation:XValidation:rule="!(self.lowerAscii() in ['host', 'content-length', 'content-type', 'content-encoding', 'transfer-encoding', 'connection', 'keep-alive', 'upgrade', 'te', 'trailer', 'accept', 'accept-encoding', 'proxy-authorization', 'proxy-connection', 'mcp-session-id', 'mcp-protocol-version', 'last-event-id']) && !self.lowerAscii().startsWith('x-coder-')",message="header is reserved for the HTTP transport, MCP, or Coder"
Header string `json:"header"`
// SecretRef references the key in a Secret in the same namespace that
// holds the header value. The Secret must opt in to the credential Secret
// contract and list the origin of spec.url.
// +kubebuilder:validation:XValidation:rule="size(self.name) > 0",message="secretRef.name must not be empty"
// +kubebuilder:validation:XValidation:rule="has(self.key) && size(self.key) > 0",message="secretRef.key must not be empty"
SecretRef SecretKeySelector `json:"secretRef"`
}
CoderMCPServerAPIKeyAuth sends one Secret value in one header. Coder sends the value as it is, so a bearer token is stored as `Bearer <token>`.
func (*CoderMCPServerAPIKeyAuth) DeepCopy ¶ added in v0.1.4
func (in *CoderMCPServerAPIKeyAuth) DeepCopy() *CoderMCPServerAPIKeyAuth
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderMCPServerAPIKeyAuth.
func (*CoderMCPServerAPIKeyAuth) DeepCopyInto ¶ added in v0.1.4
func (in *CoderMCPServerAPIKeyAuth) DeepCopyInto(out *CoderMCPServerAPIKeyAuth)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CoderMCPServerAccess ¶ added in v0.1.4
type CoderMCPServerAccess struct {
// Groups are Coder group names in the server's organization. Everyone is
// the group of all organization members. An empty list leaves the server
// to organization admins. Coder reserves the names new and create. While a
// listed group does not exist, the controller removes the access of every
// group that this list does not name, adds none, disables the server if
// the spec disables it, and waits with GroupNotFound for the rest.
// +kubebuilder:validation:MaxItems=64
// +kubebuilder:validation:XValidation:rule="self.all(g, g != 'new' && g != 'create')",message="access.groups must not hold new or create"
// +kubebuilder:validation:items:MinLength=1
// +kubebuilder:validation:items:MaxLength=255
// +kubebuilder:validation:items:Pattern=`^[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*$`
// +listType=set
// +optional
Groups []string `json:"groups,omitempty"`
}
CoderMCPServerAccess lists the Coder groups that can read the server.
func (*CoderMCPServerAccess) DeepCopy ¶ added in v0.1.4
func (in *CoderMCPServerAccess) DeepCopy() *CoderMCPServerAccess
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderMCPServerAccess.
func (*CoderMCPServerAccess) DeepCopyInto ¶ added in v0.1.4
func (in *CoderMCPServerAccess) DeepCopyInto(out *CoderMCPServerAccess)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CoderMCPServerAuth ¶ added in v0.1.4
type CoderMCPServerAuth struct {
// Type is the auth type. Coder's user_oidc type is not supported, because
// it sends each user's login token to the server URL.
// +kubebuilder:validation:Enum=none;api_key;custom_headers;oauth2
Type string `json:"type"`
// APIKey sends one Secret value in one header.
// +optional
APIKey *CoderMCPServerAPIKeyAuth `json:"apiKey,omitempty"`
// CustomHeaders sends each Secret value in its own header.
// +kubebuilder:validation:MinItems=1
// +kubebuilder:validation:MaxItems=16
// +listType=map
// +listMapKey=name
// +kubebuilder:validation:XValidation:rule="self.all(a, self.filter(b, b.name.lowerAscii() == a.name.lowerAscii()).size() == 1)",message="auth.customHeaders names must be unique, ignoring case"
// +optional
CustomHeaders []CoderMCPServerHeader `json:"customHeaders,omitempty"`
// OAuth2 lets each user connect with an OAuth2 client that the admin
// registered at the authorization server.
// +optional
OAuth2 *CoderMCPServerOAuth2Auth `json:"oauth2,omitempty"`
}
CoderMCPServerAuth is how Coder authenticates to the MCP server. Exactly the block that matches type is set. +kubebuilder:validation:XValidation:rule="(self.type == 'api_key') == has(self.apiKey)",message="auth.apiKey must be set exactly when auth.type is api_key" +kubebuilder:validation:XValidation:rule="(self.type == 'custom_headers') == has(self.customHeaders)",message="auth.customHeaders must be set exactly when auth.type is custom_headers" +kubebuilder:validation:XValidation:rule="(self.type == 'oauth2') == has(self.oauth2)",message="auth.oauth2 must be set exactly when auth.type is oauth2"
func (*CoderMCPServerAuth) DeepCopy ¶ added in v0.1.4
func (in *CoderMCPServerAuth) DeepCopy() *CoderMCPServerAuth
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderMCPServerAuth.
func (*CoderMCPServerAuth) DeepCopyInto ¶ added in v0.1.4
func (in *CoderMCPServerAuth) DeepCopyInto(out *CoderMCPServerAuth)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CoderMCPServerCredentialStatus ¶ added in v0.1.4
type CoderMCPServerCredentialStatus struct {
// Field names the credential: apiKey, oauth2ClientSecret, or
// `header:<name>`.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=160
Field string `json:"field"`
// SecretName is the Secret name that was read.
// +optional
SecretName string `json:"secretName,omitempty"`
// SecretKey is the key in the Secret that was read.
// +optional
SecretKey string `json:"secretKey,omitempty"`
// SecretUID is the UID of the Secret that was read.
// +optional
SecretUID string `json:"secretUID,omitempty"`
// SecretResourceVersion is the resourceVersion of the Secret that was read.
// +optional
SecretResourceVersion string `json:"secretResourceVersion,omitempty"`
}
CoderMCPServerCredentialStatus records which Secret value was last sent to Coder for one credential field. It holds no secret data and nothing derived from it.
func (*CoderMCPServerCredentialStatus) DeepCopy ¶ added in v0.1.4
func (in *CoderMCPServerCredentialStatus) DeepCopy() *CoderMCPServerCredentialStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderMCPServerCredentialStatus.
func (*CoderMCPServerCredentialStatus) DeepCopyInto ¶ added in v0.1.4
func (in *CoderMCPServerCredentialStatus) DeepCopyInto(out *CoderMCPServerCredentialStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CoderMCPServerHeader ¶ added in v0.1.4
type CoderMCPServerHeader struct {
// Name is the HTTP header name.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=128
// +kubebuilder:validation:Pattern=`^[!#$%&'*+.^_\x60|~0-9A-Za-z-]+$`
// +kubebuilder:validation:XValidation:rule="!(self.lowerAscii() in ['host', 'content-length', 'content-type', 'content-encoding', 'transfer-encoding', 'connection', 'keep-alive', 'upgrade', 'te', 'trailer', 'accept', 'accept-encoding', 'proxy-authorization', 'proxy-connection', 'mcp-session-id', 'mcp-protocol-version', 'last-event-id']) && !self.lowerAscii().startsWith('x-coder-')",message="header is reserved for the HTTP transport, MCP, or Coder"
Name string `json:"name"`
// SecretRef references the key in a Secret in the same namespace that
// holds the header value. The Secret must opt in to the credential Secret
// contract and list the origin of spec.url.
// +kubebuilder:validation:XValidation:rule="size(self.name) > 0",message="secretRef.name must not be empty"
// +kubebuilder:validation:XValidation:rule="has(self.key) && size(self.key) > 0",message="secretRef.key must not be empty"
SecretRef SecretKeySelector `json:"secretRef"`
}
CoderMCPServerHeader is one header whose value comes from a Secret.
func (*CoderMCPServerHeader) DeepCopy ¶ added in v0.1.4
func (in *CoderMCPServerHeader) DeepCopy() *CoderMCPServerHeader
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderMCPServerHeader.
func (*CoderMCPServerHeader) DeepCopyInto ¶ added in v0.1.4
func (in *CoderMCPServerHeader) DeepCopyInto(out *CoderMCPServerHeader)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CoderMCPServerList ¶ added in v0.1.4
type CoderMCPServerList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []CoderMCPServer `json:"items"`
}
CoderMCPServerList contains a list of CoderMCPServer objects.
func (*CoderMCPServerList) DeepCopy ¶ added in v0.1.4
func (in *CoderMCPServerList) DeepCopy() *CoderMCPServerList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderMCPServerList.
func (*CoderMCPServerList) DeepCopyInto ¶ added in v0.1.4
func (in *CoderMCPServerList) DeepCopyInto(out *CoderMCPServerList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CoderMCPServerList) DeepCopyObject ¶ added in v0.1.4
func (in *CoderMCPServerList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CoderMCPServerOAuth2Auth ¶ added in v0.1.4
type CoderMCPServerOAuth2Auth struct {
// ClientID is the OAuth2 client ID.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=256
// +kubebuilder:validation:Pattern=`^[^\s\v\x{85}\p{Z}]+$`
ClientID string `json:"clientID"`
// ClientSecretRef references the key in a Secret in the same namespace
// that holds the client secret. The Secret must opt in to the credential
// Secret contract and list the origins of spec.url, authURL, tokenURL and
// revocationURL.
// +kubebuilder:validation:XValidation:rule="size(self.name) > 0",message="clientSecretRef.name must not be empty"
// +kubebuilder:validation:XValidation:rule="has(self.key) && size(self.key) > 0",message="clientSecretRef.key must not be empty"
ClientSecretRef SecretKeySelector `json:"clientSecretRef"`
// AuthURL is the authorization endpoint that users' browsers open.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=2048
// +kubebuilder:validation:Pattern=`^[^\s\v\x{85}\p{Z}]+$`
// +kubebuilder:validation:XValidation:rule="isURL(self) && url(self).getHostname() != ”",message="authURL must be a valid URL with a host"
// +kubebuilder:validation:XValidation:rule="self.matches('^https?://[^/?#@\\\\s]+([/?#].*)?$')",message="authURL must be an http:// or https:// URL with a host and no user info"
AuthURL string `json:"authURL"`
// TokenURL is the token endpoint that Coder sends the client secret to.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=2048
// +kubebuilder:validation:Pattern=`^[^\s\v\x{85}\p{Z}]+$`
// +kubebuilder:validation:XValidation:rule="isURL(self) && url(self).getHostname() != ”",message="tokenURL must be a valid URL with a host"
// +kubebuilder:validation:XValidation:rule="self.matches('^https?://[^/?#@\\\\s]+([/?#].*)?$')",message="tokenURL must be an http:// or https:// URL with a host and no user info"
TokenURL string `json:"tokenURL"`
// RevocationURL is the https:// token revocation endpoint. Coder sends the
// client secret there when a user disconnects.
// +kubebuilder:validation:MaxLength=2048
// +kubebuilder:validation:Pattern=`^[^\s\v\x{85}\p{Z}]+$`
// +kubebuilder:validation:XValidation:rule="isURL(self) && url(self).getHostname() != ”",message="revocationURL must be a valid URL with a host"
// +kubebuilder:validation:XValidation:rule="self.matches('^https://[^/?#@\\\\s]+([/?#].*)?$')",message="revocationURL must be an https:// URL with a host and no user info"
// +optional
RevocationURL string `json:"revocationURL,omitempty"`
// Scopes are the OAuth2 scopes that Coder requests.
// +kubebuilder:validation:MaxItems=32
// +kubebuilder:validation:items:MinLength=1
// +kubebuilder:validation:items:MaxLength=256
// +kubebuilder:validation:items:Pattern=`^[!#-\[\]-~]+$`
// +listType=set
// +optional
Scopes []string `json:"scopes,omitempty"`
}
CoderMCPServerOAuth2Auth is a manually registered OAuth2 client. Coder's automatic discovery and dynamic client registration are not supported.
func (*CoderMCPServerOAuth2Auth) DeepCopy ¶ added in v0.1.4
func (in *CoderMCPServerOAuth2Auth) DeepCopy() *CoderMCPServerOAuth2Auth
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderMCPServerOAuth2Auth.
func (*CoderMCPServerOAuth2Auth) DeepCopyInto ¶ added in v0.1.4
func (in *CoderMCPServerOAuth2Auth) DeepCopyInto(out *CoderMCPServerOAuth2Auth)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CoderMCPServerSpec ¶ added in v0.1.4
type CoderMCPServerSpec struct {
// ControlPlaneRef names the CoderControlPlane in the same namespace. The
// controller calls Coder with that control plane's operator token.
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="controlPlaneRef is immutable"
ControlPlaneRef CoderControlPlaneReference `json:"controlPlaneRef"`
// Organization is the name of the Coder organization that holds the
// config. Coder cannot move a config to another organization. Coder
// reserves the names new and create.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=32
// +kubebuilder:validation:Pattern=`^[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*$`
// +kubebuilder:validation:XValidation:rule="self != 'new' && self != 'create'",message="organization must not be new or create"
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="organization is immutable"
Organization string `json:"organization"`
// Slug is the Coder slug of the config, unique in its organization. The
// model sees the server's tools as `<slug>__<tool>`.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=32
// +kubebuilder:validation:Pattern=`^[a-z0-9]+(-[a-z0-9]+)*$`
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="slug is immutable"
Slug string `json:"slug"`
// DisplayName is the name that Coder shows to users in chat.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=128
// +kubebuilder:validation:Pattern=`^[^\s\v\x{85}\p{Z}]([\s\S]*[^\s\v\x{85}\p{Z}])?$`
DisplayName string `json:"displayName"`
// Description is a short summary of what the server provides.
// +kubebuilder:validation:MaxLength=512
// +kubebuilder:validation:Pattern=`^[^\s\v\x{85}\p{Z}]([\s\S]*[^\s\v\x{85}\p{Z}])?$`
// +optional
Description string `json:"description,omitempty"`
// IconURL is the icon URL, path or emoji that Coder shows.
// +kubebuilder:validation:MaxLength=2048
// +kubebuilder:validation:Pattern=`^[^\s\v\x{85}\p{Z}]+$`
// +optional
IconURL string `json:"iconURL,omitempty"`
// URL is the http:// or https:// MCP endpoint that Coder connects to. It
// must not hold user info. Every Secret in auth must list its origin as an
// allowed destination.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=2048
// +kubebuilder:validation:Pattern=`^[^\s\v\x{85}\p{Z}]+$`
// +kubebuilder:validation:XValidation:rule="isURL(self) && url(self).getHostname() != ”",message="url must be a valid URL with a host"
// +kubebuilder:validation:XValidation:rule="self.matches('^https?://[^/?#@\\\\s]+([/?#].*)?$')",message="url must be an http:// or https:// URL with a host and no user info"
URL string `json:"url"`
// Transport is the MCP transport that Coder uses.
// +kubebuilder:validation:Enum=streamable_http;sse
// +kubebuilder:default=streamable_http
// +optional
Transport string `json:"transport,omitempty"`
// Availability decides how chats offer the server. force_on adds it to
// every new chat of a user who can read it. Coder's web UI preselects
// default_on servers. The Coder server treats default_on and default_off
// alike.
// +kubebuilder:validation:Enum=force_on;default_on;default_off
// +kubebuilder:default=default_off
// +optional
Availability string `json:"availability,omitempty"`
// Enabled turns the server on or off in Coder. Chats never connect to a
// disabled server. When omitted, the default is true.
// +kubebuilder:default=true
// +optional
Enabled *bool `json:"enabled,omitempty"`
// AllowInPlanMode offers the server in plan-mode chats.
// +optional
AllowInPlanMode bool `json:"allowInPlanMode,omitempty"`
// ModelIntent asks the model to state its intent with each tool call.
// +optional
ModelIntent bool `json:"modelIntent,omitempty"`
// ForwardCoderHeaders sends the chat owner, chat and workspace IDs to the
// server as X-Coder-* headers. Coder sends no token in them.
// +optional
ForwardCoderHeaders bool `json:"forwardCoderHeaders,omitempty"`
// Auth is how Coder authenticates to the server.
Auth CoderMCPServerAuth `json:"auth"`
// Access, when set, makes the controller own the server's access list in
// Coder: exactly the listed groups can read the server. Every sync
// therefore also removes each user entry, for example a user that an admin
// added in the Coder dashboard. Coder does not show the entry of a deleted
// group, so the sync cannot remove it, but it grants nothing.
// When omitted, the controller leaves the access list alone, and Coder's
// default lets every organization member read the server.
// +optional
Access *CoderMCPServerAccess `json:"access,omitempty"`
}
CoderMCPServerSpec defines one MCP server config in a Coder organization. Coder trims every text field with strings.TrimSpace, so the patterns reject leading and trailing Unicode white space. The class [\s\v\x{85}\p{Z}] is exactly the set of runes that unicode.IsSpace reports.
func (*CoderMCPServerSpec) DeepCopy ¶ added in v0.1.4
func (in *CoderMCPServerSpec) DeepCopy() *CoderMCPServerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderMCPServerSpec.
func (*CoderMCPServerSpec) DeepCopyInto ¶ added in v0.1.4
func (in *CoderMCPServerSpec) DeepCopyInto(out *CoderMCPServerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CoderMCPServerStatus ¶ added in v0.1.4
type CoderMCPServerStatus struct {
// ObservedGeneration is the generation the controller last processed.
// +optional
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// AppliedGeneration is the last generation whose spec Coder fully holds,
// or that a kill switch holds: when the controller disables the config
// because a credential Secret or the control plane withdrew consent, it
// sets this field before it sends the disable, so only a later spec edit
// enables the config again. Ready tells whether Coder holds the spec.
// +optional
AppliedGeneration int64 `json:"appliedGeneration,omitempty"`
// OrganizationID is the Coder organization ID that spec.organization
// resolved to first.
// +optional
OrganizationID string `json:"organizationID,omitempty"`
// ConfigID is the Coder MCP server config ID.
// +optional
ConfigID string `json:"configID,omitempty"`
// CreateAttemptTime is set before every create request. While it is set
// and ConfigID is empty, a create request can be in flight or already
// committed in Coder.
// +optional
CreateAttemptTime *metav1.Time `json:"createAttemptTime,omitempty"`
// Credentials record the Secret values last sent to Coder.
// +listType=map
// +listMapKey=field
// +optional
Credentials []CoderMCPServerCredentialStatus `json:"credentials,omitempty"`
// Conditions are Ready, Reconciling, and Stalled.
// +listType=map
// +listMapKey=type
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
CoderMCPServerStatus defines the observed state of a CoderMCPServer.
func (*CoderMCPServerStatus) DeepCopy ¶ added in v0.1.4
func (in *CoderMCPServerStatus) DeepCopy() *CoderMCPServerStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderMCPServerStatus.
func (*CoderMCPServerStatus) DeepCopyInto ¶ added in v0.1.4
func (in *CoderMCPServerStatus) DeepCopyInto(out *CoderMCPServerStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CoderProvisioner ¶
type CoderProvisioner struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec CoderProvisionerSpec `json:"spec,omitempty"`
Status CoderProvisionerStatus `json:"status,omitempty"`
}
CoderProvisioner is the schema for Coder external provisioner daemon resources.
func (*CoderProvisioner) DeepCopy ¶
func (in *CoderProvisioner) DeepCopy() *CoderProvisioner
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderProvisioner.
func (*CoderProvisioner) DeepCopyInto ¶
func (in *CoderProvisioner) DeepCopyInto(out *CoderProvisioner)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CoderProvisioner) DeepCopyObject ¶
func (in *CoderProvisioner) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CoderProvisionerKeySpec ¶
type CoderProvisionerKeySpec struct {
// Name is the provisioner key name in coderd. Defaults to the CR name.
// +kubebuilder:validation:MaxLength=128
Name string `json:"name,omitempty"`
// SecretName is the Kubernetes Secret to store the key. Defaults to "{crName}-provisioner-key".
// +kubebuilder:validation:MaxLength=253
SecretName string `json:"secretName,omitempty"`
// SecretKey is the data key in the Secret. Defaults to "key".
// +kubebuilder:validation:MaxLength=253
SecretKey string `json:"secretKey,omitempty"`
}
CoderProvisionerKeySpec configures provisioner key naming and storage.
func (*CoderProvisionerKeySpec) DeepCopy ¶
func (in *CoderProvisionerKeySpec) DeepCopy() *CoderProvisionerKeySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderProvisionerKeySpec.
func (*CoderProvisionerKeySpec) DeepCopyInto ¶
func (in *CoderProvisionerKeySpec) DeepCopyInto(out *CoderProvisionerKeySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CoderProvisionerList ¶
type CoderProvisionerList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []CoderProvisioner `json:"items"`
}
CoderProvisionerList contains a list of CoderProvisioner objects.
func (*CoderProvisionerList) DeepCopy ¶
func (in *CoderProvisionerList) DeepCopy() *CoderProvisionerList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderProvisionerList.
func (*CoderProvisionerList) DeepCopyInto ¶
func (in *CoderProvisionerList) DeepCopyInto(out *CoderProvisionerList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CoderProvisionerList) DeepCopyObject ¶
func (in *CoderProvisionerList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CoderProvisionerSpec ¶
type CoderProvisionerSpec struct {
// ControlPlaneRef identifies which CoderControlPlane instance to join.
// Provisioner key management uses operator-managed access from this
// control plane's status.operatorTokenSecretRef.
ControlPlaneRef corev1.LocalObjectReference `json:"controlPlaneRef"`
// OrganizationName is the Coder organization. Defaults to "default".
// +kubebuilder:validation:MaxLength=128
OrganizationName string `json:"organizationName,omitempty"`
// Key configures provisioner key naming and secret storage.
Key CoderProvisionerKeySpec `json:"key,omitempty"`
// Replicas is the desired number of provisioner pods.
Replicas *int32 `json:"replicas,omitempty"`
// Tags are attached to the provisioner key for job routing.
Tags map[string]string `json:"tags,omitempty"`
// Image is the container image. Defaults to the control plane image.
Image string `json:"image,omitempty"`
// ExtraArgs are appended after "provisioner start".
ExtraArgs []string `json:"extraArgs,omitempty"`
// ExtraEnv are injected into the provisioner container.
ExtraEnv []corev1.EnvVar `json:"extraEnv,omitempty"`
// Resources for the provisioner container.
Resources corev1.ResourceRequirements `json:"resources,omitempty"`
// ImagePullSecrets are used by the pod to pull private images.
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
// TerminationGracePeriodSeconds for the provisioner pods.
TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"`
}
CoderProvisionerSpec defines the desired state of a CoderProvisioner.
func (*CoderProvisionerSpec) DeepCopy ¶
func (in *CoderProvisionerSpec) DeepCopy() *CoderProvisionerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderProvisionerSpec.
func (*CoderProvisionerSpec) DeepCopyInto ¶
func (in *CoderProvisionerSpec) DeepCopyInto(out *CoderProvisionerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CoderProvisionerStatus ¶
type CoderProvisionerStatus struct {
// ObservedGeneration tracks the spec generation this status reflects.
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// ReadyReplicas is the number of ready pods observed in the deployment.
ReadyReplicas int32 `json:"readyReplicas,omitempty"`
// Phase is a high-level readiness indicator.
Phase string `json:"phase,omitempty"`
// Conditions are Kubernetes-standard conditions for this resource.
Conditions []metav1.Condition `json:"conditions,omitempty"`
// OrganizationID is the organization ID last applied to the provisioner key.
OrganizationID string `json:"organizationID,omitempty"`
// OrganizationName is the organization name last applied to the provisioner key.
OrganizationName string `json:"organizationName,omitempty"`
// ProvisionerKeyID is the provisioner key ID last applied in coderd.
ProvisionerKeyID string `json:"provisionerKeyID,omitempty"`
// ProvisionerKeyName is the provisioner key name last applied in coderd.
ProvisionerKeyName string `json:"provisionerKeyName,omitempty"`
// TagsHash is a deterministic hash of spec.tags last applied to the provisioner key.
TagsHash string `json:"tagsHash,omitempty"`
// ControlPlaneRefName is the control plane ref name last applied to the provisioner key.
ControlPlaneRefName string `json:"controlPlaneRefName,omitempty"`
// ControlPlaneURL is the control plane URL last applied to the provisioner key.
ControlPlaneURL string `json:"controlPlaneURL,omitempty"`
// SecretRef references the provisioner key secret data currently in use.
SecretRef *SecretKeySelector `json:"secretRef,omitempty"`
}
CoderProvisionerStatus defines the observed state of a CoderProvisioner.
func (*CoderProvisionerStatus) DeepCopy ¶
func (in *CoderProvisionerStatus) DeepCopy() *CoderProvisionerStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderProvisionerStatus.
func (*CoderProvisionerStatus) DeepCopyInto ¶
func (in *CoderProvisionerStatus) DeepCopyInto(out *CoderProvisionerStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CoderTemplateTest ¶ added in v0.1.3
type CoderTemplateTest struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="spec is immutable, create a new CoderTemplateTest"
Spec CoderTemplateTestSpec `json:"spec"`
Status CoderTemplateTestStatus `json:"status,omitempty"`
}
CoderTemplateTest tests one Coder template version like a Job: the controller creates a throwaway workspace, waits until every top-level agent is ready, deletes the workspace, and records Succeeded or Failed. The spec is immutable, so one object is one run.
func (*CoderTemplateTest) DeepCopy ¶ added in v0.1.3
func (in *CoderTemplateTest) DeepCopy() *CoderTemplateTest
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderTemplateTest.
func (*CoderTemplateTest) DeepCopyInto ¶ added in v0.1.3
func (in *CoderTemplateTest) DeepCopyInto(out *CoderTemplateTest)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CoderTemplateTest) DeepCopyObject ¶ added in v0.1.3
func (in *CoderTemplateTest) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CoderTemplateTestList ¶ added in v0.1.3
type CoderTemplateTestList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []CoderTemplateTest `json:"items"`
}
CoderTemplateTestList contains a list of CoderTemplateTest objects.
func (*CoderTemplateTestList) DeepCopy ¶ added in v0.1.3
func (in *CoderTemplateTestList) DeepCopy() *CoderTemplateTestList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderTemplateTestList.
func (*CoderTemplateTestList) DeepCopyInto ¶ added in v0.1.3
func (in *CoderTemplateTestList) DeepCopyInto(out *CoderTemplateTestList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CoderTemplateTestList) DeepCopyObject ¶ added in v0.1.3
func (in *CoderTemplateTestList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CoderTemplateTestParameter ¶ added in v0.1.3
type CoderTemplateTestParameter struct {
// Name is the parameter name.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=128
Name string `json:"name"`
// Value is the parameter value.
// +kubebuilder:validation:MaxLength=4096
// +optional
Value string `json:"value,omitempty"`
}
CoderTemplateTestParameter is one rich parameter value for the start build. Values are stored in plain text, so never put secrets here.
func (*CoderTemplateTestParameter) DeepCopy ¶ added in v0.1.3
func (in *CoderTemplateTestParameter) DeepCopy() *CoderTemplateTestParameter
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderTemplateTestParameter.
func (*CoderTemplateTestParameter) DeepCopyInto ¶ added in v0.1.3
func (in *CoderTemplateTestParameter) DeepCopyInto(out *CoderTemplateTestParameter)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CoderTemplateTestSpec ¶ added in v0.1.3
type CoderTemplateTestSpec struct {
// ControlPlaneRef names the CoderControlPlane in the same namespace. The
// controller calls Coder with that control plane's operator token.
ControlPlaneRef CoderControlPlaneReference `json:"controlPlaneRef"`
// 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.
// +kubebuilder:validation:MaxLength=65
// +kubebuilder:validation:XValidation:rule="self.matches('^[^.]{1,32}[.][^.]{1,32}$')",message="organization and template names must each have at most 32 characters"
// +kubebuilder:validation:XValidation:rule="!self.matches('^(new|create)[.]') && !self.matches('[.](new|create)$')",message="organization and template names must not be new or create"
// +kubebuilder:validation:Pattern=`^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*\.[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$`
Template string `json:"template"`
// Version selects the template version under test.
Version CoderTemplateTestVersion `json:"version"`
// Parameters are rich parameter values for the start build.
// +listType=map
// +listMapKey=name
// +kubebuilder:validation:MaxItems=64
// +optional
Parameters []CoderTemplateTestParameter `json:"parameters,omitempty"`
// TimeoutSeconds bounds the whole run: waiting for inputs, the start
// build, agent readiness, and the delete build. Cleanup continues after
// the deadline.
// +kubebuilder:default=900
// +kubebuilder:validation:Minimum=60
// +kubebuilder:validation:Maximum=7200
// +optional
TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"`
// 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.
// +kubebuilder:validation:Minimum=0
// +optional
TTLSecondsAfterFinished *int32 `json:"ttlSecondsAfterFinished,omitempty"`
}
CoderTemplateTestSpec defines one test run of a Coder template version.
func (*CoderTemplateTestSpec) DeepCopy ¶ added in v0.1.3
func (in *CoderTemplateTestSpec) DeepCopy() *CoderTemplateTestSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderTemplateTestSpec.
func (*CoderTemplateTestSpec) DeepCopyInto ¶ added in v0.1.3
func (in *CoderTemplateTestSpec) DeepCopyInto(out *CoderTemplateTestSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CoderTemplateTestStatus ¶ added in v0.1.3
type CoderTemplateTestStatus struct {
// ObservedGeneration is the generation the controller last processed.
// +optional
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// Phase is Pending, Running, Succeeded, or Failed. Succeeded and Failed
// are final.
// +kubebuilder:validation:Enum=Pending;Running;Succeeded;Failed
// +optional
Phase string `json:"phase,omitempty"`
// Reason is the current wait reason or the final result.
// +optional
Reason string `json:"reason,omitempty"`
// Message explains Reason. It never holds Coder error details, build
// logs, parameter values, or tokens.
// +optional
Message string `json:"message,omitempty"`
// StartTime is when the controller first processed the test.
// +optional
StartTime *metav1.Time `json:"startTime,omitempty"`
// CompletionTime is when the phase became final.
// +optional
CompletionTime *metav1.Time `json:"completionTime,omitempty"`
// OrganizationID is the resolved Coder organization ID.
// +optional
OrganizationID string `json:"organizationID,omitempty"`
// TemplateID is the resolved Coder template ID.
// +optional
TemplateID string `json:"templateID,omitempty"`
// TemplateVersionID is the pinned template version ID.
// +optional
TemplateVersionID string `json:"templateVersionID,omitempty"`
// TemplateVersionName is the name of the pinned template version.
// +optional
TemplateVersionName string `json:"templateVersionName,omitempty"`
// OwnerID is the Coder user that owns the test workspace.
// +optional
OwnerID string `json:"ownerID,omitempty"`
// WorkspaceName is the deterministic Coder workspace name of this test.
// +optional
WorkspaceName string `json:"workspaceName,omitempty"`
// 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.
// +optional
CreateAttemptTime *metav1.Time `json:"createAttemptTime,omitempty"`
// WorkspaceID is the Coder workspace ID.
// +optional
WorkspaceID string `json:"workspaceID,omitempty"`
// StartBuildID is the ID of the start build that the controller requested.
// +optional
StartBuildID string `json:"startBuildID,omitempty"`
// DeleteBuildID is the ID of the current delete build.
// +optional
DeleteBuildID string `json:"deleteBuildID,omitempty"`
// AgentsReadyTime is when every top-level agent was ready.
// +optional
AgentsReadyTime *metav1.Time `json:"agentsReadyTime,omitempty"`
// DeleteAttempts counts failed delete builds. It drives the retry backoff.
// +optional
DeleteAttempts int32 `json:"deleteAttempts,omitempty"`
// Conditions are Ready, Reconciling, Stalled, and WorkspaceDeleted.
// +listType=map
// +listMapKey=type
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
CoderTemplateTestStatus defines the observed state of a CoderTemplateTest.
func (*CoderTemplateTestStatus) DeepCopy ¶ added in v0.1.3
func (in *CoderTemplateTestStatus) DeepCopy() *CoderTemplateTestStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderTemplateTestStatus.
func (*CoderTemplateTestStatus) DeepCopyInto ¶ added in v0.1.3
func (in *CoderTemplateTestStatus) DeepCopyInto(out *CoderTemplateTestStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CoderTemplateTestVersion ¶ added in v0.1.3
type CoderTemplateTestVersion struct {
// Name is the name of a version of the template. It follows Coder's
// template version name rules.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=64
// +kubebuilder:validation:Pattern=`^[a-zA-Z0-9]+([_.-][a-zA-Z0-9]+)*$`
// +optional
Name string `json:"name,omitempty"`
// ID is the UUID of a version of the template.
// +kubebuilder:validation:Format=uuid
// +kubebuilder:validation:MaxLength=36
// +optional
ID string `json:"id,omitempty"`
// 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.
// +optional
Active *bool `json:"active,omitempty"`
}
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"
func (*CoderTemplateTestVersion) DeepCopy ¶ added in v0.1.3
func (in *CoderTemplateTestVersion) DeepCopy() *CoderTemplateTestVersion
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderTemplateTestVersion.
func (*CoderTemplateTestVersion) DeepCopyInto ¶ added in v0.1.3
func (in *CoderTemplateTestVersion) DeepCopyInto(out *CoderTemplateTestVersion)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CoderWorkspaceClaim ¶ added in v0.1.4
type CoderWorkspaceClaim struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec CoderWorkspaceClaimSpec `json:"spec"`
Status CoderWorkspaceClaimStatus `json:"status,omitempty"`
}
CoderWorkspaceClaim takes one ready workspace from a CoderWorkspacePool (#153). Deleting the claim deletes its workspace.
func (*CoderWorkspaceClaim) DeepCopy ¶ added in v0.1.4
func (in *CoderWorkspaceClaim) DeepCopy() *CoderWorkspaceClaim
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderWorkspaceClaim.
func (*CoderWorkspaceClaim) DeepCopyInto ¶ added in v0.1.4
func (in *CoderWorkspaceClaim) DeepCopyInto(out *CoderWorkspaceClaim)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CoderWorkspaceClaim) DeepCopyObject ¶ added in v0.1.4
func (in *CoderWorkspaceClaim) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CoderWorkspaceClaimList ¶ added in v0.1.4
type CoderWorkspaceClaimList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []CoderWorkspaceClaim `json:"items"`
}
CoderWorkspaceClaimList contains a list of CoderWorkspaceClaim objects.
func (*CoderWorkspaceClaimList) DeepCopy ¶ added in v0.1.4
func (in *CoderWorkspaceClaimList) DeepCopy() *CoderWorkspaceClaimList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderWorkspaceClaimList.
func (*CoderWorkspaceClaimList) DeepCopyInto ¶ added in v0.1.4
func (in *CoderWorkspaceClaimList) DeepCopyInto(out *CoderWorkspaceClaimList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CoderWorkspaceClaimList) DeepCopyObject ¶ added in v0.1.4
func (in *CoderWorkspaceClaimList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CoderWorkspaceClaimReference ¶ added in v0.1.4
type CoderWorkspaceClaimReference struct {
// Name is the claim name, in the member's namespace.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=253
// +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`
Name string `json:"name"`
// UID is the claim's metadata.uid.
// +kubebuilder:validation:MaxLength=36
// +kubebuilder:validation:Pattern=`^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$`
UID string `json:"uid"`
}
CoderWorkspaceClaimReference names the CoderWorkspaceClaim that holds a member.
func (*CoderWorkspaceClaimReference) DeepCopy ¶ added in v0.1.4
func (in *CoderWorkspaceClaimReference) DeepCopy() *CoderWorkspaceClaimReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderWorkspaceClaimReference.
func (*CoderWorkspaceClaimReference) DeepCopyInto ¶ added in v0.1.4
func (in *CoderWorkspaceClaimReference) DeepCopyInto(out *CoderWorkspaceClaimReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CoderWorkspaceClaimSpec ¶ added in v0.1.4
type CoderWorkspaceClaimSpec struct {
// PoolName is the CoderWorkspacePool in the claim's namespace.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=253
// +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`
PoolName string `json:"poolName"`
}
CoderWorkspaceClaimSpec names the pool that a claim takes a workspace from. It is immutable, so one claim is one workspace. +kubebuilder:validation:XValidation:rule="self == oldSelf",message="spec is immutable"
func (*CoderWorkspaceClaimSpec) DeepCopy ¶ added in v0.1.4
func (in *CoderWorkspaceClaimSpec) DeepCopy() *CoderWorkspaceClaimSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderWorkspaceClaimSpec.
func (*CoderWorkspaceClaimSpec) DeepCopyInto ¶ added in v0.1.4
func (in *CoderWorkspaceClaimSpec) DeepCopyInto(out *CoderWorkspaceClaimSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CoderWorkspaceClaimStatus ¶ added in v0.1.4
type CoderWorkspaceClaimStatus struct {
// Phase is Pending, Bound, or Lost. Lost is final.
// +kubebuilder:validation:Enum=Pending;Bound;Lost
// +optional
Phase string `json:"phase,omitempty"`
// MemberName is the CoderWorkspacePoolMember that holds the claim.
// +optional
MemberName string `json:"memberName,omitempty"`
// WorkspaceID is the Coder workspace ID.
// +optional
WorkspaceID string `json:"workspaceID,omitempty"`
// WorkspaceName is the Coder workspace name.
// +optional
WorkspaceName string `json:"workspaceName,omitempty"`
// OwnerName is the Coder username of the workspace owner, so that
// `coder ssh <ownerName>/<workspaceName>` reaches the workspace.
// +optional
OwnerName string `json:"ownerName,omitempty"`
// BoundTime is when a member took the claim.
// +optional
BoundTime *metav1.Time `json:"boundTime,omitempty"`
// Reason is the current wait reason or the reason for Lost.
// +optional
Reason string `json:"reason,omitempty"`
// Message explains Reason. It never holds Coder error details, build
// logs, parameter values, or tokens.
// +optional
Message string `json:"message,omitempty"`
// Conditions are Ready, Reconciling, and Stalled.
// +listType=map
// +listMapKey=type
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
CoderWorkspaceClaimStatus defines the observed state of a CoderWorkspaceClaim.
func (*CoderWorkspaceClaimStatus) DeepCopy ¶ added in v0.1.4
func (in *CoderWorkspaceClaimStatus) DeepCopy() *CoderWorkspaceClaimStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderWorkspaceClaimStatus.
func (*CoderWorkspaceClaimStatus) DeepCopyInto ¶ added in v0.1.4
func (in *CoderWorkspaceClaimStatus) DeepCopyInto(out *CoderWorkspaceClaimStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CoderWorkspacePool ¶ added in v0.1.4
type CoderWorkspacePool struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec CoderWorkspacePoolSpec `json:"spec"`
Status CoderWorkspacePoolStatus `json:"status,omitempty"`
}
CoderWorkspacePool keeps a number of ready Coder workspaces from one template for one Coder owner, and hands them out through claims (#153). The scale subresource lets kubectl scale, HPA, and KEDA resize it.
func (*CoderWorkspacePool) DeepCopy ¶ added in v0.1.4
func (in *CoderWorkspacePool) DeepCopy() *CoderWorkspacePool
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderWorkspacePool.
func (*CoderWorkspacePool) DeepCopyInto ¶ added in v0.1.4
func (in *CoderWorkspacePool) DeepCopyInto(out *CoderWorkspacePool)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CoderWorkspacePool) DeepCopyObject ¶ added in v0.1.4
func (in *CoderWorkspacePool) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CoderWorkspacePoolClaims ¶ added in v0.1.4
type CoderWorkspacePoolClaims struct {
// Mode is how a claim gets its workspace. Reserve binds a ready workspace
// to the claim, and the workspace stays with the pool owner.
// +kubebuilder:validation:Enum=Reserve
// +kubebuilder:default=Reserve
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="claims.mode is immutable"
// +optional
Mode string `json:"mode,omitempty"`
}
CoderWorkspacePoolClaims configures how the pool hands out workspaces.
func (*CoderWorkspacePoolClaims) DeepCopy ¶ added in v0.1.4
func (in *CoderWorkspacePoolClaims) DeepCopy() *CoderWorkspacePoolClaims
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderWorkspacePoolClaims.
func (*CoderWorkspacePoolClaims) DeepCopyInto ¶ added in v0.1.4
func (in *CoderWorkspacePoolClaims) DeepCopyInto(out *CoderWorkspacePoolClaims)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CoderWorkspacePoolFailure ¶ added in v0.1.4
type CoderWorkspacePoolFailure struct {
// Member is the name of the failed CoderWorkspacePoolMember.
// +optional
Member string `json:"member,omitempty"`
// Reason is the member's failure reason.
// +optional
Reason string `json:"reason,omitempty"`
// Message explains Reason. It never holds Coder error details, build
// logs, parameter values, or tokens.
// +optional
Message string `json:"message,omitempty"`
// Time is when the controller recorded the failure.
// +optional
Time *metav1.Time `json:"time,omitempty"`
}
CoderWorkspacePoolFailure is the newest member failure of a pool.
func (*CoderWorkspacePoolFailure) DeepCopy ¶ added in v0.1.4
func (in *CoderWorkspacePoolFailure) DeepCopy() *CoderWorkspacePoolFailure
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderWorkspacePoolFailure.
func (*CoderWorkspacePoolFailure) DeepCopyInto ¶ added in v0.1.4
func (in *CoderWorkspacePoolFailure) DeepCopyInto(out *CoderWorkspacePoolFailure)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CoderWorkspacePoolList ¶ added in v0.1.4
type CoderWorkspacePoolList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []CoderWorkspacePool `json:"items"`
}
CoderWorkspacePoolList contains a list of CoderWorkspacePool objects.
func (*CoderWorkspacePoolList) DeepCopy ¶ added in v0.1.4
func (in *CoderWorkspacePoolList) DeepCopy() *CoderWorkspacePoolList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderWorkspacePoolList.
func (*CoderWorkspacePoolList) DeepCopyInto ¶ added in v0.1.4
func (in *CoderWorkspacePoolList) DeepCopyInto(out *CoderWorkspacePoolList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CoderWorkspacePoolList) DeepCopyObject ¶ added in v0.1.4
func (in *CoderWorkspacePoolList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CoderWorkspacePoolMember ¶ added in v0.1.4
type CoderWorkspacePoolMember struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec CoderWorkspacePoolMemberSpec `json:"spec"`
Status CoderWorkspacePoolMemberStatus `json:"status,omitempty"`
}
CoderWorkspacePoolMember is one workspace of a CoderWorkspacePool (#153). The pool controller creates members. Each member creates, watches, and deletes its own Coder workspace.
func (*CoderWorkspacePoolMember) DeepCopy ¶ added in v0.1.4
func (in *CoderWorkspacePoolMember) DeepCopy() *CoderWorkspacePoolMember
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderWorkspacePoolMember.
func (*CoderWorkspacePoolMember) DeepCopyInto ¶ added in v0.1.4
func (in *CoderWorkspacePoolMember) DeepCopyInto(out *CoderWorkspacePoolMember)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CoderWorkspacePoolMember) DeepCopyObject ¶ added in v0.1.4
func (in *CoderWorkspacePoolMember) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CoderWorkspacePoolMemberList ¶ added in v0.1.4
type CoderWorkspacePoolMemberList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []CoderWorkspacePoolMember `json:"items"`
}
CoderWorkspacePoolMemberList contains a list of CoderWorkspacePoolMember objects.
func (*CoderWorkspacePoolMemberList) DeepCopy ¶ added in v0.1.4
func (in *CoderWorkspacePoolMemberList) DeepCopy() *CoderWorkspacePoolMemberList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderWorkspacePoolMemberList.
func (*CoderWorkspacePoolMemberList) DeepCopyInto ¶ added in v0.1.4
func (in *CoderWorkspacePoolMemberList) DeepCopyInto(out *CoderWorkspacePoolMemberList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CoderWorkspacePoolMemberList) DeepCopyObject ¶ added in v0.1.4
func (in *CoderWorkspacePoolMemberList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CoderWorkspacePoolMemberParameter ¶ added in v0.1.4
type CoderWorkspacePoolMemberParameter struct {
// Name is the parameter name.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=128
Name string `json:"name"`
// Value is the parameter value. It can be empty.
// +kubebuilder:validation:MaxLength=4096
Value string `json:"value"`
}
CoderWorkspacePoolMemberParameter is one pinned rich parameter value. Value is required and always serialized, so an empty value looks the same in a stored object and in a typed update, and the immutability rule holds.
func (*CoderWorkspacePoolMemberParameter) DeepCopy ¶ added in v0.1.4
func (in *CoderWorkspacePoolMemberParameter) DeepCopy() *CoderWorkspacePoolMemberParameter
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderWorkspacePoolMemberParameter.
func (*CoderWorkspacePoolMemberParameter) DeepCopyInto ¶ added in v0.1.4
func (in *CoderWorkspacePoolMemberParameter) DeepCopyInto(out *CoderWorkspacePoolMemberParameter)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CoderWorkspacePoolMemberSpec ¶ added in v0.1.4
type CoderWorkspacePoolMemberSpec struct {
// ControlPlaneRef names the pool's CoderControlPlane.
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="controlPlaneRef is immutable"
ControlPlaneRef CoderControlPlaneReference `json:"controlPlaneRef"`
// PoolName is the name of the member's CoderWorkspacePool.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=253
// +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="poolName is immutable"
PoolName string `json:"poolName"`
// OwnerID is the Coder user who owns the workspace. Coder's prebuilds
// system user is refused.
// +kubebuilder:validation:MaxLength=36
// +kubebuilder:validation:Pattern=`^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$`
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ownerID is immutable"
// +kubebuilder:validation:XValidation:rule="self != 'c42fdf75-3097-471c-8c33-fb52454d81c0'",message="ownerID must not be the Coder prebuilds system user"
OwnerID string `json:"ownerID"`
// OrganizationID is the template's organization.
// +kubebuilder:validation:MaxLength=36
// +kubebuilder:validation:Pattern=`^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$`
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="organizationID is immutable"
OrganizationID string `json:"organizationID"`
// TemplateID is the template.
// +kubebuilder:validation:MaxLength=36
// +kubebuilder:validation:Pattern=`^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$`
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="templateID is immutable"
TemplateID string `json:"templateID"`
// TemplateVersionID is the version of the start build.
// +kubebuilder:validation:MaxLength=36
// +kubebuilder:validation:Pattern=`^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$`
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="templateVersionID is immutable"
TemplateVersionID string `json:"templateVersionID"`
// PresetID is the preset of the start build.
// +kubebuilder:validation:MaxLength=36
// +kubebuilder:validation:Pattern=`^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$`
// +optional
PresetID string `json:"presetID,omitempty"`
// Parameters are the rich parameter values of the start build, in plain
// text. Leave the field out when there are none: typed clients drop an
// empty list, and the immutability rule would then refuse their updates.
// +listType=map
// +listMapKey=name
// +kubebuilder:validation:MinItems=1
// +kubebuilder:validation:MaxItems=64
// +optional
Parameters []CoderWorkspacePoolMemberParameter `json:"parameters,omitempty"`
// ParametersHash is the pool's hash of Parameters when it created the
// member.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=128
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="parametersHash is immutable"
ParametersHash string `json:"parametersHash"`
// ReadyTimeoutSeconds bounds the time from the member's creation until
// its workspace is ready.
// +kubebuilder:validation:Minimum=60
// +kubebuilder:validation:Maximum=7200
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="readyTimeoutSeconds is immutable"
ReadyTimeoutSeconds int32 `json:"readyTimeoutSeconds"`
// ClaimRef is the claim that holds this member. The pool sets it once,
// when it binds a ready member.
// +optional
ClaimRef *CoderWorkspaceClaimReference `json:"claimRef,omitempty"`
}
CoderWorkspacePoolMemberSpec holds the inputs that a member pinned from its pool's status.resolved. Only claimRef changes after creation, and only once. Every ID is a UUID in lower case with hyphens, as Coder writes it. +kubebuilder:validation:XValidation:rule="has(self.presetID) == has(oldSelf.presetID) && (!has(self.presetID) || self.presetID == oldSelf.presetID)",message="presetID is immutable" +kubebuilder:validation:XValidation:rule="has(self.parameters) == has(oldSelf.parameters) && (!has(self.parameters) || self.parameters == oldSelf.parameters)",message="parameters are immutable" +kubebuilder:validation:XValidation:rule="!has(oldSelf.claimRef) || (has(self.claimRef) && self.claimRef == oldSelf.claimRef)",message="claimRef can be set once"
func (*CoderWorkspacePoolMemberSpec) DeepCopy ¶ added in v0.1.4
func (in *CoderWorkspacePoolMemberSpec) DeepCopy() *CoderWorkspacePoolMemberSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderWorkspacePoolMemberSpec.
func (*CoderWorkspacePoolMemberSpec) DeepCopyInto ¶ added in v0.1.4
func (in *CoderWorkspacePoolMemberSpec) DeepCopyInto(out *CoderWorkspacePoolMemberSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CoderWorkspacePoolMemberStatus ¶ added in v0.1.4
type CoderWorkspacePoolMemberStatus struct {
// Phase is Pending, Creating, Ready, Failed, or Deleting.
// +kubebuilder:validation:Enum=Pending;Creating;Ready;Failed;Deleting
// +optional
Phase string `json:"phase,omitempty"`
// WorkspaceName is the Coder workspace name: kwp- and the first 28 hex
// characters of the member's UID.
// +optional
WorkspaceName string `json:"workspaceName,omitempty"`
// 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.
// +optional
CreateAttemptTime *metav1.Time `json:"createAttemptTime,omitempty"`
// WorkspaceID is the Coder workspace ID.
// +optional
WorkspaceID string `json:"workspaceID,omitempty"`
// StartBuildID is the ID of the start build that the controller requested.
// +optional
StartBuildID string `json:"startBuildID,omitempty"`
// ReadyTime is when the workspace became ready.
// +optional
ReadyTime *metav1.Time `json:"readyTime,omitempty"`
// ReadyLastUsedAt is the workspace's last_used_at when it became ready.
// A later value means that someone used the workspace.
// +optional
ReadyLastUsedAt *metav1.Time `json:"readyLastUsedAt,omitempty"`
// LastExtendTime is when the controller last extended the autostop
// deadline of the unclaimed workspace.
// +optional
LastExtendTime *metav1.Time `json:"lastExtendTime,omitempty"`
// BindExtended is true after the one deadline extension at bind.
// +optional
BindExtended bool `json:"bindExtended,omitempty"`
// BindExtendDeadline is the deadline that the extension at bind asks
// Coder for. The controller stores it before the first extend request.
// While BindExtended is false, a Coder deadline at or after it proves
// that the extension happened.
// +optional
BindExtendDeadline *metav1.Time `json:"bindExtendDeadline,omitempty"`
// DeleteBuildID is the ID of the current delete build.
// +optional
DeleteBuildID string `json:"deleteBuildID,omitempty"`
// DeleteAttempts counts failed delete builds. It drives the retry backoff.
// +optional
DeleteAttempts int32 `json:"deleteAttempts,omitempty"`
// Reason is the current wait reason or the failure reason.
// +optional
Reason string `json:"reason,omitempty"`
// Message explains Reason. It never holds Coder error details, build
// logs, parameter values, or tokens.
// +optional
Message string `json:"message,omitempty"`
// Conditions are Ready, Used, and WorkspaceDeleted.
// +listType=map
// +listMapKey=type
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
CoderWorkspacePoolMemberStatus defines the observed state of a CoderWorkspacePoolMember.
func (*CoderWorkspacePoolMemberStatus) DeepCopy ¶ added in v0.1.4
func (in *CoderWorkspacePoolMemberStatus) DeepCopy() *CoderWorkspacePoolMemberStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderWorkspacePoolMemberStatus.
func (*CoderWorkspacePoolMemberStatus) DeepCopyInto ¶ added in v0.1.4
func (in *CoderWorkspacePoolMemberStatus) DeepCopyInto(out *CoderWorkspacePoolMemberStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CoderWorkspacePoolParameter ¶ added in v0.1.4
type CoderWorkspacePoolParameter struct {
// Name is the parameter name.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=128
Name string `json:"name"`
// Value is the parameter value.
// +kubebuilder:validation:MaxLength=4096
// +optional
Value string `json:"value,omitempty"`
}
CoderWorkspacePoolParameter is one rich parameter value for the start builds. Values are stored in plain text, so never put secrets here.
func (*CoderWorkspacePoolParameter) DeepCopy ¶ added in v0.1.4
func (in *CoderWorkspacePoolParameter) DeepCopy() *CoderWorkspacePoolParameter
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderWorkspacePoolParameter.
func (*CoderWorkspacePoolParameter) DeepCopyInto ¶ added in v0.1.4
func (in *CoderWorkspacePoolParameter) DeepCopyInto(out *CoderWorkspacePoolParameter)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CoderWorkspacePoolResolved ¶ added in v0.1.4
type CoderWorkspacePoolResolved struct {
// OrganizationID is the UUID of the template's organization.
// +optional
OrganizationID string `json:"organizationID,omitempty"`
// TemplateID is the UUID of the template.
// +optional
TemplateID string `json:"templateID,omitempty"`
// TemplateVersionID is the UUID of the selected version.
// +optional
TemplateVersionID string `json:"templateVersionID,omitempty"`
// TemplateVersionName is the name of the selected version.
// +optional
TemplateVersionName string `json:"templateVersionName,omitempty"`
// PresetID is the UUID of the preset named by spec.presetName.
// +optional
PresetID string `json:"presetID,omitempty"`
// OwnerID is the UUID of the owner the controller checked.
// +optional
OwnerID string `json:"ownerID,omitempty"`
// ParametersHash identifies spec.parameters, so the controller can tell
// current members from outdated ones without storing values twice.
// +optional
ParametersHash string `json:"parametersHash,omitempty"`
// ReadyTimeoutSeconds is spec.readyTimeoutSeconds. A change of any of
// these values starts a new run of failures, because it can fix one.
// +optional
ReadyTimeoutSeconds int32 `json:"readyTimeoutSeconds,omitempty"`
// ResolvedTime is when the controller last changed these values.
// +optional
ResolvedTime *metav1.Time `json:"resolvedTime,omitempty"`
}
CoderWorkspacePoolResolved holds the inputs that the controller resolved in Coder. New members pin these values.
func (*CoderWorkspacePoolResolved) DeepCopy ¶ added in v0.1.4
func (in *CoderWorkspacePoolResolved) DeepCopy() *CoderWorkspacePoolResolved
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderWorkspacePoolResolved.
func (*CoderWorkspacePoolResolved) DeepCopyInto ¶ added in v0.1.4
func (in *CoderWorkspacePoolResolved) DeepCopyInto(out *CoderWorkspacePoolResolved)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CoderWorkspacePoolSpec ¶ added in v0.1.4
type CoderWorkspacePoolSpec struct {
// ControlPlaneRef names the CoderControlPlane in the same namespace. The
// controller calls Coder with that control plane's operator token.
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="controlPlaneRef is immutable"
ControlPlaneRef CoderControlPlaneReference `json:"controlPlaneRef"`
// Strategy is how the pool keeps its workspaces. Managed is the only
// strategy: the operator creates the workspaces itself.
// +kubebuilder:validation:Enum=Managed
// +kubebuilder:default=Managed
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="strategy is immutable"
// +optional
Strategy string `json:"strategy,omitempty"`
// OwnerUserID is the UUID of the Coder user who owns every workspace of
// the pool. The control plane's admin must allow this owner and the
// template. Every start build gives the owner's API token to the
// template's Terraform, so use a dedicated low-privilege user. Write the
// UUID in lower case with hyphens, as in the control plane's owners list.
// +kubebuilder:validation:Format=uuid
// +kubebuilder:validation:MaxLength=36
// +kubebuilder:validation:Pattern=`^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$`
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ownerUserID is immutable"
// +kubebuilder:validation:XValidation:rule="self != 'c42fdf75-3097-471c-8c33-fb52454d81c0'",message="ownerUserID must not be the Coder prebuilds system user"
OwnerUserID string `json:"ownerUserID"`
// 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.
// +kubebuilder:validation:MaxLength=65
// +kubebuilder:validation:XValidation:rule="self.matches('^[^.]{1,32}[.][^.]{1,32}$')",message="organization and template names must each have at most 32 characters"
// +kubebuilder:validation:XValidation:rule="!self.matches('^(new|create)[.]') && !self.matches('[.](new|create)$')",message="organization and template names must not be new or create"
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="template is immutable"
// +kubebuilder:validation:Pattern=`^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*\.[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$`
Template string `json:"template"`
// Version selects the template version of new members. A change replaces
// the unclaimed members, new before old.
Version CoderWorkspacePoolVersion `json:"version"`
// PresetName is the name of a preset of the selected version. The start
// builds use its parameter values.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=64
// +optional
PresetName string `json:"presetName,omitempty"`
// Parameters are rich parameter values for the start builds.
// +listType=map
// +listMapKey=name
// +kubebuilder:validation:MaxItems=64
// +optional
Parameters []CoderWorkspacePoolParameter `json:"parameters,omitempty"`
// Replicas is the number of unclaimed ready workspaces to keep. Waiting
// claims get a workspace built on demand on top of this number. The scale
// subresource writes this field, so kubectl scale, HPA, and KEDA can
// resize the pool within the same bounds.
// +kubebuilder:default=1
// +kubebuilder:validation:Minimum=0
// +kubebuilder:validation:Maximum=100
// +optional
Replicas *int32 `json:"replicas,omitempty"`
// MaxInFlight is the number of members of this pool that build at the
// same time.
// +kubebuilder:default=5
// +kubebuilder:validation:Minimum=1
// +kubebuilder:validation:Maximum=20
// +optional
MaxInFlight *int32 `json:"maxInFlight,omitempty"`
// ReadyTimeoutSeconds bounds the time from a member's creation until its
// workspace is ready. A member that is not ready in time fails, and the
// controller replaces it.
// +kubebuilder:default=900
// +kubebuilder:validation:Minimum=60
// +kubebuilder:validation:Maximum=7200
// +optional
ReadyTimeoutSeconds *int32 `json:"readyTimeoutSeconds,omitempty"`
// Claims configures how the pool hands out workspaces.
// +kubebuilder:default={}
// +optional
Claims CoderWorkspacePoolClaims `json:"claims,omitempty"`
}
CoderWorkspacePoolSpec defines a pool of ready Coder workspaces from one template for one Coder owner.
func (*CoderWorkspacePoolSpec) DeepCopy ¶ added in v0.1.4
func (in *CoderWorkspacePoolSpec) DeepCopy() *CoderWorkspacePoolSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderWorkspacePoolSpec.
func (*CoderWorkspacePoolSpec) DeepCopyInto ¶ added in v0.1.4
func (in *CoderWorkspacePoolSpec) DeepCopyInto(out *CoderWorkspacePoolSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CoderWorkspacePoolStatus ¶ added in v0.1.4
type CoderWorkspacePoolStatus struct {
// ObservedGeneration is the generation the controller last processed.
// Every scale change bumps metadata.generation.
// +optional
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// Replicas is the number of unclaimed members that count toward
// spec.replicas: current and outdated, not failed, not used, not being
// deleted. The scale subresource reads this field.
// +optional
Replicas int32 `json:"replicas,omitempty"`
// ReadyReplicas is the number of those members whose workspace is ready.
// +optional
ReadyReplicas int32 `json:"readyReplicas,omitempty"`
// UpdatedReplicas is the number of those members that use the resolved
// inputs.
// +optional
UpdatedReplicas int32 `json:"updatedReplicas,omitempty"`
// BoundReplicas is the number of members that claims hold.
// +optional
BoundReplicas int32 `json:"boundReplicas,omitempty"`
// UsedReplicas is the number of members that someone used without a
// claim. They no longer count toward the pool, and the controller never
// deletes their workspaces.
// +optional
UsedReplicas int32 `json:"usedReplicas,omitempty"`
// PendingClaims is the number of claims that wait for a workspace.
// +optional
PendingClaims int32 `json:"pendingClaims,omitempty"`
// Selector is the label selector of the scale subresource, in string
// form: coder.com/workspace-pool-uid=<pool UID>. It matches no pods
// unless a template sets that label, so autoscalers must use External or
// Object metrics with target type AverageValue.
// +optional
Selector string `json:"selector,omitempty"`
// Resolved holds the inputs that the controller resolved in Coder.
// +optional
Resolved *CoderWorkspacePoolResolved `json:"resolved,omitempty"`
// ConsecutiveFailures is the number of member failures in a row: the
// length of RunFailures. A ready member and a change of status.resolved
// (template, version, preset, parameters, owner, or readyTimeoutSeconds)
// reset it. A change of replicas or maxInFlight does not.
// +optional
ConsecutiveFailures int32 `json:"consecutiveFailures,omitempty"`
// LastFailure is the newest member failure.
// +optional
LastFailure *CoderWorkspacePoolFailure `json:"lastFailure,omitempty"`
// FailureRunStart is the start of the current run of failures: the
// latest of the last change of status.resolved and the newest ready
// time of a member. Failures at or before it do not count.
// +optional
FailureRunStart *metav1.Time `json:"failureRunStart,omitempty"`
// RunFailures are the member failures of the current run, oldest first,
// at most 5. The controller stores each one before it deletes the
// failed member, so it counts every failure once.
// +listType=atomic
// +kubebuilder:validation:MaxItems=5
// +optional
RunFailures []CoderWorkspacePoolFailure `json:"runFailures,omitempty"`
// Reason is the current wait reason.
// +optional
Reason string `json:"reason,omitempty"`
// Message explains Reason. It never holds Coder error details, build
// logs, parameter values, or tokens.
// +optional
Message string `json:"message,omitempty"`
// Conditions are Ready, Reconciling, and Stalled.
// +listType=map
// +listMapKey=type
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
CoderWorkspacePoolStatus defines the observed state of a CoderWorkspacePool.
func (*CoderWorkspacePoolStatus) DeepCopy ¶ added in v0.1.4
func (in *CoderWorkspacePoolStatus) DeepCopy() *CoderWorkspacePoolStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderWorkspacePoolStatus.
func (*CoderWorkspacePoolStatus) DeepCopyInto ¶ added in v0.1.4
func (in *CoderWorkspacePoolStatus) DeepCopyInto(out *CoderWorkspacePoolStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CoderWorkspacePoolVersion ¶ added in v0.1.4
type CoderWorkspacePoolVersion struct {
// Name is the name of a version of the template. It follows Coder's
// template version name rules.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=64
// +kubebuilder:validation:Pattern=`^[a-zA-Z0-9]+([_.-][a-zA-Z0-9]+)*$`
// +optional
Name string `json:"name,omitempty"`
// ID is the UUID of a version of the template.
// +kubebuilder:validation:Format=uuid
// +kubebuilder:validation:MaxLength=36
// +optional
ID string `json:"id,omitempty"`
// Active follows the template's active version. After a promotion, the
// controller replaces unclaimed members, new before old.
// +optional
Active *bool `json:"active,omitempty"`
}
CoderWorkspacePoolVersion selects the template version of new members. 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"
func (*CoderWorkspacePoolVersion) DeepCopy ¶ added in v0.1.4
func (in *CoderWorkspacePoolVersion) DeepCopy() *CoderWorkspacePoolVersion
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderWorkspacePoolVersion.
func (*CoderWorkspacePoolVersion) DeepCopyInto ¶ added in v0.1.4
func (in *CoderWorkspacePoolVersion) DeepCopyInto(out *CoderWorkspacePoolVersion)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CoderWorkspaceProxy ¶
type CoderWorkspaceProxy struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec WorkspaceProxySpec `json:"spec,omitempty"`
Status WorkspaceProxyStatus `json:"status,omitempty"`
}
CoderWorkspaceProxy is the schema for Coder workspace proxy resources.
func (*CoderWorkspaceProxy) DeepCopy ¶
func (in *CoderWorkspaceProxy) DeepCopy() *CoderWorkspaceProxy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderWorkspaceProxy.
func (*CoderWorkspaceProxy) DeepCopyInto ¶
func (in *CoderWorkspaceProxy) DeepCopyInto(out *CoderWorkspaceProxy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CoderWorkspaceProxy) DeepCopyObject ¶
func (in *CoderWorkspaceProxy) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CoderWorkspaceProxyList ¶
type CoderWorkspaceProxyList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []CoderWorkspaceProxy `json:"items"`
}
CoderWorkspaceProxyList contains a list of CoderWorkspaceProxy objects.
func (*CoderWorkspaceProxyList) DeepCopy ¶
func (in *CoderWorkspaceProxyList) DeepCopy() *CoderWorkspaceProxyList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoderWorkspaceProxyList.
func (*CoderWorkspaceProxyList) DeepCopyInto ¶
func (in *CoderWorkspaceProxyList) DeepCopyInto(out *CoderWorkspaceProxyList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CoderWorkspaceProxyList) DeepCopyObject ¶
func (in *CoderWorkspaceProxyList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DatabaseSpec ¶ added in v0.1.1
type DatabaseSpec struct {
// ConnectionSecretRef references a key in a Secret in the
// CoderControlPlane's namespace. The value must be a postgres:// or
// postgresql:// connection URL. The controller injects it into the Coder
// container as CODER_PG_CONNECTION_URL through a Secret reference and uses
// it for operator access bootstrap. Running pods keep the old value after
// the Secret changes; restart the Deployment after rotating credentials.
// +kubebuilder:validation:XValidation:rule="size(self.name) > 0",message="connectionSecretRef.name must not be empty"
// +kubebuilder:validation:XValidation:rule="has(self.key) && size(self.key) > 0",message="connectionSecretRef.key must not be empty"
ConnectionSecretRef SecretKeySelector `json:"connectionSecretRef"`
}
DatabaseSpec configures the external PostgreSQL database used by Coder.
func (*DatabaseSpec) DeepCopy ¶ added in v0.1.1
func (in *DatabaseSpec) DeepCopy() *DatabaseSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatabaseSpec.
func (*DatabaseSpec) DeepCopyInto ¶ added in v0.1.1
func (in *DatabaseSpec) DeepCopyInto(out *DatabaseSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExposeSpec ¶
type ExposeSpec struct {
// Ingress configures a networking.k8s.io/v1 Ingress.
// +optional
Ingress *IngressExposeSpec `json:"ingress,omitempty"`
// Gateway configures a gateway.networking.k8s.io/v1 HTTPRoute.
// +optional
Gateway *GatewayExposeSpec `json:"gateway,omitempty"`
}
ExposeSpec configures external exposure for the control plane. At most one of Ingress or Gateway may be set. +kubebuilder:validation:XValidation:rule="!(has(self.ingress) && has(self.gateway))",message="only one of ingress or gateway may be set"
func (*ExposeSpec) DeepCopy ¶
func (in *ExposeSpec) DeepCopy() *ExposeSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExposeSpec.
func (*ExposeSpec) DeepCopyInto ¶
func (in *ExposeSpec) DeepCopyInto(out *ExposeSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GatewayExposeSpec ¶
type GatewayExposeSpec struct {
// Host is the primary hostname for the HTTPRoute.
Host string `json:"host"`
// WildcardHost is an optional wildcard hostname.
WildcardHost string `json:"wildcardHost,omitempty"`
// ParentRefs are Gateways that the HTTPRoute attaches to.
// At least one parentRef is required when gateway exposure is configured.
// +kubebuilder:validation:MinItems=1
ParentRefs []GatewayParentRef `json:"parentRefs"`
}
GatewayExposeSpec defines Gateway API (HTTPRoute) exposure configuration.
func (*GatewayExposeSpec) DeepCopy ¶
func (in *GatewayExposeSpec) DeepCopy() *GatewayExposeSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GatewayExposeSpec.
func (*GatewayExposeSpec) DeepCopyInto ¶
func (in *GatewayExposeSpec) DeepCopyInto(out *GatewayExposeSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GatewayParentRef ¶
type GatewayParentRef struct {
// Name is the Gateway name.
Name string `json:"name"`
// Namespace is the Gateway namespace.
// +optional
Namespace *string `json:"namespace,omitempty"`
// SectionName is the listener name within the Gateway.
// +optional
SectionName *string `json:"sectionName,omitempty"`
}
GatewayParentRef identifies a Gateway for HTTPRoute attachment.
func (*GatewayParentRef) DeepCopy ¶
func (in *GatewayParentRef) DeepCopy() *GatewayParentRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GatewayParentRef.
func (*GatewayParentRef) DeepCopyInto ¶
func (in *GatewayParentRef) DeepCopyInto(out *GatewayParentRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IngressExposeSpec ¶
type IngressExposeSpec struct {
// ClassName is the Ingress class name.
ClassName *string `json:"className,omitempty"`
// Host is the primary hostname for the Ingress rule.
Host string `json:"host"`
// WildcardHost is an optional wildcard hostname (e.g., for workspace apps).
WildcardHost string `json:"wildcardHost,omitempty"`
// Annotations are applied to the managed Ingress.
Annotations map[string]string `json:"annotations,omitempty"`
// TLS configures TLS termination at the Ingress.
// +optional
TLS *IngressTLSExposeSpec `json:"tls,omitempty"`
}
IngressExposeSpec defines Ingress exposure configuration.
func (*IngressExposeSpec) DeepCopy ¶
func (in *IngressExposeSpec) DeepCopy() *IngressExposeSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressExposeSpec.
func (*IngressExposeSpec) DeepCopyInto ¶
func (in *IngressExposeSpec) DeepCopyInto(out *IngressExposeSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IngressTLSExposeSpec ¶
type IngressTLSExposeSpec struct {
// SecretName is the TLS Secret for the primary host.
SecretName string `json:"secretName,omitempty"`
// WildcardSecretName is the TLS Secret for the wildcard host.
WildcardSecretName string `json:"wildcardSecretName,omitempty"`
}
IngressTLSExposeSpec defines TLS configuration for the Ingress.
func (*IngressTLSExposeSpec) DeepCopy ¶
func (in *IngressTLSExposeSpec) DeepCopy() *IngressTLSExposeSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressTLSExposeSpec.
func (*IngressTLSExposeSpec) DeepCopyInto ¶
func (in *IngressTLSExposeSpec) DeepCopyInto(out *IngressTLSExposeSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MCPServersSpec ¶ added in v0.1.4
type MCPServersSpec struct {
// Organizations are the names of the Coder organizations whose MCP server
// configs CoderMCPServer objects can create, change and delete with this
// control plane's operator token. This delegates Coder organization-admin
// power over MCP servers in these organizations to everyone who can
// create CoderMCPServer objects here. A CoderMCPServer for an
// organization outside this list creates and changes nothing. Removing
// an organization disables in Coder each server config that a
// CoderMCPServer created there, with one request that holds only
// enabled: false, and then changes nothing else. After the organization
// is listed again, a spec edit enables the server. Deleting a
// CoderMCPServer still deletes the config it created.
// +kubebuilder:validation:MinItems=1
// +kubebuilder:validation:MaxItems=64
// +kubebuilder:validation:items:MinLength=1
// +kubebuilder:validation:items:MaxLength=32
// +kubebuilder:validation:items:Pattern=`^[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*$`
// +kubebuilder:validation:XValidation:rule="self.all(o, o != 'new' && o != 'create')",message="mcpServers.organizations must not hold new or create"
// +listType=set
Organizations []string `json:"organizations"`
// AllowForceOn lets CoderMCPServer objects use availability: force_on,
// which adds a server to every new chat of each user who can read it,
// without that user's choice. When false (the default), such objects
// create and change nothing, and a server config that one of them
// created is disabled in Coder, as for a removed organization.
// +optional
AllowForceOn bool `json:"allowForceOn,omitempty"`
}
MCPServersSpec configures CoderMCPServer objects that use a CoderControlPlane (CoderControlPlane.spec.mcpServers).
func (*MCPServersSpec) DeepCopy ¶ added in v0.1.4
func (in *MCPServersSpec) DeepCopy() *MCPServersSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MCPServersSpec.
func (*MCPServersSpec) DeepCopyInto ¶ added in v0.1.4
func (in *MCPServersSpec) DeepCopyInto(out *MCPServersSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OperatorAccessSpec ¶
type OperatorAccessSpec struct {
// Disabled turns off creation and management of the `coder-k8s-operator`
// user and API token.
// +kubebuilder:default=false
Disabled bool `json:"disabled,omitempty"`
// GeneratedTokenSecretName stores the generated operator API token.
// The default is `<name>-operator-token`. The Secret must not exist yet,
// or must have this control plane as its controller owner.
GeneratedTokenSecretName string `json:"generatedTokenSecretName,omitempty"`
}
OperatorAccessSpec configures the controller-managed coderd operator user.
func (*OperatorAccessSpec) DeepCopy ¶
func (in *OperatorAccessSpec) DeepCopy() *OperatorAccessSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperatorAccessSpec.
func (*OperatorAccessSpec) DeepCopyInto ¶
func (in *OperatorAccessSpec) DeepCopyInto(out *OperatorAccessSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ProbeSpec ¶
type ProbeSpec struct {
// Enabled toggles the probe on or off.
// When omitted, readiness defaults to enabled while liveness defaults to disabled.
Enabled *bool `json:"enabled,omitempty"`
// InitialDelaySeconds is the delay before the probe starts.
// +kubebuilder:default=0
InitialDelaySeconds int32 `json:"initialDelaySeconds,omitempty"`
// PeriodSeconds controls how often the probe is performed.
PeriodSeconds *int32 `json:"periodSeconds,omitempty"`
// TimeoutSeconds is the probe timeout.
TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"`
// SuccessThreshold is the minimum consecutive successes for the probe to be considered successful.
SuccessThreshold *int32 `json:"successThreshold,omitempty"`
// FailureThreshold is the minimum consecutive failures for the probe to be considered failed.
FailureThreshold *int32 `json:"failureThreshold,omitempty"`
}
ProbeSpec configures a Kubernetes probe with an enable toggle.
func (*ProbeSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProbeSpec.
func (*ProbeSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ProxyBootstrapSpec ¶
type ProxyBootstrapSpec struct {
// CoderURL is the URL for the primary Coder control plane API.
CoderURL string `json:"coderURL"`
// CredentialsSecretRef points to a Secret containing a Coder session token.
CredentialsSecretRef SecretKeySelector `json:"credentialsSecretRef"`
// ProxyName is the name used when registering the proxy in Coder.
ProxyName string `json:"proxyName,omitempty"`
// DisplayName is the human-readable name for the proxy region.
DisplayName string `json:"displayName,omitempty"`
// Icon is the optional icon URL or emoji path for the proxy region.
Icon string `json:"icon,omitempty"`
// GeneratedTokenSecretName stores the generated proxy token.
GeneratedTokenSecretName string `json:"generatedTokenSecretName,omitempty"`
}
ProxyBootstrapSpec configures optional registration with the Coder API.
func (*ProxyBootstrapSpec) DeepCopy ¶
func (in *ProxyBootstrapSpec) DeepCopy() *ProxyBootstrapSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyBootstrapSpec.
func (*ProxyBootstrapSpec) DeepCopyInto ¶
func (in *ProxyBootstrapSpec) DeepCopyInto(out *ProxyBootstrapSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RBACSpec ¶
type RBACSpec struct {
// WorkspacePerms enables Role/RoleBinding creation for workspace resources.
// When omitted, the default is true.
// +kubebuilder:default=true
WorkspacePerms *bool `json:"workspacePerms,omitempty"`
// EnableDeployments grants apps/deployments permissions (only when WorkspacePerms is true).
// When omitted, the default is true.
// +kubebuilder:default=true
EnableDeployments *bool `json:"enableDeployments,omitempty"`
// ExtraRules are appended to the managed Role rules.
ExtraRules []rbacv1.PolicyRule `json:"extraRules,omitempty"`
// WorkspaceNamespaces lists additional namespaces for Role/RoleBinding creation.
WorkspaceNamespaces []string `json:"workspaceNamespaces,omitempty"`
}
RBACSpec configures namespace-scoped RBAC for workspace provisioning.
func (*RBACSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RBACSpec.
func (*RBACSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SecretKeySelector ¶
type SecretKeySelector struct {
// Name is the Kubernetes Secret name.
Name string `json:"name"`
// Key is the key inside the Secret data map.
Key string `json:"key,omitempty"`
}
SecretKeySelector identifies a key in a Secret.
func (*SecretKeySelector) DeepCopy ¶
func (in *SecretKeySelector) DeepCopy() *SecretKeySelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretKeySelector.
func (*SecretKeySelector) DeepCopyInto ¶
func (in *SecretKeySelector) DeepCopyInto(out *SecretKeySelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServiceAccountSpec ¶
type ServiceAccountSpec struct {
// DisableCreate skips ServiceAccount creation (use an existing SA).
// +kubebuilder:default=false
DisableCreate bool `json:"disableCreate,omitempty"`
// Name overrides the ServiceAccount name. Defaults to the CoderControlPlane name.
Name string `json:"name,omitempty"`
// Annotations are applied to the managed ServiceAccount.
Annotations map[string]string `json:"annotations,omitempty"`
// Labels are applied to the managed ServiceAccount.
Labels map[string]string `json:"labels,omitempty"`
}
ServiceAccountSpec configures the ServiceAccount used by the Coder pod.
func (*ServiceAccountSpec) DeepCopy ¶
func (in *ServiceAccountSpec) DeepCopy() *ServiceAccountSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceAccountSpec.
func (*ServiceAccountSpec) DeepCopyInto ¶
func (in *ServiceAccountSpec) DeepCopyInto(out *ServiceAccountSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServiceSpec ¶
type ServiceSpec struct {
// Type controls the Kubernetes service type.
// +kubebuilder:default="ClusterIP"
Type corev1.ServiceType `json:"type,omitempty"`
// Port controls the exposed service port.
// +kubebuilder:default=80
Port int32 `json:"port,omitempty"`
// Annotations are applied to the reconciled service object.
Annotations map[string]string `json:"annotations,omitempty"`
}
ServiceSpec defines the Service configuration reconciled by the operator.
func (*ServiceSpec) DeepCopy ¶
func (in *ServiceSpec) DeepCopy() *ServiceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceSpec.
func (*ServiceSpec) DeepCopyInto ¶
func (in *ServiceSpec) DeepCopyInto(out *ServiceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TLSSpec ¶
type TLSSpec struct {
// SecretNames lists TLS secrets to mount for built-in TLS.
// When non-empty, TLS is enabled on the Coder control plane.
SecretNames []string `json:"secretNames,omitempty"`
}
TLSSpec configures Coder built-in TLS.
func (*TLSSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSSpec.
func (*TLSSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TemplateTestsSpec ¶ added in v0.1.3
type TemplateTestsSpec struct {
// OwnerUserID is the UUID of the Coder user that owns every test
// workspace. Use a dedicated low-privilege tester user: each start build
// gives the owner's API token to the template's Terraform. Tests stay
// pending until this is set.
// +kubebuilder:validation:Format=uuid
// +kubebuilder:validation:MaxLength=36
// +optional
OwnerUserID string `json:"ownerUserID,omitempty"`
// AllowRetain lets the annotation coder.com/deletion-policy: retain on a
// CoderTemplateTest release the test without deleting its workspace.
// This delegates that power to everyone who can create tests against
// this control plane: they can leave workspaces, and their owner's
// session keys, in Coder. When false (the default), the controller
// ignores retain and deletes the workspace.
// +optional
AllowRetain bool `json:"allowRetain,omitempty"`
}
TemplateTestsSpec configures CoderTemplateTest runs against a control plane.
func (*TemplateTestsSpec) DeepCopy ¶ added in v0.1.3
func (in *TemplateTestsSpec) DeepCopy() *TemplateTestsSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateTestsSpec.
func (*TemplateTestsSpec) DeepCopyInto ¶ added in v0.1.3
func (in *TemplateTestsSpec) DeepCopyInto(out *TemplateTestsSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkspacePoolOwner ¶ added in v0.1.4
type WorkspacePoolOwner struct {
// UserID is the UUID of the Coder user, in lower case with hyphens, as
// Coder writes it. One user has one spelling, so the list holds each
// owner once. Coder's prebuilds system user is refused: Coder's prebuild
// reconciler can delete or hand out the workspaces it owns.
// +kubebuilder:validation:Format=uuid
// +kubebuilder:validation:MaxLength=36
// +kubebuilder:validation:Pattern=`^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$`
// +kubebuilder:validation:XValidation:rule="self != 'c42fdf75-3097-471c-8c33-fb52454d81c0'",message="userID must not be the Coder prebuilds system user"
UserID string `json:"userID"`
// Templates are the only Coder templates, as `<organization>.<template>`,
// that pools of this owner can build.
// +kubebuilder:validation:MinItems=1
// +kubebuilder:validation:MaxItems=16
// +kubebuilder:validation:items:MaxLength=65
// +kubebuilder:validation:items:Pattern=`^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*\.[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$`
// +kubebuilder:validation:XValidation:rule="self.all(t, t.matches('^[^.]{1,32}[.][^.]{1,32}$'))",message="organization and template names must each have at most 32 characters"
// +kubebuilder:validation:XValidation:rule="self.all(t, !t.matches('^(new|create)[.]') && !t.matches('[.](new|create)$'))",message="organization and template names must not be new or create"
// +listType=set
Templates []string `json:"templates"`
// MaxWorkspaces caps the workspaces of this owner across all pools of
// this control plane: unclaimed, bound, and used.
// +kubebuilder:default=10
// +kubebuilder:validation:Minimum=1
// +kubebuilder:validation:Maximum=100
// +optional
MaxWorkspaces *int32 `json:"maxWorkspaces,omitempty"`
}
WorkspacePoolOwner allows one Coder user as the owner of pool workspaces.
func (*WorkspacePoolOwner) DeepCopy ¶ added in v0.1.4
func (in *WorkspacePoolOwner) DeepCopy() *WorkspacePoolOwner
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspacePoolOwner.
func (*WorkspacePoolOwner) DeepCopyInto ¶ added in v0.1.4
func (in *WorkspacePoolOwner) DeepCopyInto(out *WorkspacePoolOwner)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkspacePoolsSpec ¶ added in v0.1.4
type WorkspacePoolsSpec struct {
// Owners are the Coder users that pools on this control plane can use as
// owners, each with the templates it can build and a workspace cap. They
// are the admin's consent that pools make Coder build these templates as
// this owner. Every start build gives the owner's API token to the
// template's Terraform. A pool whose owner or template is not listed
// creates no workspace.
//
// This field has no effect yet: the CoderWorkspacePool controller is not
// shipped.
// +kubebuilder:validation:MaxItems=16
// +listType=map
// +listMapKey=userID
// +optional
Owners []WorkspacePoolOwner `json:"owners,omitempty"`
}
WorkspacePoolsSpec configures CoderWorkspacePool objects that use a CoderControlPlane (CoderControlPlane.spec.workspacePools).
func (*WorkspacePoolsSpec) DeepCopy ¶ added in v0.1.4
func (in *WorkspacePoolsSpec) DeepCopy() *WorkspacePoolsSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspacePoolsSpec.
func (*WorkspacePoolsSpec) DeepCopyInto ¶ added in v0.1.4
func (in *WorkspacePoolsSpec) DeepCopyInto(out *WorkspacePoolsSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkspaceProxySpec ¶
type WorkspaceProxySpec struct {
// Image is the container image used for the workspace proxy pod.
Image string `json:"image,omitempty"`
// Replicas is the desired number of proxy pods.
Replicas *int32 `json:"replicas,omitempty"`
// Service controls the service created in front of the workspace proxy.
// +kubebuilder:default={}
Service ServiceSpec `json:"service,omitempty"`
// PrimaryAccessURL is the coderd URL the proxy should connect to.
PrimaryAccessURL string `json:"primaryAccessURL,omitempty"`
// ProxySessionTokenSecretRef points to a Secret key containing the proxy token.
ProxySessionTokenSecretRef *SecretKeySelector `json:"proxySessionTokenSecretRef,omitempty"`
// Bootstrap optionally registers the proxy and mints a proxy token.
Bootstrap *ProxyBootstrapSpec `json:"bootstrap,omitempty"`
// DerpOnly configures the workspace proxy to only serve DERP traffic.
DerpOnly bool `json:"derpOnly,omitempty"`
// ExtraArgs are appended to the default workspace proxy arguments.
ExtraArgs []string `json:"extraArgs,omitempty"`
// ExtraEnv are injected into the workspace proxy container.
ExtraEnv []corev1.EnvVar `json:"extraEnv,omitempty"`
// ImagePullSecrets are used by the pod to pull private images.
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
}
WorkspaceProxySpec defines the desired state of a WorkspaceProxy.
func (*WorkspaceProxySpec) DeepCopy ¶
func (in *WorkspaceProxySpec) DeepCopy() *WorkspaceProxySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceProxySpec.
func (*WorkspaceProxySpec) DeepCopyInto ¶
func (in *WorkspaceProxySpec) DeepCopyInto(out *WorkspaceProxySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkspaceProxyStatus ¶
type WorkspaceProxyStatus struct {
// ObservedGeneration tracks the spec generation this status reflects.
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// ReadyReplicas is the number of ready pods observed in the deployment.
ReadyReplicas int32 `json:"readyReplicas,omitempty"`
// Registered reports whether bootstrap registration completed successfully.
Registered bool `json:"registered,omitempty"`
// ProxyTokenSecretRef is the Secret used for the proxy session token.
ProxyTokenSecretRef *SecretKeySelector `json:"proxyTokenSecretRef,omitempty"`
// Phase is a high-level readiness indicator.
Phase string `json:"phase,omitempty"`
// Conditions are Kubernetes-standard conditions for this resource.
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
WorkspaceProxyStatus defines the observed state of a WorkspaceProxy.
func (*WorkspaceProxyStatus) DeepCopy ¶
func (in *WorkspaceProxyStatus) DeepCopy() *WorkspaceProxyStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceProxyStatus.
func (*WorkspaceProxyStatus) DeepCopyInto ¶
func (in *WorkspaceProxyStatus) DeepCopyInto(out *WorkspaceProxyStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
Source Files
¶
- coderaigatewaykey_types.go
- coderaiprovider_types.go
- codercontrolplane_types.go
- codermcpserver_types.go
- coderprovisioner_types.go
- codertemplatetest_types.go
- coderworkspaceclaim_types.go
- coderworkspacepool_types.go
- coderworkspacepoolmember_types.go
- coderworkspaceproxy_types.go
- doc.go
- groupversion_info.go
- types_shared.go
- zz_generated.deepcopy.go