Skip to content

Commit 24293df

Browse files
authored
Merge pull request #220 from maybe-sybr/improv/chart-labels-for-pv
improv: Accept `labelsForPV` elements in the chart
2 parents 42935c0 + 382ca6e commit 24293df

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

helm/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ provisioner chart and their default values.
186186
| common.minResyncPeriod | Resync period in reflectors will be random between `minResyncPeriod` and `2*minResyncPeriod`. | str | `5m0s` |
187187
| common.setPVOwnerRef | If set to true, PVs are set to be dependents of the owner Node. | bool | `false` |
188188
| common.mountDevVolume | If set to false, the node's `/dev` path will not be mounted into containers. | bool | `true` |
189+
| common.labelsForPV | Map of label key-value pairs to apply to the PVs created by the provisioner. | map | `-` |
189190
| classes.[n].name | StorageClass name. | str | `-` |
190191
| classes.[n].hostDir | Path on the host where local volumes of this storage class are mounted under. | str | `-` |
191192
| classes.[n].mountDir | Optionally specify mount path of local volumes. By default, we use same path as hostDir in container. | str | `-` |

helm/provisioner/templates/configmap.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ data:
1515
- {{$label}}
1616
{{- end }}
1717
{{- end }}
18+
{{- if .Values.common.labelsForPV }}
19+
labelsForPV: |
20+
{{- range $label, $value := .Values.common.labelsForPV }}
21+
{{$label}} : {{$value}}
22+
{{- end }}
23+
{{- end }}
1824
{{- if .Values.common.useAlphaAPI }}
1925
useAlphaAPI: "true"
2026
{{- end }}

helm/provisioner/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ common:
4747
# resolved by the containers
4848
#
4949
mountDevVolume: true
50+
#
51+
# Map of label key-value pairs to apply to the PVs created by the
52+
# provisioner. Uncomment to add labels to the list.
53+
#
54+
#labelsForPV:
55+
# pv-labels: can-be-selected
5056
#
5157
# Configure storage classes.
5258
#

0 commit comments

Comments
 (0)