csi: ability to set priorityClassName for csi daemonset pods (#670)

This commit is contained in:
Vadim Grek 2022-01-05 00:10:56 +02:00 committed by GitHub
parent 0c0b6e34f4
commit 0043023c09
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 33 additions and 0 deletions

View file

@ -4,6 +4,7 @@ Features:
* Added configurable podDisruptionBudget for injector [GH-653](https://github.com/hashicorp/vault-helm/pull/653)
* Make terminationGracePeriodSeconds configurable for server [GH-659](https://github.com/hashicorp/vault-helm/pull/659)
* Added configurable update strategy for injector [GH-661](https://github.com/hashicorp/vault-helm/pull/661)
* csi: ability to set priorityClassName for CSI daemonset pods [GH-670](https://github.com/hashicorp/vault-helm/pull/670)
## 0.18.0 (November 17th, 2021)

View file

@ -27,6 +27,9 @@ spec:
app.kubernetes.io/instance: {{ .Release.Name }}
{{ template "csi.pod.annotations" . }}
spec:
{{- if .Values.csi.priorityClassName }}
priorityClassName: {{ .Values.csi.priorityClassName }}
{{- end }}
serviceAccountName: {{ template "vault.fullname" . }}-csi-provider
{{- template "csi.pod.tolerations" . }}
containers:

View file

@ -30,6 +30,29 @@ load _helpers
[ "${actual}" = "false" ]
}
# priorityClassName
@test "csi/daemonset: priorityClassName not set by default" {
cd `chart_dir`
local actual=$(helm template \
--show-only templates/csi-daemonset.yaml \
--set "csi.enabled=true" \
. | tee /dev/stderr |
yq '.spec.template.spec | .priorityClassName? == null' | tee /dev/stderr)
[ "${actual}" = "true" ]
}
@test "csi/daemonset: priorityClassName can be set" {
cd `chart_dir`
local actual=$(helm template \
--show-only templates/csi-daemonset.yaml \
--set 'csi.priorityClassName=armaggeddon' \
--set "csi.enabled=true" \
. | tee /dev/stderr |
yq '.spec.template.spec | .priorityClassName == "armaggeddon"' | tee /dev/stderr)
[ "${actual}" = "true" ]
}
# serviceAccountName reference name
@test "csi/daemonset: serviceAccountName reference name" {
cd `chart_dir`

View file

@ -33,6 +33,9 @@
}
}
},
"priorityClassName": {
"type": "string"
},
"debug": {
"type": "boolean"
},

View file

@ -812,6 +812,9 @@ csi:
# in a PodSpec.
tolerations: []
# Priority class for csi pods
priorityClassName: ""
serviceAccount:
# Extra annotations for the serviceAccount definition. This can either be
# YAML or a YAML-formatted multi-line templated string map of the