Skip to content

Commit 601106f

Browse files
authored
Add Github workflow for releasing charts (kubernetes#1067)
Also includes: - minor improvement to docs. - remove duplicate imagePullPolicy from Cinder CSI chart
1 parent 66b9eed commit 601106f

File tree

8 files changed

+119
-11
lines changed

8 files changed

+119
-11
lines changed

.github/workflows/pr.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Lint and Test Charts
2+
3+
on: pull_request
4+
5+
jobs:
6+
changes:
7+
outputs:
8+
charts: ${{ steps.filter.outputs.charts }}
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v2
13+
14+
- id: filter
15+
uses: dorny/[email protected]
16+
with:
17+
filters: |
18+
charts:
19+
- 'charts/**/Chart.yaml'
20+
- 'charts/**/*'
21+
token: ${{ secrets.GITHUB_TOKEN }}
22+
23+
helm-lint-test:
24+
if: ${{ needs.changes.outputs.charts == 'true' }}
25+
name: Helm chart
26+
needs:
27+
- changes
28+
runs-on: ubuntu-latest
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v2
32+
33+
- name: Fetch history
34+
run: git fetch --prune --unshallow
35+
36+
- id: lint
37+
name: Run chart-testing (lint)
38+
uses: helm/[email protected]
39+
with:
40+
command: lint
41+
42+
# Only build a kind cluster if there are chart changes to test.
43+
- if: steps.lint.outputs.changed == 'true'
44+
name: Create kind cluster
45+
uses: helm/[email protected]
46+
47+
- name: Run chart-testing (install)
48+
uses: helm/[email protected]
49+
with:
50+
command: install

.github/workflows/release.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Release Charts
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v2
14+
15+
- name: Fetch history
16+
run: git fetch --prune --unshallow
17+
18+
- name: Configure Git
19+
run: |
20+
git config user.name "$GITHUB_ACTOR"
21+
git config user.email "[email protected]"
22+
23+
- name: Run chart-releaser
24+
uses: helm/[email protected]
25+
env:
26+
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
apiVersion: v1
2-
appVersion: "v1.18.0"
2+
appVersion: latest
33
description: Cinder CSI Plugin for OpenStack
44
name: openstack-cinder-csi
5-
version: 1.1.1
5+
version: 1.1.2
6+
home: https://github.com/kubernetes/cloud-provider-openstack
7+
icon: https://github.com/kubernetes/kubernetes/blob/master/logo/logo.png
8+
maintainers:
9+
- name: brtknr
10+

charts/cinder-csi-plugin/README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,17 @@ Deploys a Cinder csi provisioner to your cluster, with the appropriate storageCl
55
## How To install
66
- Enable deployment of storageclasses using `storageClass.enabled`
77
- Tag the retain or delete class as default class using `storageClass.delete.isDefault` in your value yaml
8-
- Set `storageClass.<reclaim-policy>.allowVolumeExpansion` to `true` or `false`
8+
- Set `storageClass.<reclaim-policy>.allowVolumeExpansion` to `true` or `false`
9+
10+
First add the repo:
11+
12+
helm repo add cpo https://kubernetes.github.io/cloud-provider-openstack
13+
helm repo update
14+
15+
If you are using Helm v3:
16+
17+
helm install cinder-csi cpo/openstack-cinder-csi
18+
19+
If you are using Helm v2:
20+
21+
helm install --name cinder-csi cpo/openstack-cinder-csi

charts/cinder-csi-plugin/templates/controllerplugin-statefulset.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ spec:
3535
env:
3636
- name: ADDRESS
3737
value: /var/lib/csi/sockets/pluginproxy/csi.sock
38-
imagePullPolicy: "IfNotPresent"
3938
volumeMounts:
4039
- name: socket-dir
4140
mountPath: /var/lib/csi/sockets/pluginproxy/
@@ -48,7 +47,6 @@ spec:
4847
env:
4948
- name: ADDRESS
5049
value: /var/lib/csi/sockets/pluginproxy/csi.sock
51-
imagePullPolicy: "IfNotPresent"
5250
volumeMounts:
5351
- name: socket-dir
5452
mountPath: /var/lib/csi/sockets/pluginproxy/
@@ -60,7 +58,6 @@ spec:
6058
env:
6159
- name: ADDRESS
6260
value: /var/lib/csi/sockets/pluginproxy/csi.sock
63-
imagePullPolicy: Always
6461
volumeMounts:
6562
- mountPath: /var/lib/csi/sockets/pluginproxy/
6663
name: socket-dir
@@ -72,7 +69,6 @@ spec:
7269
env:
7370
- name: ADDRESS
7471
value: /var/lib/csi/sockets/pluginproxy/csi.sock
75-
imagePullPolicy: "IfNotPresent"
7672
volumeMounts:
7773
- name: socket-dir
7874
mountPath: /var/lib/csi/sockets/pluginproxy/
@@ -96,7 +92,6 @@ spec:
9692
value: /etc/kubernetes/cloud-config
9793
- name: CLUSTER_NAME
9894
value: kubernetes
99-
imagePullPolicy: "IfNotPresent"
10095
volumeMounts:
10196
- name: socket-dir
10297
mountPath: /csi
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
apiVersion: v1
2-
appVersion: "0.9"
3-
description: A Helm chart for Kubernetes
2+
appVersion: latest
3+
description: Manila CSI Plugin for OpenStack
44
name: openstack-manila-csi
55
version: 0.1.2
6+
home: http://github.com/kubernetes/cloud-provider-openstack
7+
icon: https://github.com/kubernetes/kubernetes/blob/master/logo/logo.png
8+
maintainers:
9+
- name: brtknr
10+

charts/manila-csi-plugin/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Manila CSI provisioner
2+
3+
First add the repo:
4+
5+
helm repo add cpo https://kubernetes.github.io/cloud-provider-openstack
6+
helm repo update
7+
8+
If you are using Helm v3:
9+
10+
helm install manila-csi cpo/openstack-manila-csi
11+
12+
If you are using Helm v2:
13+
14+
helm install --name manila-csi cpo/openstack-manila-csi

docs/using-manila-csi-plugin.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ This is the preferred way of deployment because it greatly simplifies the diffic
157157

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

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

162162
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.
163163

0 commit comments

Comments
 (0)