|
1 | | -# Bucket |
| 1 | +# Bucket |
| 2 | +A `Bucket` in `Ironcore` refers to a storage resource that organizes and manages data, similar to the concept of buckets in cloud storage services like Amazon S3. Buckets are containers for storing objects, such as files or data blobs, and are crucial for managing storage workloads. |
| 3 | + |
| 4 | +# Example Bucket Resource |
| 5 | +An example of how to define a `Bucket` resource in `Ironcore` |
| 6 | + |
| 7 | +``` |
| 8 | +apiVersion: storage.ironcore.dev/v1alpha1 |
| 9 | +kind: Bucket |
| 10 | +metadata: |
| 11 | + name: bucket-sample |
| 12 | +spec: |
| 13 | + bucketClassRef: |
| 14 | + name: bucketclass-sample |
| 15 | +# bucketPoolRef: |
| 16 | +# name: bucketpool-sample |
| 17 | +``` |
| 18 | + |
| 19 | +# Key Fields: |
| 20 | +- `bucketClassRef`(`string`): |
| 21 | + - Mandatory field |
| 22 | + - `BucketClassRef` is the BucketClass of a bucket |
| 23 | + |
| 24 | +- `bucketPoolRef`(`string`): |
| 25 | + - Optional field |
| 26 | + - `bucketPoolRef` indicates which BucketPool to use for the bucket, if not specified the controller itself picks the available bucketPool |
| 27 | + |
| 28 | + |
| 29 | +# Usage |
| 30 | +- **Data Storage**: Use `Buckets` to store and organize data blobs, files, or any object-based data. |
| 31 | + |
| 32 | +- **Multi-Tenant Workloads**: Leverage buckets for isolated and secure data storage in multi-tenant environments by using separate BucketClass or BucketPool references. |
| 33 | + |
| 34 | +- **Secure Access**: Buckets store a reference to the `Secret` securely in their status, and the `Secret` has the access credentials, which applications can retrieve access details from the `Secret`. |
| 35 | + |
| 36 | +# Reconciliation Process: |
| 37 | +- The controller detects changes and fetches bucket details. |
| 38 | + |
| 39 | +- Creation/Update ensures the backend bucket exists, metadata is synced, and credentials are updated. |
| 40 | + |
| 41 | +- The bucket will automatically sync with the backend storage system, and update the Bucket's state (e.g., `Available`, `Pending`, or `Error`) in the bucket's status. |
| 42 | + |
| 43 | +- Access details and credentials will be managed securely using Kubernetes `Secret` and the bucket status will track a reference to the `Secret`. |
| 44 | + |
| 45 | +- During deletion, resources will be cleaned up gracefully without manual intervention. |
| 46 | + |
| 47 | +- If the bucket is not ready (e.g., backend issues), reconciliation will retry |
0 commit comments