Skip to content
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

Add the ability to use cross namespace volume data sources #809

Open
yacinebbt opened this issue May 14, 2024 · 5 comments
Open

Add the ability to use cross namespace volume data sources #809

yacinebbt opened this issue May 14, 2024 · 5 comments

Comments

@yacinebbt
Copy link
Contributor

What happened?

following the official documentation of kubernetes, and in order to be able to use cross namespace volume data sources, i have to activate CrossNamespaceVolumeDataSource feature gate for the csi-provisioner.

i quote from their doc (https://kubernetes.io/docs/concepts/storage/persistent-volumes/#cross-namespace-data-sources):

"
Also, you must enable the CrossNamespaceVolumeDataSource feature gate for the csi-provisioner.
Enabling the CrossNamespaceVolumeDataSource feature gate allows you to specify a namespace in the dataSourceRef field.

"
and here is the example how it works (https://kubernetes.io/docs/concepts/storage/persistent-volumes/#using-a-cross-namespace-volume-data-source).

My problem is that i don't know how can i enable this feature in the osc-bsu-csi driver. if you can help, i'll be very grateful.

What you expected to happen?
The ability to use this feature.

How to reproduce it (as minimally and precisely as possible)?
follow the official documentation, but before that, you are forced to enable this feature in osc-bsu-csi-driver because it's a prerequisite.

Environment

  • Kubernetes version (v1.27.12+rke2r1):
  • Driver version: osc-bsu-csi-driver-1.4.0

Thank you for your help

@jerome-jutteau
Copy link
Contributor

Hi, you should be able to enable features through csi-provisionner's side car parameters but I think this could also be a Chart option to add.
cc @outscale-hmi

@yacinebbt
Copy link
Contributor Author

Hello @jerome-jutteau,

Thank you for your fast reply, i'll test that and I'll keep you informed.

@yacinebbt
Copy link
Contributor Author

Hello again,

Unfortunately, it seems like the osc bsu csi driver does not support this feature, it says that it doesn't recongnize CrossNamespaceVolumeDataSource feature gate:

W0514 13:17:49.937739       1 feature_gate.go:237] Setting GA feature gate Topology=true. It will be removed in a future release.
F0514 13:17:49.937835       1 csi-provisioner.go:126] unrecognized feature gate: CrossNamespaceVolumeDataSource
goroutine 1 [running]:
k8s.io/klog/v2.stacks(0xc0000c2001, 0xc000038000, 0x70, 0xce)
	/workspace/vendor/k8s.io/klog/v2/klog.go:1026 +0xb9
k8s.io/klog/v2.(*loggingT).output(0x29f1ca0, 0xc000000003, 0x0, 0x0, 0xc000247260, 0x1, 0x221ca47, 0x12, 0x7e, 0x40e000)
	/workspace/vendor/k8s.io/klog/v2/klog.go:975 +0x1e5
k8s.io/klog/v2.(*loggingT).printDepth(0x29f1ca0, 0xc000000003, 0x0, 0x0, 0x0, 0x0, 0x1, 0xc00023efc0, 0x1, 0x1)
	/workspace/vendor/k8s.io/klog/v2/klog.go:735 +0x185
k8s.io/klog/v2.(*loggingT).print(...)
	/workspace/vendor/k8s.io/klog/v2/klog.go:717
k8s.io/klog/v2.Fatal(...)
	/workspace/vendor/k8s.io/klog/v2/klog.go:1494
main.main()
	/workspace/cmd/csi-provisioner/csi-provisioner.go:126 +0x2fa

goroutine 5 [chan receive]:
k8s.io/klog/v2.(*loggingT).flushDaemon(0x29f1ca0)
	/workspace/vendor/k8s.io/klog/v2/klog.go:1169 +0x8b
created by k8s.io/klog/v2.init.0
	/workspace/vendor/k8s.io/klog/v2/klog.go:420 +0xdf

Here is my kube-api server confs:

   - name: kube-apiserver
      command:
        - kube-apiserver
      args:
        .....
        - '--audit-log-path=/var/log/audit/rke2.log'
        - '--feature-gates=CrossNamespaceVolumeDataSource=true'
        - '--feature-gates=AnyVolumeDataSource=true'
        .....

Here is the params of the csi driver:

        - name: csi-provisioner
          image: registry.k8s.io/sig-storage/csi-provisioner:v3.0.0
          args:
            - '--csi-address=$(ADDRESS)'
            - '--v=10'
            - '--feature-gates=Topology=true'
            - '--feature-gates=CrossNamespaceVolumeDataSource=true'
            - '--leader-election=true'
            - '--timeout=60s'
            - '--default-fstype=ext4'

@jerome-jutteau
Copy link
Contributor

jerome-jutteau commented May 14, 2024

It seems csi-provisioner sidecar v3.0.0 does not support this feature but v3.4.0 has CrossNamespaceVolumeDataSource feature.
@outscale-hmi, maybe we can even upgrade further and use the latest version (currently v4.0.1).

@yacinebbt
Copy link
Contributor Author

Thank you for your help, i tried both of them (v3.4.0 and v4.0.1) and both of them support it

W0514 15:10:11.130928       1 feature_gate.go:241] Setting GA feature gate Topology=true. It will be removed in a future release.
I0514 15:10:11.131028       1 feature_gate.go:249] feature gates: &{map[CrossNamespaceVolumeDataSource:true Topology:true]}
I0514 15:10:11.131068       1 csi-provisioner.go:154] Version: v4.0.1
I0514 15:10:11.131082       1 csi-provisioner.go:177] Building kube configs for running in cluster...
I0514 15:10:11.131707       1 connection.go:215] Connecting to unix:///var/lib/csi/sockets/pluginproxy/csi.sock
I0514 15:10:11.132873       1 common.go:138] Probing CSI driver for readiness
I0514 15:10:11.132906       1 connection.go:244] GRPC call: /csi.v1.Identity/Probe
I0514 15:10:11.132910       1 connection.go:245] GRPC request: {}
I0514 15:10:11.135242       1 connection.go:251] GRPC response: {}
I0514 15:10:11.135316       1 connection.go:252] GRPC error: <nil>
I0514 15:10:11.135377       1 connection.go:244] GRPC call: /csi.v1.Identity/GetPluginInfo
I0514 15:10:11.135401       1 connection.go:245] GRPC request: {}
I0514 15:10:11.136384       1 connection.go:251] GRPC response: {"name":"bsu.csi.outscale.com","vendor_version":"v1.3.0"}
I0514 15:10:11.136420       1 connection.go:252] GRPC error: <nil>
I0514 15:10:11.136443       1 csi-provisioner.go:230] Detected CSI driver bsu.csi.outscale.com
I0514 15:10:11.136465       1 connection.go:244] GRPC call: /csi.v1.Identity/GetPluginCapabilities
I0514 15:10:11.136476       1 connection.go:245] GRPC request: {}
I0514 15:10:11.137495       1 connection.go:251] GRPC response: {"capabilities":[{"Type":{"Service":{"type":1}}},{"Type":{"Service":{"type":2}}}]}
I0514 15:10:11.137544       1 connection.go:252] GRPC error: <nil>
I0514 15:10:11.137574       1 connection.go:244] GRPC call: /csi.v1.Controller/ControllerGetCapabilities
I0514 15:10:11.137592       1 connection.go:245] GRPC request: {}
W0514 15:11:05.678994       1 feature_gate.go:241] Setting GA feature gate Topology=true. It will be removed in a future release.
I0514 15:11:05.679110       1 feature_gate.go:249] feature gates: &{map[CrossNamespaceVolumeDataSource:true Topology:true]}
I0514 15:11:05.679152       1 csi-provisioner.go:154] Version: v3.4.0
I0514 15:11:05.679195       1 csi-provisioner.go:177] Building kube configs for running in cluster...
I0514 15:11:05.679704       1 connection.go:154] Connecting to unix:///var/lib/csi/sockets/pluginproxy/csi.sock
I0514 15:11:05.680499       1 common.go:111] Probing CSI driver for readiness
I0514 15:11:05.680654       1 connection.go:183] GRPC call: /csi.v1.Identity/Probe
I0514 15:11:05.680663       1 connection.go:184] GRPC request: {}
I0514 15:11:05.684044       1 connection.go:186] GRPC response: {}
I0514 15:11:05.684083       1 connection.go:187] GRPC error: <nil>
I0514 15:11:05.684090       1 connection.go:183] GRPC call: /csi.v1.Identity/GetPluginInfo
I0514 15:11:05.684093       1 connection.go:184] GRPC request: {}
I0514 15:11:05.684524       1 connection.go:186] GRPC response: {"name":"bsu.csi.outscale.com","vendor_version":"v1.3.0"}
I0514 15:11:05.684553       1 connection.go:187] GRPC error: <nil>
I0514 15:11:05.684560       1 csi-provisioner.go:230] Detected CSI driver bsu.csi.outscale.com
I0514 15:11:05.684566       1 connection.go:183] GRPC call: /csi.v1.Identity/GetPluginCapabilities
I0514 15:11:05.684568       1 connection.go:184] GRPC request: {}
I0514 15:11:05.685082       1 connection.go:186] GRPC response: {"capabilities":[{"Type":{"Service":{"type":1}}},{"Type":{"Service":{"type":2}}}]}
I0514 15:11:05.685163       1 connection.go:187] GRPC error: <nil>
I0514 15:11:05.685170       1 connection.go:183] GRPC call: /csi.v1.Controller/ControllerGetCapabilities
I0514 15:11:05.685173       1 connection.go:184] GRPC request: {}

So i can say that all releases starting from v3.4.0 support this feature.

I will try to produce the same result as the kubernetes cross namespace volume data sources and then close the issue.

Thank you for your help again :).
Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants