feat(chart): backup CronJob keys S3 off instance.id (code fallback)

This commit is contained in:
Tower Deploy
2026-05-15 07:37:16 +02:00
parent ec63eca5ba
commit 2ae8f5343e
3 changed files with 15 additions and 2 deletions

View File

@@ -5,7 +5,7 @@ description: |
Variation between instances is expressed via values.yaml only. Variation between instances is expressed via values.yaml only.
No chart variants. No string-templating in Tower. No chart variants. No string-templating in Tower.
type: application type: application
version: 0.1.11 version: 0.1.12
appVersion: "1.0" appVersion: "1.0"
keywords: keywords:
- odoo - odoo

View File

@@ -108,8 +108,14 @@ spec:
value: {{ .Values.backups.s3.region | quote }} value: {{ .Values.backups.s3.region | quote }}
- name: S3_BUCKET - name: S3_BUCKET
value: {{ .Values.backups.s3.bucket | quote }} value: {{ .Values.backups.s3.bucket | quote }}
# S3_PREFIX -- the instance's durable identity. Prefer
# instance.id (`<code>-<shortid>`, unique per lifetime,
# written by Tower at create + backfill); fall back to
# the bare code for overlays not yet carrying an id
# (transition window). Once every overlay has an id the
# fallback is dead and can be dropped.
- name: S3_PREFIX - name: S3_PREFIX
value: {{ .Values.instance.code | quote }} value: {{ .Values.instance.id | default .Values.instance.code | quote }}
- name: RETAIN - name: RETAIN
value: {{ .Values.backups.retain | quote }} value: {{ .Values.backups.retain | quote }}
command: command:

View File

@@ -9,6 +9,13 @@ instance:
# Short slug used in K8s object names + as the Helm release name. # Short slug used in K8s object names + as the Helm release name.
# Must be DNS-safe (lowercase, no underscores, <= 40 chars). # Must be DNS-safe (lowercase, no underscores, <= 40 chars).
code: demo code: demo
# id -- durable instance identity, `<code>-<shortid>`. Written by
# Tower at create time (and backfilled onto existing instances).
# The backup CronJob uses it as the S3 key prefix so a deleted +
# recreated instance never inherits the previous one's snapshots.
# Empty in a bare `helm template` lint -- the CronJob falls back to
# `code` then.
id: ""
# The full HTTPS hostname this instance answers on. # The full HTTPS hostname this instance answers on.
# Tenants live under *.tenants.odoosky.org (covered by wildcard DNS A). # Tenants live under *.tenants.odoosky.org (covered by wildcard DNS A).
domain: demo.tenants.odoosky.org domain: demo.tenants.odoosky.org