sodafoundation / dock

SODA Terra Project DOCK module : is an open source implementation for the unified interface to connect heterogeneous storage backends.
Apache License 2.0
27 stars 17 forks source link

help needed : OpenStack cinder https certificate #78

Open olivierBlanc opened 3 years ago

olivierBlanc commented 3 years ago

Hello, When trying to connect cinder to OpenStack tenant, I have a self-signed certificate problem (x509: certificate signed by unknown authority) Is there a way to give the cinder driver, through the configuration, a ca-file to bypass this problem ? Regards, Olivier

sushanthakumar commented 3 years ago

@olivierBlanc , Can you elaborate a bit on your scenario. Are you using openstack which is integrated with soda projects?

olivierBlanc commented 3 years ago

Hi,

Yes, I am using OpenStack integrated with Soda Project.

So my infrastructure is IaaS with Openstack. I installed a Kubernetes v1.20.2 on this infra and I want to be able to access OpenStack volumes from my Pods in RWM mode. To do so, I moved to SODA.

For my problem, I tried to move on and I modified the cinder.go file in contrib/drivers/openstack to add a parameter CAPEM read from cinder.yaml configuration file. I pass this info to gophercloud/gophercloud/openstack/client.go AthenticatedClient function. I modified that function too, to initiate an http client transport aware of the RootCA to use.

From now on I bypassed the self-certificate problem that I had. I'm still going on to check other problems that I have with my configuration file. Let me know if I need to provide more infos, code or whatever.