Skip to content

Commit 9aca82a

Browse files
author
Michael Buchar
committed
feat(helm): add quota period Helm support (#TBD)
1 parent 5bb9b8d commit 9aca82a

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
@@ -205,6 +205,9 @@ collisions.
205205
| `quota.workflow_termination_update_policy` | Resources to calculate quotas on worflow termination. Possible values: "cpu" and "disk". Leave it empty to deactivate workflow termination accounting. | "" |
206206
| `quota.default_disk_limit` | Default users disk quota limit in bytes. (0=unlimited) | 0 |
207207
| `quota.default_cpu_limit` | Default users CPU quota limit in milliseconds. (0=unlimited) | 0 |
208+
| `quota.cpu_periodic_reset.enabled` | Enable deployment default periodic CPU quota for newly created users. | false |
209+
| `quota.cpu_periodic_reset.period_months` | Length of the CPU accounting window in months. | 3 |
210+
| `quota.cpu_periodic_reset.anchor_at` | Anchor datetime used to derive the active CPU accounting window. | `""` |
208211
| `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 |
209212
| `workspaces.retention_rules.cronjob_schedule` | Cron format string describing how often pending retention rules should be applied. | `"0 2 * * *"` |
210213
| `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 | quote }}
9898
- name: REANA_DEFAULT_QUOTA_DISK_LIMIT
9999
value: {{ .Values.quota.default_disk_limit | default 0 | 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
@@ -251,9 +251,15 @@ pgbouncer:
251251
# Quota
252252
quota:
253253
enabled: true
254+
default_disk_limit: 0
255+
default_cpu_limit: 0
254256
periodic_update_policy: "{{ .Values.quota.disk_update }}"
255257
workflow_termination_update_policy:
256258
"{{ .Values.quota.termination_update_policy }}"
259+
cpu_periodic_reset:
260+
enabled: false
261+
period_months: 3
262+
anchor_at: ""
257263
# backward compatibility
258264
disk_update: "0 3 * * *" # everyday at 3am
259265
termination_update_policy: ""

0 commit comments

Comments
 (0)