helm: Support setting annotations for nodePlugin and provisioner

Adding annotation support to both the CephFS and RBD charts.  Support
setting the DaemonSet and Pod level annotations for the nodeplugin.
Support setting the Deployment and Pod level annotations for the
provisioner.

Signed-off-by: Mike Vollman <mike@reportallusa.com>
This commit is contained in:
Mike Vollman
2024-10-11 10:20:34 -04:00
committed by mergify[bot]
parent 0c5619b2a2
commit d1c28fa57a
10 changed files with 58 additions and 0 deletions

View File

@ -133,6 +133,8 @@ charts and their default values.
| `nodeplugin.plugin.image.tag` | Image tag | `canary` |
| `nodeplugin.plugin.image.pullPolicy` | Image pull policy | `IfNotPresent` |
| `nodeplugin.podSecurityContext` | Specifies pod-level security context. | `{}` |
| `nodeplugin.annotations` | Specifies DaemonSet level annotations. | `{}` |
| `nodeplugin.podAnnotations` | Specifies pod-level annotations. | `{}` |
| `nodeplugin.nodeSelector` | Kubernetes `nodeSelector` to add to the Daemonset | `{}` |
| `nodeplugin.tolerations` | List of Kubernetes `tolerations` to add to the Daemonset | `{}` |
| `provisioner.name` | Specifies the name of provisioner | `provisioner` |
@ -157,6 +159,8 @@ charts and their default values.
| `provisioner.provisioner.args.httpEndpointPort` | Specifies http server port for diagnostics, health checks and metrics | `""` |
| `provisioner.provisioner.extraArgs` | Specifies extra arguments for the provisioner sidecar | `[]` |
| `provisioner.podSecurityContext` | Specifies pod-level security context. | `{}` |
| `provisioner.annotations` | Specifies Deployment level annotations. | `{}` |
| `provisioner.podAnnotations` | Specifies pod-level annotations. | `{}` |
| `provisioner.attacher.name` | Specifies the name of csi-attacher sidecar | `attacher` |
| `provisioner.attacher.enabled` | Specifies whether attacher sidecar is enabled | `true` |
| `provisioner.attacher.image.repository` | Specifies the csi-attacher image repository URL | `registry.k8s.io/sig-storage/csi-attacher` |

View File

@ -10,6 +10,10 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.commonLabels }}{{ toYaml . | trim | nindent 4 }}{{- end }}
{{- if .Values.nodeplugin.annotations }}
annotations:
{{- toYaml .Values.nodeplugin.annotations | nindent 4 -}}
{{- end }}
spec:
selector:
matchLabels:
@ -27,6 +31,10 @@ spec:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.commonLabels }}{{ toYaml . | trim | nindent 8 }}{{- end }}
{{- if .Values.nodeplugin.podAnnotations }}
annotations:
{{- toYaml .Values.nodeplugin.podAnnotations | nindent 8 -}}
{{- end }}
spec:
securityContext: {{ toYaml .Values.nodeplugin.podSecurityContext | nindent 8 }}
serviceAccountName: {{ include "ceph-csi-rbd.serviceAccountName.nodeplugin" . }}

View File

@ -10,6 +10,10 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.commonLabels }}{{ toYaml . | trim | nindent 4 }}{{- end }}
{{- if .Values.provisioner.annotations }}
annotations:
{{- toYaml .Values.provisioner.annotations | nindent 4 -}}
{{- end }}
spec:
replicas: {{ .Values.provisioner.replicaCount }}
strategy:
@ -32,6 +36,10 @@ spec:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.commonLabels }}{{ toYaml . | trim | nindent 8 }}{{- end }}
{{- if .Values.provisioner.podAnnotations }}
annotations:
{{- toYaml .Values.provisioner.podAnnotations | nindent 8 -}}
{{- end }}
spec:
{{- if gt (int .Values.provisioner.replicaCount) 1 }}
affinity:

View File

@ -159,8 +159,12 @@ nodeplugin:
affinity: {}
annotations: {}
podSecurityContext: {}
podAnnotations: {}
provisioner:
name: provisioner
replicaCount: 3
@ -318,8 +322,12 @@ provisioner:
affinity: {}
annotations: {}
podSecurityContext: {}
podAnnotations: {}
topology:
# domainLabels define which node labels to use as domains
# for CSI nodeplugins to advertise their domains