[backups] Add throttlling of remote etcd backups

This PS adds a possibility to limit (to throttle) the number of
simultaneously uploaded backups while keeping the logic on the client
side using flag files on remote side.

Change-Id: I753faab8f3d934346d54e38bfc94cec3a8f79385
This commit is contained in:
Sergiy Markin 2023-12-12 03:58:53 +00:00
parent 748dfc535d
commit 7297362c2d
3 changed files with 17 additions and 1 deletions

View File

@ -15,4 +15,4 @@
apiVersion: v1
description: A chart for a DaemonSet-based etcd deployment.
name: etcd
version: 0.1.3
version: 0.1.4

View File

@ -134,6 +134,16 @@ spec:
value: {{ .Values.backup.remote_backup.delay_range.min | quote }}
- name: MAX_DELAY_SEND_BACKUP_TO_REMOTE
value: {{ .Values.backup.remote_backup.delay_range.max | quote }}
- name: THROTTLE_BACKUPS_ENABLED
value: {{ .Values.conf.backup.remote_backup.throttle_backups.enabled }}
- name: THROTTLE_LIMIT
value: {{ .Values.conf.backup.remote_backup.throttle_backups.sessions_limit | quote }}
- name: THROTTLE_LOCK_EXPIRE_AFTER
value: {{ .Values.conf.backup.remote_backup.throttle_backups.lock_expire_after | quote }}
- name: THROTTLE_RETRY_AFTER
value: {{ .Values.conf.backup.remote_backup.throttle_backups.retry_after | quote }}
- name: THROTTLE_CONTAINER_NAME
value: {{ .Values.conf.backup.remote_backup.throttle_backups.container_name | quote }}
{{- with $env := dict "ksUserSecret" $envAll.Values.secrets.identity.kubernetes }}
{{- include "helm-toolkit.snippets.keystone_openrc_env_vars" $env | indent 16 }}
{{- end }}

View File

@ -74,6 +74,12 @@ backup:
delay_range:
min: 30
max: 60
throttle_backups:
enabled: false
sessions_limit: 200
lock_expire_after: 3600
retry_after: 1800
container_name: throttle-backups-manager
endpoints:
identity: