Skip to content

Commit

Permalink
[kubernetes-zfs-provisioner] Render string if no parameter is given
Browse files Browse the repository at this point in the history
Otherwise Kubernetes fails at validating if the value is empty,
since it would be rendered as nil
  • Loading branch information
ccremer committed Jul 30, 2020
1 parent 6a558e1 commit d353cde
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion kubernetes-zfs-provisioner/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ description: Dynamic ZFS persistent volume provisioner for Kubernetes

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.2.4
version: 0.2.5

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
Expand Down
2 changes: 1 addition & 1 deletion kubernetes-zfs-provisioner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ kubernetes-zfs-provisioner
==========================
Dynamic ZFS persistent volume provisioner for Kubernetes

Current chart version is `0.2.4`
Current chart version is `0.2.5`



Expand Down
2 changes: 1 addition & 1 deletion kubernetes-zfs-provisioner/templates/storageclass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ parameters:
hostname: {{ .hostName }}
type: {{ .type | default "nfs" }}
node: {{ .nodeName | default "''" }}
shareProperties: {{ .shareProperties | default "" }}
shareProperties: {{ .shareProperties | default "''" }}
{{- end }}
{{- end }}
4 changes: 2 additions & 2 deletions kubernetes-zfs-provisioner/test/storageclass_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func Test_Storageclass_GivenClassesEnabled_WhenNoPolicyDefined_ThenRenderDefault
assert.Equal(t, &expectedPolicy, class.ReclaimPolicy)
}

func Test_Secret_GivenClassesEnabled_WhenNoTypeDefined_ThenRenderDefault(t *testing.T) {
func Test_StorageClass_GivenClassesEnabled_WhenNoTypeDefined_ThenRenderDefault(t *testing.T) {
options := &helm.Options{
SetValues: map[string]string{
"storageClass.create": "true",
Expand All @@ -43,7 +43,7 @@ func Test_Secret_GivenClassesEnabled_WhenNoTypeDefined_ThenRenderDefault(t *test
assert.Equal(t, "nfs", class.Parameters["type"])
}

func Test_Secret_GivenClassesEnabled_WhenAdditionalParametersUndefined_ThenRenderEmptyValues(t *testing.T) {
func Test_StorageClass_GivenClassesEnabled_WhenAdditionalParametersUndefined_ThenRenderEmptyValues(t *testing.T) {
options := &helm.Options{
SetValues: map[string]string{
"storageClass.create": "true",
Expand Down

0 comments on commit d353cde

Please sign in to comment.