Align sylva-units HelmRelease deletion timeout with delete hook job...
What does this MR do and why?
Align sylva-units HelmRelease deletion timeout with delete hook job ActiveDeadline in the sylva-unit operator
- No modification of CRD. The timeouts are internal settings
- Bump some modules to fix sec vulns
- Add an example in the usual samples folder
- Rely on spec:uninstall:timeout
- Different values given CAPI provider
Related reference(s)
Close #16 (closed)
Test coverage
See comments
Explanations
Code status
In the Sylva code, there are several places where timeouts are defined:
- charts/sylva-units/values.yaml
- cluster:timeouts:cluster_delete_hook_job_timeout: 300
- helmrelease_spec:uninstall:timeout: {{ mul .Values.cluster.timeouts.cluster_delete_hook_job_timeout 1.2 }}s
- environment-values/workload-clusters/base/patch-helm-release.yaml
- spec:timeout: 80m
- spec:install:timeout: 5m
- spec:upgrade:timeout: 5m
- delete_hook.yaml
- activeDeadlineSeconds: {{ $delete_hook.job_timeout | default 1800 }}
- charts/sylva-units/workload-cluster/workload-cluster.values.yaml
- delete_hook:job_timeout: {{ .Values.cluster.capi_providers.infra_provider | eq "capm3" | ternary 3600 1200 | include "preserve-type" }}
Current combination
AFAI understand
| Fields | Workload cluster / Capm3 case | Workload cluster / other case | Other clusters |
|---|---|---|---|
| values.yaml cluster.timeouts:cluster_delete_hook_job_timeout | 300s | 300s | 300s |
| values.yaml helmrelease:spec:uninstall:timeout | 360s | 360s | 360s |
| patch-helm-release.yaml spec:install:timeout | 5m | 5m | not set --> equal to the helmrelease spec timeout |
| patch-helm-release.yaml spec:upgrade:timeout | 5m | 5m | not set --> equal to the helmrelease spec timeout |
| patch-helm-release.yaml spec:timeout | 80m | 80m | not set --> equal to the helmrelease default (5m) |
| workload-cluster.values.yaml delete_hook:job_timeout | 60m | 20m | N.A. |
| delete_hook.yaml activeDeadlineSeconds | 60m | 20m | 1800s |
Proposal
| Fields | Workload cluster / Capm3 case | Workload cluster / other case | Other clusters |
|---|---|---|---|
| helmrelease spec:uninstall:timeout | 80m | 25m | |
| helmrelease spec:install:timeout | 5m | 5m | |
| helmrelease spec:upgrade:timeout | 5m | 5m | |
| helmrelease spec:timeout | 5m | 5m |
Further issues
- Create an issue in sylva-core to use uninstall:timeout instead of timeout in environment-values/workload-clusters/base/patch-helm-release.yaml
- Create an issue to align cluster.timeouts:cluster_delete_hook_job_timeout for workload cluster
Edited by vladimir braquet