Re: [kubernetes/kubernetes] Custom labels can't be added to PVC using StatefulSet.Spec.VolumeClaimTemplates (#58987)

6 views
Skip to first unread message

k8s-ci-robot

unread,
Jan 29, 2018, 4:57:30 PM1/29/18
to kubernetes/kubernetes, k8s-mirror-storage-misc, Team mention

@ateleshev: Reiterating the mentions to trigger a notification:
@kubernetes/sig-storage-misc

In response to this:

@kubernetes/sig-storage-misc

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.


You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Artem Teleshev

unread,
Jan 29, 2018, 5:10:20 PM1/29/18
to kubernetes/kubernetes, k8s-mirror-storage-misc, Team mention

/kind bug

Michelle Au

unread,
Jan 29, 2018, 5:12:33 PM1/29/18
to kubernetes/kubernetes, k8s-mirror-storage-misc, Team mention

krmayankk

unread,
Feb 13, 2018, 3:41:18 AM2/13/18
to kubernetes/kubernetes, k8s-mirror-storage-misc, Team mention

/assign @krmayankk i can work on this

k8s-ci-robot

unread,
Feb 13, 2018, 3:41:25 AM2/13/18
to kubernetes/kubernetes, k8s-mirror-storage-misc, Team mention

@krmayankk: GitHub didn't allow me to assign the following users: i, can, work, on, this.

Note that only kubernetes members and repo collaborators can be assigned.

In response to this:

/assign @krmayankk i can work on this

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.

Carsten

unread,
Mar 1, 2018, 7:20:14 AM3/1/18
to kubernetes/kubernetes, k8s-mirror-storage-misc, Team mention

I stumbled upon this issue while making my first steps into k8s, volume claims and a custom controller. I tried to create a StatefulSet and wanted to use volumeClaimTemplates to create persistent volumes for my instances.

My controller would watch all volume claims for a specific label and then create cronjobs with custom commands on the volumes.

Here's my YAML for the StatefulSet

apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: myname
  namespace: mynamespace
spec:
  serviceName: myname
  replicas: 2
  selector:
    matchLabels:
      name: myname
      security-group: backend
      # we have to specify the cleanup label here, but then both volumeClaimTemplates get the keyword
      custom-label: "True"
  volumeClaimTemplates:
    - metadata:
        name: claim1
        #labels:
        #  custom-label: "True"
      spec:
        accessModes: ["ReadWriteMany"]
        resources:
          requests:
            storage: 1Gi
    - metadata:
        name: claim2
      spec:
        accessModes: ["ReadWriteMany"]
        resources:
          requests:
            storage: 1Gi
  template:
...

If I understand this issue, I can not specify my custom-label for the first claim, but not for the second because currently the labels from the StatefulSet.Spec.Selector.MatchLabels are used exclusively. Is that correct?

fejta-bot

unread,
Jun 20, 2018, 11:12:26 AM6/20/18
to kubernetes/kubernetes, k8s-mirror-storage-misc, Team mention

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

fejta-bot

unread,
Jul 20, 2018, 11:57:45 AM7/20/18
to kubernetes/kubernetes, k8s-mirror-storage-misc, Team mention

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
/remove-lifecycle stale

fejta-bot

unread,
Aug 19, 2018, 12:44:28 PM8/19/18
to kubernetes/kubernetes, k8s-mirror-storage-misc, Team mention

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

unread,
Aug 19, 2018, 12:44:42 PM8/19/18
to kubernetes/kubernetes, k8s-mirror-storage-misc, Team mention

Closed #58987.

Artem Teleshev

unread,
Aug 20, 2018, 4:01:31 AM8/20/18
to kubernetes/kubernetes, k8s-mirror-storage-misc, Team mention

/reopen

k8s-ci-robot

unread,
Aug 20, 2018, 4:01:33 AM8/20/18
to kubernetes/kubernetes, k8s-mirror-storage-misc, Team mention

Reopened #58987.

fejta-bot

unread,
Sep 19, 2018, 4:47:43 AM9/19/18
to kubernetes/kubernetes, k8s-mirror-storage-misc, Team mention

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

unread,
Sep 19, 2018, 4:47:48 AM9/19/18
to kubernetes/kubernetes, k8s-mirror-storage-misc, Team mention

@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.

k8s-ci-robot

unread,
Sep 19, 2018, 4:47:52 AM9/19/18
to kubernetes/kubernetes, k8s-mirror-storage-misc, Team mention

Closed #58987.

mohnishkodnani

unread,
Dec 14, 2018, 3:26:08 PM12/14/18
to kubernetes/kubernetes, k8s-mirror-storage-misc, Team mention

/reopen

Kubernetes Prow Robot

unread,
Dec 14, 2018, 3:26:19 PM12/14/18
to kubernetes/kubernetes, k8s-mirror-storage-misc, Team mention

@mohnishkodnani: You can't reopen an issue/PR unless you authored it or you are a collaborator.

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.

krmayankk

unread,
Dec 14, 2018, 5:50:31 PM12/14/18
to kubernetes/kubernetes, k8s-mirror-storage-misc, Team mention

/remove-lifecycle rotten

krmayankk

unread,
Dec 14, 2018, 5:51:45 PM12/14/18
to kubernetes/kubernetes, k8s-mirror-storage-misc, Team mention

/reopen

Kubernetes Prow Robot

unread,
Dec 14, 2018, 5:51:57 PM12/14/18
to kubernetes/kubernetes, k8s-mirror-storage-misc, Team mention

@krmayankk: 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.

Kubernetes Prow Robot

unread,
Dec 14, 2018, 5:52:00 PM12/14/18
to kubernetes/kubernetes, k8s-mirror-storage-misc, Team mention

Reopened #58987.

krmayankk

unread,
Dec 14, 2018, 5:52:03 PM12/14/18
to kubernetes/kubernetes, k8s-mirror-storage-misc, Team mention

/sig apps

Xavier Lange

unread,
Feb 6, 2019, 10:23:02 AM2/6/19
to kubernetes/kubernetes, k8s-mirror-storage-misc, Team mention

This would be fantastic. We would feel much better deleting PVCs based on labels!

mohnishkodnani

unread,
Mar 1, 2019, 2:40:39 AM3/1/19
to kubernetes/kubernetes, k8s-mirror-storage-misc, Team mention

Please let me know if any help is needed on this.
Due to the inability to put labels, currently, in my use case i have to fetch all PVC's in the namespace and then manually filter out based on "annotations" because custom annotations are allowed.
But if labels are allowed, then in the ListOptions we can add a selector and make the query more efficient.

Alex Leonhardt

unread,
Apr 17, 2019, 12:43:58 PM4/17/19
to kubernetes/kubernetes, k8s-mirror-storage-misc, Team mention

@krmayankk this would be great to get in, is there anything that needs doing / that's blocking this?

Artem Teleshev

unread,
Apr 19, 2019, 6:56:26 AM4/19/19
to kubernetes/kubernetes, k8s-mirror-storage-misc, Team mention

It has already fixed in master branch

Artem Teleshev

unread,
Apr 19, 2019, 6:57:40 AM4/19/19
to kubernetes/kubernetes, k8s-mirror-storage-misc, Team mention

/close

Kubernetes Prow Robot

unread,
Apr 19, 2019, 6:57:56 AM4/19/19
to kubernetes/kubernetes, k8s-mirror-storage-misc, Team mention

@ateleshev: Closing this issue.

In response to this:

/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.

Kubernetes Prow Robot

unread,
Apr 19, 2019, 6:57:57 AM4/19/19
to kubernetes/kubernetes, k8s-mirror-storage-misc, Team mention

Closed #58987.

muvaffak

unread,
Apr 19, 2019, 8:46:28 AM4/19/19
to kubernetes/kubernetes, k8s-mirror-storage-misc, Team mention

@ateleshev could you point to the related PR so that we can check which versions got it?

Artem Teleshev

unread,
Apr 19, 2019, 8:57:48 AM4/19/19
to kubernetes/kubernetes, k8s-mirror-storage-misc, Team mention

muvaffak

unread,
Apr 19, 2019, 9:55:14 AM4/19/19
to kubernetes/kubernetes, k8s-mirror-storage-misc, Team mention

@ateleshev Thanks a lot!

Reply all
Reply to author
Forward
0 new messages