diff --git a/deploy/charts/csi-driver/Chart.yaml b/deploy/charts/csi-driver/Chart.yaml index 44af755e..ba18ecc5 100644 --- a/deploy/charts/csi-driver/Chart.yaml +++ b/deploy/charts/csi-driver/Chart.yaml @@ -1,4 +1,4 @@ -apiVersion: v1 +apiVersion: v2 name: cert-manager-csi-driver type: application diff --git a/deploy/charts/csi-driver/README.md b/deploy/charts/csi-driver/README.md index 92320630..6048642c 100644 --- a/deploy/charts/csi-driver/README.md +++ b/deploy/charts/csi-driver/README.md @@ -20,6 +20,7 @@ A Helm chart for cert-manager-csi-driver | Key | Type | Default | Description | |-----|------|---------|-------------| +| affinity | object | `{}` | Kubernetes affinity: constraints for pod assignment | | app.driver | object | `{"csiDataDir":"/tmp/cert-manager-csi-driver","name":"csi.cert-manager.io","useTokenRequest":false}` | Options for CSI driver | | app.driver.csiDataDir | string | `"/tmp/cert-manager-csi-driver"` | Configures the hostPath directory that the driver will write and mount volumes from. | | app.driver.name | string | `"csi.cert-manager.io"` | Name of the driver which will be registered with Kubernetes. | @@ -28,6 +29,8 @@ A Helm chart for cert-manager-csi-driver | app.livenessProbe | object | `{"port":9809}` | Options for the liveness container. | | app.livenessProbe.port | int | `9809` | The port that will expose the livness of the csi-driver | | app.logLevel | int | `1` | Verbosity of cert-manager-csi-driver logging. | +| commonLabels | object | `{}` | Labels to apply to all resources | +| daemonSetAnnotations | object | `{}` | Optional additional annotations to add to the csi-driver DaemonSet | | image.pullPolicy | string | `"IfNotPresent"` | Kubernetes imagePullPolicy on csi-driver. | | image.repository | string | `"quay.io/jetstack/cert-manager-csi-driver"` | Target image repository. | | image.tag | string | `"v0.5.0"` | Target image version tag. | @@ -38,8 +41,10 @@ A Helm chart for cert-manager-csi-driver | nodeDriverRegistrarImage.pullPolicy | string | `"IfNotPresent"` | Kubernetes imagePullPolicy on node-driver. | | nodeDriverRegistrarImage.repository | string | `"registry.k8s.io/sig-storage/csi-node-driver-registrar"` | Target image repository. | | nodeDriverRegistrarImage.tag | string | `"v2.7.0"` | Target image version tag. | -| nodeSelector | object | `{}` | | +| nodeSelector | object | `{}` | Kubernetes node selector: node labels for pod assignment | +| podAnnotations | object | `{}` | Optional additional annotations to add to the csi-driver Pods | +| podLabels | object | `{}` | Optional additional labels to add to the csi-driver Pods | | priorityClassName | string | `""` | Optional priority class to be used for the csi-driver pods. | -| resources | object | `{}` | | -| tolerations | list | `[]` | | +| resources | object | `{}` | Kubernetes pod resources requests/limits for cert-manager-csi-driver | +| tolerations | list | `[]` | Kubernetes pod tolerations for cert-manager-csi-driver | diff --git a/deploy/charts/csi-driver/templates/_helpers.tpl b/deploy/charts/csi-driver/templates/_helpers.tpl index 8aefceca..5383ff14 100644 --- a/deploy/charts/csi-driver/templates/_helpers.tpl +++ b/deploy/charts/csi-driver/templates/_helpers.tpl @@ -24,4 +24,7 @@ app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- if .Values.commonLabels}} +{{ toYaml .Values.commonLabels }} +{{- end }} {{- end -}} diff --git a/deploy/charts/csi-driver/templates/daemonset.yaml b/deploy/charts/csi-driver/templates/daemonset.yaml index 99156bc3..40312aeb 100644 --- a/deploy/charts/csi-driver/templates/daemonset.yaml +++ b/deploy/charts/csi-driver/templates/daemonset.yaml @@ -4,6 +4,10 @@ metadata: name: {{ include "cert-manager-csi-driver.name" . }} labels: {{ include "cert-manager-csi-driver.labels" . | indent 4 }} + {{- with .Values.daemonSetAnnotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} spec: selector: matchLabels: @@ -12,12 +16,23 @@ spec: metadata: labels: app: {{ include "cert-manager-csi-driver.name" . }} + {{- include "cert-manager-csi-driver.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} serviceAccountName: {{ include "cert-manager-csi-driver.name" . }} + {{- with .Values.priorityClassName }} + priorityClassName: {{ . | quote }} + {{- end }} containers: - name: node-driver-registrar @@ -90,18 +105,22 @@ spec: port: healthz initialDelaySeconds: 5 timeoutSeconds: 5 + {{- with .Values.resources }} resources: - {{- toYaml .Values.resources | nindent 12 }} + {{- toYaml . | nindent 12 }} + {{- end }} - {{- if .Values.nodeSelector }} - nodeSelector: {{- toYaml .Values.nodeSelector | nindent 8 }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} {{- end }} - + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} tolerations: - {{- toYaml .Values.tolerations | nindent 8 }} - - {{- with .Values.priorityClassName }} - priorityClassName: {{ . | quote }} + {{- toYaml . | nindent 8 }} {{- end }} volumes: diff --git a/deploy/charts/csi-driver/values.yaml b/deploy/charts/csi-driver/values.yaml index 71f6c7dc..11153399 100644 --- a/deploy/charts/csi-driver/values.yaml +++ b/deploy/charts/csi-driver/values.yaml @@ -12,6 +12,9 @@ image: imagePullSecrets: [] #- name: Secret with Registry credentials +# -- Labels to apply to all resources +commonLabels: {} + nodeDriverRegistrarImage: # -- Target image repository. repository: registry.k8s.io/sig-storage/csi-node-driver-registrar @@ -50,24 +53,43 @@ app: # -- Overrides path to root kubelet directory in case of a non-standard k8s install. kubeletRootDir: /var/lib/kubelet +# -- Optional additional annotations to add to the csi-driver DaemonSet +daemonSetAnnotations: {} + +# -- Optional additional annotations to add to the csi-driver Pods +podAnnotations: {} + +# -- Optional additional labels to add to the csi-driver Pods +podLabels: {} + +# -- Kubernetes pod resources requests/limits for cert-manager-csi-driver resources: {} - # -- Kubernetes pod resource limits for cert-manager-csi-driver # limits: # cpu: 100m # memory: 128Mi - # -- Kubernetes pod memory resource requests for cert-manager-csi-driver # requests: # cpu: 100m # memory: 128Mi +# -- Kubernetes node selector: node labels for pod assignment nodeSelector: {} - # -- Kubernetes node selector: node labels for pod assignment - # Allow scheduling of DaemonSet on linux nodes only + # -- Allow scheduling of DaemonSet on linux nodes only # kubernetes.io/os: linux +# -- Kubernetes affinity: constraints for pod assignment +affinity: {} + # nodeAffinity: + # requiredDuringSchedulingIgnoredDuringExecution: + # nodeSelectorTerms: + # - matchExpressions: + # - key: foo.bar.com/role + # operator: In + # values: + # - master + +# -- Kubernetes pod tolerations for cert-manager-csi-driver tolerations: [] - # -- Kubernetes pod tolerations for cert-manager-csi-driver - # Allow scheduling of DaemonSet on all nodes + # -- Allow scheduling of DaemonSet on all nodes # - operator: "Exists" # -- Optional priority class to be used for the csi-driver pods.