Kibotos
API 参考kibotos.ctrl.v1

WorkspaceService

本页列出 kibotos.ctrl.v1 中 WorkspaceService 的方法及每个方法用到的消息与枚举,由 ctrl.proto 及其注释生成,注释保持英文。多个服务共用的消息与枚举见 kibotos.ctrl.v1 类型。

ctrl API使用 Operator 证书调用。调用方式

WorkspaceService owns the Native Workspace lifecycle and stable identity.

CreateWorkspace

Accepts a durable creation command. CREATING is an accepted result; execution continues without client requests. Query GetWorkspaceCommand for completion, or replay the same input/command ID to recover acceptance.

POST/kibotos.ctrl.v1.WorkspaceService/CreateWorkspace一元调用
请求CreateWorkspaceRequest
响应CreateWorkspaceResponse

GetWorkspace

POST/kibotos.ctrl.v1.WorkspaceService/GetWorkspace一元调用
请求GetWorkspaceRequest
响应GetWorkspaceResponse

ListWorkspaces

POST/kibotos.ctrl.v1.WorkspaceService/ListWorkspaces一元调用
请求ListWorkspacesRequest
  • page_sizeuint32= 1

    Zero selects the server default. Values above the server maximum are rejected rather than silently changed.

  • page_tokenstring= 2

    Opaque cursor returned by the preceding page.

  • By default, Workspaces whose deletion has completed are omitted. This flag includes them when no explicit states filter is supplied.

  • When non-empty, return only these exact states. Values must be known, specified, and unique. This filter is mutually exclusive with include_deleted.

  • label_selectormap<string, string>= 5

    When non-empty, return only Workspaces that carry every entry as a label with exactly that value. Keys and values must satisfy the label rules. A page token is only valid with the selector it was issued for.

  • When specified, return only Workspaces whose current guest_observation has this condition; a Workspace without one never matches. It combines with the other filters, and a page token is only valid with the condition it was issued for.

响应ListWorkspacesResponse

UpdateWorkspaceExpiration

POST/kibotos.ctrl.v1.WorkspaceService/UpdateWorkspaceExpiration一元调用
请求UpdateWorkspaceExpirationRequest
响应UpdateWorkspaceExpirationResponse

GetWorkspaceCommand

POST/kibotos.ctrl.v1.WorkspaceService/GetWorkspaceCommand一元调用
请求GetWorkspaceCommandRequest
响应GetWorkspaceCommandResponse

WorkspaceCommand

WorkspaceCommandStatus

  • WORKSPACE_COMMAND_STATUS_UNSPECIFIED= 0
  • WORKSPACE_COMMAND_STATUS_PROCESSING= 1
  • WORKSPACE_COMMAND_STATUS_COMPLETED= 2

StopWorkspace

POST/kibotos.ctrl.v1.WorkspaceService/StopWorkspace一元调用
请求StopWorkspaceRequest
  • workspace_idstring= 2
  • Required even when no expiration is armed. Retries preserve this value.

  • Committed in the stop admission transaction itself, so a caller that never returns cannot leave a stopped Workspace under the deadline it just replaced. Without it, a STOP policy is consumed and a DELETE policy keeps constraining the stopped Workspace.

  • FORCE is also admitted while a normal stop is in flight, which it supersedes, and on a FAILED Workspace that still holds its execution, whatever it failed at, unless its deletion began: DeleteWorkspace finishes that one. A FAILED Workspace that holds no execution refuses FORCE and accepts StartWorkspace as it is. When the execution's machine is already gone, for example because it exited on its own, the forced stop releases what that execution still holds. Either way the Volume and the writable layer are kept for the next start.

响应StopWorkspaceResponse

StopMode

StopMode selects how a Workspace stops. The zero value is the normal stop, which succeeds only after the guest confirms writeback. FORCE is an explicit caller decision: it does not wait for guest writers, gives the guest one short best-effort sync, and stops the execution; the most recent writes may be lost.

  • STOP_MODE_UNSPECIFIED= 0
  • STOP_MODE_FORCE= 1

StartWorkspace

Accepts a durable start command with the same completion semantics as CreateWorkspace.

POST/kibotos.ctrl.v1.WorkspaceService/StartWorkspace一元调用
请求StartWorkspaceRequest
响应StartWorkspaceResponse

UpdateWorkspaceNetworkPolicy

UpdateWorkspaceNetworkPolicy replaces the expected policy. A non-zero expected_revision must equal the current revision or the call is aborted and nothing changes, even when the content is equal. Equal content is idempotent and keeps the revision. Different content on an AVAILABLE Workspace increments the revision and returns once the running execution confirmed or failed the change; on a STOPPED Workspace it only records the expectation for the next start. Any other state is failed_precondition. On an AVAILABLE Workspace whose execution still uses the DNS configuration it was started with by an earlier release, a policy that references a Resolver is failed_precondition and neither the expected nor the applied policy changes; the Workspace accepts it after a stop and start.

POST/kibotos.ctrl.v1.WorkspaceService/UpdateWorkspaceNetworkPolicy一元调用
请求UpdateWorkspaceNetworkPolicyRequest
  • workspace_idstring= 2
  • The network_policy.revision the caller observed. When it is not zero it must equal the current revision or the call is aborted and nothing changes, which lets a caller change part of the policy without overwriting a change it did not see. Zero skips the check. Retries preserve this value.

  • drain_secondsoptionaluint32= 5

    drain_seconds is how long a connection whose path this change moves keeps running on its old path before it is closed: a connection that left directly and is now covered by an Egress, or the reverse, or one through an Egress the policy no longer references for its destination. 0 to 3600, absent selects 600, and 0 closes them when the new revision takes effect. A connection the new mode, allow or deny no longer admits ends at once regardless. It is a parameter of this call and is not stored with the policy. Retries preserve this value.

响应UpdateWorkspaceNetworkPolicyResponse

UpdateWorkspaceMemory

UpdateWorkspaceMemory replaces the memory the Workspace requests for its next execution. It only records configuration: it never starts, stops, or resizes a running execution, and the new value takes effect at the next successful start. It is accepted by a Workspace that holds no execution: STOPPED, and the FAILED a start is allowed to resume from, so a request no placement could honour can be lowered again. Any other state is failed_precondition. The same value is idempotent and keeps the revision, a different value increments it, and capacity is judged by that later start, not by this call.

POST/kibotos.ctrl.v1.WorkspaceService/UpdateWorkspaceMemory一元调用
请求UpdateWorkspaceMemoryRequest
响应UpdateWorkspaceMemoryResponse

UpdateWorkspaceCpu

UpdateWorkspaceCpu replaces the CPU the Workspace requests for its next execution. It follows every rule of UpdateWorkspaceMemory: configuration only, accepted by a Workspace that holds no execution, the same value is idempotent and keeps the revision, and capacity is judged by the later start. Both share one resources_revision, so a CPU change and a memory change submitted against the same revision conflict rather than both landing.

POST/kibotos.ctrl.v1.WorkspaceService/UpdateWorkspaceCpu一元调用
请求UpdateWorkspaceCpuRequest
  • workspace_idstring= 2
  • The resources_revision the caller observed. A mismatch is aborted and never overwrites a concurrent update. Retries preserve this value.

  • cpu_millisuint32= 4

    Millicores, greater than zero. It replaces the stored value; it is not a delta. The execution receives the value rounded up to whole vCPUs.

响应UpdateWorkspaceCpuResponse

ResizeWorkspaceWritableLayer

ResizeWorkspaceWritableLayer enlarges the Workspace's writable filesystem layer in place. The Workspace keeps its identity, Template binding, Volume binding, and every byte already written to the layer; nothing is started, stopped, or rebuilt. The target is absolute and only moves upward: equal to the current capacity it is a plain success that opens no command, smaller it is invalid_argument, and beyond what the placement can hold it is resource_exhausted. It is accepted by a Workspace that holds no execution, under the same rule as UpdateWorkspaceMemory. A Workspace whose layer does not exist yet only records the capacity; the layer is created at that size on its first start.

POST/kibotos.ctrl.v1.WorkspaceService/ResizeWorkspaceWritableLayer一元调用
请求ResizeWorkspaceWritableLayerRequest
  • workspace_idstring= 2
  • The absolute capacity the writable layer must have, not a delta. It is required: a resize never resolves its own target from the storage profile. It must be a whole number of MiB and must not be smaller than the capacity the Workspace already has.

响应ResizeWorkspaceWritableLayerResponse

UpdateWorkspaceVolumeBinding

UpdateWorkspaceVolumeBinding replaces the Workspace's Volume binding with the complete target it is given: NONE releases the current Volume, BOUND with the current Volume changes its mount path or delete_with_workspace, and BOUND with another Volume binds that one and releases the current one. NEW is not accepted here. It only records configuration: nothing is started, stopped, or rebuilt, and the new binding is mounted by the next successful start. A released Volume always survives with its data and returns to AVAILABLE. It is accepted by a Workspace that holds no execution, under the same rule as UpdateWorkspaceMemory; the target Volume must be AVAILABLE, unbound, and reachable from the placement this Workspace already has. The same binding is idempotent and keeps binding_revision, a different one increments it.

POST/kibotos.ctrl.v1.WorkspaceService/UpdateWorkspaceVolumeBinding一元调用
请求UpdateWorkspaceVolumeBindingRequest
响应UpdateWorkspaceVolumeBindingResponse

RevokeWorkspaceDataPlane

RevokeWorkspaceDataPlane invalidates all existing data-plane credentials without restarting the Workspace or exposing its internal route target.

POST/kibotos.ctrl.v1.WorkspaceService/RevokeWorkspaceDataPlane一元调用
请求RevokeWorkspaceDataPlaneRequest
响应RevokeWorkspaceDataPlaneResponse

DeleteWorkspace

POST/kibotos.ctrl.v1.WorkspaceService/DeleteWorkspace一元调用
请求DeleteWorkspaceRequest
响应DeleteWorkspaceResponse

UpdateWorkspaceLabels

UpdateWorkspaceLabels replaces the complete label map; it never merges. expected_revision must equal labels_revision or the call is aborted and nothing changes. Content equal to the stored labels succeeds and keeps the revision. Accepted in every state except DELETED.

POST/kibotos.ctrl.v1.WorkspaceService/UpdateWorkspaceLabels一元调用
请求UpdateWorkspaceLabelsRequest
响应UpdateWorkspaceLabelsResponse

UpdateWorkspaceAnnotations

UpdateWorkspaceAnnotations follows every rule of UpdateWorkspaceLabels for the annotation map and annotations_revision.

POST/kibotos.ctrl.v1.WorkspaceService/UpdateWorkspaceAnnotations一元调用
请求UpdateWorkspaceAnnotationsRequest
响应UpdateWorkspaceAnnotationsResponse

本页内容