Skip to content

Commit

Permalink
Merge pull request #26 from ccremer/provisioner-fix
Browse files Browse the repository at this point in the history
[kubernetes-zfs-provisioner] Fix wrong Node parameter
  • Loading branch information
ccremer authored Jul 30, 2020
2 parents 920c49f + 43dee82 commit fa0f4c6
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 17 deletions.
14 changes: 0 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,6 @@ jobs:
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Update chart versions
if: "!contains(github.event.head_commit.message, 'skip bump')"
run: make bump-docs

- name: Commit changes
if: "!contains(github.event.head_commit.message, 'skip bump')"
uses: EndBug/add-and-commit@v4
with:
author_name: "${{ github.actor }}"
author_email: "${{ github.actor }}@users.noreply.github.com"
message: "Update chart versions"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

- name: Run chart-releaser
uses: helm/chart-releaser-action@master
env:
Expand Down
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.6
version: 0.2.7

# 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.6`
Current chart version is `0.2.7`



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 @@ -13,7 +13,7 @@ parameters:
parentDataset: {{ .parentDataset }}
hostname: {{ .hostName }}
type: {{ .type | default "nfs" }}
node: {{ .nodeName | default "''" }}
node: {{ .node | default "''" }}
shareProperties: {{ .shareProperties | default "''" }}
{{- end }}
{{- end }}
18 changes: 18 additions & 0 deletions kubernetes-zfs-provisioner/test/storageclass_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,24 @@ func Test_StorageClass_GivenClassesEnabled_WhenNoTypeDefined_ThenRenderDefault(t
assert.Equal(t, "nfs", class.Parameters["type"])
}

func Test_StorageClass_GivenClassesEnabled_WhenNodeDefined_ThenRenderNodeName(t *testing.T) {
options := &helm.Options{
SetValues: map[string]string{
"storageClass.create": "true",
"storageClass.classes[0].node": "host",
"storageClass.classes[0].type": "hostpath",
},
}

output := helm.RenderTemplate(t, options, helmChartPath, releaseName, tplStorageclass)

var class v1.StorageClass
helm.UnmarshalK8SYaml(t, output, &class)

assert.Equal(t, "host", class.Parameters["node"])
assert.Equal(t, "hostpath", class.Parameters["type"])
}

func Test_StorageClass_GivenClassesEnabled_WhenAdditionalParametersUndefined_ThenRenderEmptyValues(t *testing.T) {
options := &helm.Options{
SetValues: map[string]string{
Expand Down

0 comments on commit fa0f4c6

Please sign in to comment.