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

Migrated AWS EBS volumes don't have tags #529

Closed
jsafrane opened this issue Jul 8, 2020 · 4 comments · Fixed by #530
Closed

Migrated AWS EBS volumes don't have tags #529

jsafrane opened this issue Jul 8, 2020 · 4 comments · Fixed by #530
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@jsafrane
Copy link
Contributor

jsafrane commented Jul 8, 2020

/kind bug

What happened?
In-tree awes-ebs provisioner creates volumes with these tags:

kubernetes.io/cluster/jsafrane-10235-vgdv6: owned     
Name:                                       jsafrane-10235-vgdv6-dynamic-pvc-447cc711-bb65-4b4d-836d-a822e4e77e43     
kubernetes.io/created-for/pv/name:          pvc-447cc711-bb65-4b4d-836d-a822e4e77e43     
kubernetes.io/created-for/pvc/name:         myclaim     
kubernetes.io/created-for/pvc/namespace:    default     

When migration to CSI is enabled, provisioned volumes don't have such tags, only

CSIVolumeName: pvc-4e4cb311-3907-4192-bc58-cde8ea112392

What you expected to happen?
When requested on cmdline, the driver should add also the "legacy" tags to EBS volumes.

Anything else we need to know?:

  • Driver version: today's master
@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Jul 8, 2020
@jsafrane
Copy link
Contributor Author

jsafrane commented Jul 8, 2020

  • The cluster ID is hard to get, I can imagine a new driver option --kubernetes-cluster-id=XXX or let --extra-volume-tags accept kubernes.io prefix as suggested in Clarify why kubernetes tag prefix is disallowed #450, so Kubernetes vendor can add it.

  • PV / PVC namespace/name: CreateVolume request, if enabled via external-provisioner --extra-create-metadata=true, gets PVC name+namespace + PV name.

    • The driver can either always tag volumes with pv/pvc names when it gets them from the provisioner (i.e. someone has deployed the external-provisioner with --extra-create-metadata=true. This would be my preferred solution.
    • Or there is a new cmdline options in the driver, say --legacy-tags=true, that then explicitly enables volume tags.

@wongma7
Copy link
Contributor

wongma7 commented Jul 8, 2020

let --extra-volume-tags accept kubernes.io prefix as suggested in #450, so Kubernetes vendor can add it.

I prefer this.

always tag volumes with pv/pvc names when it gets them from the provisioner (i.e. someone has deployed the external-provisioner with --extra-create-metadata=true.

Also prefer this, I can't think of a reason someone would need a driver cmdline option to disable these tags.

@jsafrane
Copy link
Contributor Author

jsafrane commented Jul 9, 2020

/assign

@jsafrane
Copy link
Contributor Author

jsafrane commented Jul 9, 2020

Thinking more about it... tag Name: jsafrane-10235-vgdv6-dynamic-pvc-447cc711-bb65-4b4d-836d-a822e4e77e43 includes cluster-id. So the CSI driver still needs to get it from somewhere. I'll add it as extra parameter.

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

Successfully merging a pull request may close this issue.

3 participants