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

[cinder-csi-plugin] Add metadata in creation of volume #2436

Open
Kortekaasy opened this issue Oct 16, 2023 · 7 comments
Open

[cinder-csi-plugin] Add metadata in creation of volume #2436

Kortekaasy opened this issue Oct 16, 2023 · 7 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@Kortekaasy
Copy link

Kortekaasy commented Oct 16, 2023

Is this a BUG REPORT or FEATURE REQUEST?:

Uncomment only one, leave it on its own line:

/kind bug
/kind feature

What happened:
My cloud provider uses the metadata field in the volume creation API call to enable e.g. encrypted volumes. Looking at the documentation & source code, it doesn't look like it's possible at this moment to such metadata to a PVC. If this is really not possible at the moment, could anyone give me some pointers on where to start to add such functionality?

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Oct 16, 2023
@kayrus
Copy link
Contributor

kayrus commented Oct 16, 2023

See also #2327.

@jichenjc
Copy link
Contributor

@kayrus I assume you are talking about #2327 (comment) ? want to split the design of LB and CSI into different issue and can cross link

https://github.com/kubernetes/cloud-provider-openstack/blob/master/pkg/csi/cinder/controllerserver.go#L107
is something we can refer to

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 31, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Mar 1, 2024
@Kortekaasy
Copy link
Author

I see that this is somewhat related to #2327 (comment), but I also see development has stagnated there. If I were to implement adding metadata to volume creation, could anyone give me some pointers?

@Kortekaasy
Copy link
Author

/remove-lifecycle rotten

@k8s-ci-robot k8s-ci-robot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Mar 13, 2024
@dulek
Copy link
Contributor

dulek commented Mar 15, 2024

I see that this is somewhat related to #2327 (comment), but I also see development has stagnated there. If I were to implement adding metadata to volume creation, could anyone give me some pointers?

At a glance I'd say it's almost implemented at [1]. What you would need to add is to read some more annotations at [2] (and maybe [3], but ephemeral volumes might not need that?) and pass them to properties variable. On the implementation PR we'll probably spend some time figuring out how to properly name the annotation itself.

[1]

if tags != nil {
opts.Metadata = tags
}

[2]
// Volume Create
properties := map[string]string{cinderCSIClusterIDKey: cs.Driver.cluster}
//Tag volume with metadata if present: https://github.com/kubernetes-csi/external-provisioner/pull/399
for _, mKey := range []string{"csi.storage.k8s.io/pvc/name", "csi.storage.k8s.io/pvc/namespace", "csi.storage.k8s.io/pv/name"} {
if v, ok := req.Parameters[mKey]; ok {
properties[mKey] = v
}
}

[3]
properties := map[string]string{"cinder.csi.openstack.org/cluster": ns.Driver.cluster}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

6 participants