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

Add support for storage_selector through configuration. #336

Open
GrahamDumpleton opened this issue Jul 17, 2019 · 1 comment
Open

Add support for storage_selector through configuration. #336

GrahamDumpleton opened this issue Jul 17, 2019 · 1 comment

Comments

@GrahamDumpleton
Copy link
Contributor

There should be a way of configuring a selector for a persistent volume claim.

$ kubectl explain pvc.spec.selector
KIND:     PersistentVolumeClaim
VERSION:  v1

RESOURCE: selector <Object>

DESCRIPTION:
     A label query over volumes to consider for binding.

     A label selector is a label query over a set of resources. The result of
     matchLabels and matchExpressions are ANDed. An empty label selector matches
     all objects. A null label selector matches no objects.

FIELDS:
   matchExpressions	<[]Object>
     matchExpressions is a list of label selector requirements. The requirements
     are ANDed.

   matchLabels	<map[string]string>
     matchLabels is a map of {key,value} pairs. A single {key,value} in the
     matchLabels map is equivalent to an element of matchExpressions, whose key
     field is "key", the operator is "In", and the values array contains only
     "value". The requirements are ANDed.

This will allow for a pool of persistent volumes setup in a certain way, including with existing content loaded in the volume, to be pre-created and for the persistent volume claim to match them via the storage label selector.

@consideRatio consideRatio added label selector Issues about replacing hardcoded component label as a selector for Pod / PVCs enhancement and removed label selector Issues about replacing hardcoded component label as a selector for Pod / PVCs labels Oct 25, 2020
@consideRatio
Copy link
Member

A note about the implementation, it should be made as closely mapped to the k8s naming as possible. So, if it is a specification of matchLabels, it should reflect that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants