Skip to content

Commit

Permalink
Merge pull request #1758 from neogopher/bugfix-helmtemplate-storagecl…
Browse files Browse the repository at this point in the history
…assname
  • Loading branch information
ThomasK33 authored May 10, 2024
2 parents 1926e1d + 68accba commit 964f962
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chart/templates/etcd-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ spec:
name: data
spec:
accessModes: {{ $externalEtcd.persistence.volumeClaim.accessModes }}
{{- if $externalEtcd.persistence.volumeClaim.className }}
storageClassName: {{ $externalEtcd.persistence.volumeClaim.className }}
{{- if $externalEtcd.persistence.volumeClaim.storageClass }}
storageClassName: {{ $externalEtcd.persistence.volumeClaim.storageClass }}
{{- end }}
resources:
requests:
Expand Down
18 changes: 18 additions & 0 deletions chart/tests/etcd-statefulset_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,24 @@ tests:
path: spec.template.spec.containers[0].image
value: fabi.com/etcd:123

- it: check specified storage class is used
set:
controlPlane:
backingStore:
etcd:
deploy:
enabled: true
statefulSet:
persistence:
volumeClaim:
storageClass: test-sc
asserts:
- hasDocuments:
count: 1
- equal:
path: spec.volumeClaimTemplates[0].spec.storageClassName
value: test-sc

- it: enabled for k3s & non persistent
set:
controlPlane:
Expand Down

0 comments on commit 964f962

Please sign in to comment.