Skip to content

Commit 2b2fb1b

Browse files
committed
Revert "fix(csi-cinder-plugin): apply commonAnnotation to all resources"
This reverts commit 7a5bfcd.
1 parent d6bc7f2 commit 2b2fb1b

File tree

6 files changed

+5
-67
lines changed

6 files changed

+5
-67
lines changed

charts/cinder-csi-plugin/templates/cinder-csi-driver.yaml

-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ apiVersion: storage.k8s.io/v1
22
kind: CSIDriver
33
metadata:
44
name: cinder.csi.openstack.org
5-
annotations:
6-
{{- with .Values.commonAnnotations }}
7-
{{- toYaml . | nindent 4 }}
8-
{{- end }}
95
spec:
106
attachRequired: true
117
podInfoOnMount: true

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

-36
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,11 @@ kind: ServiceAccount
66
metadata:
77
name: csi-cinder-controller-sa
88
namespace: {{ .Release.Namespace }}
9-
annotations:
10-
{{- with .Values.commonAnnotations }}
11-
{{- toYaml . | nindent 4 }}
12-
{{- end }}
139
---
1410
kind: ClusterRole
1511
apiVersion: rbac.authorization.k8s.io/v1
1612
metadata:
1713
name: csi-attacher-role
18-
annotations:
19-
{{- with .Values.commonAnnotations }}
20-
{{- toYaml . | nindent 4 }}
21-
{{- end }}
2214
rules:
2315
- apiGroups: [""]
2416
resources: ["persistentvolumes"]
@@ -40,10 +32,6 @@ kind: ClusterRoleBinding
4032
apiVersion: rbac.authorization.k8s.io/v1
4133
metadata:
4234
name: csi-attacher-binding
43-
annotations:
44-
{{- with .Values.commonAnnotations }}
45-
{{- toYaml . | nindent 4 }}
46-
{{- end }}
4735
subjects:
4836
- kind: ServiceAccount
4937
name: csi-cinder-controller-sa
@@ -58,10 +46,6 @@ kind: ClusterRole
5846
apiVersion: rbac.authorization.k8s.io/v1
5947
metadata:
6048
name: csi-provisioner-role
61-
annotations:
62-
{{- with .Values.commonAnnotations }}
63-
{{- toYaml . | nindent 4 }}
64-
{{- end }}
6549
rules:
6650
- apiGroups: [""]
6751
resources: ["persistentvolumes"]
@@ -95,10 +79,6 @@ kind: ClusterRoleBinding
9579
apiVersion: rbac.authorization.k8s.io/v1
9680
metadata:
9781
name: csi-provisioner-binding
98-
annotations:
99-
{{- with .Values.commonAnnotations }}
100-
{{- toYaml . | nindent 4 }}
101-
{{- end }}
10282
subjects:
10383
- kind: ServiceAccount
10484
name: csi-cinder-controller-sa
@@ -113,10 +93,6 @@ kind: ClusterRole
11393
apiVersion: rbac.authorization.k8s.io/v1
11494
metadata:
11595
name: csi-snapshotter-role
116-
annotations:
117-
{{- with .Values.commonAnnotations }}
118-
{{- toYaml . | nindent 4 }}
119-
{{- end }}
12096
rules:
12197
- apiGroups: [""]
12298
resources: ["events"]
@@ -145,10 +121,6 @@ kind: ClusterRoleBinding
145121
apiVersion: rbac.authorization.k8s.io/v1
146122
metadata:
147123
name: csi-snapshotter-binding
148-
annotations:
149-
{{- with .Values.commonAnnotations }}
150-
{{- toYaml . | nindent 4 }}
151-
{{- end }}
152124
subjects:
153125
- kind: ServiceAccount
154126
name: csi-cinder-controller-sa
@@ -162,10 +134,6 @@ kind: ClusterRole
162134
apiVersion: rbac.authorization.k8s.io/v1
163135
metadata:
164136
name: csi-resizer-role
165-
annotations:
166-
{{- with .Values.commonAnnotations }}
167-
{{- toYaml . | nindent 4 }}
168-
{{- end }}
169137
rules:
170138
# The following rule should be uncommented for plugins that require secrets
171139
# for provisioning.
@@ -195,10 +163,6 @@ kind: ClusterRoleBinding
195163
apiVersion: rbac.authorization.k8s.io/v1
196164
metadata:
197165
name: csi-resizer-binding
198-
annotations:
199-
{{- with .Values.commonAnnotations }}
200-
{{- toYaml . | nindent 4 }}
201-
{{- end }}
202166
subjects:
203167
- kind: ServiceAccount
204168
name: csi-cinder-controller-sa

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

-12
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,11 @@ kind: ServiceAccount
33
metadata:
44
name: csi-cinder-node-sa
55
namespace: {{ .Release.Namespace }}
6-
annotations:
7-
{{- with .Values.commonAnnotations }}
8-
{{- toYaml . | nindent 4 }}
9-
{{- end }}
106
---
117
kind: ClusterRole
128
apiVersion: rbac.authorization.k8s.io/v1
139
metadata:
1410
name: csi-nodeplugin-role
15-
annotations:
16-
{{- with .Values.commonAnnotations }}
17-
{{- toYaml . | nindent 4 }}
18-
{{- end }}
1911
rules:
2012
- apiGroups: [""]
2113
resources: ["events"]
@@ -26,10 +18,6 @@ kind: ClusterRoleBinding
2618
apiVersion: rbac.authorization.k8s.io/v1
2719
metadata:
2820
name: csi-nodeplugin-binding
29-
annotations:
30-
{{- with .Values.commonAnnotations }}
31-
{{- toYaml . | nindent 4 }}
32-
{{- end }}
3321
subjects:
3422
- kind: ServiceAccount
3523
name: csi-cinder-node-sa

charts/cinder-csi-plugin/templates/secret.yaml

-4
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ kind: Secret
44
metadata:
55
name: {{ .Values.secret.name }}
66
namespace: {{ .Release.Namespace }}
7-
annotations:
8-
{{- with .Values.commonAnnotations }}
9-
{{- toYaml . | nindent 4 }}
10-
{{- end }}
117
type: Opaque
128
stringData:
139
{{ .Values.secret.data | toYaml | trimSuffix "\n" | nindent 2 }}

charts/cinder-csi-plugin/templates/storageclass.yaml

+4-10
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,10 @@ apiVersion: storage.k8s.io/v1
33
kind: StorageClass
44
metadata:
55
name: csi-cinder-sc-delete
6+
{{- if .Values.storageClass.delete.isDefault }}
67
annotations:
7-
{{- with .Values.commonAnnotations }}
8-
{{- toYaml . | nindent 4 }}
9-
{{- end }}
10-
{{- if .Values.storageClass.delete.isDefault }}
118
storageclass.kubernetes.io/is-default-class: "true"
12-
{{- end }}
9+
{{- end }}
1310
provisioner: cinder.csi.openstack.org
1411
reclaimPolicy: Delete
1512
allowVolumeExpansion: {{ .Values.storageClass.delete.allowVolumeExpansion }}
@@ -18,13 +15,10 @@ apiVersion: storage.k8s.io/v1
1815
kind: StorageClass
1916
metadata:
2017
name: csi-cinder-sc-retain
18+
{{- if .Values.storageClass.retain.isDefault }}
2119
annotations:
22-
{{- with .Values.commonAnnotations }}
23-
{{- toYaml . | nindent 4 }}
24-
{{- end }}
25-
{{- if .Values.storageClass.retain.isDefault }}
2620
storageclass.kubernetes.io/is-default-class: "true"
27-
{{- end }}
21+
{{- end }}
2822
provisioner: cinder.csi.openstack.org
2923
reclaimPolicy: Retain
3024
allowVolumeExpansion: {{ .Values.storageClass.retain.allowVolumeExpansion }}

charts/cinder-csi-plugin/values.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -212,5 +212,5 @@ priorityClassName: ""
212212
imagePullSecrets: []
213213
# - name: my-imagepull-secret
214214

215-
## Annotations to apply to all resources
215+
# add annotations to all pods
216216
commonAnnotations: {}

0 commit comments

Comments
 (0)