mirror of
https://github.com/bitnami/charts.git
synced 2026-03-10 15:07:49 +08:00
[bitnami/influxdb] - add nodeSelector, affinity and tolerations to the backup container(s) (#6778)
* Fix #6765 This MR adds the `affinity` `nodeSelector` and `tolerations` to the backup container(s) of InfluxDB backup feature. Currently the backup container(s) ignores these values set in the values.yaml. * Bump chart version to 2.2.10 Bump the chart version due to a new PR * Update values.yaml Adding vars in the `backup` tree to separate tolerations, nodeSelectors and affinity of the backup pods * Update cronjob-backup.yaml Changing reference of values for backup.nodeAffinity, backup.tolerations and backup.nodeSelector * Update values.yaml Adding backup.nodeAffinityPreset and backup.podAntiAffinityPreset and backup.podAffinityPreset * Update README.md Adding description for new backup values
This commit is contained in:
@@ -24,4 +24,4 @@ name: influxdb
|
||||
sources:
|
||||
- https://github.com/bitnami/bitnami-docker-influxdb
|
||||
- https://www.influxdata.com/products/influxdb-overview/
|
||||
version: 2.2.9
|
||||
version: 2.2.10
|
||||
|
||||
@@ -260,6 +260,14 @@ The following tables lists the configurable parameters of the InfluxDB<sup>TM</s
|
||||
| `backup.cronjob.schedule` | crontab style time schedule for backup execution | `"0 2 * * *"` |
|
||||
| `backup.cronjob.historyLimit` | cronjob historylimit | `1` |
|
||||
| `backup.cronjob.annotations` | backup pod annotations | `{}` |
|
||||
| `backup.podAffinityPreset` | Backup <sup>TM</sup> Pod affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` |
|
||||
| `backup.podAntiAffinityPreset` | Backup<sup>TM</sup> Pod anti-affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` |
|
||||
| `backup.nodeAffinityPreset.type` | Backup<sup>TM</sup> Node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` |
|
||||
| `backup.nodeAffinityPreset.key` | Backup<sup>TM</sup> Node label key to match Ignored if `affinity` is set. | `""` |
|
||||
| `backup.nodeAffinityPreset.values` | Backup<sup>TM</sup> Node label values to match. Ignored if `affinity` is set. | `[]` |
|
||||
| `backup.affinity` | Backup<sup>TM</sup> Affinity for backup pod assignment | `{}` (evaluated as a template) |
|
||||
| `backup.nodeSelector` | Backup<sup>TM</sup> Node labels for backup pod assignment | `{}` (evaluated as a template) |
|
||||
| `backup.tolerations` | Backup<sup>TM</sup> Tolerations for backup pod assignment | `[]` (evaluated as a template) |
|
||||
| `backup.uploadProviders.google.enabled` | enable upload to google storage bucket | `false` |
|
||||
| `backup.uploadProviders.google.secret` | json secret with serviceaccount data to access Google storage bucket | `""` |
|
||||
| `backup.uploadProviders.google.secretKey` | service account secret key name | `"key.json"` |
|
||||
|
||||
@@ -52,6 +52,20 @@ spec:
|
||||
{{- else }}
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
{{- if .Values.backup.affinity }}
|
||||
affinity: {{- include "common.tplvalues.render" (dict "value" .Values.backup.affinity "context" $) | nindent 8 }}
|
||||
{{- else }}
|
||||
affinity:
|
||||
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.backup.podAffinityPreset "component" "influxdb" "context" $) | nindent 10 }}
|
||||
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.backup.podAntiAffinityPreset "component" "influxdb" "context" $) | nindent 10 }}
|
||||
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.backup.nodeAffinityPreset.type "key" .Values.backup.nodeAffinityPreset.key "values" .Values.backup.nodeAffinityPreset.values) | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- if .Values.backup.nodeSelector }}
|
||||
nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.backup.nodeSelector "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.backup.tolerations }}
|
||||
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.backup.tolerations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
initContainers:
|
||||
- name: influxdb-backup
|
||||
image: {{ include "influxdb.image" . | quote }}
|
||||
|
||||
@@ -806,6 +806,53 @@ backup:
|
||||
enabled: true
|
||||
fsGroup: 1001
|
||||
runAsUser: 1001
|
||||
## Pod affinity preset
|
||||
## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
|
||||
## Allowed values: soft, hard
|
||||
##
|
||||
podAffinityPreset: ""
|
||||
|
||||
## Pod anti-affinity preset
|
||||
## Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
|
||||
## Allowed values: soft, hard
|
||||
##
|
||||
podAntiAffinityPreset: soft
|
||||
|
||||
## Node affinity preset
|
||||
## Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity
|
||||
## Allowed values: soft, hard
|
||||
##
|
||||
nodeAffinityPreset:
|
||||
## Node affinity type
|
||||
## Allowed values: soft, hard
|
||||
type: ""
|
||||
## Node label key to match
|
||||
## E.g.
|
||||
## key: "kubernetes.io/e2e-az-name"
|
||||
##
|
||||
key: ""
|
||||
## Node label values to match
|
||||
## E.g.
|
||||
## values:
|
||||
## - e2e-az1
|
||||
## - e2e-az2
|
||||
##
|
||||
values: []
|
||||
## Affinity for pod assignment
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
## Note: podAffinityPreset, podAntiAffinityPreset, and nodeAffinityPreset will be ignored when it's set
|
||||
##
|
||||
affinity: {}
|
||||
|
||||
## Node labels for pod assignment
|
||||
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
##
|
||||
nodeSelector: {}
|
||||
|
||||
## Tolerations for pod assignment
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||
##
|
||||
tolerations: []
|
||||
## Storage providers where to upload backups
|
||||
##
|
||||
uploadProviders:
|
||||
|
||||
Reference in New Issue
Block a user