-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(node affinity): add support to specify node affinity rules of NF…
…S Server (#59) * feat(node affinity): add support to specify node affinity rules of NFS Server This commit adds support to specify node affinity rules via NFS-Provisioner ENV to schedule scheduling NFS Server on set of nodes. **How to use?**: - Add 'OPENEBS_IO_NFS_SERVER_NODE_AFFINITY' ENV in NFS-Provisioner deployment in following manner: ```sh - name: OPENEBS_IO_NFS_SERVER_NODE_AFFINITY value: "kubernetes.io/hostname:[172.17.0.1],kubernetes.io/os:[linux]" ``` - To schedule NFS Server instance on storage & nfs nodes ```sh - name: OPENEBS_IO_NFS_SERVER_NODE_AFFINITY value: "kubernetes.io/storage,kubernetes.io/nfs-node" ``` Ex: Propagation to NFS Server deployment ```yaml ... ... ... nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/storage-node operator: Exists - key: kubernetes.io/arch operator: Exists ``` **How it is propagated to NFS Server instance**: - During boot-up time of provisioner instance, provisioner will read OPENEBS_IO_NFS_SERVER_NODE_AFFINITY ENV then parse affinity rules and store them under the affinity rules in form of Go structure[in-memory]. - When volume is provisioned NFS-Provisioner will propagate this affinity rules to NFS Server instance. Example propagation: ```yaml ... ... ... affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - 172.17.0.1 - key: kubernetes.io/os operator: In values: - linux ``` * add integration test case to verify node affinity rules * helm chart changes and fixes test cases Signed-off-by: mittachaitu <[email protected]>
- Loading branch information
sai chaithanya
authored
Jul 9, 2021
1 parent
af64d34
commit cbb6dc2
Showing
16 changed files
with
874 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
cbb6dc2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It shall rather be property of StorageClass (wrapped into annotation?), not the provisioner as whole.
cbb6dc2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @mgrechukh ,
Thanks for looking into nfs-provisioner.
Can you describe your use case?