Skip to content

Commit

Permalink
Merge pull request #413 from AndrewChubatiuk/added-allowed-topologies
Browse files Browse the repository at this point in the history
feat: add allowedTopologies for storage class in helm
  • Loading branch information
k8s-ci-robot authored Dec 11, 2023
2 parents 9cd16b4 + 3402dbc commit 02d16b8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions helm/provisioner/templates/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ rules:
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get"]
{{- if .Values.rbac.extraRules }}
{{ toYaml .Values.rbac.extraRules }}
{{- end}}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
Expand Down
7 changes: 7 additions & 0 deletions helm/provisioner/templates/storageclass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,12 @@ reclaimPolicy: {{ $val.storageClass.reclaimPolicy | default "Delete" }}
{{- else }}
reclaimPolicy: Delete
{{- end }}
{{- if $val.allowedTopologies }}
{{- if kindIs "string" $val.allowedTopologies }}
allowedTopologies: {{ tpl $val.allowedTopologies $ }}
{{- else }}
allowedTopologies: {{ $val.allowedTopologies | toYaml | nindent 0 }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
4 changes: 4 additions & 0 deletions helm/provisioner/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ fullnameOverride: ""
rbac:
# rbac.create: `true` if rbac resources should be created
create: true
# list of additional rbac rules that may be needed by init containers
extraRules: []

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

0 comments on commit 02d16b8

Please sign in to comment.