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

A single "default" storage class secret #384

Closed
lpabon opened this issue Dec 5, 2019 · 3 comments · Fixed by #393
Closed

A single "default" storage class secret #384

lpabon opened this issue Dec 5, 2019 · 3 comments · Fixed by #393
Assignees

Comments

@lpabon
Copy link
Member

lpabon commented Dec 5, 2019

Current Issue

Currently storage classes have each operation have a reference to the secret:

kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: fast-storage-all
provisioner: csi-driver.team.example.com
parameters:
  type: pd-ssd
  csi.storage.k8s.io/provisioner-secret-name: ${pvc.name}
  csi.storage.k8s.io/provisioner-secret-namespace: ${pvc.namespace}-fast-storage
  csi.storage.k8s.io/node-publish-secret-name: ${pvc.name}-${pvc.annotations['team.example.com/key']}
  csi.storage.k8s.io/node-publish-secret-namespace: ${pvc.namespace}-fast-storage

See Docs

Proposal

To have a default that can be overridden by the specific operation secret references, that way as new operations are supported, we do not need to have a large set of repeating information for each operation. The new storageClass would look like this:

kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: fast-storage-all
provisioner: csi-driver.team.example.com
parameters:
  type: pd-ssd
  csi.storage.k8s.io/secret-name: ${pvc.name}
  csi.storage.k8s.io/secret-namespace: ${pvc.namespace}-fast-storage
  csi.storage.k8s.io/node-publish-secret-name: ${pvc.name}-${pvc.annotations['team.example.com/key']}
  csi.storage.k8s.io/node-publish-secret-namespace: ${pvc.namespace}-fast-storage

Where

  csi.storage.k8s.io/secret-name: ${pvc.name}
  csi.storage.k8s.io/secret-namespace: ${pvc.namespace}-fast-storage

Are the new default secrets if none are specified.

@zhucan
Copy link
Member

zhucan commented Dec 5, 2019

@lpabon +1 I think all of the operation can use the secret.

@msau42
Copy link
Collaborator

msau42 commented Dec 9, 2019

#245

@taaraora
Copy link
Contributor

I've started working on this feature.

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

Successfully merging a pull request may close this issue.

4 participants