Skip to content

Commit

Permalink
Revert "fix(csi-cinder-plugin): apply commonAnnotation to all resources"
Browse files Browse the repository at this point in the history
This reverts commit 7a5bfcd.
  • Loading branch information
roehlc committed Feb 14, 2024
1 parent e088cd3 commit 3afc8d1
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 67 deletions.
4 changes: 0 additions & 4 deletions charts/cinder-csi-plugin/templates/cinder-csi-driver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ apiVersion: storage.k8s.io/v1
kind: CSIDriver
metadata:
name: cinder.csi.openstack.org
annotations:
{{- with .Values.commonAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
attachRequired: true
podInfoOnMount: true
Expand Down
36 changes: 0 additions & 36 deletions charts/cinder-csi-plugin/templates/controllerplugin-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,11 @@ kind: ServiceAccount
metadata:
name: csi-cinder-controller-sa
namespace: {{ .Release.Namespace }}
annotations:
{{- with .Values.commonAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: csi-attacher-role
annotations:
{{- with .Values.commonAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
rules:
- apiGroups: [""]
resources: ["persistentvolumes"]
Expand All @@ -40,10 +32,6 @@ kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: csi-attacher-binding
annotations:
{{- with .Values.commonAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
subjects:
- kind: ServiceAccount
name: csi-cinder-controller-sa
Expand All @@ -58,10 +46,6 @@ kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: csi-provisioner-role
annotations:
{{- with .Values.commonAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
rules:
- apiGroups: [""]
resources: ["persistentvolumes"]
Expand Down Expand Up @@ -95,10 +79,6 @@ kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: csi-provisioner-binding
annotations:
{{- with .Values.commonAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
subjects:
- kind: ServiceAccount
name: csi-cinder-controller-sa
Expand All @@ -113,10 +93,6 @@ kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: csi-snapshotter-role
annotations:
{{- with .Values.commonAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
rules:
- apiGroups: [""]
resources: ["events"]
Expand Down Expand Up @@ -145,10 +121,6 @@ kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: csi-snapshotter-binding
annotations:
{{- with .Values.commonAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
subjects:
- kind: ServiceAccount
name: csi-cinder-controller-sa
Expand All @@ -162,10 +134,6 @@ kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: csi-resizer-role
annotations:
{{- with .Values.commonAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
rules:
# The following rule should be uncommented for plugins that require secrets
# for provisioning.
Expand Down Expand Up @@ -195,10 +163,6 @@ kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: csi-resizer-binding
annotations:
{{- with .Values.commonAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
subjects:
- kind: ServiceAccount
name: csi-cinder-controller-sa
Expand Down
12 changes: 0 additions & 12 deletions charts/cinder-csi-plugin/templates/nodeplugin-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,11 @@ kind: ServiceAccount
metadata:
name: csi-cinder-node-sa
namespace: {{ .Release.Namespace }}
annotations:
{{- with .Values.commonAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: csi-nodeplugin-role
annotations:
{{- with .Values.commonAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
rules:
- apiGroups: [""]
resources: ["events"]
Expand All @@ -26,10 +18,6 @@ kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: csi-nodeplugin-binding
annotations:
{{- with .Values.commonAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
subjects:
- kind: ServiceAccount
name: csi-cinder-node-sa
Expand Down
4 changes: 0 additions & 4 deletions charts/cinder-csi-plugin/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ kind: Secret
metadata:
name: {{ .Values.secret.name }}
namespace: {{ .Release.Namespace }}
annotations:
{{- with .Values.commonAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
type: Opaque
stringData:
{{ .Values.secret.data | toYaml | trimSuffix "\n" | nindent 2 }}
Expand Down
14 changes: 4 additions & 10 deletions charts/cinder-csi-plugin/templates/storageclass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@ apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: csi-cinder-sc-delete
{{- if .Values.storageClass.delete.isDefault }}
annotations:
{{- with .Values.commonAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- if .Values.storageClass.delete.isDefault }}
storageclass.kubernetes.io/is-default-class: "true"
{{- end }}
{{- end }}
provisioner: cinder.csi.openstack.org
reclaimPolicy: Delete
allowVolumeExpansion: {{ .Values.storageClass.delete.allowVolumeExpansion }}
Expand All @@ -18,13 +15,10 @@ apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: csi-cinder-sc-retain
{{- if .Values.storageClass.retain.isDefault }}
annotations:
{{- with .Values.commonAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- if .Values.storageClass.retain.isDefault }}
storageclass.kubernetes.io/is-default-class: "true"
{{- end }}
{{- end }}
provisioner: cinder.csi.openstack.org
reclaimPolicy: Retain
allowVolumeExpansion: {{ .Values.storageClass.retain.allowVolumeExpansion }}
Expand Down
2 changes: 1 addition & 1 deletion charts/cinder-csi-plugin/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -204,5 +204,5 @@ priorityClassName: ""
imagePullSecrets: []
# - name: my-imagepull-secret

## Annotations to apply to all resources
# add annotations to all pods
commonAnnotations: {}

0 comments on commit 3afc8d1

Please sign in to comment.