Skip to content

Use ManagedResource for volumes in CLI commands#1607

Open
katiewasnothere wants to merge 1 commit into
apple:mainfrom
katiewasnothere:volume_managedresource_conformance
Open

Use ManagedResource for volumes in CLI commands#1607
katiewasnothere wants to merge 1 commit into
apple:mainfrom
katiewasnothere:volume_managedresource_conformance

Conversation

@katiewasnothere
Copy link
Copy Markdown
Contributor

Type of Change

  • New feature

Motivation and Context

Related to #1404.

This PR adds the initial work to have volume resources conform to ManagedResource, in alignment with other resources such as networks (see here). Further work is necessary to move the use of VolumeResource down to the APIServer (in the VolumesService) and in the volume client. Volumes do not currently have any plugin or runtime state, so that information is not included in the VolumeResource, but could be added later if needed.

Testing

  • Tested locally

@github-actions github-actions Bot added the cli label May 27, 2026

public var tableRow: [String] {
[
id,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have to do it today, but just wanted to get the thought out there.

If we switch ID over to a system-assigned identifier (for container, volume, network it'd be a 32 digit hex value like Docker), we'd probably want to report name and not id here. What do you think?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems very reasonable to me. I'll change it to that.

/// A volume resource, representing a configured volume.
public struct VolumeResource: ManagedResource {
/// The volume's configuration — its persistent, intrinsic properties.
public let config: Volume
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again not necessarily for this PR Volume become VolumeConfiguration?

Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
@katiewasnothere katiewasnothere force-pushed the volume_managedresource_conformance branch from 047157b to c472271 Compare May 28, 2026 00:09
@github-actions
Copy link
Copy Markdown

Code Coverage

Tier Line Coverage
Unit 33.79%
Integration 19.51%
Combined 52.75%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants