@@ -82,6 +82,13 @@ component: controllerplugin
8282{ { include " cinder-csi.common.metaLabels" . } }
8383{ {- end -} }
8484
85+ { {- define " cinder-csi.controllerplugin.podLabels" -} }
86+ { { include " cinder-csi.controllerplugin.labels" . } }
87+ { { if .Values.csi.plugin.controllerPlugin.podLabels } }
88+ { {- toYaml .Values.csi.plugin.controllerPlugin.podLabels } }
89+ { {- end } }
90+ { {- end -} }
91+
8592{ {- define " cinder-csi.nodeplugin.matchLabels" -} }
8693component: nodeplugin
8794{ { include " cinder-csi.common.matchLabels" . } }
@@ -92,6 +99,13 @@ component: nodeplugin
9299{ { include " cinder-csi.common.metaLabels" . } }
93100{ {- end -} }
94101
102+ { {- define " cinder-csi.nodeplugin.podLabels" -} }
103+ { { include " cinder-csi.nodeplugin.labels" . } }
104+ { { if .Values.csi.plugin.nodePlugin.podLabels } }
105+ { {- toYaml .Values.csi.plugin.nodePlugin.podLabels } }
106+ { {- end } }
107+ { {- end -} }
108+
95109{ {- define " cinder-csi.snapshot-controller.matchLabels" -} }
96110component: snapshot-controller
97111{ { include " cinder-csi.common.matchLabels" . } }
@@ -101,3 +115,30 @@ component: snapshot-controller
101115{ { include " cinder-csi.snapshot-controller.matchLabels" . } }
102116{ { include " cinder-csi.common.metaLabels" . } }
103117{ {- end -} }
118+
119+ { {/*
120+ Common annotations
121+ */} }
122+ { {- define " cinder-csi.annotations" -} }
123+ { {- if .Values.commonAnnotations } }
124+ { {- toYaml .Values.commonAnnotations } }
125+ { {- end } }
126+ { {- end -} }
127+
128+
129+ { {/*
130+ Create unified annotations for cinder-csi components
131+ */} }
132+ { {- define " cinder-csi.controllerplugin.podAnnotations" -} }
133+ { { include " cinder-csi.annotations" . } }
134+ { { if .Values.csi.plugin.controllerPlugin.podAnnotations } }
135+ { {- toYaml .Values.csi.plugin.controllerPlugin.podAnnotations } }
136+ { {- end } }
137+ { {- end -} }
138+
139+ { {- define " cinder-csi.nodeplugin.podAnnotations" -} }
140+ { { include " cinder-csi.annotations" . } }
141+ { { if .Values.csi.plugin.nodePlugin.podAnnotations } }
142+ { {- toYaml .Values.csi.plugin.nodePlugin.podAnnotations } }
143+ { {- end } }
144+ { {- end -} }
0 commit comments