feat(chart): expose Odoo runtime knobs (B-1) — version 0.1.11

- Adds odoo.{workers,limitTime*,limitMemory*,maxCronThreads,serverWideModules,dbFilter,extraArgs} knobs
- New instance.odooArgs helper renders flags only when set
- Empty odoo block byte-identical to previous chart output
This commit is contained in:
OdooSky v3
2026-05-13 21:42:33 +02:00
parent 8f3cf36711
commit ec63eca5ba
4 changed files with 84 additions and 18 deletions

View File

@@ -69,6 +69,59 @@ shouldn't blow up the rendered chart).
{{- toYaml (index $cfg .role) -}}
{{- end -}}
{{/*
Args list for the Odoo container.
Hard baseline (-d / --db-filter / --addons-path / --proxy-mode)
encodes invariants the v3 deployment relies on (Traefik termination,
single-DB mode); operators cannot drop these.
Runtime knobs come from .Values.odoo.* and only render when set
null leaves Odoo's internal default in place. Overlays without the
extended odoo block render byte-identical to the pre-runtime-knob
chart, so B-1 doesn't disturb any live instance.
Schema: see values.yaml `odoo:` block + docs/PLAN_INSTANCE_CONFIG_AND_DBTOOLS.md.
*/}}
{{- define "instance.odooArgs" -}}
- "-d"
- {{ .Values.instance.code | quote }}
{{- if .Values.odoo.dbFilter }}
- {{ printf "--db-filter=%s" .Values.odoo.dbFilter | quote }}
{{- else }}
- {{ printf "--db-filter=^%s$" .Values.instance.code | quote }}
{{- end }}
- {{ printf "--addons-path=/usr/lib/python3/dist-packages/odoo/addons,%s" .Values.addonsMountPath | quote }}
- "--proxy-mode"
{{- with .Values.odoo.workers }}
- {{ printf "--workers=%d" (int64 .) | quote }}
{{- end }}
{{- with .Values.odoo.maxCronThreads }}
- {{ printf "--max-cron-threads=%d" (int64 .) | quote }}
{{- end }}
{{- with .Values.odoo.limitTimeCpu }}
- {{ printf "--limit-time-cpu=%d" (int64 .) | quote }}
{{- end }}
{{- with .Values.odoo.limitTimeReal }}
- {{ printf "--limit-time-real=%d" (int64 .) | quote }}
{{- end }}
{{- with .Values.odoo.limitTimeRealCron }}
- {{ printf "--limit-time-real-cron=%d" (int64 .) | quote }}
{{- end }}
{{- with .Values.odoo.limitMemorySoft }}
- {{ printf "--limit-memory-soft=%d" (int64 .) | quote }}
{{- end }}
{{- with .Values.odoo.limitMemoryHard }}
- {{ printf "--limit-memory-hard=%d" (int64 .) | quote }}
{{- end }}
{{- with .Values.odoo.serverWideModules }}
- {{ printf "--load=%s" (join "," .) | quote }}
{{- end }}
{{- range .Values.odoo.extraArgs }}
- {{ . | quote }}
{{- end }}
{{- end -}}
{{/*
Storage size for a given layer (`filestore` | `database`). Resolution
order, most-specific first: