exoscale / exoscale-csi-driver

Kubernetes CSI driver for Exoscale BlockStorage
Apache License 2.0
17 stars 1 forks source link

[Request]: use same secrets naming convention as in `exoscale-cloud-controller-manager` #6

Closed thomas-chauvet closed 7 months ago

thomas-chauvet commented 7 months ago

Your request

In exoscale-cloud-controller-manager secrets contain:

In CSI driver, secrets contain:

Furthermore, secrets are passed as environment variables like this:

          envFrom:
            - secretRef:
                name: exoscale-csi-credentials

But as I suggest to rename secrets, they could be passed like this:

          - name: EXOSCALE_API_SECRET
            valueFrom:
              secretKeyRef:
                key: api-secret
                name: exoscale-credentials
          - name: EXOSCALE_API_ENDPOINT
            valueFrom:
              secretKeyRef:
                key: api-endpoint
                name: exoscale-credentials

Finally, I suggest to rename secrets' name exoscale-csi-credentials to exoscale-credentials. Thus, the two components will be coherent which will facilitate the deployment.

Happy to make a PR if ok for you.

Cheers,

Thomas

pierre-emmanuelJ commented 7 months ago

Hello, thanks for your issue

I agree on the naming replacement from EXOSCALE_API_URL to EXOSCALE_API_ENDPOINT We'll make a PR.

In the CSI, the EXOSCALE_API_ENDPOINT is not necessary, that why it's not documented inside the README.md, it's only for internal use. What you only need is the key and the secret, the CSI will discover the right endpoint for you depending on your node zone.

exoscale-csi-credentials was a reason for not conflicting with cloud-controller-manager secret one during our internal use, but yes now it's no longer the case, let's align it with the CCM, and user can change on their own the secret name in the manifest if it's needed.

Thank you