diff --git a/.github/workflows/helm-chart-release.yml b/.github/workflows/helm-chart-release.yml new file mode 100644 index 00000000..95face1a --- /dev/null +++ b/.github/workflows/helm-chart-release.yml @@ -0,0 +1,30 @@ +name: Release Helm Charts + +on: + push: + branches: + - master + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Configure Git + run: | + git config user.name "$GITHUB_ACTOR" + git config user.email "$GITHUB_ACTOR@users.noreply.github.com" + + - name: Install Helm + uses: azure/setup-helm@v1 + with: + version: v3.4.0 + + - name: Run chart-releaser + uses: helm/chart-releaser-action@v1.1.0 + env: + CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff --git a/README.md b/README.md index db570747..b120b521 100644 --- a/README.md +++ b/README.md @@ -21,14 +21,13 @@ To note again, you must _already_ have an NFS Server. ### With Helm -Follow the instructions from the helm chart [README](deploy/helm/README.md). +Follow the instructions from the helm chart [README](charts/nfs-subdir-external-provisioner/README.md). The tl;dr is ```console -$ git clone https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner.git -$ cd nfs-subdir-external-provisioner/deploy/helm/ -$ helm install nfs-subdir-external-provisioner . \ +$ helm repo add nfs-subdir-external-provisioner https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner/ +$ helm install nfs-subdir-external-provisioner nfs-subdir-external-provisioner/nfs-subdir-external-provisioner \ --set nfs.server=x.x.x.x \ --set nfs.path=/exported/path ``` diff --git a/deploy/helm/Chart.yaml b/charts/nfs-subdir-external-provisioner/Chart.yaml similarity index 100% rename from deploy/helm/Chart.yaml rename to charts/nfs-subdir-external-provisioner/Chart.yaml diff --git a/deploy/helm/README.md b/charts/nfs-subdir-external-provisioner/README.md similarity index 94% rename from deploy/helm/README.md rename to charts/nfs-subdir-external-provisioner/README.md index 63709289..29aeb562 100644 --- a/deploy/helm/README.md +++ b/charts/nfs-subdir-external-provisioner/README.md @@ -5,9 +5,8 @@ The [NFS subdir external provisioner](https://github.com/kubernetes-sigs/nfs-sub ## TL;DR; ```console -$ git clone https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner.git -$ cd nfs-subdir-external-provisioner/deploy/helm/ -$ helm install nfs-subdir-external-provisioner . \ +$ helm repo add nfs-subdir-external-provisioner https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner/ +$ helm install nfs-subdir-external-provisioner nfs-subdir-external-provisioner/nfs-subdir-external-provisioner \ --set nfs.server=x.x.x.x \ --set nfs.path=/exported/path ``` @@ -28,9 +27,9 @@ This charts installs custom [storage class](https://kubernetes.io/docs/concepts/ To install the chart with the release name `my-release`: ```console -$ helm install my-release . \ +$ helm install my-release nfs-subdir-external-provisioner/nfs-subdir-external-provisioner \ --set nfs.server=x.x.x.x \ - --set nfs.path=/exported/path``` + --set nfs.path=/exported/path ``` The command deploys the given storage class in the default configuration. It can be used afterswards to provision persistent volumes. The [configuration](#configuration) section lists the parameters that can be configured during installation. diff --git a/deploy/helm/ci/test-values.yaml b/charts/nfs-subdir-external-provisioner/ci/test-values.yaml similarity index 100% rename from deploy/helm/ci/test-values.yaml rename to charts/nfs-subdir-external-provisioner/ci/test-values.yaml diff --git a/deploy/helm/templates/_helpers.tpl b/charts/nfs-subdir-external-provisioner/templates/_helpers.tpl similarity index 100% rename from deploy/helm/templates/_helpers.tpl rename to charts/nfs-subdir-external-provisioner/templates/_helpers.tpl diff --git a/deploy/helm/templates/clusterrole.yaml b/charts/nfs-subdir-external-provisioner/templates/clusterrole.yaml similarity index 100% rename from deploy/helm/templates/clusterrole.yaml rename to charts/nfs-subdir-external-provisioner/templates/clusterrole.yaml diff --git a/deploy/helm/templates/clusterrolebinding.yaml b/charts/nfs-subdir-external-provisioner/templates/clusterrolebinding.yaml similarity index 100% rename from deploy/helm/templates/clusterrolebinding.yaml rename to charts/nfs-subdir-external-provisioner/templates/clusterrolebinding.yaml diff --git a/deploy/helm/templates/deployment.yaml b/charts/nfs-subdir-external-provisioner/templates/deployment.yaml similarity index 100% rename from deploy/helm/templates/deployment.yaml rename to charts/nfs-subdir-external-provisioner/templates/deployment.yaml diff --git a/deploy/helm/templates/persistentvolume.yaml b/charts/nfs-subdir-external-provisioner/templates/persistentvolume.yaml similarity index 100% rename from deploy/helm/templates/persistentvolume.yaml rename to charts/nfs-subdir-external-provisioner/templates/persistentvolume.yaml diff --git a/deploy/helm/templates/persistentvolumeclaim.yaml b/charts/nfs-subdir-external-provisioner/templates/persistentvolumeclaim.yaml similarity index 100% rename from deploy/helm/templates/persistentvolumeclaim.yaml rename to charts/nfs-subdir-external-provisioner/templates/persistentvolumeclaim.yaml diff --git a/deploy/helm/templates/podsecuritypolicy.yaml b/charts/nfs-subdir-external-provisioner/templates/podsecuritypolicy.yaml similarity index 100% rename from deploy/helm/templates/podsecuritypolicy.yaml rename to charts/nfs-subdir-external-provisioner/templates/podsecuritypolicy.yaml diff --git a/deploy/helm/templates/role.yaml b/charts/nfs-subdir-external-provisioner/templates/role.yaml similarity index 100% rename from deploy/helm/templates/role.yaml rename to charts/nfs-subdir-external-provisioner/templates/role.yaml diff --git a/deploy/helm/templates/rolebinding.yaml b/charts/nfs-subdir-external-provisioner/templates/rolebinding.yaml similarity index 100% rename from deploy/helm/templates/rolebinding.yaml rename to charts/nfs-subdir-external-provisioner/templates/rolebinding.yaml diff --git a/deploy/helm/templates/serviceaccount.yaml b/charts/nfs-subdir-external-provisioner/templates/serviceaccount.yaml similarity index 100% rename from deploy/helm/templates/serviceaccount.yaml rename to charts/nfs-subdir-external-provisioner/templates/serviceaccount.yaml diff --git a/deploy/helm/templates/storageclass.yaml b/charts/nfs-subdir-external-provisioner/templates/storageclass.yaml similarity index 100% rename from deploy/helm/templates/storageclass.yaml rename to charts/nfs-subdir-external-provisioner/templates/storageclass.yaml diff --git a/deploy/helm/values.yaml b/charts/nfs-subdir-external-provisioner/values.yaml similarity index 100% rename from deploy/helm/values.yaml rename to charts/nfs-subdir-external-provisioner/values.yaml diff --git a/go.mod b/go.mod index 82fe58e6..9d9cd603 100644 --- a/go.mod +++ b/go.mod @@ -41,4 +41,4 @@ replace ( k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.18.0 k8s.io/metrics => k8s.io/metrics v0.18.0 k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.18.0 -) +) \ No newline at end of file