kubernetes-sigs / secrets-store-csi-driver

Secrets Store CSI driver for Kubernetes secrets - Integrates secrets stores with Kubernetes via a CSI volume.
https://secrets-store-csi-driver.sigs.k8s.io/
Apache License 2.0
1.28k stars 295 forks source link

Changing of CSIDriver name #1172

Closed monicabiswal147 closed 1 year ago

monicabiswal147 commented 1 year ago

I am trying to deploy the secrets-store-csi-driver manually and I have a requirement to have a different CSIDriver name apart from secrets-store.csi.k8s.io. I have updated the CSIDriver name in csidriver.yaml and in rbac-secretproviderclass.yaml files as well.

When I probe into the logs of the secrets-store-csi-driver pods I see the old CSIDrivername returned not the new one (pasted below). Bottomline is I am trying to find the root cause of the issue -'[Volume mount fails with secrets-store.csi.k8s.io not found in the list of registered CSI drivers]' which occurs when I try to create another pod after adding the volume mounts using the new CSIDriver name.

Can you please let me know If changing the name of CSIDriver can have such impact and where else should I updating the new CSIDriver name.

Note that I have gone through the troubleshooting reccommendations.

I0301 01:22:40.720970       1 main.go:167] Version: v2.7.0
I0301 01:22:40.721095       1 main.go:168] Running node-driver-registrar in mode=registration
I0301 01:22:40.721799       1 main.go:192] Attempting to open a gRPC connection with: "/csi/csi.sock"
I0301 01:22:40.721829       1 connection.go:154] Connecting to unix:///csi/csi.sock
I0301 01:22:40.723395       1 main.go:199] Calling CSI driver to discover driver name
I0301 01:22:40.723440       1 connection.go:183] GRPC call: /csi.v1.Identity/GetPluginInfo
I0301 01:22:40.723451       1 connection.go:184] GRPC request: {}
I0301 01:22:40.821561       1 connection.go:186] GRPC response: {"name":"secrets-store.csi.k8s.io","vendor_version":"v1.3.0"}
I0301 01:22:40.821653       1 connection.go:187] GRPC error: <nil>
I0301 01:22:40.821666       1 main.go:209] CSI driver name: "secrets-store.csi.k8s.io"
I0301 01:22:40.821739       1 node_register.go:53] Starting Registration Server at: /registration/secrets-store.csi.k8s.io-reg.sock
I0301 01:22:40.822036       1 node_register.go:62] Registration Server started at: /registration/secrets-store.csi.k8s.io-reg.sock
I0301 01:22:40.822211       1 node_register.go:92] Skipping HTTP server because endpoint is set to: ""
I0301 01:22:41.375741       1 main.go:102] Received GetInfo call: &InfoRequest{}
I0301 01:22:41.376077       1 main.go:109] "Kubelet registration probe created" path="/var/lib/kubelet/plugins/csi-secrets-store/registration"
I0301 01:22:41.433449       1 main.go:121] Received NotifyRegistrationStatus call: &RegistrationStatus{PluginRegistered:true,Error:,}

It would be great If I can get some pointers on how can I change a CSIDrivers name and deploy it manually since I have updated the spec.names {} in this file as well https://github.com/kubernetes-sigs/secrets-store-csi-driver/blob/9c72f6b4680747ccbf6af820a7d848332e343768/manifest_staging/deploy/secrets-store.csi.x-k8s.io_secretproviderclasses.yaml

aramase commented 1 year ago

Can you please let me know If changing the name of CSIDriver can have such impact and where else should I updating the new CSIDriver name.

Yes, if the driver name is not changed everywhere it can lead to this issue. In addition to the driver name change in CSIDriver and rbac roles, you'll need to set the --drivername arg in the secrets-store container (ref: https://secrets-store-csi-driver.sigs.k8s.io/topics/command-reference.html#list-of-command-line-options for the flags)

aramase commented 1 year ago

Closing this with https://github.com/kubernetes-sigs/secrets-store-csi-driver/issues/1172#issuecomment-1480341311. Feel free to reopen if you have any questions.

/close

k8s-ci-robot commented 1 year ago

@aramase: Closing this issue.

In response to [this](https://github.com/kubernetes-sigs/secrets-store-csi-driver/issues/1172#issuecomment-1511868776): >Closing this with https://github.com/kubernetes-sigs/secrets-store-csi-driver/issues/1172#issuecomment-1480341311. Feel free to reopen if you have any questions. > >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.