Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
2279287
[AISOS-1560] Create SwiftContainerResourceSpec and validation types w…
Jun 21, 2026
314aef4
[AISOS-1560] Create SwiftContainerResourceSpec and validation types w…
Jun 21, 2026
a4b9531
[AISOS-1561] Add SwiftContainerFilter and SwiftContainerImport types
Jun 21, 2026
f92e490
[AISOS-1562] Create SwiftContainerResourceStatus type for observed state
Jun 21, 2026
7106659
[AISOS-1563] Create SwiftContainer Spec, Status and CRD registration …
Jun 21, 2026
3a8ffc7
[AISOS-1563] Create SwiftContainer Spec, Status and CRD registration …
Jun 21, 2026
0eaee78
[AISOS-1564] Add SwiftContainer to PROJECT file and run code generation
Jun 21, 2026
f79b1ec
[AISOS-1564] Add SwiftContainer to PROJECT file and run code generation
Jun 21, 2026
71bb2a8
[AISOS-1565] Create SwiftContainer example manifests
Jun 21, 2026
c4c4ad2
[AISOS-1573] Create SwiftContainerClient interface and client impleme…
Jun 21, 2026
c72a56e
[AISOS-1576] Add GetContainerMetadata helper to SwiftContainerClient
Jun 21, 2026
e056421
[AISOS-1577] Add unit tests for SwiftContainerClient operations
Jun 21, 2026
259bf76
[AISOS-1592] Create SwiftContainer actuator with CRUD operations
Jun 21, 2026
8524f86
[AISOS-1593] Complete SwiftContainer status writer with all observed …
Jun 21, 2026
6b32fc1
[AISOS-1594] Register swiftcontainer controller in manager
Jun 21, 2026
d1e95fc
[AISOS-1594] Create SwiftContainer controller setup and registration
Jun 21, 2026
7ad5ea4
[AISOS-1596] Add unit tests for SwiftContainer actuator operations
Jun 21, 2026
5c51ee7
[AISOS-1605] Enable Swift service in devstack CI configuration
Jun 21, 2026
3b025d0
[AISOS-1606] Create SwiftContainer KUTTL test directory structure
Jun 21, 2026
b58c756
[AISOS-1607] Implement swiftcontainer-create-minimal KUTTL test case …
Jun 21, 2026
e9d9c9b
[AISOS-1608] Add swiftcontainer-create-full KUTTL test case (SC-002)
Jun 21, 2026
3888caa
[AISOS-1609] Implement swiftcontainer-import KUTTL test case (SC-003)
Jun 21, 2026
26dce31
[AISOS-1610] Implement swiftcontainer-update KUTTL test case
Jun 21, 2026
6940e21
[AISOS-1611] Implement swiftcontainer-import-error KUTTL test case
Jun 21, 2026
78a4fc6
[AISOS-1612] Implement swiftcontainer-validation KUTTL test case for …
Jun 21, 2026
3d42525
[AISOS-1424-review] Fix breaking issues in swiftcontainer controller
Jun 21, 2026
22c0cef
[AISOS-1424-review] Local code review — fix breaking issues
Jun 21, 2026
031af8a
[AISOS-1424-docs] docs: update documentation for code changes
Jun 21, 2026
dc2c011
[AISOS-1424] review: address PR feedback
Jun 22, 2026
50b8d1f
[AISOS-1424-review-review-impl] Fix DeleteResource to use osResource.…
Jun 22, 2026
7deb63a
[AISOS-1424] review: address PR feedback
Jun 22, 2026
05a28ee
[AISOS-1424-ci-fix] Fix SwiftContainer CI failures
Jun 22, 2026
8818601
[AISOS-1424-ci-fix] Fix swiftcontainer-update e2e test: remove invali…
Jun 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
with:
enable_workaround_docker_io: 'false'
branch: ${{ matrix.openstack_version }}
enabled_services: "openstack-cli-server,neutron-trunk,neutron-port-trusted-vif"
enabled_services: "openstack-cli-server,neutron-trunk,neutron-port-trusted-vif,s-proxy,s-account,s-container,s-object"
conf_overrides: |
enable_plugin neutron https://github.com/openstack/neutron ${{ matrix.openstack_version }}
enable_plugin manila https://github.com/openstack/manila ${{ matrix.openstack_version }}
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
bin/*
Dockerfile.cross

# Root-level compiled binaries
/manager
/resource-generator

# Test binary, built with `go test -c`
*.test

Expand Down Expand Up @@ -42,3 +46,6 @@ __pycache__/

/bundle/
bundle.Dockerfile

# Forge workflow state (do not commit)
.forge/
8 changes: 8 additions & 0 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,14 @@ resources:
kind: Subnet
path: github.com/k-orc/openstack-resource-controller/api/v1alpha1
version: v1alpha1
- api:
crdVersion: v1
namespaced: true
domain: k-orc.cloud
group: openstack
kind: SwiftContainer
path: github.com/k-orc/openstack-resource-controller/api/v1alpha1
version: v1alpha1
- api:
crdVersion: v1
namespaced: true
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ kubectl delete -f $ORC_RELEASE
| server group | | ✔ | ✔ |
| service | | ✔ | ✔ |
| share network | | | ◐ |
| swift container | | | ◐ |
| subnet | | ◐ | ◐ |
| trunk | | ✔ | ✔ |
| user | | ◐ | ◐ |
Expand Down
186 changes: 186 additions & 0 deletions api/v1alpha1/swiftcontainer_types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
/*
Copyright The ORC Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package v1alpha1

// SwiftContainerName is the name of a Swift container. It must be between 1
// and 256 characters long and must not contain forward slashes.
// +kubebuilder:validation:MinLength:=1
// +kubebuilder:validation:MaxLength:=256
// +kubebuilder:validation:Pattern:=`^[^/]+$`
// +kubebuilder:validation:XValidation:rule="self.size() <= 256",message="name must not exceed 256 UTF-8 bytes"
type SwiftContainerName string

// SwiftContainerMetadata defines a key-value pair to be set as a Swift
// container metadata header (X-Container-Meta-<key>: <value>).
type SwiftContainerMetadata struct {
// key is the name of the metadata item. It will be used as the suffix of
// the X-Container-Meta-* header.
// +kubebuilder:validation:MinLength:=1
// +kubebuilder:validation:MaxLength:=255
// +required
Key string `json:"key,omitempty"`

// value is the value of the metadata item.
// +kubebuilder:validation:MaxLength:=255
// +required
Value string `json:"value"`
}

// SwiftContainerMetadataStatus represents an observed metadata key-value pair
// on a Swift container.
type SwiftContainerMetadataStatus struct {
// key is the name of the metadata item.
// +kubebuilder:validation:MaxLength:=255
// +optional
Key string `json:"key,omitempty"`

// value is the value of the metadata item.
// +kubebuilder:validation:MaxLength:=255
// +optional
Value string `json:"value,omitempty"`
}

// SwiftContainerFilter defines an existing resource by its properties
// +kubebuilder:validation:MinProperties:=1
type SwiftContainerFilter struct {
// name of the existing resource
// +optional
Name *SwiftContainerName `json:"name,omitempty"`

// prefix filters containers by name prefix. Only containers whose names
// begin with this prefix will be considered.
// +kubebuilder:validation:MinLength:=1
// +kubebuilder:validation:MaxLength:=256
// +optional
Prefix *string `json:"prefix,omitempty"`
}

// SwiftContainerImport specifies an existing resource which will be imported
// instead of creating a new one. Swift containers are identified by name
// rather than UUID.
// +kubebuilder:validation:MinProperties:=1
// +kubebuilder:validation:MaxProperties:=1
type SwiftContainerImport struct {
// name contains the name of an existing Swift container to import. Note
// that when specifying an import by name, the resource MUST already exist.
// The ORC object will enter an error state if the resource does not exist.
// +optional
Name *SwiftContainerName `json:"name,omitempty"`

// filter contains a resource query which is expected to return a single
// result. The controller will continue to retry if filter returns no
// results. If filter returns multiple results the controller will set an
// error state and will not continue to retry.
// +optional
Filter *SwiftContainerFilter `json:"filter,omitempty"`
}

// SwiftContainerResourceSpec contains the desired state of a Swift container.
type SwiftContainerResourceSpec struct {
// name will be the name of the created Swift container. If not specified,
// the name of the ORC object will be used. The name must be unique within
// the account and must not contain forward slashes.
// +optional
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="name is immutable"
Name *SwiftContainerName `json:"name,omitempty"`

// metadata is a list of key-value pairs which will be set as
// X-Container-Meta-* headers on the Swift container.
// +kubebuilder:validation:MaxItems:=64
// +listType=atomic
// +optional
Metadata []SwiftContainerMetadata `json:"metadata,omitempty"`

// containerRead sets the X-Container-Read ACL header which defines who
// can read objects in the container. Common values include ".r:*" for
// public read access or a comma-separated list of account/container
// combinations.
// +kubebuilder:validation:MaxLength:=256
// +optional
ContainerRead *string `json:"containerRead,omitempty"`

// containerWrite sets the X-Container-Write ACL header which defines who
// can write objects to the container. Common values include a
// comma-separated list of account/container combinations.
// +kubebuilder:validation:MaxLength:=256
// +optional
ContainerWrite *string `json:"containerWrite,omitempty"`

// storagePolicy is the name of the storage policy to use for this
// container. If not specified, the cluster's default storage policy will
// be used. This field is immutable after creation.
// +kubebuilder:validation:MinLength:=1
// +kubebuilder:validation:MaxLength:=255
// +optional
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="storagePolicy is immutable"
StoragePolicy *string `json:"storagePolicy,omitempty"`
}

// SwiftContainerResourceStatus represents the observed state of a Swift container.
type SwiftContainerResourceStatus struct {
// name is the name of the Swift container.
// +kubebuilder:validation:MaxLength=256
// +optional
Name string `json:"name,omitempty"`

// bytesUsed is the total number of bytes stored in the container.
// +optional
BytesUsed int64 `json:"bytesUsed,omitempty"`

// objectCount is the number of objects stored in the container.
// +optional
ObjectCount int64 `json:"objectCount,omitempty"`

// metadata is the list of observed metadata key-value pairs on the container.
// +kubebuilder:validation:MaxItems:=64
// +listType=atomic
// +optional
Metadata []SwiftContainerMetadataStatus `json:"metadata,omitempty"`

// containerRead is the current X-Container-Read ACL, defining who can
// read objects in the container.
// +kubebuilder:validation:MaxLength=1024
// +optional
ContainerRead string `json:"containerRead,omitempty"`

// containerWrite is the current X-Container-Write ACL, defining who can
// write objects to the container.
// +kubebuilder:validation:MaxLength=1024
// +optional
ContainerWrite string `json:"containerWrite,omitempty"`

// storagePolicy is the name of the storage policy assigned to the container.
// +kubebuilder:validation:MaxLength=1024
// +optional
StoragePolicy string `json:"storagePolicy,omitempty"`

// versions is the container where object versions are stored, if versioning
// is enabled on this container.
// +kubebuilder:validation:MaxLength=1024
// +optional
Versions string `json:"versions,omitempty"`

// quotaBytes is the quota on the maximum number of bytes that can be
// stored in the container, if set.
// +optional
QuotaBytes *int64 `json:"quotaBytes,omitempty"`

// quotaCount is the quota on the maximum number of objects that can be
// stored in the container, if set.
// +optional
QuotaCount *int64 `json:"quotaCount,omitempty"`
}
Loading
Loading