containerd.services.containers.v1

github.com/containerd/containerd/api/services/containers/v1/containers.proto (syntax: proto3)

Dependencies

  • gogoproto/gogo.proto
  • google/protobuf/any.proto
  • google/protobuf/empty.proto
  • google/protobuf/field_mask.proto
  • google/protobuf/timestamp.proto

Services

Containers

Description:

Containers provides metadata storage for containers used in the execution service.

The objects here provide an state-independent view of containers for use in management and resource pinning. From that perspective, containers do not have a “state” but rather this is the set of resources that will be considered in use by the container.

From the perspective of the execution service, these objects represent the base parameters for creating a container process.

In general, when looking to add fields for this type, first ask yourself whether or not the function of the field has to do with runtime execution or is invariant of the runtime state of the container. If it has to do with runtime, or changes as the “container” is started and stops, it probably doesn’t belong on this object.

MethodInput TypeOutput TypeDescription
Get GetContainerRequest GetContainerResponse
List ListContainersRequest ListContainersResponse
Create CreateContainerRequest CreateContainerResponse
Update UpdateContainerRequest UpdateContainerResponse
Delete DeleteContainerRequest Empty

Messages

Message: Container

#FieldLabelTypeDescription
1 id optional string

ID is the user-specified identifier.

This field may not be updated.

2 labels repeated LabelsEntry

Labels provides an area to include arbitrary data on containers.

The combined size of a key/value pair cannot exceed 4096 bytes.

Note that to add a new value to this field, read the existing set and include the entire result in the update call.

3 image optional string

Image contains the reference of the image used to build the specification and snapshots for running this container.

If this field is updated, the spec and rootfs needed to updated, as well.

4 runtime optional Runtime

Runtime specifies which runtime to use for executing this container.

5 spec optional Any

Spec to be used when creating the container. This is runtime specific.

6 snapshotter optional string

Snapshotter specifies the snapshotter name used for rootfs

7 snapshot_key optional string

SnapshotKey specifies the snapshot key to use for the container’s root filesystem. When starting a task from this container, a caller should look up the mounts from the snapshot service and include those on the task create request.

Snapshots referenced in this field will not be garbage collected.

This field is set to empty when the rootfs is not a snapshot.

This field may be updated.

8 created_at optional Timestamp

CreatedAt is the time the container was first created.

9 updated_at optional Timestamp

UpdatedAt is the last time the container was mutated.

10 extensions repeated ExtensionsEntry

Extensions allow clients to provide zero or more blobs that are directly associated with the container. One may provide protobuf, json, or other encoding formats. The primary use of this is to further decorate the container object with fields that may be specific to a client integration.

The key portion of this map should identify a “name” for the extension that should be unique against other extensions. When updating extension data, one should only update the specified extension using field paths to select a specific map key.

Message: Container.LabelsEntry

#FieldLabelTypeDescription
1 key optional string
2 value optional string

Message: .LabelsEntryRuntime

#FieldLabelTypeDescription
1 name optional string

Name is the name of the runtime.

2 options optional Any

Options specify additional runtime initialization options.

Message: RuntimeExtensionsEntry

#FieldLabelTypeDescription
1 key optional string
2 value optional Any

Message: GetContainerRequest

#FieldLabelTypeDescription
1 id optional string

Message: GetContainerResponse

#FieldLabelTypeDescription
1 container optional Container

Message: ListContainersRequest

#FieldLabelTypeDescription
1 filters repeated string

Filters contains one or more filters using the syntax defined in the containerd filter package.

The returned result will be those that match any of the provided filters. Expanded, containers that match the following will be returned:

filters[0] or filters[1] or … or filters[n-1] or filters[n]

If filters is zero-length or nil, all items will be returned.

Message: ListContainersResponse

#FieldLabelTypeDescription
1 containers repeated Container

Message: CreateContainerRequest

#FieldLabelTypeDescription
1 container optional Container

Message: CreateContainerResponse

#FieldLabelTypeDescription
1 container optional Container

Message: UpdateContainerRequest

Description:

UpdateContainerRequest updates the metadata on one or more container.

The operation should follow semantics described in https://developers.google.com/protocol-buffers/docs/reference/csharp/class/google/protobuf/well-known-types/field-mask, unless otherwise qualified.

#FieldLabelTypeDescription
1 container optional Container

Container provides the target values, as declared by the mask, for the update.

The ID field must be set.

2 update_mask optional FieldMask

UpdateMask specifies which fields to perform the update on. If empty, the operation applies to all fields.

Message: UpdateContainerResponse

#FieldLabelTypeDescription
1 container optional Container

Message: DeleteContainerRequest

#FieldLabelTypeDescription
1 id optional string