Skip to content

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

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)

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