Skip to content

SwiftContainer: add controller#824

Open
eshulman2 wants to merge 8 commits into
k-orc:mainfrom
eshulman2:swiftcontainer-controller
Open

SwiftContainer: add controller#824
eshulman2 wants to merge 8 commits into
k-orc:mainfrom
eshulman2:swiftcontainer-controller

Conversation

@eshulman2

@eshulman2 eshulman2 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a SwiftContainer API and controller for managing Swift containers
  • add name-based import handling, metadata and ACL reconciliation, generated clients, CRD/RBAC wiring, and manager registration
  • add unit tests, KUTTL suites, examples, and CRD documentation

@github-actions github-actions Bot added the semver:major Breaking change label Jun 23, 2026

@winiciusallan winiciusallan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hey @eshulman2, thanks for the PR!

I did a round of review through the API and left other comments inline. Will take some time to look how CRUD operations are being performed and the tests :).

Comment thread api/v1alpha1/swiftcontainer_types.go Outdated
Comment thread api/v1alpha1/swiftcontainer_types.go Outdated
Comment thread api/v1alpha1/swiftcontainer_types.go Outdated
Comment thread internal/osclients/swiftcontainer_test.go Outdated
}

// SwiftContainerResourceSpec contains the desired state of a Swift container.
type SwiftContainerResourceSpec struct {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There are other fields that we could implement in the ResourceSpec, but I'm okay leaving as it is and add them later.

Comment thread api/v1alpha1/swiftcontainer_types.go Outdated
Comment thread internal/controllers/swiftcontainer/controller.go Outdated
Comment thread internal/controllers/swiftcontainer/status.go Outdated
Comment thread internal/controllers/swiftcontainer/actuator_test.go Outdated
Comment thread internal/controllers/swiftcontainer/actuator.go Outdated
@eshulman2 eshulman2 force-pushed the swiftcontainer-controller branch from 2fb1881 to c85a5da Compare June 28, 2026 13:54
@eshulman2 eshulman2 requested a review from winiciusallan June 29, 2026 07:21
@eshulman2 eshulman2 force-pushed the swiftcontainer-controller branch from 222add3 to ab62b5d Compare July 2, 2026 10:58
Comment thread api/v1alpha1/swiftcontainer_types.go Outdated
Comment thread internal/controllers/swiftcontainer/actuator.go Outdated
Comment thread api/v1alpha1/swiftcontainer_types.go
Comment thread internal/controllers/swiftcontainer/tests/.gitkeep Outdated
Comment thread internal/controllers/swiftcontainer/actuator.go Outdated
Comment thread internal/controllers/swiftcontainer/actuator.go Outdated
Comment thread internal/controllers/swiftcontainer/tests/swiftcontainer-create-minimal/README.md Outdated
Comment thread internal/controllers/swiftcontainer/tests/swiftcontainer-create-full/README.md Outdated
Comment thread internal/controllers/swiftcontainer/tests/swiftcontainer-import/README.md Outdated
Scaffold the SwiftContainer controller using the controller generator:

$ go run ./cmd/scaffold-controller -interactive=false     -kind=SwiftContainer     -gophercloud-client=NewObjectStorageV1     -gophercloud-module=github.com/gophercloud/gophercloud/v2/openstack/objectstorage/v1/containers     -gophercloud-type=Container     -openstack-json-object=container
@eshulman2 eshulman2 force-pushed the swiftcontainer-controller branch from ab62b5d to b74e0b9 Compare July 5, 2026 11:27
eshulman2 added 6 commits July 5, 2026 14:55
Add the SwiftContainer API, generated clients, OpenStack client wrapper, controller wiring, status writer, and reconciliation logic.

Swift containers are name-addressed, so the controller uses the container name as the ORC status ID and adds custom import handling for name-based imports.
Add unit coverage for Swift container import, adoption, creation, validation, and OpenStack client behavior.

Add KUTTL suites for minimal and full creation, import success and failure, updates, and name validation, and enable Swift in the E2E environment.
Document SwiftContainer in the resource matrix and generated CRD reference, and add example manifests for create and import workflows.
@eshulman2 eshulman2 force-pushed the swiftcontainer-controller branch 3 times, most recently from aefae9a to 65d3739 Compare July 5, 2026 12:30
@eshulman2 eshulman2 force-pushed the swiftcontainer-controller branch from 65d3739 to ec7d589 Compare July 6, 2026 08:04
@eshulman2 eshulman2 requested a review from winiciusallan July 7, 2026 12:22

@winiciusallan winiciusallan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice! 👌

// HasCustomImport indicates that the resource defines its own Import type in the
// non-generated *_types.go file. When true, the Import type will not be generated.
// Default is false (Import type is generated).
HasCustomImport bool

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we could add a validation later to check whether a user has passed an Import type.

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

Labels

semver:major Breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants