apache / apache/answer

Support exporting install configuration as environment variables for stateless deployments

Aperta
#1,559 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

good first issue
Lingua principale
Go
Stelle
15.7k
Fork
1.4k
Merge medio
3g 8h
PR unite (30g)
7

Descrizione

Is your feature request related to a problem? Please describe

Answer's installation flow generates /data/conf/config.yaml, and the Helm chart notes that persistence is required so config.yaml survives restarts. AUTO_INSTALL accepts environment variables for initial setup, but those variables are not used as the runtime configuration afterward.

This makes configuration-stateless container deployments difficult. A pod with a disposable filesystem cannot restart or scale from an already initialized external database using environment variables and secrets alone. Operators must persist or mount the generated config.yaml, or rerun the one-time installer, which is not appropriate once the database has already been initialized.

Describe the solution you'd like

Please allow the install flow to export the effective post-install configuration as a complete, documented set of environment variables, and allow normal Answer startup to consume those variables without requiring config.yaml.

Expected behavior could include:

  • An explicit install option or endpoint that exports the effective runtime configuration in a machine-readable environment-variable format, such as dotenv or shell output.
  • An environment-variable equivalent for every config.yaml value required at runtime, with documented precedence when both sources are present.
  • A fresh Answer instance can connect to an already initialized external database and start using only the exported environment variables, without a local config.yaml.
  • Secrets are never printed to ordinary logs; exporting secret-bearing values requires an explicit action and can be directed to a secret manager.
  • Existing config.yaml-based deployments remain backward compatible.

This would make Answer easier to run with immutable images, disposable pods, Kubernetes Secrets, and externally managed databases.

Describe alternatives you've considered

  • Persist /data/conf on a volume.
  • Generate and mount config.yaml from a ConfigMap or Secret.
  • Use an init container or entrypoint template to recreate config.yaml on every start.
  • Keep using AUTO_INSTALL, although it is a one-time initialization path and fails or becomes inappropriate after the database has already been initialized.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

La issue non indica file né test; inizia tracciando il flusso di installazione, la gestione di AUTO_INSTALL, il caricamento di config.yaml e la configurazione del chart Helm. Il lavoro sarà considerato completato quando la configurazione runtime potrà essere esportata e utilizzata tramite variabili d’ambiente documentate, sarà supportato un database esterno già inizializzato senza config.yaml, verrà mantenuta la compatibilità con le versioni precedenti e si eviterà di esporre i segreti nei log ordinari.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
go, helm, kubernetes
Ambito
backend, cloud, devops, infrastructure
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.