-
Notifications
You must be signed in to change notification settings - Fork 528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support storing cephfs omap in a different namespace in rados under same filesystem metadata pool #4652
base: devel
Are you sure you want to change the base?
Conversation
de2a831
to
23fe029
Compare
Add cli argument --radosnamespacecephfs to override radosNamespace "csi" used to store CSI specific objects and keys. Signed-off-by: Andreas <zerotens@users.noreply.github.com>
Add --instanceid / --radosnamespacecephfs for nfs component as it is also using these two variables from cephfs code. Signed-off-by: Andreas <zerotens@users.noreply.github.com>
Add --radosnamespacecephfs cli argument to docs Signed-off-by: Andreas <zerotens@users.noreply.github.com>
Add --radosnamespacecephfs cli argument to helm chart cephfs Add --instance cli argument to helm chart cephfs and rbd Signed-off-by: Andreas <zerotens@users.noreply.github.com>
23fe029
to
ebaa395
Compare
@nixpanic Linting was hopefully fixed |
{{- if .Values.instanceID }} | ||
- "--instanceid={{ .Values.instanceID }}" | ||
{{- end }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zerotens
Can you please open another for instanceID change ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Rakshith-R
I made an extra PR for this.
Describe what this PR does
Fixes #4599
This PR adds a new cli argument to let users override the current hardcoded radosNamespace "csi" used in CephFS.
ceph-csi/internal/cephfs/util/util.go
Line 24 in ce3ec6a
Needed is this for multitenant environments where one ceph cluster with one cephfs filesystem is used by multiple kubernetes clusters.
This allows storing the state of every cephfs instance / kubernetes cluster in their own radosNamespaces and allows finer controlled access for cephfs.
This PR also makes those two needed parameters --instanceid (rbd & cephfs Helm Chart) and --radosnamespacecephfs (cephfs Helm Chart) configurable via helm chart.
Is there anything that requires special attention
Is the change backward compatible?
Yes
Are there concerns around backward compatibility?
No, the default values in code have not been changed but are now overrideable via helm and cli arguments.
Future concerns
Depending on future usage of the NFS Controller, currently the NFS controller is using the CephFS variables cephfs.CSIInstanceID and fsutil.RadosNamespace which is now overrideable with the cli argument
--radosnamespacecephfs
and--instanceid
.ceph-csi/internal/nfs/controller/controllerserver.go
Line 48 in ce3ec6a
ceph-csi/internal/nfs/controller/controllerserver.go
Line 49 in ce3ec6a
ceph-csi/internal/nfs/controller/volume.go
Line 291 in ce3ec6a
ceph-csi/internal/nfs/controller/volume.go
Line 329 in ce3ec6a
Testing
As i don't have a nice way of testing it and this is my first PR and go code for some time i would appreciate an detailed review.