Skip to content

Commit 12896a1

Browse files
brtkwrramineni
andauthored
Only perform chart lint, remove install step (kubernetes#1227) (kubernetes#1233)
* Only perform chart lint, remove install step (kubernetes#1227) For the chart install to work, the Kubernetes cluster needs to be able to talk to an OpenStack cloud which cannot be done in the CI. Therefore, only perform the lint test and disable install. (cherry picked from commit 534bf32) * [cinder-csi-plugin] Update snapshotter to v2.1.1 in charts (cherry picked from commit c507740) * Lint chart against release-1.19 branch and not master Co-authored-by: Anusha Ramineni <[email protected]>
1 parent 70ead50 commit 12896a1

File tree

3 files changed

+12
-53
lines changed

3 files changed

+12
-53
lines changed

.github/workflows/config/ct.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
target-branch: release-1.19

.github/workflows/pr.yaml

Lines changed: 3 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,9 @@
1-
name: Lint and Test Charts
1+
name: Lint Charts
22

33
on: pull_request
44

55
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
6+
lint:
287
runs-on: ubuntu-latest
298
steps:
309
- name: Checkout
@@ -38,13 +17,4 @@ jobs:
3817
uses: helm/[email protected]
3918
with:
4019
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
20+
config: .github/workflows/config/ct.yaml

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

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -89,37 +89,25 @@ apiVersion: rbac.authorization.k8s.io/v1
8989
metadata:
9090
name: csi-snapshotter-role
9191
rules:
92-
- apiGroups: [""]
93-
resources: ["persistentvolumes"]
94-
verbs: ["get", "list", "watch"]
95-
- apiGroups: [""]
96-
resources: ["persistentvolumeclaims"]
97-
verbs: ["get", "list", "watch"]
98-
- apiGroups: ["storage.k8s.io"]
99-
resources: ["storageclasses"]
100-
verbs: ["get", "list", "watch"]
10192
- apiGroups: [""]
10293
resources: ["events"]
10394
verbs: ["list", "watch", "create", "update", "patch"]
104-
- apiGroups: [""]
105-
resources: ["secrets"]
106-
verbs: ["get", "list"]
95+
# Secret permission is optional.
96+
# Enable it if your driver needs secret.
97+
# For example, `csi.storage.k8s.io/snapshotter-secret-name` is set in VolumeSnapshotClass.
98+
# See https://kubernetes-csi.github.io/docs/secrets-and-credentials.html for more details.
99+
# - apiGroups: [""]
100+
# resources: ["secrets"]
101+
# verbs: ["get", "list"]
107102
- apiGroups: ["snapshot.storage.k8s.io"]
108103
resources: ["volumesnapshotclasses"]
109104
verbs: ["get", "list", "watch"]
110105
- apiGroups: ["snapshot.storage.k8s.io"]
111106
resources: ["volumesnapshotcontents"]
112107
verbs: ["create", "get", "list", "watch", "update", "delete"]
113108
- apiGroups: ["snapshot.storage.k8s.io"]
114-
resources: ["volumesnapshots"]
115-
verbs: ["get", "list", "watch", "update"]
116-
- apiGroups: ["snapshot.storage.k8s.io"]
117-
resources: ["volumesnapshots/status"]
109+
resources: ["volumesnapshotcontents/status"]
118110
verbs: ["update"]
119-
- apiGroups: ["apiextensions.k8s.io"]
120-
resources: ["customresourcedefinitions"]
121-
verbs: ["create", "list", "watch", "delete"]
122-
123111
---
124112
kind: ClusterRoleBinding
125113
apiVersion: rbac.authorization.k8s.io/v1

0 commit comments

Comments
 (0)