feat(helm): deploy the RustFS COSI driver via cosiDriver.enabled - #246
Conversation
Wires the RustFS COSI driver (rustfs.objectstorage.k8s.io), added in rustfs#219, into the Helm chart so it is turnkey-deployable instead of requiring hand-written manifests. Adds a Deployment running the driver alongside the upstream objectstorage-sidecar container over a shared Unix socket, a dedicated ServiceAccount/ClusterRole covering both containers, and a worked BucketClass/BucketAccessClass/BucketClaim/ BucketAccess example. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Better with a clear documentation @GatewayJ :D |
|
Thanks for adding the Helm wiring and documentation for the RustFS COSI driver. I reviewed commit The Helm chart renders successfully for the default, enabled, OpenShift, external RBAC, and custom ServiceAccount configurations. The driver binary path, Unix socket path, sidecar image, and basic COSI v1alpha1 resource shapes also look correct. However, I do not think this is ready to merge yet:
Although the CRD describes this field as optional, sidecar v0.2.2 copies BucketAccess.spec.protocol directly into BucketInfo and does not implement the documented fallback. Omitting it produces an empty protocol value. |
Addresses review feedback on rustfs#246 (commit 5bd2db4), verified against objectstorage-sidecar v0.2.2 and client-go source: - Document and demonstrate the real credential Secret shape: sidecar v0.2.2 writes a single `BucketInfo` JSON key, not the flat AWS_ACCESS_KEY_ID-style keys previously documented. Replace the envFrom example with a volume-mounted, JSON-parsing Pod. - Add `protocol: S3` to the BucketAccess example: the sidecar copies this field verbatim into BucketInfo with no fallback despite the CRD's optional-field doc comment, so omitting it yields an empty protocol. - Tighten the COSI driver ClusterRole: drop unused `list` on Secrets (neither the driver nor the pinned sidecar ever lists Secrets) and add `patch` on Events (client-go's event recorder PATCHes repeated/aggregated events, which 403'd without it). - Add a Helm lint/template CI step covering the disabled, enabled, OpenShift, custom-ServiceAccount, and custom-RBAC branches; ci.yml previously installed Helm but never invoked it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Thanks for the thorough review — all four points checked out against the pinned
One caveat worth flagging: full end-to-end coverage of the actual generated 🤖 Generated with Claude Code |
|
Amazing ! Thank you @GatewayJ |
Type of Change
Related Issues
Follow-up to #219 (merged) — the COSI driver binary itself. That PR intentionally left Helm
chart wiring out of scope ("can be added in a follow-up or kept in external GitOps").
Summary of Changes
Makes the RustFS COSI driver (
rustfs.objectstorage.k8s.io, from #219) turnkey-deployableinstead of requiring hand-written manifests, and documents a clear getting-started path.
Helm chart (
deploy/rustfs-operator/)cosiDriver.enabled(defaultfalse) invalues.yaml, following the same conventions asthe existing
console.*block (image/resources/securityContext/RBAC sub-values).cosi-driver-deployment.yaml— a Deployment running therustfs-cosi-driverbinaryalongside the official upstream
objectstorage-sidecarcontainer (pinned tov0.2.2,matching the CRD API version below), sharing a Unix socket via an
emptyDirvolume. Verifiedagainst the real Rook/ceph-cosi reference implementation for image tag, socket path, and
container wiring.
cosi-driver-serviceaccount.yaml/cosi-driver-clusterrole.yaml/cosi-driver-clusterrolebinding.yaml— RBAC covering both the sidecar(
objectstorage.k8s.ioCRDs, Leases) and the driver (Secrets/ConfigMaps for the CASownership records), modeled on the upstream
ceph-cosireference RBAC.openshift.enabledtoggle so the driver Deployment behaves thesame as the operator/console Deployments on OpenShift (omits
securityContext, setshostUsers: false, letting the SCC assign the pod's UID instead of a hardcoded one thatwould fail SCC admission).
Docs & examples
examples/cosi-bucket-provisioning.yaml— a full workedBucketClass/BucketAccessClass/BucketClaim/BucketAccessexample plus a workload Podconsuming the resulting Secret. Field names and the CRD's
spec-nesting shape were verifieddirectly against the upstream Go types at the exact CRD version (
v1alpha1) matching thepinned sidecar release, not from memory.
separate Vanilla Kubernetes and OpenShift getting-started subsections (verified by
Dockerfile/manifest inspection of the upstream controller+sidecar images — both are
non-privileged, non-root-via-Dockerfile-only containers with no SCC-incompatible
requirements), plus a table documenting every key the driver writes into the generated
credentials Secret.
CHANGELOG.mdentry under[Unreleased].Out of scope
kubectl apply -k github.com/kubernetes-sigs/container-object-storage-interface?ref=v0.2.2,not something this chart manages (matches how Rook/ceph-cosi expect it to be installed too).
Checklist
helm lintandhelm templateacross default/enabled/OpenShift/custom-RBACvalue combinations
[Unreleased]Impact
(
cosiDriver.enabled: false); no impact on existing deployments that don't opt in.Verification