sig-storage-local-static-provisioner
sig-storage-local-static-provisioner copied to clipboard
[Feature] Allow additional selector terms to be defined in storage config
What type of PR is this? /kind feature
What this PR does / why we need it:
It's not possible to change affinity for PVs after they've been created. This change allows for additional affinity terms to be added to the PVs provisioned by the provisioner.
This enables support for cases where disks are shared among nodes (e.g. SAS-based DAS):
- Deploy the provisioner with a node selector that constrains it to a single node with the disks attached (this will be the 'owner' of the disks)
- Add the other nodes that are connected to the same disks using the new selector terms option
Example deployment values file:
nodeSelector:
kubernetes.io/hostname: node1
classes:
- name: shared-disks
volumeMode: Block
hostDir: /my/path
selector:
- matchExpressions:
- key: "kubernetes.io/hostname"
operator: "In"
values:
- node2
Special notes for your reviewer:
- There was a restriction checking specifically for 1 node name occurrence, which conflicts with PVs added with additional terms. I've changed that to allow an arbitrary number (commit 1).
- The current feature implementation (commit 2) is limited to **OR**ing the custom terms with the provisioner node term.
Release note:
Added: support additional affinity terms to be added to the provisioned PVs.
The committers listed above are authorized under a signed CLA.
- :white_check_mark: login: Omar007 / name: Omar Pakker (2729447a13792ce2264774ad9450ed13165a6e6b, 9fe0e17aa31bd5a1fd1d5a1abb99aaf8873e02cf)
Welcome @Omar007!
It looks like this is your first PR to kubernetes-sigs/sig-storage-local-static-provisioner 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.
You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.
You can also check if kubernetes-sigs/sig-storage-local-static-provisioner has its own contribution guidelines.
You may want to refer to our testing guide if you run into trouble with your tests not passing.
If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!
Thank you, and welcome to Kubernetes. :smiley:
Hi @Omar007. Thanks for your PR.
I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
I understand the commands that are listed here.
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-sigs/prow repository.
/easycla
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.
This bot triages PRs according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the PR is closed
You can:
- Mark this PR as fresh with
/remove-lifecycle stale - Close this PR with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/remove-lifecycle stale
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: andyzhangx, Omar007
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [andyzhangx]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment