Skip to content

Option to tag PD with cluster name #469

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

Closed
msau42 opened this issue Feb 7, 2020 · 16 comments
Closed

Option to tag PD with cluster name #469

msau42 opened this issue Feb 7, 2020 · 16 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Milestone

Comments

@msau42
Copy link
Contributor

msau42 commented Feb 7, 2020

Since the driver is usually deployed per cluster, the cluster name could be passed in as a driver arg. This can help associate PDs to clusters. Instead of being specific to cluster name, it could also just take in a set of global tags. This is what ebs driver does.

/kind feature

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Feb 7, 2020
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/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 May 7, 2020
@mattcary
Copy link
Contributor

mattcary commented May 7, 2020

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 7, 2020
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/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 Aug 5, 2020
@saad-ali saad-ali added this to the Post-GA milestone Aug 7, 2020
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/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 Sep 6, 2020
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@k8s-ci-robot
Copy link
Contributor

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@msau42
Copy link
Contributor Author

msau42 commented Oct 6, 2020

/reopen

@k8s-ci-robot
Copy link
Contributor

@msau42: Reopened this issue.

In response to this:

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot reopened this Oct 6, 2020
@mattcary
Copy link
Contributor

mattcary commented Oct 6, 2020

Is this effectively a duplicate of #340?

@msau42
Copy link
Contributor Author

msau42 commented Oct 6, 2020

#340 is at the StorageClass level. This is at the cluster-level and could be automatically inferred by the provider that's deploying the driver.

@mattcary
Copy link
Contributor

mattcary commented Oct 6, 2020

Got it, so it eg could be done at the same time that we set the PV info, https://github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver/blob/master/pkg/common/parameters.go#L86

@msau42
Copy link
Contributor Author

msau42 commented Oct 7, 2020

Yeah it can be set when you create the PV, but the actual config could be set when you start the driver (as a driver arg)

@loganmzz
Copy link

I don't see interest in pushing explicitly cluster name into GCP-managed resources since cluster labels are already applied as describe in #340 (comment).

Just add a gke-cluster-id (or similar) label(s) to your cluster. However, being able to distinct resources coming from a single cluster is still required. For the moment, I rely on description field which contains JSON structure. But as it's stored as raw string, filtering against is fragile.

Output example:

$ gcloud compute disks describe --zone gke-my-k8s-cluster-1bcec-pvc-a80c2aa5-f0c9-4a64-b3c4-a3930f037528
...
description: '{"kubernetes.io/created-for/pv/name":"pvc-a80c2aa5-f0c9-4a64-b3c4-a3930f037528","kubernetes.io/created-for/pvc/name":"my-k8s-pvc","kubernetes.io/created-for/pvc/namespace":"my-k8s-namespace"}'
...

@msau42
Copy link
Contributor Author

msau42 commented Oct 19, 2020

There is this change here which is using Disk labels, and we'll have to do a followup to set the pvc/pv tags as a Label as well: #566

As for cluster id as a label, it's useful for non-gke users.

@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@k8s-ci-robot
Copy link
Contributor

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

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. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

6 participants