diff --git a/charts/cinder-csi-plugin/templates/cinder-csi-driver.yaml b/charts/cinder-csi-plugin/templates/cinder-csi-driver.yaml index f69e667866..5b681e4c4d 100644 --- a/charts/cinder-csi-plugin/templates/cinder-csi-driver.yaml +++ b/charts/cinder-csi-plugin/templates/cinder-csi-driver.yaml @@ -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 diff --git a/charts/cinder-csi-plugin/templates/controllerplugin-rbac.yaml b/charts/cinder-csi-plugin/templates/controllerplugin-rbac.yaml index 1fbf2e1670..e8d7a909fc 100644 --- a/charts/cinder-csi-plugin/templates/controllerplugin-rbac.yaml +++ b/charts/cinder-csi-plugin/templates/controllerplugin-rbac.yaml @@ -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"] @@ -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 @@ -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"] @@ -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 @@ -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"] @@ -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 @@ -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. @@ -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 diff --git a/charts/cinder-csi-plugin/templates/nodeplugin-rbac.yaml b/charts/cinder-csi-plugin/templates/nodeplugin-rbac.yaml index 83d1071c74..894a8df219 100644 --- a/charts/cinder-csi-plugin/templates/nodeplugin-rbac.yaml +++ b/charts/cinder-csi-plugin/templates/nodeplugin-rbac.yaml @@ -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"] @@ -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 diff --git a/charts/cinder-csi-plugin/templates/secret.yaml b/charts/cinder-csi-plugin/templates/secret.yaml index d7c102c1e4..597880c0d5 100644 --- a/charts/cinder-csi-plugin/templates/secret.yaml +++ b/charts/cinder-csi-plugin/templates/secret.yaml @@ -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 }} diff --git a/charts/cinder-csi-plugin/templates/storageclass.yaml b/charts/cinder-csi-plugin/templates/storageclass.yaml index dd47c9f16b..704c30038b 100644 --- a/charts/cinder-csi-plugin/templates/storageclass.yaml +++ b/charts/cinder-csi-plugin/templates/storageclass.yaml @@ -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 }} @@ -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 }} diff --git a/charts/cinder-csi-plugin/values.yaml b/charts/cinder-csi-plugin/values.yaml index b869d5417a..ec41307046 100644 --- a/charts/cinder-csi-plugin/values.yaml +++ b/charts/cinder-csi-plugin/values.yaml @@ -204,5 +204,5 @@ priorityClassName: "" imagePullSecrets: [] # - name: my-imagepull-secret -## Annotations to apply to all resources +# add annotations to all pods commonAnnotations: {}