Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion operator/charts/patroni-services/templates/cr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ spec:
{{ toYaml .Values.podLabels | nindent 6 }}
{{- end }}
image: {{ template "find_image" (dict "deployName" "postgres_backup_daemon" "SERVICE_NAME" "postgres_backup_daemon" "vals" .Values "default" .Values.backupDaemon.dockerImage) }}
compressionLevel: {{ default 5 .Values.backupDaemon.compressionLevel }}
compressionLevel: {{ default 9 .Values.backupDaemon.compressionLevel }}
walArchiving: {{ default false .Values.backupDaemon.walArchiving }}
granularEviction: {{ .Values.backupDaemon.granularEviction | squote }}
encryption: {{.Values.backupDaemon.encryption}}
Expand Down
2 changes: 1 addition & 1 deletion operator/charts/patroni-services/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@
},
"compressionLevel": {
"type": "integer",
"default": 5
"default": 9
},
"walArchiving": {
"type": "boolean",
Expand Down
2 changes: 1 addition & 1 deletion operator/charts/patroni-services/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ backupDaemon:
# Docker Image that will be used for PostgreSQL Backup Daemon container
dockerImage: ghcr.io/netcracker/pgskipper-docker-backup-daemon:main
podLabels: {}
compressionLevel: 5
compressionLevel: 9
# If the flag is set as true, the installation procedure will configure Postgres to use the WAL archive and use the backup daemon as storage.
# This setting can cause major disk usage impact, because each postgres WAL file size is 16MB.
walArchiving: false
Expand Down
5 changes: 5 additions & 0 deletions services/backup-daemon/docker/granular/configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,11 @@ def diff_cron_pattern():
def incr_cron_pattern():
return os.getenv("INCR_SCHEDULE", "none")

def compression_level():
level = os.getenv("COMPRESSION_LEVEL")
if level is not None:
return int(level)
return None

def get_parallel_jobs():
return os.getenv("JOB_FLAG" , "1")
Expand Down
3 changes: 3 additions & 0 deletions services/backup-daemon/docker/granular/granular.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ def schedule_granular_backup(scheduler):
logging.info('Start schedule granular backup')
databases = configs.dbs_to_granular_backup()
backup_request = {'databases': databases, 'namespace': 'schedule'}
compression_level = configs.compression_level()
if compression_level is not None:
backup_request['compression_level'] = str(compression_level)
items = cron_pattern.split(' ', 5)
minute, hour, day, month, day_of_week = items[0], items[1], items[2], items[3], items[4]

Expand Down
Loading