|
| 1 | +# rustfs-resources Helm chart |
| 2 | + |
| 3 | +Declare RustFS resources — `Bucket`, `Policy`, `User` custom resources — |
| 4 | +from Helm values. One release per team/app/namespace; the |
| 5 | +[rustfs-operator](https://github.com/OpenProjectX/rustfs-operator) |
| 6 | +reconciles them against the RustFS server. Resources are created in the |
| 7 | +release namespace. |
| 8 | + |
| 9 | +```sh |
| 10 | +helm repo add rustfs-operator https://openprojectx.github.io/rustfs-operator |
| 11 | +helm install app-storage rustfs-operator/rustfs-resources \ |
| 12 | + --namespace team-a -f my-resources.yaml |
| 13 | +``` |
| 14 | + |
| 15 | +## Example |
| 16 | + |
| 17 | +```yaml |
| 18 | +# my-resources.yaml |
| 19 | +connection: # default for every entry; per-entry override possible |
| 20 | + clusterRef: prod # or secretRef: <connection Secret in this namespace> |
| 21 | + |
| 22 | +buckets: |
| 23 | + - name: app-data |
| 24 | + versioning: true |
| 25 | + quotaBytes: 10737418240 # 10 GiB |
| 26 | + deletionPolicy: Retain # keep the bucket if the CR is deleted |
| 27 | + |
| 28 | +policies: |
| 29 | + - name: app-data-rw |
| 30 | + document: |
| 31 | + Version: "2012-10-17" |
| 32 | + Statement: |
| 33 | + - Effect: Allow |
| 34 | + Action: ["s3:GetObject", "s3:PutObject", "s3:DeleteObject", "s3:ListBucket"] |
| 35 | + Resource: ["arn:aws:s3:::app-data", "arn:aws:s3:::app-data/*"] |
| 36 | + |
| 37 | +users: |
| 38 | + - name: app-user |
| 39 | + policies: ["app-data-rw"] |
| 40 | + secretKeyRef: # existing Secret with key `secretKey` |
| 41 | + name: app-user-creds |
| 42 | +``` |
| 43 | +
|
| 44 | +## Values |
| 45 | +
|
| 46 | +| Key | Description | |
| 47 | +|-----|-------------| |
| 48 | +| `connection.clusterRef` / `connection.secretRef` | default connection (exactly one) | |
| 49 | +| `buckets[]` | `name` (required), `bucketName`, `versioning`, `quotaBytes`, `deletionPolicy`, `connection` | |
| 50 | +| `policies[]` | `name` (required), `document` (required), `policyName`, `deletionPolicy`, `connection` | |
| 51 | +| `users[]` | `name` (required), `accessKey`, `secretKeyRef` **or** inline `secretKey`, `policies`, `enabled`, `deletionPolicy`, `connection` | |
| 52 | + |
| 53 | +Fields you omit stay unmanaged (e.g. no `versioning` key means the operator |
| 54 | +never touches versioning). `deletionPolicy` defaults to `Delete` — the |
| 55 | +remote resource is removed when the CR is deleted; use `Retain` to keep it. |
| 56 | + |
| 57 | +**User secret keys**: `secretKeyRef` points at an existing Secret in the |
| 58 | +release namespace. Alternatively set `secretKey` inline and the chart |
| 59 | +creates `<release>-user-<name>` — but the key then lives in the Helm |
| 60 | +release values; prefer `secretKeyRef` in production. The secret key is only |
| 61 | +applied when the user is first created (RustFS cannot update it in place). |
| 62 | + |
| 63 | +## Prerequisites |
| 64 | + |
| 65 | +The operator and CRDs must be installed (main `rustfs-operator` chart), and |
| 66 | +the referenced `ClusterConnection` or connection Secret must exist. |
0 commit comments