Skip to content

Commit 02d16b8

Browse files
authored
Merge pull request #413 from AndrewChubatiuk/added-allowed-topologies
feat: add allowedTopologies for storage class in helm
2 parents 9cd16b4 + 3402dbc commit 02d16b8

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

helm/provisioner/templates/rbac.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ rules:
2424
- apiGroups: [""]
2525
resources: ["nodes"]
2626
verbs: ["get"]
27+
{{- if .Values.rbac.extraRules }}
28+
{{ toYaml .Values.rbac.extraRules }}
29+
{{- end}}
2730
---
2831
apiVersion: rbac.authorization.k8s.io/v1
2932
kind: ClusterRoleBinding

helm/provisioner/templates/storageclass.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,12 @@ reclaimPolicy: {{ $val.storageClass.reclaimPolicy | default "Delete" }}
2323
{{- else }}
2424
reclaimPolicy: Delete
2525
{{- end }}
26+
{{- if $val.allowedTopologies }}
27+
{{- if kindIs "string" $val.allowedTopologies }}
28+
allowedTopologies: {{ tpl $val.allowedTopologies $ }}
29+
{{- else }}
30+
allowedTopologies: {{ $val.allowedTopologies | toYaml | nindent 0 }}
31+
{{- end }}
32+
{{- end }}
2633
{{- end }}
2734
{{- end }}

helm/provisioner/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ fullnameOverride: ""
55
rbac:
66
# rbac.create: `true` if rbac resources should be created
77
create: true
8+
# list of additional rbac rules that may be needed by init containers
9+
extraRules: []
810

911
# Defines whether to generate a serviceAccount
1012
serviceAccount:
@@ -67,6 +69,8 @@ classes:
6769
fsType: ext4
6870
# File name pattern to discover. By default, discover all file names.
6971
namePattern: "*"
72+
# Restrict topology of provisioned volumes to specific labels
73+
allowedTopologies:
7074
blockCleanerCommand:
7175
# Do a quick reset of the block device during its cleanup.
7276
# - "/scripts/quick_reset.sh"

0 commit comments

Comments
 (0)