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

Unable to use inline ephemeral volumes with non-Helm Chart Secret #12

Open
datamattsson opened this issue Sep 17, 2024 · 0 comments
Open

Comments

@datamattsson
Copy link

I need to use ephemeral volumes with separate secrets. I've tried multiple ways to provide the Secret to the inline volume construct without any rate of success.

...
  volumes:
  - csi:
      driver: csi.vastdata.com
      volumeAttributes:
        csi.storage.k8s.io/ephemeral: "true"
        eph_volume_name_fmt: csi:{namespace}:{name}:{id}
        inline-volume-secret-name: vast-file-backend
        inline-volume-secret-namespace: vast-storage
        root_export: /export
        secretName: vast-file-backend
        secretNamespace: vast-storage
        view_policy: my-view
        vip_pool_name: my-pool
        volume_name_fmt: csi:{namespace}:{name}:{id}
 ...

or:

...
  volumes:
 - csi:
     driver: csi.vastdata.com
     volumeAttributes:
       csi.storage.k8s.io/controller-expand-secret-name: vast-file-backend
       csi.storage.k8s.io/controller-expand-secret-namespace: vast-storage
       csi.storage.k8s.io/controller-publish-secret-name: vast-file-backend
       csi.storage.k8s.io/controller-publish-secret-namespace: vast-storage
       csi.storage.k8s.io/ephemeral: "true"
       csi.storage.k8s.io/node-publish-secret-name: vast-file-backend
       csi.storage.k8s.io/node-publish-secret-namespace: vast-storage
       csi.storage.k8s.io/provisioner-secret-name: vast-file-backend
       csi.storage.k8s.io/provisioner-secret-namespace: vast-storage
       eph_volume_name_fmt: csi:{namespace}:{name}:{id}
       root_export: /export
       view_policy: kubernetes
       vip_pool_name: my-pool
       volume_name_fmt: csi:{namespace}:{name}:{id}
...

The error seems to be that the content in the Secret can't be looked up:

  Warning  FailedMount  90s (x15 over 9m37s)  kubelet  (combined from similar events): MountVolume.SetUp failed for volume "my-volume-1" : rpc error: code = Unknown desc = Exception calling application: Could not find username.
    field = username
    tip = Make sure username is present in secret.
    timestamp = 2024-09-17T18:55:51.246849

If I specify secretName in Helm values AND endpoint (even if the Secret contains endpoint) it works as expected.

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

No branches or pull requests

1 participant