Add configurable tolerations (fixes #9 and #27)

This commit is contained in:
Vitaliy Filippov 2022-08-05 13:56:26 +03:00
parent 52b29e1725
commit dc1eb30b0d
7 changed files with 53 additions and 4 deletions

View file

@ -34,3 +34,6 @@ The following table lists all configuration parameters and their default values.
| `secret.accessKey` | S3 Access Key | | | `secret.accessKey` | S3 Access Key | |
| `secret.secretKey` | S3 Secret Key | | | `secret.secretKey` | S3 Secret Key | |
| `secret.endpoint` | Endpoint | https://storage.yandexcloud.net | | `secret.endpoint` | Endpoint | https://storage.yandexcloud.net |
| `tolerations.all` | Tolerate all taints by the CSI-S3 node driver (mounter) | false |
| `tolerations.node` | Custom tolerations for the CSI-S3 node driver (mounter) | [] |
| `tolerations.controller` | Custom tolerations for the CSI-S3 controller (provisioner) | [] |

View file

@ -102,3 +102,12 @@ user_values:
ru: Название секрета, который будет создан или использован для класса хранения ru: Название секрета, который будет создан или использован для класса хранения
string_value: string_value:
default_value: csi-s3-secret default_value: csi-s3-secret
- name: tolerations.all
title:
en: Tolerate all taints
ru: Игнорировать все taint-ы
description:
en: Tolerate all taints by the CSI-S3 node driver (mounter)
ru: Игнорировать все taint-ы узлов кластера драйвером CSI-S3, монтирующим ФС на узлах
boolean_value:
default_value: false

View file

@ -52,6 +52,19 @@ spec:
labels: labels:
app: csi-s3 app: csi-s3
spec: spec:
tolerations:
{{- if .Values.tolerations.all }}
- operator: Exists
{{- else }}
- key: CriticalAddonsOnly
operator: Exists
- operator: Exists
effect: NoExecute
tolerationSeconds: 300
{{- end }}
{{- with .Values.tolerations.node }}
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccount: csi-s3 serviceAccount: csi-s3
hostNetwork: true hostNetwork: true
containers: containers:

View file

@ -70,8 +70,16 @@ spec:
spec: spec:
serviceAccount: csi-provisioner-sa serviceAccount: csi-provisioner-sa
tolerations: tolerations:
- key: node-role.kubernetes.io/master - key: node-role.kubernetes.io/master
operator: "Exists" operator: Exists
- key: CriticalAddonsOnly
operator: Exists
- operator: Exists
effect: NoExecute
tolerationSeconds: 300
{{- with .Values.tolerations.controller }}
{{- toYaml . | nindent 8 }}
{{- end }}
containers: containers:
- name: csi-provisioner - name: csi-provisioner
image: {{ .Values.images.provisioner }} image: {{ .Values.images.provisioner }}

View file

@ -37,3 +37,8 @@ secret:
secretKey: "" secretKey: ""
# Endpoint # Endpoint
endpoint: https://storage.yandexcloud.net endpoint: https://storage.yandexcloud.net
tolerations:
all: false
node: []
controller: []

View file

@ -77,8 +77,13 @@ spec:
spec: spec:
serviceAccount: csi-attacher-sa serviceAccount: csi-attacher-sa
tolerations: tolerations:
- key: node-role.kubernetes.io/master - key: node-role.kubernetes.io/master
operator: "Exists" operator: Exists
- key: CriticalAddonsOnly
operator: Exists
- operator: Exists
effect: NoExecute
tolerationSeconds: 300
containers: containers:
- name: csi-attacher - name: csi-attacher
image: quay.io/k8scsi/csi-attacher:v3.0.1 image: quay.io/k8scsi/csi-attacher:v3.0.1

View file

@ -52,6 +52,12 @@ spec:
labels: labels:
app: csi-s3 app: csi-s3
spec: spec:
tolerations:
- key: CriticalAddonsOnly
operator: Exists
- operator: Exists
effect: NoExecute
tolerationSeconds: 300
serviceAccount: csi-s3 serviceAccount: csi-s3
hostNetwork: true hostNetwork: true
containers: containers: