Repository navigation
Closed
4 / 44 of 4 issues completedLabels
priority: mediumMedium prioritytype: deliveryRelated to packaging, deployment etc.type: featureNew feature or requestworkload: daysLikely takes days to resolve
Description
Why?
Most FOCA apps (cloud-registry, proWES, proTES, and others) are deployed on Kubernetes, and each one keeps its own Helm chart. These charts are largely copies of one another, and they drift apart: cloud-registry's chart, for example, still uses a Job with namespace admin rights to patch a ConfigMap at install time, which never applies some of its values (wrong YAML paths), races the app pods, and is reset by helm upgrade. Fixes and best practices (config overlays, secrets, probes, OpenShift compatibility) have to be redone in every repository.
FOCA already provides the building blocks that charts need, so one shared chart could implement them once:
- Config overlays:
FOCA_CONFIG_OVERLAYmerges deployment-specific YAML files on top of the config baked into the image (FOCA ≥ 0.14). - Secrets via environment variables:
MONGO_URI/MONGO_USERNAME/MONGO_PASSWORD,CELERY_BROKER_URL/CELERY_RESULT_BACKEND. - A non-root base image (UID 1000, GID 0) that runs under OpenShift's arbitrary UIDs.
How?
- Provide a Helm library chart (
type: library), e.g.foca-common, with named templates that app charts include, rather than a fully generic application chart. Apps keep a thin chart (their ownChart.yaml,values.yamland a few one-line templates such as{{ include "foca.deployment" . }}), so they can add app-specific resources (e.g. Celery workers) without forking. - Templates (each optional through values):
Deploymentfor the app: image, resources, non-rootsecurityContextcompatible with OpenShift, readiness and liveness probes on a configurable path.ConfigMapwithoverlay.yamlrendered from.Values.config(toYaml), mounted as a directory (nosubPath), referenced byFOCA_CONFIG_OVERLAY, and achecksum/configpod annotation so thathelm upgraderolls the pods when the config changes.- Secret wiring:
existingSecret-style values mapped toMONGO_URI(or username and password) and Celery URLs viasecretKeyRef. No secrets in ConfigMaps or values files. Service,Ingress(with optional cert-manager TLS) and OpenShiftRoute(rendered when the Route API exists and ingress is disabled).- Optional MongoDB (
Deployment+Service+PVC, pinned major version) for small deployments, with the option to point at an external database instead. - Optional Celery worker and broker for apps that use background jobs (proWES, proTES).
- Ship a
values.schema.jsonso that typos in values fail athelm install/helm lint. - Location and publishing: either a
charts/folder in this repo or a separateelixir-cloud-aai/helm-chartsrepo, published as an OCI artifact (e.g.oci://ghcr.io/elixir-cloud-aai/charts) or as a GitHub Pages chart repo via chart-releaser. Chart versions follow SemVer independently of FOCA, with the minimum supported FOCA version documented. - CI:
helm lint,helm templatesnapshot tests, and an install test on a kind cluster (e.g. with chart-testing) using the petstore example image. - Docs: a page in FOCA's docs on how to build an app chart on top of the library chart, extending the Kubernetes deployment guide.
- Migrate one app first (cloud-registry is the natural candidate, since its chart needs rework anyway), then the others.
Open questions
- Library chart (flexible, a little boilerplate per app) or one generic application chart (no per-app templates, less flexible)? The proposal above favors the library chart.
- Keep the chart in this repo (versioned next to FOCA) or in a separate charts repo (independent releases, one place for all ELIXIR Cloud charts)?
- Is a bundled MongoDB worth maintaining, or should the chart only support an external database?
Acceptance criteria
- The library chart is published and versioned, with CI (lint, template tests, kind install test).
- The petstore example deploys with a thin chart based on the library chart.
- Deployment-specific config is set only through Helm values (rendered into a
FOCA_CONFIG_OVERLAYfile), secrets only through Kubernetes Secrets, and changing either and runninghelm upgraderolls the pods. - Works on plain Kubernetes and on OpenShift.
- At least one production app (e.g. cloud-registry) uses it.
- Documented in FOCA's docs.
Sub-issues
Collapse Sub-issuesSub-issues
Loading 4 sub-issues
Metadata
Metadata
Assignees
Labels
priority: mediumMedium prioritytype: deliveryRelated to packaging, deployment etc.type: featureNew feature or requestworkload: daysLikely takes days to resolve
Activity
uniqueg commentedon Oct 21, 2026
Decisions on the open questions (2026-10-21):
type: library), apps keep thin charts.charts/, versioned independently withchart-v*tags, published as OCI tooci://ghcr.io/elixir-cloud-aai/charts.Split into sub-issues: #350 (core library chart, extracted from cloud-registry's chart v3), #351 (Celery worker and broker, with proTES), elixir-cloud-aai/cloud-registry#158 (cloud-registry uses the library chart).
uniqueg commentedon Oct 23, 2026
Done in #357, #381, #365 and elixir-cloud-aai/cloud-registry#176 (sub-issues #350, #351, #356 and elixir-cloud-aai/cloud-registry#158).