Commit Graph

51 Commits

Author SHA1 Message Date
OdooSky v3
7b3a0cde5d fix(chart/backups): normalize S3 endpoint scheme — close CN parity Bug #4 (Slice 12.4)
awscli --endpoint-url rejects bare hostnames ("scheme is missing").
Tower's migrate path emitted bare s3-cn-gd.ufileos.com for CN
tenants, which booted every scheduled backup pod into Error within
seconds. Chart-side fix: prepend https:// when missing, resilient
to either shape. Bumped 0.1.12 -> 0.1.13.

Render-tested both shapes:
  endpoint: s3-cn-gd.ufileos.com    -> "https://s3-cn-gd.ufileos.com"
  endpoint: https://s3.amazonaws.com -> "https://s3.amazonaws.com"
2026-05-27 22:52:55 +02:00
Tower Deploy
2ae8f5343e feat(chart): backup CronJob keys S3 off instance.id (code fallback) 2026-05-15 07:37:16 +02:00
OdooSky v3
ec63eca5ba 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
2026-05-13 21:42:33 +02:00
OdooSky v3
8f3cf36711 fix(shim): ship hoot-dom lib files explicitly for empty Odoo 19 2026-05-13 09:46:21 +02:00
OdooSky v3
7132d527a3 fix(odoo): add --proxy-mode to args (Mixed-Content fix; chart 0.1.9) 2026-05-13 05:52:31 +02:00
OdooSky v3
4a8dc61a92 feat(chart): rip out pg dual-mode shim — ESO-only (0.1.8)
A-Chunk 3 finalisation. All live instances are migrated to ESO,
and Tower 0.77.2 makes the migrate + template-deploy paths also
emit ESO-shape overlays (wizard always has). The
`{{- if not .Values.postgres.passwordVaultPath }}` shim in
postgres-secret.yaml has zero remaining production callers.

Changes:
  - DELETE templates/postgres-secret.yaml (dual-mode legacy path)
  - DELETE _helpers.tpl `instance.pgPassword` (only consumed by
    postgres-secret.yaml; no other callers)
  - UNWRAP templates/postgres-password-externalsecret.yaml — the
    outer `{{- if .Values.postgres.passwordVaultPath }}` conditional
    is removed; the template now renders unconditionally and the
    chart's `required` directive on tenant.id is the new boundary
    (chart render fails loud if Tower forgot to populate it)
  - SIMPLIFY values.yaml — drop the legacy `postgres.password` field
    and the dual-mode documentation. `passwordVaultPath` stays as an
    operator-visible advisory string but the chart hardcodes the
    path shape from tenant.id + instance.code

Chart 0.1.7 → 0.1.8. helm template + helm lint verified locally;
helm template with tenant.id missing fails loud with a clear
error pointing the operator at the chart line + the source of the
missing value.

The live instances (erp/erp18v3/v19) carry tenant.id + passwordVaultPath
in their overlays already; this chart version produces the same
manifests for them on next ArgoCD reconcile — no observable change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 13:56:40 +03:00
OdooSky v3
96071aec8e feat(chart): pg password via ExternalSecret/OpenBao (A-Chunk 1)
Per-instance Postgres password sourced from OpenBao via External
Secrets Operator. Dual-mode for the migration window:

  - postgres.passwordVaultPath unset → legacy postgres-secret.yaml
    renders with .Values.postgres.password (helm lookup + random
    fallback, bit-exact existing behaviour for live instances).
  - postgres.passwordVaultPath set → postgres-password-externalsecret.yaml
    renders an ExternalSecret that produces the same <release>-pg
    Secret (POSTGRES_USER/PASSWORD/DB) from OpenBao path
    `tenants/<tenant.id>/instances/<instance.code>/pg`.

Exactly one of the two templates ships per instance (mutually
exclusive `if`s on .Values.postgres.passwordVaultPath). The Postgres
StatefulSet envFroms <release>-pg unchanged.

OpenBao policy already grants the per-cluster ESO read on
`v3/data/tenants/<tenantID>/*` (buildEsoPolicy in tower's
openbao_auth_setup.go) — the new instances/<code>/pg subpath is
covered. No policy change required.

A `required` directive on the ExternalSecret asserts tenant.id is
present when passwordVaultPath is set — fails loud at helm template
time if Tower forgot to populate it.

deletionPolicy: Retain on the ExternalSecret. Postgres PGDATA on
disk hashes to the password in the Secret; an accidental ESO
removal must not cascade into the Secret disappearing.

Chart 0.1.6 → 0.1.7. Verified locally: helm template both modes,
helm lint clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 12:56:54 +03:00
OdooSky v3
d7c1b2f895 fix(shim-version-parse): anchor awk regex on literal version key (H2) 2026-05-09 15:34:39 +02:00
OdooSky v3
961f31998e fix(hoot-dom): derive shim version from odoo tag for Odoo 19 compat 2026-05-09 01:19:45 +02:00
OdooSky v3
55d069cd4d fix(hoot-dom): static/src alias file approach 2026-05-08 23:44:15 +02:00
OdooSky v3
9999899c3d fix(hoot-dom): include hoot module loader + version-aware shim upgrade 2026-05-08 23:35:26 +02:00
OdooSky v3
44a6972b44 fix(hoot-dom): platform shim addon to inject hoot-dom into web.assets_backend 2026-05-08 23:26:52 +02:00
OdooSky v3
96785158e7 fix(readiness): bump Odoo readinessProbe failureThreshold 2 -> 15
Heavy addon installs (e.g. ks_dashboard_ninja) blocked /web/login
probes for >10s, causing K8s to pull the Pod from Endpoints; Traefik
then 503d the operator addon-apply RPC. failureThreshold: 15 (~75s
of headroom) covers the install window without affecting true
pod-restart detection (initialDelay gates boot).

Chart 0.1.0 -> 0.1.1.
2026-05-08 22:04:07 +02:00
OdooSky v3
965a650b10 feat(chart): pin 19.0 / 17.0 / 16.0 in pinnedTags map 2026-05-06 13:55:58 +02:00
OdooSky v3
09c21d5e55 feat(chart): filestore-chown initContainer — self-heal for UID drift on every pod boot 2026-05-06 13:29:17 +02:00
OdooSky v3
93473919ae feat(platform): pinnedTags map — chart resolves major to exact nightly 2026-05-06 13:11:47 +02:00
OdooSky v3
3eaa6381db feat(platform): pin Odoo + postgres to mirror — fix rolling-tag regression 2026-05-06 11:57:49 +02:00
OdooSky v3
6425526314 feat(chart): air-gap-friendly Odoo + Postgres image refs (B.10) 2026-05-05 17:59:17 +02:00
OdooSky v3
8ab695b93d fix(ingress): gate tenants-default-retry middleware on values flag (B.11) 2026-05-05 17:53:06 +02:00
OdooSky v3
aca1e67fd9 feat(instance): IngressRoute uses tenants-default-retry + tighter readiness probe 2026-05-05 12:13:16 +02:00
OdooSky v3
5fc75edafb revert(ingress): drop per-instance redirect IngressRoute (now handled at cluster Traefik entrypoint) 2026-05-05 12:06:15 +02:00
OdooSky v3
53ffb5a041 fix(ingress): add HTTP→HTTPS redirect IngressRoute so bare-hostname http:// stops 404ing 2026-05-05 12:01:16 +02:00
OdooSky Bot
f6cf121966 db-init: rename cloned source database to target's instance code (#347 fast-path correctness) 2026-05-02 22:37:23 +03:00
OdooSky Bot
52c91c6833 fix: fsGroup=101 on Odoo pod (Longhorn PVCs come up root-owned, Odoo crashes on first session write) 2026-05-02 22:30:35 +03:00
OdooSky Bot
f3ab459459 Phase 3b: PVC dataSource + storageClassName plumbing (#347) 2026-05-02 22:06:03 +03:00
OdooSky Bot
51b6735abc skip odoo-builtin rows in addon initContainer loop (regression from #344) 2026-05-02 22:05:06 +03:00
Tower deploy
0cda7072eb feat: per-host Let's Encrypt cert for instances outside tenant wildcard zone 2026-05-02 11:10:49 +03:00
4a4efcabb8 db-init: comment cleanup 2026-04-28 14:00:36 +00:00
aaf027b15f db-init: init BASE_INSTALLED= for set -u safety 2026-04-28 13:52:55 +00:00
32d114e46a odoo-deployment: db-init skips --init when base already installed (fix migrate FK clash) 2026-04-28 13:29:40 +00:00
6168b86c2a backup-cronjob: rotation must not touch checkpoints/exports subdirs (use --delimiter / + strict regex) 2026-04-28 10:58:54 +00:00
760ee75877 backup-cronjob: PGDATABASE = release name (system POSTGRES_DB was empty) 2026-04-28 10:50:01 +00:00
213170e5ce backup: skip ./sessions in nightly tar (matches reshape checkpoint) 2026-04-27 20:35:47 +00:00
659dd8c1fa chart: database PVC reads via instance.storage helper 2026-04-27 17:16:56 +00:00
b4d4543657 chart: filestore PVC reads via instance.storage helper 2026-04-27 17:16:54 +00:00
caa58738b7 chart: instance.storage helper resolves override > tier > default 2026-04-27 17:16:51 +00:00
00c9be8fdf chart: sizes table now includes per-tier PVC defaults (filestore + database) 2026-04-27 17:16:48 +00:00
043be6ff47 chart: realistic sizes table (tiny=sandbox, small=recommended minimum) 2026-04-27 14:58:51 +00:00
88d855d92e chart: PVC whenDeleted=Delete (no more leaked pgdata on instance delete) 2026-04-27 12:39:09 +00:00
f46e453ed0 chart: db-init initContainer (auto-create tenant DB + base init) + pin -d <code> 2026-04-27 11:55:36 +00:00
Tower Deploy
32869f74e8 Addon init containers: imagePullPolicy=Always so rebuilt images under same tag are picked up 2026-04-27 12:38:10 +03:00
Tower Deploy
9546a243f7 Odoo deployment: PYTHONPATH=/mnt/extra-addons/.python-deps so baked-in addon python deps are importable 2026-04-27 12:30:42 +03:00
Tower Deploy
bad53c4636 Addon initContainer materialization: per-addon image runs as initContainer + copies content into shared emptyDir mounted at /mnt/extra-addons 2026-04-27 00:59:51 +03:00
Tower Deploy
9dace864d8 Backup CronJob: also archive filestore (/var/lib/odoo) to S3 alongside the SQL dump
Pairs each <TS>.sql.gz with a <TS>.filestore.tar.gz under the same prefix; rotation prunes both together. Backup pod runs on the same node as Odoo (podAffinity) and mounts the filestore PVC read-only — RWO permits multiple pods on the same node, so this is safe.

Restore (Tower-side) reads the companion key from S3, scales Odoo to 0, restores DB + filestore, and scales Odoo back up.
2026-04-26 23:33:30 +03:00
git_admin
94fe1bf18b Backups: pipefail on pipeline so pg_dump errors propagate 2026-04-26 21:31:13 +03:00
git_admin
5af1f3a042 Backups: switch to postgres:alpine + apk add aws-cli (Bitnami images gated) 2026-04-26 21:29:37 +03:00
git_admin
3a63da9609 Backups: pg_dump → S3 (MEGA S4); drop local PVC 2026-04-26 21:17:34 +03:00
git_admin
24f879db01 Add daily backups (CronJob + dedicated PVC, 7-day retention) 2026-04-26 21:01:17 +03:00
git_admin
97666c4e2f Add named sizes table (tiny/small/medium/large) 2026-04-26 20:04:39 +03:00
git_admin
a915b31588 Initial chart import from local infrastructure/ 2026-04-26 17:46:59 +03:00