Skip to content
Install Secrets

Install Secrets

Every credential and id an install reads is a Kubernetes Secret, named by a value and holding documented keys. This page lists them all. The same list is data in internal/install/secrets.go, and three things read it:

  • this table, regenerated by task chart:seams;
  • the umbrella chart’s ExternalSecrets (below);
  • the components’ start-up checks.

A component whose Secret or key is missing refuses to start, and names the seam:

brokerOIDC: Secret broker.oidc.existingSecret key web-client-id is missing or empty (docs/install-secrets.md)

The message names the Secret by its default name, or by the value that names it when there is no default.

The Secrets

The value is the key of the chart named after it. In the umbrella chart, prefix it with the subchart’s name (maku., maku-factory., maku-gateway.). The namespace is the release’s, or the runs’ (maku.runs.namespace).

IdRead byValue (chart)Default nameNamespaceKeysRead asOptional: what it holds
databaseBrokerroom-brokerbroker.database.brokerSecret (maku)rooms-broker-dsnreleaseuri (required), renamed by broker.database.secretKeyenvno. The broker’s DSN, as rooms_broker (ROOMS_DATABASE_URL)
databaseOwnerroom-broker (migrate)broker.database.ownerSecret (maku)rooms-owner-dsnreleaseuri (required), renamed by broker.database.secretKeyenvyes. The migrations’ DSN, as rooms_owner (ROOMS_MIGRATION_DATABASE_URL); without it nothing is migrated
databaseRetentionroom-broker-retentionbroker.database.retentionSecret (maku)rooms-retention-dsnreleaseuri (required), renamed by broker.database.secretKeyenvyes. The retention CronJob’s DSN, as rooms_retention; without it no CronJob renders
databaseCAroom-brokerbroker.database.caSecret (maku)nonereleaseca.crt (required)file /etc/room-broker/db-cayes. The database’s CA, for sslmode=verify-full&sslrootcert=/etc/room-broker/db-ca/ca.crt
databasePasswordsrooms-db (demo)(fixed) (agent-factory)rooms-db-passwordsreleasepostgres (required), rooms_owner (required), rooms_broker (required), rooms_retention (required)envno. The bundled Postgres’s passwords (postgres.enabled, the demo only)
brokerOIDCroom-brokerbroker.oidc.existingSecret (maku)nonereleaseweb-client-id (required), renamed by broker.oidc.keys.web, cli-client-id, renamed by broker.oidc.keys.cli, project-id, renamed by broker.oidc.keys.projectfile /etc/room-broker/oidcyes. The OIDC client ids (ids, not secrets): human.clientIDFile, roomctlClientIDFile, projectIDFile
githubLinkroom-brokerbroker.githubLink.existingSecret (maku)nonereleaseclient_id (required), renamed by broker.githubLink.keys.clientID, client_secret (required), renamed by broker.githubLink.keys.clientSecretfile /etc/room-broker/github-linkyes. The GitHub account link’s OAuth client (human.githubLink): the factory App’s, or an OAuth App’s. Its state is bound by a per-flow nonce, so no key material is stored
brokerTLSroom-brokerbroker.tls.secretName (maku)room-broker-tlsreleasetls.crt (required), tls.key (required)file /etc/room-broker/tlsno. The broker’s :8443 serving pair
brokerCArun-controllerbroker.tls.caSecretName (maku)room-broker-careleaseca.crt (required)apino. The CA of the broker’s pair, which the run-controller hands each run’s bridge
factoryCAroom-brokerbroker.factoryCA.secretName (maku)nonereleaseca.crt (required)file /etc/room-broker/factory-cayes. The CA of the factory’s API certificate (factoryCAFile); empty is the system roots
runModelrun podsrunController.modelSecret (maku)agent-modelrunsbase_url (required), model (required), api_key (required), judge_modelenvno. The runs’ model, in runController.model.mode secret
runGitrun podsrunController.gitSecret (maku)nonerunstoken (required)envyes. A laptop’s one PAT, which every role mounts (demo-only: demoValues). Unset, each run mounts its own token, which the factory mints
factoryAppagent-factoryapps.factory.existingSecret (maku-factory)agent-factory-githubreleaseapp_id (required), private_key (required)file /etc/agent-factory-githubno. The factory App
mergerAppagent-factoryapps.merger.existingSecret (maku-factory)agent-factory-mergerreleaseapp_id (required), private_key (required)file /etc/agent-factory-mergeryes. The merger App (apps.merger.mode separate)
agentsAppagent-factoryapps.agents.existingSecret (maku-factory)nonereleaseapp_id (required), private_key (required)file /etc/agent-factory-agentsyes. The agents App: each run’s token and the publisher’s
factoryOIDCagent-factoryoidcSecret (maku-factory)agent-factory-oidcrelease<client>file /etc/agent-factory-oidcno. The client ids the run API accepts human tokens from (ids, not secrets)
intakeagent-factoryintakeSecret (maku-factory)agent-factory-intakereleasetoken (required)file /etc/agent-factory-intakeyes. The RunLore intake’s bearer token (config.runlore.tokenFile)
factorySponsoredagent-factorysponsoredSecret (maku-factory)agent-factory-sponsoredrelease<name>-client-id, project-idfile /etc/agent-factory-sponsoredyes. The sponsored principals’ client ids
factoryBrokerCAagent-factorybrokerCASecret (maku-factory)openbao-careleaseca.crt (required)file /etc/agent-factory/openbao-cano. The CA of the broker’s pair (config.broker.caFile)
factoryAPITLSagent-factoryapi.tls.secretName (maku-factory)nonereleasetls.crt (required), tls.key (required)file /etc/agent-factory-api-tlsyes. The run API’s serving pair (api.tls), cert-manager’s when issuerRef is set
webProxyrooms-web-proxywebProxy.existingSecret (agent-factory)nonereleaseclient-id (required), renamed by webProxy.keys.clientID, client-secret (required), renamed by webProxy.keys.clientSecret, cookie-secret (required), renamed by webProxy.keys.cookieSecretenvyes. The web front door’s client and cookie secret (webProxy.enabled)
slackAppfactory-slack-appslackSecret (maku-slack)factory-slack-appreleasesigning-secret (required), bot-token (required), bot-user-id (required)file /etc/factory-slack-app/slackyes. The Slack App’s signing secret and bot (slack.enabled)
slackPrincipalfactory-slack-appprincipalSecret (maku-slack)factory-slack-principalreleaseclient-id (required), client-secret (required), project-idfile /etc/factory-slack-app/principalyes. The Slack App’s client credentials at the IdP: its sponsored principal
slackWebhookfactory-slack-app, room-brokerwebhookSecret (maku-slack)room-broker-webhook-slack-appreleasesigning-key (required)file /etc/factory-slack-app/webhookyes. The key the broker signs the App’s webhooks with; the broker mounts it too (maku.broker.webhooks[slack-app].existingSecret)
gatewayProvidermaku-gatewayproviders (maku-gateway)nonereleaseapiKey (required)apiyes. Each model provider’s key: providers.<name>.existingSecret; its ExternalSecret id is gatewayProvider.<name>

Some installs write a Secret for you:

  • the bundled Postgres (postgres.enabled, the demo) writes the three DSNs and its passwords;
  • the demo’s umbrella writes the broker’s TLS pair and both CAs (demoValues only: a production install brings them, by hand, through cert-manager’s issuerRef, or as ExternalSecrets);
  • the demo’s demo.model and demo.githubApp values write the runs’ model and the factory App;
  • the factory writes the runs’ git tokens.

Bring every other one yourself, by hand or with an ExternalSecret.

ExternalSecrets

The umbrella chart can render an External Secrets Operator (ESO 0.17 or later) ExternalSecret for each Secret you list. It never renders a SecretStore: name one you run already.

externalSecrets:
  enabled: true
  apiVersion: external-secrets.io/v1
  storeRef: {kind: ClusterSecretStore, name: platform-secrets}   # or kind: SecretStore
  refreshInterval: 1h
  secrets:
    <seam id>:                       # a row of the table above
      data: [{secretKey: <key>, remoteRef: {key: <path>, property: <field>}}]
      # or dataFrom: [{extract: {key: <path>}}]
      template: {...}                # optional: ESO's target.template, passed through
      refreshInterval: 24h           # optional: this one's own

Each ExternalSecret takes its seam’s resolved Secret name: the value that names it, else its default. The subcharts therefore read the same name as without ESO. The target has creationPolicy: Owner and deletionPolicy: Retain. A model provider of the gateway is listed as gatewayProvider.<name>, and its Secret is maku-gateway.providers.<name>.existingSecret.

With storeRef.kind: SecretStore, the store is namespaced. Every ExternalSecret reads from the store of that name in its own namespace. runModel, runGit and runGitRead live in the runs' namespace (maku.runs.namespace), so they need a SecretStore of the same name there too. A ClusterSecretStore serves both namespaces.

The render fails, naming the seam, in these cases:

  • enabled is set with no storeRef.name;
  • an id is not in the table;
  • the seam’s chart is off (maku-factory.enabled: false for a factory seam): nothing would read it;
  • two ids resolve to the same Secret;
  • an entry has neither data nor dataFrom;
  • a required key is produced by no data entry and by no template.data key. A dataFrom is trusted as it is: check its keys yourself;
  • the install already writes that Secret. One writer per Secret name: two writers of one Secret would fight over it. The writers are:
    • the umbrella, for the bundled Postgres’s (postgres.enabled), its TLS, and the demo’s demo.model (as agent-model, or as demo-model for gatewayProvider.demo) and demo.githubApp;
    • the factory, for the runs’ git tokens, while it writes them (maku-factory.runTokens.enabled, or the demo);
    • cert-manager, for the API’s pair, when maku-factory.api.tls.issuerRef.name is set.

Rotation

ESO refreshes a Secret every refreshInterval. What a component then sees depends on how it reads the Secret:

  • Files (the OIDC ids, the GitHub link’s client, the CAs, the Apps’ keys) are read at each use. The kubelet updates the mounted file within a minute or two, and no restart is needed.
  • Environment variables are read once, at start: the broker’s DSNs (databaseBroker, databaseOwner) and the runs’ model (runModel).
    • The DSNs. A rotated password reaches the broker only through a restart: kubectl rollout restart deployment/room-broker. Set maku.broker.reloader: true, and Stakater Reloader rolls the broker when either DSN Secret changes. Keep the old password valid until the new pods are ready.
    • The runs’ model. Each run reads it when its pod starts, so the next run takes the new key.
    • The retention job. databaseRetention is read by each scheduled run of the CronJob, and needs no restart.

OpenBao (KV v2)

externalSecrets:
  enabled: true
  storeRef: {kind: SecretStore, name: agents-secrets}
  secrets:
    brokerOIDC:
      data:
        - {secretKey: web-client-id, remoteRef: {key: maku/oidc, property: web-client-id}}
        - {secretKey: cli-client-id, remoteRef: {key: maku/oidc, property: cli-client-id}}
    factoryApp:
      dataFrom:
        - extract: {key: maku/factory-app}     # holds app_id and private_key

A DSN assembled from CNPG’s role Secret

CloudNativePG writes each managed role’s username and password. ESO’s template assembles the broker’s uri from them, here read back through a store over the database’s namespace:

externalSecrets:
  enabled: true
  storeRef: {kind: ClusterSecretStore, name: cnpg-roles}
  secrets:
    databaseBroker:
      data:
        - {secretKey: username, remoteRef: {key: rooms-cnpg-role-rooms-broker, property: username}}
        - {secretKey: password, remoteRef: {key: rooms-cnpg-role-rooms-broker, property: password}}
      template:
        data:
          uri: "postgresql://{{ .username }}:{{ .password }}@rooms-rw.db.svc:5432/rooms?sslmode=verify-full&sslrootcert=/etc/room-broker/db-ca/ca.crt"

The same shape serves databaseOwner and databaseRetention, with their roles. Set maku.broker.database.caSecret and list databaseCA for the CA.

AWS Secrets Manager

externalSecrets:
  enabled: true
  storeRef: {kind: ClusterSecretStore, name: aws-secrets-manager}
  secrets:
    databaseBroker:
      data:
        - {secretKey: uri, remoteRef: {key: prod/maku/rooms-broker-dsn}}
    gatewayProvider.anthropic:
      data:
        - {secretKey: apiKey, remoteRef: {key: prod/maku/anthropic, property: api_key}}