helm

system-facts-helm

Chart Contract

Helm chart for System Facts — the Lerian fact registry, with an optional internal-facts-worker workload.

Install

From the OCI registry:

helm upgrade --install system-facts \
  oci://ghcr.io/lerianstudio/system-facts-helm \
  --namespace system-facts --create-namespace \
  --values my-values.yaml

From a working copy of this repository:

helm dependency update ./charts/system-facts
helm upgrade --install system-facts ./charts/system-facts \
  --namespace system-facts --create-namespace \
  --values ./charts/system-facts/values-template.yaml

values-template.yaml is the starting point for an environment: it carries only the keys an install actually has to decide.

Access Manager

With authorization on (global.auth.enabled=true, which renders PLUGIN_AUTH_ENABLED=true), System Facts authorizes every call through the Access Manager. Authorization is required: with PLUGIN_AUTH_ENABLED=false and the default system-facts.env (production), the application refuses to boot. The chart does not install it and does not declare it as a dependency. It must already be running at global.auth.host, at a version that knows both applications.

Access Manager app What it adds
3.11.0 Catalogs the system-facts application, the target of every producer credential.
3.11.2 Catalogs the internal-facts-worker application, the source of the worker credential.
3.13.0 Issues single-tenant service credentials, the only credentials that hold catalog:reserved with app 1.1.0. Minimum for this chart.

Earlier versions do not catalog these applications. The Access Manager requires a credential’s source to be catalogued, so a worker credential cannot declare internal-facts-worker as its source before 3.11.2.

System Facts also refuses to boot with authorization on unless both M2M flags are the exact string true. Set them on the System Facts service, not on the callers:

global:
  auth:
    enabled: true
    host: "http://plugin-access-manager-auth:4000"

system-facts:
  extraEnvVars:
    - name: AUTH_M2M_INVERSION_ENABLED
      value: "true"
    - name: AUTH_M2M_PRODUCT_FORWARD_ENABLED
      value: "true"

1, TRUE and a leading space all count as off.

Database credentials

Passwords have no defaults. system-facts.secrets.POSTGRES_PASSWORD and global.externalPostgresDefinitions.boilerplateCredentials.password are two separate values that must be equal: the second is the password the bootstrap Job gives the role, the first is the one the service logs in with. The chart does not link them, so a mismatch creates the role with one password while the service starts with another.

When the bootstrap is enabled, the render fails unless the role password is set (boilerplateCredentials.password) or an existing Secret is named (boilerplateCredentials.useExistingSecret.name). An empty inline value causes rendering to fail.

To keep one source of truth, put both keys in one existing Secret and name it on both sides: system-facts.useExistingSecret: true with system-facts.existingSecretName (key POSTGRES_PASSWORD) for the service, and boilerplateCredentials.useExistingSecret.name (key DB_PASSWORD_BOILERPLATE) for the bootstrap:

global:
  externalPostgresDefinitions:
    enabled: true
    boilerplateCredentials:
      useExistingSecret:
        name: my-db-credentials     # key: DB_PASSWORD_BOILERPLATE

The bootstrap Job only ever runs against an external database: it creates the database, the role and the grants. Leave it disabled when the role already exists.

The Job sets the role password on creation only; it never rotates it. To rotate the password of an existing role:

  1. Change it in PostgreSQL as an administrator (ALTER ROLE "system-facts" PASSWORD '...').
  2. Set system-facts.secrets.POSTGRES_PASSWORD and DB_PASSWORD_BOILERPLATE (boilerplateCredentials) to that same value.
  3. Keep the bootstrap Job disabled.

Datastores

PostgreSQL and Valkey are declared as subcharts but disabled by default. Enable them for a self-contained install (chaos/fuzzing environments, local clusters):

postgresql:
  enabled: true
  external: false
valkey:
  enabled: true
  external: false

When enabled, hosts resolve to the subchart Services and the passwords are read straight from the subchart’s own Secret rather than copied into this chart’s — a copy would go stale the moment the subchart rotated it.

Global masks (global.*)

Every global.* mask below is env-wide: set it once per environment and every component that consumes it inherits the value, with a native system-facts.configmap.<KEY> always overriding it, and this component’s own productized param (system-facts.<field>) as the last fallback before the hardcoded default — so an install that sets none of this renders unchanged.

global:
  cloud: "aws"   # aws | gcp | azure — topology preset (PostgreSQL SSL mode); leave unset for the bundled dev topology
  datastores:
    postgres: { host: "my-rds.example.com", user: "system-facts" }
    redis: { host: "my-elasticache.example.com:6379" }
  observability: { enabled: true, otlpEndpoint: "otel-collector:4317" }
  auth: { host: "http://plugin-access-manager-auth:4000" }
  idp: { host: "http://plugin-access-manager-identity:4001" }
  multiTenant: { url: "http://tenant-manager:8080", redisHost: "my-elasticache.example.com" }
  streaming: { brokers: "redpanda:9092" }

Plaintext OTEL to the node-local collector (ALLOW_INSECURE_OTEL)

With system-facts.otel.enabled on, the pod ships telemetry to the collector on its own node at http://$(HOST_IP):4317, in plaintext. lib-observability refuses a plaintext exporter in production unless ALLOW_INSECURE_OTEL carries a reason, so the chart sets that variable on the container. The value resolves in this order:

  1. system-facts.configmap.ALLOW_INSECURE_OTEL
  2. global.observability.allowInsecureOtel, one value for the whole environment
  3. the default reason, node-local collector on the pod's own node

null counts as unset. An empty string is an explicit refusal, and the app then refuses the plaintext exporter in production. The ConfigMap carries the configmap value, or else the global one, so the setting also reaches the app when the node-local collector is off and you point at an explicit plaintext endpoint.

A key in system-facts.extraEnvVars or a non-empty system-facts.secrets.ALLOW_INSECURE_OTEL in the chart’s own Secret is the legacy route, and the chart then adds no entry of its own. The Secret counts only while nothing in the order above is set: a configmap, knob or global value, a refusal included, keeps the chart’s entry, which wins over the Secret. With useExistingSecret: true the chart cannot see the Secret, so the container entry overrides any ALLOW_INSECURE_OTEL held there; set system-facts.configmap.ALLOW_INSECURE_OTEL instead. This needs lerian-common-helm 2.7.0 or later, which the chart depends on.

Optional capabilities

Each is off by default, gated per-component; the connection/topology config for the enabled ones comes from the matching global.* mask above:

system-facts:
  multiTenant: {enabled: true}       # requires global.multiTenant.url and .redisHost (or configmap.MULTI_TENANT_*)
  streaming: {enabled: true}         # requires global.streaming.brokers
  otel: {enabled: true}              # also gates the OTLP podEnv (local-collector sidecar via HOST_IP); global.observability.enabled independently controls ENABLE_TELEMETRY/endpoint

aws.rolesAnywhere adds the IAM Roles Anywhere sidecar and the IMDS env for workloads outside EKS.

Schema migrations

migrations.enabled is false by default, and migrations.image.repository is never the application image: the Job refuses to render without a runner image.

Nothing else applies the root (control-plane) migration sequence. The service image is gcr.io/distroless/static-debian13 (ENTRYPOINT /service): it ships the SQL at /migrations but has no migrate binary and no shell. Without the Job the control-plane tables (fact_contracts, reference_types, outbox_events, systemplane_entries, namespace_bindings) are never created, and /v1/contracts and /v1/reference-types answer 500 (relation "fact_contracts" does not exist).

migrations:
  enabled: true
  image:
    tag: ""   # empty tracks the chart appVersion; the app release writes it to .migrations.image.tag

Health, probes and rollout

The chart pairs with app images that serve /health, /readyz and /metrics on the internal health port 8099 (HEALTH_PORT). The lerian-common health preset owns probes (startup and liveness on /health, readiness on /readyz, all on the named container port health), the drain and shutdown env, the grace period, the rollout strategy (maxUnavailable: 0) and the PodDisruptionBudget (maxUnavailable: 1, unhealthyPodEvictionPolicy: AlwaysAllow). The API runs 2 replicas (the autoscaler floors at 2). Port 8099 is a named ClusterIP Service port health only: no Ingress routes to it, and a LoadBalancer or NodePort Service drops it.

The only knobs are system-facts.health.drainSeconds (default 15) and shutdownSeconds (default 30); grace = drain + shutdown + 10. Setting livenessProbe, readinessProbe, startupProbe or terminationGracePeriodSeconds, or HEALTH_PORT / SHUTDOWN_* in configmap, fails the render. The chart also refuses an image.tag below 1.2.0-beta.4 (pre-releases of older lines included). Roll back chart and image together: an older image on this chart fails the render.

internal-facts-worker (optional)

worker.enabled=true adds a second workload next to the API: the system-facts-worker image, which consumes product events from RedPanda and delivers them to the System Facts API as facts. Off by default, so a chart bump alone changes nothing.

It renders a Deployment, ConfigMap, Secret and ServiceAccount, and no Service, Ingress, HPA, PDB, database, Redis or migrations: its only listener, the health port 8099 (/health, /readyz), is for the kubelet only. The worker pod carries its own app.kubernetes.io/name (<name>-worker), because the API Service, HPA and PDB select on the API’s name and would otherwise pick it up.

Value Env Notes
worker.systemFacts.url, .authUrl SYSTEM_FACTS_URL, SYSTEM_FACTS_AUTH_URL required
worker.streaming.brokers STREAMING_CONSUMER_BROKERS required. Consumer variables only: STREAMING_ENABLED / STREAMING_BROKERS do nothing for the worker
worker.streaming.saslMechanism, .saslUsername STREAMING_SASL_* password in worker.secrets.STREAMING_SASL_PASSWORD
worker.streaming.requireSecurity REQUIRE_BROKER_SECURITY default true: refuses to boot without TLS+SASL, and on a missing or ungranted topic
worker.secrets.SYSTEM_FACTS_CLIENT_ID/_SECRET same required. A service credential with source internal-facts-worker and target system-facts. Only a service credential holds catalog:reserved, which registers the reserved lerian prefix. A plain M2M Application gets 403 SF-0014 on that registration. In single-tenant mode the Access Manager issues it only after System Facts publishes its declaration (IDP_DECLARATION_ENABLED, see Permission declaration (RI))
worker.multiTenant.enabled, .env MULTI_TENANT_ENABLED, ENV_NAME env required when enabled
worker.products WORKER_PRODUCTS default []: every product. System Facts producer names midaz, plugin-br-pix-jd; plugin-br-pix-jd requires midaz. Rendered comma-joined in the given order
worker.systemFacts.allowInsecureHttp SYSTEM_FACTS_ALLOW_INSECURE_HTTP default false, always rendered. true admits plain http:// for url and authUrl; only inside a namespace whose pod-to-pod traffic is already encrypted (istio ambient). The worker logs a WARN at every boot

The consumer switch (STREAMING_CONSUMER_ENABLED=true) is always rendered. The chart refuses to render when:

The image tag tracks appVersion when worker.image.tag is empty; the app release writes .worker.image.tag. The chart refuses a tag below 1.2.0-beta.4, the first image that serves the health port.

Product selection and in-cluster http

worker.products selects which products this worker serves. A product left out has no topic checked by the broker preflight, no consumer subscription and no contract registered by this worker, so the worker identity needs no broker grant on that product’s topic. plugin-br-pix-jd requires midaz. A deployment that drops plugin-br-pix-jd from the worker must keep Pix JD’s own in-process System Facts emitter on, or Pix JD facts stop. An empty list keeps every product.

worker.systemFacts.allowInsecureHttp is for cluster-local URLs inside a namespace whose pod-to-pod traffic is already encrypted (for example istio.io/dataplane-mode: ambient) only. The worker logs it as a WARN at every boot, production included.

Both values need a worker image that carries the matching binary change. An older image ignores the unknown variables: it still refuses to boot on a plain http:// URL and still consumes every product.

Permission declaration (RI)

The API publishes its embedded permissions.yaml to the Access Manager at boot (lib-auth declaration.WireFromEnv). It is off by default; with the gate on, the app refuses to boot without the host and the client pair:

global:
  idp: { host: "http://plugin-access-manager-identity:4001" }

system-facts:
  configmap:
    IDP_DECLARATION_ENABLED: "true"
  secrets:
    IDP_M2M_CLIENT_ID: "<client-id>"
    IDP_M2M_CLIENT_SECRET: "<client-secret>"
Key Where Rendered
IDP_DECLARATION_ENABLED system-facts.configmap > system-facts.extraEnvVars entry (legacy) > global.idp.declarationEnabled ConfigMap, always, default "false"
IDP_HOST same precedence, with global.idp.host ConfigMap, only when non-empty
IDP_M2M_CLIENT_ID / IDP_M2M_CLIENT_SECRET system-facts.secrets Secret, each only when non-empty

Environment variables

Non-secret values live in the ConfigMap, credentials in the Secret. Any key the chart renders can be overridden natively through system-facts.configmap.<ENV_VAR_NAME>, which wins over the productized parameter. A key the chart does not render goes in system-facts.extraEnvVars.

A typo in your values is not an error

values.schema.json validates the top level strictly, but system-facts and global both set additionalProperties: true, and system-facts declares only configmap and secrets of its own. Everything else you put under them is accepted without being checked — including a key the chart does not read.

So system-facts.revisionHistoryLimits, where the chart reads system-facts.revisionHistoryLimit, installs cleanly, reports success, and leaves the Deployment on the default of 10. The same applies to a key this chart used to have and no longer does: an upgrade keeps the stale entry in your values and quietly falls back.

Nothing in helm install will tell you. Render the version you are actually installing and read the field back:

helm template system-facts \
  oci://ghcr.io/lerianstudio/system-facts-helm \
  --version <chart-version> \
  --values my-values.yaml \
  | grep -E 'revisionHistoryLimit|replicas:'

--version matters: without it Helm pulls the newest chart in the registry, which is not necessarily the one your release is on, and you would be reading back the wrong template.

Note that spec.replicas is emitted only when system-facts.autoscaling.enabled is false. It defaults to true, so on a default install the field is absent from the Deployment entirely and replica count is the HPA’s business — checking replicas: proves nothing unless you turned autoscaling off.

Environments managed through the Lerian GitOps repository are covered: the chart-update pipeline runs an orphan-key gate that fails the bump when an environment sets a key the chart no longer declares. This section is for installs outside it.

Upgrades

Per-version notes are generated under docs/ as releases ship.