Skip to content

Commit

Permalink
Add Github workflow for releasing charts (#1067)
Browse files Browse the repository at this point in the history
Also includes:
- minor improvement to docs.
- remove duplicate imagePullPolicy from Cinder CSI chart
  • Loading branch information
brtkwr authored Sep 3, 2020
1 parent 66b9eed commit 601106f
Show file tree
Hide file tree
Showing 8 changed files with 119 additions and 11 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Lint and Test Charts

on: pull_request

jobs:
changes:
outputs:
charts: ${{ steps.filter.outputs.charts }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- id: filter
uses: dorny/[email protected]
with:
filters: |
charts:
- 'charts/**/Chart.yaml'
- 'charts/**/*'
token: ${{ secrets.GITHUB_TOKEN }}

helm-lint-test:
if: ${{ needs.changes.outputs.charts == 'true' }}
name: Helm chart
needs:
- changes
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Fetch history
run: git fetch --prune --unshallow

- id: lint
name: Run chart-testing (lint)
uses: helm/[email protected]
with:
command: lint

# Only build a kind cluster if there are chart changes to test.
- if: steps.lint.outputs.changed == 'true'
name: Create kind cluster
uses: helm/[email protected]

- name: Run chart-testing (install)
uses: helm/[email protected]
with:
command: install
26 changes: 26 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Release Charts

on:
push:
branches:
- master

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Fetch history
run: git fetch --prune --unshallow

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Run chart-releaser
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
9 changes: 7 additions & 2 deletions charts/cinder-csi-plugin/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
apiVersion: v1
appVersion: "v1.18.0"
appVersion: latest
description: Cinder CSI Plugin for OpenStack
name: openstack-cinder-csi
version: 1.1.1
version: 1.1.2
home: https://github.com/kubernetes/cloud-provider-openstack
icon: https://github.com/kubernetes/kubernetes/blob/master/logo/logo.png
maintainers:
- name: brtknr
email: [email protected]
15 changes: 14 additions & 1 deletion charts/cinder-csi-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,17 @@ Deploys a Cinder csi provisioner to your cluster, with the appropriate storageCl
## How To install
- Enable deployment of storageclasses using `storageClass.enabled`
- Tag the retain or delete class as default class using `storageClass.delete.isDefault` in your value yaml
- Set `storageClass.<reclaim-policy>.allowVolumeExpansion` to `true` or `false`
- Set `storageClass.<reclaim-policy>.allowVolumeExpansion` to `true` or `false`

First add the repo:

helm repo add cpo https://kubernetes.github.io/cloud-provider-openstack
helm repo update

If you are using Helm v3:

helm install cinder-csi cpo/openstack-cinder-csi

If you are using Helm v2:

helm install --name cinder-csi cpo/openstack-cinder-csi
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ spec:
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi.sock
imagePullPolicy: "IfNotPresent"
volumeMounts:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy/
Expand All @@ -48,7 +47,6 @@ spec:
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi.sock
imagePullPolicy: "IfNotPresent"
volumeMounts:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy/
Expand All @@ -60,7 +58,6 @@ spec:
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi.sock
imagePullPolicy: Always
volumeMounts:
- mountPath: /var/lib/csi/sockets/pluginproxy/
name: socket-dir
Expand All @@ -72,7 +69,6 @@ spec:
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi.sock
imagePullPolicy: "IfNotPresent"
volumeMounts:
- name: socket-dir
mountPath: /var/lib/csi/sockets/pluginproxy/
Expand All @@ -96,7 +92,6 @@ spec:
value: /etc/kubernetes/cloud-config
- name: CLUSTER_NAME
value: kubernetes
imagePullPolicy: "IfNotPresent"
volumeMounts:
- name: socket-dir
mountPath: /csi
Expand Down
9 changes: 7 additions & 2 deletions charts/manila-csi-plugin/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
apiVersion: v1
appVersion: "0.9"
description: A Helm chart for Kubernetes
appVersion: latest
description: Manila CSI Plugin for OpenStack
name: openstack-manila-csi
version: 0.1.2
home: http://github.com/kubernetes/cloud-provider-openstack
icon: https://github.com/kubernetes/kubernetes/blob/master/logo/logo.png
maintainers:
- name: brtknr
email: [email protected]
14 changes: 14 additions & 0 deletions charts/manila-csi-plugin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Manila CSI provisioner

First add the repo:

helm repo add cpo https://kubernetes.github.io/cloud-provider-openstack
helm repo update

If you are using Helm v3:

helm install manila-csi cpo/openstack-manila-csi

If you are using Helm v2:

helm install --name manila-csi cpo/openstack-manila-csi
2 changes: 1 addition & 1 deletion docs/using-manila-csi-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ This is the preferred way of deployment because it greatly simplifies the diffic

CSI Manila Helm chart is located in `charts/manila-csi-plugin`.

First, modify `values.yaml` to suite your environment, and then simply install the Helm chart with `$ helm charts/manila-csi-plugin`.
First, modify `values.yaml` to suite your environment, and then simply install the Helm chart with `$ helm install ./charts/manila-csi-plugin`.

Note that the release name generated by `helm install` may not be suitable due to their length. The chart generates object names with the release name included in them, which may cause the names to exceed 63 characters and result in chart installation failure. You may use `--name` flag to set the release name manually. See [helm installation docs](https://helm.sh/docs/helm/#helm-install) for more info. Alternatively, you may also use `nameOverride` or `fullnameOverride` variables in `values.yaml` to override the respective names.

Expand Down

0 comments on commit 601106f

Please sign in to comment.