Allow configuration of nodelabels in local_volume_provisioner (#6620)
parent
b6b26c710f
commit
a870dd368e
|
@ -33,6 +33,10 @@ local_path_provisioner_enabled: false
|
||||||
# Local volume provisioner deployment
|
# Local volume provisioner deployment
|
||||||
local_volume_provisioner_enabled: false
|
local_volume_provisioner_enabled: false
|
||||||
# local_volume_provisioner_namespace: kube-system
|
# local_volume_provisioner_namespace: kube-system
|
||||||
|
# local_volume_provisioner_nodelabels:
|
||||||
|
# - kubernetes.io/hostname
|
||||||
|
# - topology.kubernetes.io/region
|
||||||
|
# - topology.kubernetes.io/zone
|
||||||
# local_volume_provisioner_storage_classes:
|
# local_volume_provisioner_storage_classes:
|
||||||
# local-storage:
|
# local-storage:
|
||||||
# host_dir: /mnt/disks
|
# host_dir: /mnt/disks
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
---
|
---
|
||||||
local_volume_provisioner_namespace: "kube-system"
|
local_volume_provisioner_namespace: "kube-system"
|
||||||
|
# List of node labels to be copied to the PVs created by the provisioner
|
||||||
|
local_volume_provisioner_nodelabels: []
|
||||||
|
# - kubernetes.io/hostname
|
||||||
|
# - topology.kubernetes.io/region
|
||||||
|
# - topology.kubernetes.io/zone
|
||||||
# Levarages Ansibles string to Python datatype casting. Otherwise the dict_key isn't substituted
|
# Levarages Ansibles string to Python datatype casting. Otherwise the dict_key isn't substituted
|
||||||
# see https://github.com/ansible/ansible/issues/17324
|
# see https://github.com/ansible/ansible/issues/17324
|
||||||
local_volume_provisioner_storage_classes: |
|
local_volume_provisioner_storage_classes: |
|
||||||
|
|
|
@ -16,6 +16,12 @@ metadata:
|
||||||
name: local-volume-provisioner
|
name: local-volume-provisioner
|
||||||
namespace: {{ local_volume_provisioner_namespace }}
|
namespace: {{ local_volume_provisioner_namespace }}
|
||||||
data:
|
data:
|
||||||
|
{% if local_volume_provisioner_nodelabels | length > 0 %}
|
||||||
|
nodeLabelsForPV: |
|
||||||
|
{% for nodelabel in local_volume_provisioner_nodelabels %}
|
||||||
|
- {{ nodelabel }}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
storageClassMap: |
|
storageClassMap: |
|
||||||
{% for class_name, storage_class in local_volume_provisioner_storage_classes.items() %}
|
{% for class_name, storage_class in local_volume_provisioner_storage_classes.items() %}
|
||||||
{{ class_name }}:
|
{{ class_name }}:
|
||||||
|
|
Loading…
Reference in New Issue