Skip to content

Lago v2 global - #190

Closed
IxDay wants to merge 86 commits into
mainfrom
lago-v2-global
Closed

Lago v2 global#190
IxDay wants to merge 86 commits into
mainfrom
lago-v2-global

Conversation

@IxDay

@IxDay IxDay commented Feb 2, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

IxDay added 2 commits February 6, 2026 22:25
Refactor Taskfile to use a map structure for charts with their types
(deployment, cronjob, or empty for umbrella/config charts). Add shared
test pattern files in tests-common/ that validate extraEnv, extraEnvFrom,
and resources configurations. Enable parallel test execution with
chart-specific dependencies.

- Add extraEnv and extraEnvFrom support to lago-data-worker,
  lago-data-forecasted-usage, and lago-mcp-server templates
- Create test fixtures with required values for each chart
- Implement test:unit:* wildcard task for individual chart testing
Add conditional environment variables for WEB_CONCURRENCY,
RAILS_MAX_THREADS, and RAILS_MIN_THREADS in the deployment template
so they are only set when explicitly configured. Remove the hardcoded
default of 4 for concurrency in values.yaml, allowing Puma to use its
own defaults when no value is provided.
Bundles a Gotenberg deployment (HTML-to-PDF service) with an optional
lago-rails worker subchart for PDF generation jobs. The worker can be
disabled via worker.enabled to deploy only Gotenberg.
When the release name is a prefix of the nameOverride (e.g. release
"lago" with nameOverride "lago-pdf-worker"), the standard Helm contains
check fails because the override is longer than the release name. This
caused duplicated prefixes like "lago-pdf-lago-pdf-worker".

Add an `else if contains .Release.Name $name` branch so that when the
release name is already embedded in the computed name, use the name
directly instead of concatenating again.

Also updates lago-pdf config nameOverride to lago-pdf-config, reworks
the gotenberg fullname helper to build on lago-pdf.fullname, adds
fullname unit tests for lago-pdf, and adds lago-pdf to the Taskfile.
Breaking change in fullname helpers (reverse contains logic) affects
resource naming for existing deployments, warranting a minor version
bump across all charts.
Ensures configs are pushed before components and components before
umbrella charts, preventing dependency resolution failures during
OCI publishing.
Remove the separate gotenberg.fullname helper in favor of the standard
lago-pdf.fullname, reducing unnecessary naming indirection. Switch the
Gotenberg image from upstream gotenberg/gotenberg to getlago/lago-gotenberg
and add default args to disable health check logging. Update all Chart.lock
files to reflect the 0.2.0 dependency versions.
…nit tests

Add a `configmap.create` flag to both lago-config and lago-data-config charts,
allowing users to skip ConfigMap creation when using an externally managed
ConfigMap. This mirrors the existing `secret.create` pattern already present
in both charts.

Improve values.yaml comments to clearly describe the toggle behavior and
document the name resolution fallback paths for each chart.

Add helm-unittest coverage for lago-data-config (previously had none):
- configmap: create toggle, name resolution, and priority tests
- secret: create toggle, name resolution, and priority tests

Extend lago-config configmap tests with create toggle assertions.
…rkers

Convert all extraEnv fields from list format to deep-mergeable map format
across every chart. Update all templates to iterate over map entries
instead of using `with`. Add consistent commented examples (simple value,
secretKeyRef, configMapKeyRef) to every extraEnv entry in values.yaml.

Restructure sidekiq configuration from flat `sidekiqPro` flag to a
`sidekiq.pro` and `sidekiq.queues` structure, enabling dedicated worker
deployments per queue (analytics, billing, clock, events, webhook, pdf).
Add corresponding subchart dependencies and values for each worker.

Bump appVersion to v1.41.3 across lago-rails, lago-front, and
lago-events-processor-worker. Fix lago-pdf config dependency condition
from `worker.enabled` to `config.enabled`. Add global.lago.version field.
Move sidekiqPro from global.lago into a dedicated global.sidekiq section
with per-queue toggles (analytics, billing, clock, events, webhook, pdf)
to support independent sidekiq queue worker deployments.

- Bump appVersion to v1.41.0 across lago-rails, lago-front, and
  lago-events-processor-worker charts
- Add appVersion to umbrella lago chart
- Fix front image repository from getlago/app to getlago/front
- Switch postgres image to getlago/postgres-partman:15.0-alpine
- Add lago.configMapName and lago.secretName helper templates in the
  umbrella chart and use them consistently in migrate-job
- Fix example DNS names to include default namespace
- Add basic_workers.yaml example demonstrating sidekiq queue workers
- Regenerate Chart.lock files
Add missing CI files for the lago chart e2e test:
- postgres.yml and redis.yml manifests for kind cluster infrastructure
- e2e-values.yaml with required config for chart-testing install

Scope ct install to specific charts in Taskfile, chart-testing-lago,
and chart-testing-lago-mcp-server workflows to prevent sub-charts
from being installed independently without their infrastructure.

Expand chart-testing-lago.yml path triggers to include sub-chart
dependencies (lago-config, lago-rails, lago-front, etc.) so the
e2e test runs when any dependency changes.

Fix redis key names in lago values.yaml (url -> uri) to match
what lago-config templates actually reference.
IxDay added 15 commits February 16, 2026 21:18
Add missing global keys to the lago umbrella values.yaml:
- global.lago.version
- global.nango.publicKey and global.nango.secretKey
- global.s3.region default to "us-east-1"

Rename redis global keys from `url` to `uri` in lago-rails, lago-pdf,
and lago-events-processor-worker to match what lago-config templates
actually reference.
The gotenberg deployment uses the chart-level lago-pdf.fullname helper
directly (resolving to lago-pdf), not a gotenberg-suffixed variant.
Update test expectations and override keys accordingly.
- Disable check-version-increment in ct.yaml (v2 rewrite uses 0.2.0
  which is lower than the old 1.27.1 on main)
- Fix yamllint comment spacing (2 spaces before inline comments)
  across lago-config, lago-rails, lago-pdf, lago-data, lago-data-worker,
  lago-data-forecasted-usage, and lago umbrella values.yaml
- Fix bracket spacing in lago-data-forecasted-usage
- Create missing lago-staging/values.yaml
- Add global.dbtPipeline and global.databaseReplica defaults to
  lago-data-config and lago-data-worker to prevent nil pointer on
  template rendering
- Add config.api.url default to lago-data-worker
Add two companion overlays for basic_workers.yaml:

- basic_workers_resources.yaml: production resource requests/limits and
  HPA autoscaling with minReplicas: 1 for all components. Uses no CPU
  limits (avoids throttling) and memory request = limit (guaranteed QoS).

- basic_workers_scaled.yaml: minReplicas overrides matching recommended
  production replica counts. Layers on top of the resources overlay.

Usage combinations:
  basic_workers.yaml alone = staging (no resources, no HPA)
  + resources overlay = production-like (resources + HPA starting at 1)
  + resources + scaled = full production (recommended min replicas)
Move ct.yaml, cr.yaml, chart_schema.yaml, and lintconf.yaml into a
dedicated tools/ directory to declutter the repo root. Update all
references in Taskfile.yaml and GitHub Actions workflows. Add
chart-yaml-schema and lint-conf paths to ct.yaml so ct can locate
its companion files, enabling local linting without the CI Docker image.
Add docs and docs:* Taskfile targets for generating chart README files
using helm-docs. The docs:* target allows generating docs for a single
chart (e.g. task docs:lago-rails), while docs generates for all charts.

Generate initial README.md for all 13 charts from their existing
Chart.yaml metadata and values.yaml comments.
Add `# --` description comments to every field in all 13 chart
values.yaml files for helm-docs generation. Covers global shared
values, subchart overrides, container/image/service config,
autoscaling, ingress, probes, and all data/streaming settings.

Regenerate all chart READMEs with the new descriptions.
- Add @section annotations to all values.yaml files across all 13 charts
  to group parameters into logical sections (Lago, Config, Database, etc.)
- Consolidate Scheduling, Volumes, Probes, Resources, and Environment
  sections into the Pod section for cleaner README organization
- Replace long inline JSON blobs for complex object defaults with
  @default links to specific lines in values.yaml (probes, httpRoute,
  ingress.hosts, config)
- Add @ignore to parent global: keys to prevent duplicate rendering of
  the entire global object as a JSON blob in "Other Values" section
- Regenerate all chart READMEs with helm-docs
Replace the old monolithic parameter tables with a streamlined README
that points to the lago umbrella chart as the main entry point. Link to
the example overlays (basic, basic_workers, resources, scaled) for
getting started, document the kind-based local dev workflow, and
reference each chart's auto-generated README for detailed values.
Bump chart version and dependency versions from 0.2.0 to 0.3.0 across
all 13 charts. Regenerate READMEs to reflect the new version badges.
Add mise.toml with pinned versions for helm, helm-docs, helm-unittest,
chart-testing, kind, kubectl, and yamllint. Replace `helm unittest` calls
in Taskfile with `untt`, the binary name installed by mise.
Add @default annotations to parent keys in lago and lago-data umbrella
charts so helm-docs renders "See child values" instead of serializing
the entire object tree as an inline JSON blob. Applies to 16 parent keys
in lago (api, worker, clock, pdf, migrate, etc.) and 6 in lago-data.
The lago-data-config subchart provides helper templates (configMapName,
secretName) that are always needed by the data-worker. With config.enabled
set to false, Helm skips loading the subchart entirely in CI (clean
checkout with no unpacked chart directory), causing template resolution
failures. Locally it worked because the gitignored unpacked subchart
directory persisted from previous builds.

Default to true for standalone deployments; the lago-data umbrella chart
already overrides this to false when providing config at the parent level.
Move Redis and Postgres manifests from standalone CI files into
extraObjects within e2e-values.yaml and basic.yaml. This eliminates
the need for separate kubectl apply steps before chart-testing,
letting helm hooks manage dependency ordering automatically.

- Delete charts/lago/ci/postgres.yml and redis.yml
- Remove kubectl apply steps from Taskfile e2e task
- Add pre-install helm hook annotations to all extraObjects
- Add liveness probes to Redis and Postgres containers
- Add oci:install Taskfile task for installing from GHCR
Helm does not wait for Deployment hooks to be ready before proceeding
to the next hook weight. This means the migrate job (weight -5) starts
before Redis/Postgres (weight -10) pods are actually accepting
connections.

Add initContainers support to the migrate job template and configure
wait-for-db and wait-for-redis init containers in all examples that
deploy postgres/redis via extraObjects. Also add busybox image to
kind image preloading.
@IxDay IxDay closed this Feb 17, 2026
@IxDay
IxDay deleted the lago-v2-global branch February 17, 2026 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant