Skip to content

SwiftContainer: add controller#824

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

SwiftContainer: add controller#824
eshulman2 wants to merge 7 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

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
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.
@github-actions github-actions Bot added the semver:major Breaking change label Jun 23, 2026

@winiciusallan winiciusallan left a comment

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.

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
// comma-separated list of account/container combinations.
// +kubebuilder:validation:MaxLength:=256
// +optional
ContainerWrite *string `json:"containerWrite,omitempty"`

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.

Ditto for ContainerWrite

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
Contributor

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
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