Skip to content

Commit f9078b0

Browse files
author
Michael Buchar
committed
feat(helm): add quota period Helm support (reanahub#931)
1 parent 301fc2a commit f9078b0

3 files changed

Lines changed: 15 additions & 0 deletions

File tree

helm/reana/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,9 @@ collisions.
290290
| `quota.workflow_termination_update_policy` | Resources to calculate quotas on workflow termination. Possible values: "cpu" and "disk". Leave it empty to deactivate workflow termination accounting. | "" |
291291
| `quota.default_disk_limit` | Default users disk quota limit in bytes. (0=unlimited) | 0 |
292292
| `quota.default_cpu_limit` | Default users CPU quota limit in milliseconds. (0=unlimited) | 0 |
293+
| `quota.cpu_periodic_reset.enabled` | Enable deployment default periodic CPU quota for newly created users. | false |
294+
| `quota.cpu_periodic_reset.period_months` | Length of the CPU accounting window in months. | 3 |
295+
| `quota.cpu_periodic_reset.anchor_at` | Anchor datetime used to derive the active CPU accounting window. | `""` |
293296
| `workspaces.retention_rules.maximum_period` | Set a default period in days for workspace retention rules. Users will not be able to specify a longer period to retain the workspace files. After this period the workspace will be cleared. To disable the period and allow files to be kept forever, use value "forever". | forever |
294297
| `workspaces.retention_rules.cronjob_schedule` | Cron format string describing how often pending retention rules should be applied. | `"0 2 * * *"` |
295298
| `workspaces.paths` | List of additional workspace paths as strings. Each mount string is composed by a key `hostPath`(path to the directory to be mounted from the Kubernetes nodes) and a cluster_pod_mountpath (path inside the cluster containers where the `mountPath` will be mounted) e.g. `hostPath:mountPath`. The first value listed will be the default workspace root path. Any POSIX filesystem mounted on cluster nodes is supported | None |

helm/reana/templates/reana-server.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@ spec:
9797
value: {{ .Values.quota.default_cpu_limit | default 0 | int64 | quote }}
9898
- name: REANA_DEFAULT_QUOTA_DISK_LIMIT
9999
value: {{ .Values.quota.default_disk_limit | default 0 | int64 | quote }}
100+
- name: REANA_DEFAULT_QUOTA_CPU_PERIODIC_RESET_ENABLED
101+
value: {{ .Values.quota.cpu_periodic_reset.enabled | default false | quote }}
102+
- name: REANA_DEFAULT_QUOTA_CPU_PERIODIC_RESET_MONTHS
103+
value: {{ .Values.quota.cpu_periodic_reset.period_months | default 3 | quote }}
104+
- name: REANA_DEFAULT_QUOTA_CPU_PERIODIC_RESET_ANCHOR_AT
105+
value: {{ .Values.quota.cpu_periodic_reset.anchor_at | default "" | quote }}
100106
{{- if .Values.kubernetes_jobs_max_user_cpu_request }}
101107
- name: REANA_KUBERNETES_JOBS_MAX_USER_CPU_REQUEST
102108
value: {{ .Values.kubernetes_jobs_max_user_cpu_request | quote }}

helm/reana/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,9 +252,15 @@ pgbouncer:
252252
# Quota
253253
quota:
254254
enabled: true
255+
default_disk_limit: 0
256+
default_cpu_limit: 0
255257
periodic_update_policy: "{{ .Values.quota.disk_update }}"
256258
workflow_termination_update_policy:
257259
"{{ .Values.quota.termination_update_policy }}"
260+
cpu_periodic_reset:
261+
enabled: false
262+
period_months: 3
263+
anchor_at: ""
258264
# backward compatibility
259265
disk_update: "0 3 * * *" # everyday at 3am
260266
termination_update_policy: ""

0 commit comments

Comments
 (0)