Skip to content

api: rename Volume.external_volume_template (ExternalVolumeTemplate) to external (ExternalVolumeSource) #2407

Closed

Description

Background

In pkg/proto/ateapipb/ateapi.proto, three of the four union members on Volume (ateapi.proto:1248-1275) use <Type>VolumeSource for the message name and a concise <type> field name without repeating _volume:

message Volume {
  string name = 1;

  DurableDirVolumeSource durable_dir = 2;
  ExternalVolumeTemplate external_volume_template = 3;
  SystemInfoVolumeSource system_info = 5;
  ImageVolumeSource image = 6;
}

ExternalVolumeTemplate external_volume_template breaks both conventions:

  1. Every sibling message on ActorTemplate.volumes is named *VolumeSource (DurableDirVolumeSource, SystemInfoVolumeSource, ImageVolumeSource), even though all of them are part of ActorTemplate.
  2. Its field name repeats _volume_template inside Volume, whereas the siblings use durable_dir, system_info, and image (and internal/proto/ateletpb/atelet.proto:358 already uses ExternalVolumeSource external = 3;).

Proposed Changes

  1. pkg/proto/ateapipb/ateapi.proto:
    • Rename message ExternalVolumeTemplate -> ExternalVolumeSource.
    • Rename field Volume.external_volume_template -> external.
  2. Regenerate & update callers:
    • Run hack/update/codegen.sh to regenerate pkg/proto/ateapipb/ateapi.pb.go and declarative validation in cmd/ateapi/internal/apivalidation.
    • Update Go callers, tests, and YAML examples in docs/ (docs/api-guide.md, docs/api-style-guide.md, docs/csi-volumes.md, docs/csi-deployment.md).

Michelle Au (@msau42)

Activity

  1. hajiler commented on Oct 13, 2026

    @hajiler
    Collaborator

    We also have an Atelet ExternalVolumeSource that should probably be renamed just to ExternalVolume to match SystemInfo and Durable dir

    type ExternalVolumeSource struct {
    state protoimpl.MessageState `protogen:"open.v1"`
    // Required, unlike the actor status counterpart: the control plane only
    // sends volumes that finished provisioning.
    //
    // +k8s:required
    // +k8s:maxLength=256 # matches ExternalVolume.storage_volume_id's bound
    // +k8s:customValidation # no control characters
    StorageVolumeId string `protobuf:"bytes,1,opt,name=storage_volume_id,json=storageVolumeId,proto3" json:"storage_volume_id,omitempty"`
    // +k8s:optional
    // +k8s:maxLength=253 # matches ExternalVolume.volume_type's bound
    // +k8s:customValidation # optional "substrate.io/" prefix + DNS subdomain
    VolumeType string `protobuf:"bytes,2,opt,name=volume_type,json=volumeType,proto3" json:"volume_type,omitempty"`
    // volume_context is the driver's provisioning metadata. Its entries are the
    // driver's own, so the map is only bounded, not validated.
    //
    // +k8s:optional
    // +k8s:customValidation # at most 40 KiB in total, ten times the CSI limit for map fields
    VolumeContext map[string]string `protobuf:"bytes,3,rep,name=volume_context,json=volumeContext,proto3" json:"volume_context,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
    // publish_context is the driver's attachment metadata for this node, which
    // the node plugin needs to complete the mount. Bounded like volume_context.
    //
    // +k8s:optional
    // +k8s:customValidation # at most 40 KiB in total, ten times the CSI limit for map fields
    PublishContext map[string]string `protobuf:"bytes,4,rep,name=publish_context,json=publishContext,proto3" json:"publish_context,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
    unknownFields protoimpl.UnknownFields
    sizeCache protoimpl.SizeCache
    }

    // Exactly one of durable_dir / external / system_info / image must be set.
    //
    // +k8s:optional
    // +k8s:unionMember
    DurableDir *DurableDirVolume `protobuf:"bytes,2,opt,name=durable_dir,json=durableDir,proto3" json:"durable_dir,omitempty"`
    // +k8s:optional
    // +k8s:unionMember
    External *ExternalVolumeSource `protobuf:"bytes,3,opt,name=external,proto3" json:"external,omitempty"`
    // +k8s:optional
    // +k8s:unionMember
    SystemInfo *SystemInfoVolume `protobuf:"bytes,4,opt,name=system_info,json=systemInfo,proto3" json:"system_info,omitempty"`
    // +k8s:optional
    // +k8s:unionMember
    Image *ImageVolumeSource `protobuf:"bytes,5,opt,name=image,proto3" json:"image,omitempty"`

  2. hajiler commented on Oct 13, 2026

    @hajiler
    Collaborator

    As of now we are looking at several changes to the External Volume objects

    1. Introduce an ExternalVolumeRef message which enables actors to refer to existing CSI volumes
    2. Nest ExternalVolumeTemplate & ExternalVolumeRef into a single ateapi object ExternalVolumeSource (to match other volumes)
    3. Rename atelet ExternalVolumeSource -> ExternalVolume (to match other volumes)
    4. Introduce a new Atespaced ExternalVolume object (naming scheme tbd).

    As of now I think we should close #2436, and I can cover cover all issues as part of a single PR.

    cc: Michelle Au (@msau42)

  3. added 9 commits that reference this issue on Oct 14, 2026
    73ea148
    64e3351
    580a413
    a83aea3
    4a9c50e
    cfa2183
    6b3279c
    203f873
    d3f7222
  4. added a commit that references this issue on Oct 19, 2026
    73e4d56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area/apiUser-facing API changeskind/cleanupSmall fixes that are not bugs, for example a typo in a code comment

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions