Documentation
¶
Overview ¶
Package controller contains Kubernetes controllers for coder-k8s resources.
Package controller contains Kubernetes controllers for coder-k8s resources.
Package controller contains Kubernetes controllers for coder-k8s resources.
Index ¶
- type CoderAIGatewayKeyReconciler
- type CoderAIProviderReconciler
- type CoderControlPlaneReconciler
- type CoderMCPServerReconciler
- type CoderProvisionerReconciler
- type CoderTemplateTestReconciler
- type CoderWorkspacePoolMemberReconciler
- type CoderWorkspaceProxyReconciler
- type EntitlementsInspector
- type LicenseUploader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CoderAIGatewayKeyReconciler ¶ added in v0.1.4
type CoderAIGatewayKeyReconciler struct {
client.Client
// APIReader reads the output Secret and the objects of the reserved-name
// check live, not from the cache.
APIReader client.Reader
Scheme *runtime.Scheme
Clock clock.PassiveClock
// contains filtered or unexported fields
}
CoderAIGatewayKeyReconciler reconciles CoderAIGatewayKey objects (#156). It is not registered yet. This version runs the checks of the observe step (plan 4.2) and claims the output Secret. It creates and deletes no Coder key.
func (*CoderAIGatewayKeyReconciler) Reconcile ¶ added in v0.1.4
func (r *CoderAIGatewayKeyReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile handles deletion first, stores the finalizer before any Coder call, then runs the observe step and at most one action.
func (*CoderAIGatewayKeyReconciler) SetupWithManager ¶ added in v0.1.4
func (r *CoderAIGatewayKeyReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager wires the reconciler into controller-runtime. Nothing calls it until activation (K10). A change of the output Secret, or of any control plane in the namespace (any of them can reserve the Secret name), requeues the object at once.
type CoderAIProviderReconciler ¶ added in v0.1.4
type CoderAIProviderReconciler struct {
client.Client
Scheme *runtime.Scheme
// contains filtered or unexported fields
}
CoderAIProviderReconciler reconciles CoderAIProvider objects (#154). It checks the spec, the credential Secret and the control plane, creates the Coder provider when the name is free, and sets the spec values on the provider that it created. It never changes a provider that it did not create.
func (*CoderAIProviderReconciler) Reconcile ¶ added in v0.1.4
func (r *CoderAIProviderReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile runs the checks in order and reports the first one that fails.
func (*CoderAIProviderReconciler) SetupWithManager ¶ added in v0.1.4
func (r *CoderAIProviderReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager wires the reconciler into controller-runtime. A change of the referenced control plane or of the key Secret requeues the provider.
type CoderControlPlaneReconciler ¶
type CoderControlPlaneReconciler struct {
client.Client
APIReader client.Reader
Scheme *runtime.Scheme
OperatorAccessProvisioner coderbootstrap.OperatorAccessProvisioner
LicenseUploader LicenseUploader
EntitlementsInspector EntitlementsInspector
}
CoderControlPlaneReconciler reconciles a CoderControlPlane object.
func (*CoderControlPlaneReconciler) Reconcile ¶
func (r *CoderControlPlaneReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile converges the desired CoderControlPlane spec into Deployment and Service resources.
func (*CoderControlPlaneReconciler) SetupWithManager ¶
func (r *CoderControlPlaneReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager wires the reconciler into controller-runtime.
type CoderMCPServerReconciler ¶ added in v0.1.4
type CoderMCPServerReconciler struct {
client.Client
Scheme *runtime.Scheme
// contains filtered or unexported fields
}
CoderMCPServerReconciler reconciles CoderMCPServer objects (#155). It is not registered yet. It checks the control plane, the organization and its opt-in, and the credential Secrets, reports a slug that a config of someone else holds, creates the config, and syncs it on every reconcile.
func (*CoderMCPServerReconciler) Reconcile ¶ added in v0.1.4
func (r *CoderMCPServerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile runs the checks in order and reports the first one that fails.
func (*CoderMCPServerReconciler) SetupWithManager ¶ added in v0.1.4
func (r *CoderMCPServerReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager wires the reconciler into controller-runtime. Nothing calls it until activation. The controller watches its own kind without a generation predicate, so an annotation change also triggers a reconcile. A change of the referenced control plane or of a credential Secret requeues the object.
type CoderProvisionerReconciler ¶
type CoderProvisionerReconciler struct {
client.Client
Scheme *runtime.Scheme
BootstrapClient coderbootstrap.Client
}
CoderProvisionerReconciler reconciles a CoderProvisioner object.
func (*CoderProvisionerReconciler) Reconcile ¶
func (r *CoderProvisionerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error)
Reconcile converges the desired CoderProvisioner spec into Deployment, RBAC, and Secret resources.
func (*CoderProvisionerReconciler) SetupWithManager ¶
func (r *CoderProvisionerReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager wires the reconciler into controller-runtime.
type CoderTemplateTestReconciler ¶ added in v0.1.3
type CoderTemplateTestReconciler struct {
client.Client
Scheme *runtime.Scheme
Clock clock.PassiveClock
// contains filtered or unexported fields
}
CoderTemplateTestReconciler runs CoderTemplateTest objects (#152): it creates a throwaway workspace from a template version, waits until every agent is ready, records the result, and deletes the workspace.
func (*CoderTemplateTestReconciler) Reconcile ¶ added in v0.1.3
func (r *CoderTemplateTestReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile runs the first step of the test that applies, then returns.
func (*CoderTemplateTestReconciler) SetupWithManager ¶ added in v0.1.3
func (r *CoderTemplateTestReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager wires the reconciler into controller-runtime. Nothing calls it until activation (#152). A change of a control plane requeues the tests that use it, so cleanup that waits for Coder resumes at once.
type CoderWorkspacePoolMemberReconciler ¶ added in v0.1.4
type CoderWorkspacePoolMemberReconciler struct {
client.Client
Scheme *runtime.Scheme
Clock clock.PassiveClock
// contains filtered or unexported fields
}
CoderWorkspacePoolMemberReconciler makes the Coder workspace of one CoderWorkspacePoolMember (#153 plan 6.2). Nothing registers it yet. This version runs the steps up to the create request: readiness, the watch rules, and cleanup follow before activation.
type CoderWorkspaceProxyReconciler ¶
type CoderWorkspaceProxyReconciler struct {
client.Client
Scheme *runtime.Scheme
BootstrapClient coderbootstrap.Client
}
CoderWorkspaceProxyReconciler reconciles a CoderWorkspaceProxy object.
func (*CoderWorkspaceProxyReconciler) Reconcile ¶
func (r *CoderWorkspaceProxyReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile converges the desired CoderWorkspaceProxy spec into Deployment and Service resources.
func (*CoderWorkspaceProxyReconciler) SetupWithManager ¶
func (r *CoderWorkspaceProxyReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager wires the reconciler into controller-runtime.
type EntitlementsInspector ¶
type EntitlementsInspector interface {
Entitlements(ctx context.Context, coderURL, sessionToken string) (codersdk.Entitlements, error)
}
EntitlementsInspector inspects coderd entitlements.
func NewSDKEntitlementsInspector ¶
func NewSDKEntitlementsInspector() EntitlementsInspector
NewSDKEntitlementsInspector returns an EntitlementsInspector backed by codersdk.
type LicenseUploader ¶
type LicenseUploader interface {
AddLicense(ctx context.Context, coderURL, sessionToken, licenseJWT string) error
HasAnyLicense(ctx context.Context, coderURL, sessionToken string) (bool, error)
}
LicenseUploader uploads and inspects Coder Enterprise licenses in a coderd instance.
func NewSDKLicenseUploader ¶
func NewSDKLicenseUploader() LicenseUploader
NewSDKLicenseUploader returns a LicenseUploader backed by codersdk.
Source Files
¶
- coder_access.go
- coder_workspace_steps.go
- coderaigatewaykey_controller.go
- coderaigatewaykey_delete.go
- coderaigatewaykey_issue.go
- coderaigatewaykey_recover.go
- coderaigatewaykey_retire.go
- coderaigatewaykey_rotate.go
- coderaiprovider_controller.go
- coderaiprovider_create.go
- coderaiprovider_delete.go
- coderaiprovider_disable.go
- coderaiprovider_env.go
- coderaiprovider_sync.go
- codercontrolplane_controller.go
- codermcpserver_acl.go
- codermcpserver_apply.go
- codermcpserver_controller.go
- codermcpserver_create.go
- coderprovisioner_controller.go
- codertemplatetest_cleanup.go
- codertemplatetest_confirm.go
- codertemplatetest_controller.go
- codertemplatetest_create.go
- codertemplatetest_delete.go
- codertemplatetest_readiness.go
- coderworkspacepoolmember_controller.go
- coderworkspacepoolmember_extend.go
- coderworkspacepoolmember_ready.go
- coderworkspaceproxy_controller.go
- controlplane_access.go
- credential_checks.go
- owned_secret.go
- reserved_secret_names.go
- rollout_restart.go