Skip to content

The open-source agent harness - the runtime layer that turns an LLM into a working agent.

Refactor helm chart to take oidc config (#176)

Chirag Jain4eb928e79669
diff --git a/README.md b/README.md
index cbddde116..af6e7302d 100644
--- a/README.md
+++ b/README.md
@@ -81,7 +81,7 @@ helm install truefoundry-utils oci://<HELM_REPO>/truefoundry-utils \
--version <x.y.z>
```
-See the [chart README](charts/truefoundry-utils/README.md) and [Quickstart](https://trueforge.dev/quickstart) for values and details.
+See the [chart README](charts/truefoundry-utils/README.md) (including [`configs.oidc`](charts/truefoundry-utils/README.md#oidc)) and [Quickstart](https://trueforge.dev/quickstart) for values and details.
## Build your first agent
diff --git a/charts/truefoundry-utils/README.md b/charts/truefoundry-utils/README.md
index 532e330d9..179985dd8 100644
--- a/charts/truefoundry-utils/README.md
+++ b/charts/truefoundry-utils/README.md
@@ -47,90 +47,95 @@ helm upgrade --install truefoundry-utils oci://<jfrog-public-helm-repo>/truefoun
## Postgres
Bundled by default (`postgresql.enabled=true`). Set `postgresql.auth.username`,
-`postgresql.auth.password` (or `postgresql.auth.existingSecret`), and
+`postgresql.auth.password` (or Bitnami's `postgresql.auth.existingSecret`), and
`postgresql.auth.database`; the server connects to it automatically.
To use an **external** Postgres, set `postgresql.enabled=false` and provide
-`externalPostgres.host` (+ `port`, `database`, `user`) with the password one of
-two ways:
-
-- Set `externalPostgres.password` and the chart renders a `Secret`, or
-- Set `externalPostgres.existingSecret` (and optionally `externalPostgres.passwordKey`,
- default `password`) to reference a `Secret` you manage.
-
-## Redis
-
-The server always runs peered (`STANDALONE=false`), so Redis is always required.
-Bundled by default (`redis.enabled=true`, auth disabled). To use an **external**
-Redis, set `redis.enabled=false` and provide the connection URL one of two ways:
-
-- Set `externalRedis.url` (literal; fine for local/dev), or
-- Set `externalRedis.existingSecret` (and optionally `externalRedis.urlKey`,
- default `redis-url`) to reference a `Secret` you manage.
-
-For passworded Redis, prefer an external instance and load `REDIS_URL` from a Secret.
-
-## Using Secrets
-
-Prefer Kubernetes Secrets over literals in values files for production.
-
-**Bundled Postgres password** — Bitnami `postgresql.auth.existingSecret` (key `password`):
-
-```yaml
-postgresql:
- auth:
- existingSecret: my-postgres-secret
- # leave password empty / unused when existingSecret is set
-```
-
-**External Postgres password**:
+`externalPostgres.host` (+ `port`, `database`, `user`). Set
+`externalPostgres.password` as a string (inlined as env `value`) or as
+`valueFrom.secretKeyRef` (preferred in production — you create the Secret):
```yaml
postgresql:
enabled: false
externalPostgres:
host: postgres.databases.svc
- existingSecret: my-postgres-secret
- passwordKey: password
+ password:
+ valueFrom:
+ secretKeyRef:
+ name: my-postgres-secret
+ key: password
```
-**External Redis URL**:
+## Redis
+
+The server always runs peered (`STANDALONE=false`), so Redis is always required.
+Bundled by default (`redis.enabled=true`, auth disabled). To use an **external**
+Redis, set `redis.enabled=false` and provide `externalRedis.url` as a string or
+`valueFrom.secretKeyRef`:
```yaml
redis:
enabled: false
externalRedis:
- existingSecret: my-redis-secret
- urlKey: redis-url
+ url:
+ valueFrom:
+ secretKeyRef:
+ name: my-redis-secret
+ key: redis-url
```
-**OIDC and other env secrets** — use `server.extraEnv` / `server.extraEnvFrom`
-(first-class OIDC values are not wired yet):
+For passworded Redis, prefer an external instance and load `REDIS_URL` via
+`valueFrom`.
+
+## OIDC
+
+Configure IdP login under `configs.oidc`. When `enabled` is false, no `OIDC_*`
+env is set (fixed local admin identity). When enabled, set string `issuerUrl`
+and `clientId`, and `clientSecret` as a string or `valueFrom.secretKeyRef`
+(prefer valueFrom in production).
+
+Also set `server.publicBaseUrl` to the public origin and register
+`{publicBaseUrl}/api/v1/auth/callback` at your IdP.
```yaml
server:
- extraEnv:
- - name: OIDC_ISSUER_URL
- value: https://idp.example.com
- - name: OIDC_CLIENT_ID
- valueFrom:
- secretKeyRef:
- name: truefoundry-utils-oidc
- key: client-id
- - name: OIDC_CLIENT_SECRET
+ publicBaseUrl: https://truefoundry-utils.example.com
+configs:
+ oidc:
+ enabled: true
+ issuerUrl: https://idp.example.com/oauth2/default
+ clientId: truefoundry-utils
+ clientSecret:
valueFrom:
secretKeyRef:
name: truefoundry-utils-oidc
key: client-secret
+ # optional claim overrides (defaults shown):
+ # userReferenceClaim: sub
+ # userRoleClaim: groups
+ # adminRoleValue: admin
+ # scopes: "openid,profile,email,groups"
```
-Or load a whole Secret as env:
+## Using Secrets
+
+Prefer Kubernetes Secrets over literals in values files for production. This
+chart does **not** create Secrets for chart-owned fields — supply
+`valueFrom.secretKeyRef` (or create Secrets yourself and point at them).
+
+Fields that accept string | `valueFrom.secretKeyRef`:
+`externalPostgres.password`, `externalRedis.url`, `configs.oidc.clientSecret`.
+`configs.oidc.issuerUrl` and `clientId` are plain strings only.
+
+**Bundled Postgres password** still uses Bitnami's API (`postgresql.auth.existingSecret`,
+key `password`):
```yaml
-server:
- extraEnvFrom:
- - secretRef:
- name: truefoundry-utils-oidc
+postgresql:
+ auth:
+ existingSecret: my-postgres-secret
+ # leave password empty / unused when existingSecret is set
```
## Extra objects
@@ -166,7 +171,8 @@ extraObjects:
| `replicaCount` | `1` | Number of server replicas. |
| `image.repository` | `tfy.jfrog.io/tfy-images/truefoundry-utils` | Image repository. |
| `image.tag` | chart `appVersion` | Image tag; stamped on release. |
-| `server.publicBaseUrl`| `""` | Public origin for OAuth/OIDC callbacks (optional; required for MCP OAuth / OIDC). |
+| `server.publicBaseUrl`| `""` | Public origin for OAuth/OIDC callbacks (required for MCP OAuth / OIDC). |
+| `configs.oidc.enabled`| `false` | Inject `OIDC_*` env for IdP login. |
| `postgresql.enabled` | `true` | Bundle the Bitnami Postgres subchart. |
| `redis.enabled` | `true` | Bundle the Bitnami Redis subchart. |
| `service.type` | `ClusterIP` | Service type. |
@@ -184,9 +190,9 @@ Also available (defaults inert): `strategy`, `priorityClassName`,
## Production checklist
- Set `server.publicBaseUrl` to the real public origin before using MCP OAuth or OIDC.
-- Prefer `existingSecret` for Postgres and Redis credentials; do not commit passwords in values files.
+- Prefer `valueFrom.secretKeyRef` for Postgres password, Redis URL, and OIDC client secret; do not commit secrets in values files.
- Prefer external managed Postgres/Redis over the bundled subcharts for production HA.
- Set container `resources` (especially CPU requests) before enabling HPA.
- Add `imagePullSecrets` when pulling from `tfy.jfrog.io`.
-- Configure OIDC via `server.extraEnv` / `extraEnvFrom` when you need IdP login.
+- Configure IdP login via `configs.oidc` when you need OIDC.
- Enable `podDisruptionBudget` when running multiple replicas (defaults to `minAvailable: 1`; set exactly one of `minAvailable` or `maxUnavailable`).
diff --git a/charts/truefoundry-utils/templates/NOTES.txt b/charts/truefoundry-utils/templates/NOTES.txt
index bcbfabd51..dfb8b87f7 100644
--- a/charts/truefoundry-utils/templates/NOTES.txt
+++ b/charts/truefoundry-utils/templates/NOTES.txt
@@ -11,9 +11,15 @@ Port-forward it locally with:
Then open http://localhost:8790 and check http://localhost:8790/healthz.
Postgres: {{ if .Values.postgresql.enabled }}bundled ({{ include "truefoundry-utils.postgres.host" . }}){{ else }}external ({{ include "truefoundry-utils.postgres.host" . }}){{ end }}
-Redis: {{ if .Values.redis.enabled }}bundled{{- else }}external (Secret or url){{- end }}
+Redis: {{ if .Values.redis.enabled }}bundled{{- else }}external (literal or valueFrom){{- end }}
+OIDC: {{ if .Values.configs.oidc.enabled }}enabled{{- else }}disabled (local admin identity){{- end }}
-{{- if not .Values.server.publicBaseUrl }}
+{{- if and .Values.configs.oidc.enabled (not .Values.server.publicBaseUrl) }}
+
+WARNING: configs.oidc.enabled is true but server.publicBaseUrl is empty.
+OIDC callbacks require PUBLIC_BASE_URL. Register
+https://<your-public-origin>/api/v1/auth/callback at your IdP.
+{{- else if not .Values.server.publicBaseUrl }}
WARNING: server.publicBaseUrl is empty. MCP OAuth and OIDC callbacks will fail until you set it to the public origin (e.g. https://truefoundry-utils.example.com).
{{- end }}
diff --git a/charts/truefoundry-utils/templates/_helpers.tpl b/charts/truefoundry-utils/templates/_helpers.tpl
index c04d0af96..eb28f529b 100644
--- a/charts/truefoundry-utils/templates/_helpers.tpl
+++ b/charts/truefoundry-utils/templates/_helpers.tpl
@@ -66,6 +66,31 @@ Container image reference; tag falls back to the chart appVersion.
{{- printf "%s:%s" .Values.image.repository (.Values.image.tag | default .Chart.AppVersion) }}
{{- end }}
+{{/*
+True when .value is a non-empty string (vs a valueFrom map).
+Expects dict with key "value".
+*/}}
+{{- define "truefoundry-utils.isLiteralString" -}}
+{{- $v := index . "value" -}}
+{{- if and (kindIs "string" $v) (ne $v "") -}}true{{- end -}}
+{{- end }}
+
+{{/*
+Fail unless .value is a non-empty string or a map with valueFrom.
+Expects dict with keys "name" and "value".
+*/}}
+{{- define "truefoundry-utils.requireStringOrValueFrom" -}}
+{{- $v := index . "value" -}}
+{{- $name := index . "name" -}}
+{{- if kindIs "string" $v -}}
+{{- if eq $v "" -}}{{- fail (printf "%s is required (string or valueFrom.secretKeyRef)" $name) -}}{{- end -}}
+{{- else if kindIs "map" $v -}}
+{{- if not $v.valueFrom -}}{{- fail (printf "%s map must set valueFrom" $name) -}}{{- end -}}
+{{- else -}}
+{{- fail (printf "%s must be a string or a valueFrom object" $name) -}}
+{{- end -}}
+{{- end }}
+
{{/*
Postgres connection. Sourced from the bundled Bitnami postgresql subchart when
postgresql.enabled, otherwise from externalPostgres.
@@ -91,43 +116,78 @@ postgresql.enabled, otherwise from externalPostgres.
{{- end }}
{{/*
-Name of the Secret holding the Postgres password, and its key.
-- bundled: the subchart's Secret (existingSecret override or <release>-postgresql, key `password`).
-- external existingSecret: that Secret and its passwordKey.
-- external literal password: a Secret this chart renders (see secret.yaml).
+Name of the Secret holding the Postgres password when using the bundled
+postgresql subchart (existingSecret override or <release>-postgresql).
*/}}
{{- define "truefoundry-utils.postgres.secretName" -}}
-{{- if .Values.postgresql.enabled -}}
{{- default (printf "%s-postgresql" .Release.Name) .Values.postgresql.auth.existingSecret -}}
-{{- else if .Values.externalPostgres.existingSecret -}}
-{{- .Values.externalPostgres.existingSecret -}}
-{{- else -}}
-{{- $_ := required "externalPostgres.password or externalPostgres.existingSecret is required when postgresql.enabled is false" .Values.externalPostgres.password -}}
-{{- printf "%s-postgres" (include "truefoundry-utils.fullname" .) -}}
-{{- end -}}
{{- end }}
-{{- define "truefoundry-utils.postgres.secretKey" -}}
-{{- if .Values.postgresql.enabled -}}password{{- else -}}{{ .Values.externalPostgres.passwordKey }}{{- end -}}
+{{- define "truefoundry-utils.redis.bundledUrl" -}}
+{{- printf "redis://%s-redis-master:6379" .Release.Name -}}
{{- end }}
{{/*
-True when REDIS_URL should be loaded from externalRedis.existingSecret.
+JSON env entry from a string | { valueFrom: ... } field.
+Expects: name (env var), field (values path for errors), value.
+Literals become env value; valueFrom maps are passed through. The chart does
+not create Secrets — callers who need secretKeyRef must supply valueFrom.
*/}}
-{{- define "truefoundry-utils.redis.useSecret" -}}
-{{- if and (not .Values.redis.enabled) .Values.externalRedis.existingSecret -}}true{{- end -}}
+{{- define "truefoundry-utils.env.fromStringOrValueFrom" -}}
+{{- $name := index . "name" -}}
+{{- $field := index . "field" -}}
+{{- $value := index . "value" -}}
+{{- include "truefoundry-utils.requireStringOrValueFrom" (dict "name" $field "value" $value) -}}
+{{- if eq (include "truefoundry-utils.isLiteralString" (dict "value" $value)) "true" -}}
+{{- dict "name" $name "value" $value | toJson -}}
+{{- else -}}
+{{- dict "name" $name "valueFrom" $value.valueFrom | toJson -}}
+{{- end -}}
{{- end }}
{{/*
-Redis connection URL literal. Used when redis is bundled, or when external
-Redis is configured via externalRedis.url (not existingSecret).
+Full server container env list (YAML). Validates required string|valueFrom
+fields, wires bundled Postgres/Redis, optional OIDC, then server.extraEnv.
*/}}
-{{- define "truefoundry-utils.redis.url" -}}
+{{- define "truefoundry-utils.server.env" -}}
+{{- $env := list -}}
+{{- $env = append $env (dict "name" "NODE_ENV" "value" "production") -}}
+{{- $env = append $env (dict "name" "PORT" "value" (.Values.server.port | toString)) -}}
+{{- $env = append $env (dict "name" "PUBLIC_BASE_URL" "value" .Values.server.publicBaseUrl) -}}
+{{- $env = append $env (dict "name" "STANDALONE" "value" "false") -}}
+{{- $env = append $env (dict "name" "GRACEFUL_TIMEOUT_SECONDS" "value" (.Values.server.gracefulTimeoutSeconds | toString)) -}}
+
{{- if .Values.redis.enabled -}}
-{{- printf "redis://%s-redis-master:6379" .Release.Name -}}
-{{- else if .Values.externalRedis.existingSecret -}}
-{{- fail "truefoundry-utils.redis.url must not be used when externalRedis.existingSecret is set" -}}
+{{- $env = append $env (dict "name" "REDIS_URL" "value" (include "truefoundry-utils.redis.bundledUrl" .)) -}}
{{- else -}}
-{{- required "externalRedis.url or externalRedis.existingSecret is required when redis.enabled is false (the server always needs Redis)" .Values.externalRedis.url -}}
+{{- $env = append $env (include "truefoundry-utils.env.fromStringOrValueFrom" (dict "name" "REDIS_URL" "field" "externalRedis.url" "value" .Values.externalRedis.url) | fromJson) -}}
{{- end -}}
+
+{{- $env = append $env (dict "name" "POSTGRES_HOST" "value" (include "truefoundry-utils.postgres.host" .)) -}}
+{{- $env = append $env (dict "name" "POSTGRES_PORT" "value" (include "truefoundry-utils.postgres.port" . | toString)) -}}
+{{- $env = append $env (dict "name" "POSTGRES_DB" "value" (include "truefoundry-utils.postgres.database" .)) -}}
+{{- $env = append $env (dict "name" "POSTGRES_USER" "value" (include "truefoundry-utils.postgres.user" .)) -}}
+{{- if .Values.postgresql.enabled -}}
+{{- $env = append $env (dict "name" "POSTGRES_PASSWORD" "valueFrom" (dict "secretKeyRef" (dict "name" (include "truefoundry-utils.postgres.secretName" .) "key" "password"))) -}}
+{{- else -}}
+{{- $env = append $env (include "truefoundry-utils.env.fromStringOrValueFrom" (dict "name" "POSTGRES_PASSWORD" "field" "externalPostgres.password" "value" .Values.externalPostgres.password) | fromJson) -}}
+{{- end -}}
+
+{{- if .Values.configs.oidc.enabled -}}
+{{- $_ := required "configs.oidc.issuerUrl is required when configs.oidc.enabled is true" .Values.configs.oidc.issuerUrl -}}
+{{- $_ := required "configs.oidc.clientId is required when configs.oidc.enabled is true" .Values.configs.oidc.clientId -}}
+{{- $env = append $env (dict "name" "OIDC_ISSUER_URL" "value" .Values.configs.oidc.issuerUrl) -}}
+{{- $env = append $env (dict "name" "OIDC_CLIENT_ID" "value" .Values.configs.oidc.clientId) -}}
+{{- $env = append $env (include "truefoundry-utils.env.fromStringOrValueFrom" (dict "name" "OIDC_CLIENT_SECRET" "field" "configs.oidc.clientSecret" "value" .Values.configs.oidc.clientSecret) | fromJson) -}}
+{{- $env = append $env (dict "name" "OIDC_USER_REFERENCE_CLAIM" "value" .Values.configs.oidc.userReferenceClaim) -}}
+{{- $env = append $env (dict "name" "OIDC_USER_ROLE_CLAIM" "value" .Values.configs.oidc.userRoleClaim) -}}
+{{- $env = append $env (dict "name" "OIDC_ADMIN_ROLE_VALUE" "value" .Values.configs.oidc.adminRoleValue) -}}
+{{- $env = append $env (dict "name" "OIDC_SCOPES" "value" .Values.configs.oidc.scopes) -}}
+{{- end -}}
+
+{{- range .Values.server.extraEnv -}}
+{{- $env = append $env . -}}
+{{- end -}}
+
+{{- toYaml $env -}}
{{- end }}
diff --git a/charts/truefoundry-utils/templates/deployment.yaml b/charts/truefoundry-utils/templates/deployment.yaml
index 7e83fdcf0..63339adfe 100644
--- a/charts/truefoundry-utils/templates/deployment.yaml
+++ b/charts/truefoundry-utils/templates/deployment.yaml
@@ -58,46 +58,7 @@ spec:
containerPort: {{ .Values.server.port }}
protocol: TCP
env:
- - name: NODE_ENV
- value: production
- - name: PORT
- value: {{ .Values.server.port | quote }}
- - name: PUBLIC_BASE_URL
- value: {{ .Values.server.publicBaseUrl | quote }}
- # The server always runs peered against Postgres + Redis.
- - name: STANDALONE
- value: "false"
- - name: GRACEFUL_TIMEOUT_SECONDS
- value: {{ .Values.server.gracefulTimeoutSeconds | quote }}
- - name: REDIS_URL
- {{- if eq (include "truefoundry-utils.redis.useSecret" .) "true" }}
- valueFrom:
- secretKeyRef:
- name: {{ .Values.externalRedis.existingSecret | quote }}
- key: {{ .Values.externalRedis.urlKey | quote }}
- {{- else }}
- value: {{ include "truefoundry-utils.redis.url" . | quote }}
- {{- end }}
- - name: POSTGRES_HOST
- value: {{ include "truefoundry-utils.postgres.host" . | quote }}
- - name: POSTGRES_PORT
- value: {{ include "truefoundry-utils.postgres.port" . | quote }}
- - name: POSTGRES_DB
- value: {{ include "truefoundry-utils.postgres.database" . | quote }}
- - name: POSTGRES_USER
- value: {{ include "truefoundry-utils.postgres.user" . | quote }}
- - name: POSTGRES_PASSWORD
- valueFrom:
- secretKeyRef:
- name: {{ include "truefoundry-utils.postgres.secretName" . }}
- key: {{ include "truefoundry-utils.postgres.secretKey" . }}
- {{- with .Values.server.extraEnv }}
- {{- toYaml . | nindent 12 }}
- {{- end }}
- {{- with .Values.server.extraEnvFrom }}
- envFrom:
- {{- toYaml . | nindent 12 }}
- {{- end }}
+ {{- include "truefoundry-utils.server.env" . | nindent 12 }}
{{- with .Values.startupProbe }}
startupProbe:
{{- toYaml . | nindent 12 }}
diff --git a/charts/truefoundry-utils/templates/secret.yaml b/charts/truefoundry-utils/templates/secret.yaml
deleted file mode 100644
index d82b91ffb..000000000
--- a/charts/truefoundry-utils/templates/secret.yaml
+++ /dev/null
@@ -1,15 +0,0 @@
-{{- /*
-Rendered only for external Postgres with a literal password and no existingSecret.
-The bundled postgresql subchart manages its own Secret.
-*/ -}}
-{{- if and (not .Values.postgresql.enabled) .Values.externalPostgres.password (not .Values.externalPostgres.existingSecret) }}
-apiVersion: v1
-kind: Secret
-metadata:
- name: {{ printf "%s-postgres" (include "truefoundry-utils.fullname" .) }}
- labels:
- {{- include "truefoundry-utils.labels" . | nindent 4 }}
-type: Opaque
-stringData:
- {{ .Values.externalPostgres.passwordKey }}: {{ .Values.externalPostgres.password | quote }}
-{{- end }}
diff --git a/charts/truefoundry-utils/values.yaml b/charts/truefoundry-utils/values.yaml
index 28e95a9b0..4caaaa796 100644
--- a/charts/truefoundry-utils/values.yaml
+++ b/charts/truefoundry-utils/values.yaml
@@ -47,23 +47,35 @@ server:
# Container port the server listens on (PORT).
port: 8790
# Public origin for MCP OAuth / OIDC callbacks (PUBLIC_BASE_URL).
+ # Required for OIDC and MCP OAuth to work correctly.
publicBaseUrl: ""
# Seconds the server is given to drain turns on SIGTERM (GRACEFUL_TIMEOUT_SECONDS).
gracefulTimeoutSeconds: 30
# The server always runs peered (STANDALONE=false) against Postgres + Redis.
- # extraEnv/extraEnvFrom are escape hatches for OIDC and other knobs.
- # extraEnv accepts {name, value} or {name, valueFrom: {secretKeyRef: ...}}.
+ # Escape hatch for knobs not covered by configs.*. Each entry is a full env
+ # item: {name, value} or {name, valueFrom: {secretKeyRef|configMapKeyRef: ...}}.
extraEnv: []
- # extraEnv:
- # - name: OIDC_CLIENT_SECRET
- # valueFrom:
- # secretKeyRef:
- # name: truefoundry-utils-oidc
- # key: client-secret
- extraEnvFrom: []
- # extraEnvFrom:
- # - secretRef:
- # name: truefoundry-utils-oidc
+
+# Application feature config (maps to env vars in packages/server/src/config.ts).
+# clientSecret (and other secret-like fields) accept a string or
+# { valueFrom: { secretKeyRef: ... } }.
+configs:
+ oidc:
+ # When false, no OIDC_* env is set (fixed local admin identity).
+ enabled: false
+ issuerUrl: ""
+ clientId: ""
+ # string or valueFrom.secretKeyRef (prefer valueFrom in production).
+ clientSecret: ""
+ # clientSecret:
+ # valueFrom:
+ # secretKeyRef:
+ # name: truefoundry-utils-oidc
+ # key: client-secret
+ userReferenceClaim: sub
+ userRoleClaim: groups
+ adminRoleValue: admin
+ scopes: "openid,profile,email"
# Bitnami relocated its versioned container images to docker.io/bitnamilegacy and
# left only rolling `latest` tags under docker.io/bitnami, so the subchart image
@@ -124,21 +136,23 @@ externalPostgres:
port: 5432
database: truefoundry_utils
user: truefoundry_utils
- # Provide the password one of two ways:
- # - set `password` and the chart renders a Secret, or
- # - set `existingSecret` (+ `passwordKey`) to reference an existing Secret.
+ # string, or { valueFrom: { secretKeyRef: { name, key } } }. Prefer valueFrom in prod.
password: ""
- existingSecret: ""
- passwordKey: password
+ # password:
+ # valueFrom:
+ # secretKeyRef:
+ # name: my-postgres-secret
+ # key: password
externalRedis:
# Full connection URL, e.g. redis://:[email protected]:6379.
- # Provide one of:
- # - `url` (literal; fine for local/dev), or
- # - `existingSecret` (+ `urlKey`) to reference an existing Secret.
+ # string, or { valueFrom: { secretKeyRef: { name, key } } }. Prefer valueFrom in prod.
url: ""
- existingSecret: ""
- urlKey: redis-url
+ # url:
+ # valueFrom:
+ # secretKeyRef:
+ # name: my-redis-secret
+ # key: redis-url
# Extra raw manifests deployed alongside the server, e.g. an Istio
# VirtualService, a Gateway, an Ingress, or a NetworkPolicy. Each entry is a
diff --git a/docs/authentication/overview.mdx b/docs/authentication/overview.mdx
index ab86984cd..189ebe87e 100644
--- a/docs/authentication/overview.mdx
+++ b/docs/authentication/overview.mdx
@@ -142,29 +142,27 @@ The default. Do **not** set any `OIDC_*` variables, run TrueForge as usual ([Qui
```
</Tab>
<Tab title="Helm">
- Set `server.publicBaseUrl`, pass the `OIDC_*` variables via `server.extraEnv`, and keep the client secret in a Kubernetes Secret:
+ Set `server.publicBaseUrl` and `configs.oidc`. Prefer `clientSecret` as
+ `valueFrom.secretKeyRef` to a Kubernetes Secret you manage — the chart does
+ not create Secrets for you:
```yaml values.yaml
server:
publicBaseUrl: "https://trueforge.myorg.com"
- extraEnv:
- - name: OIDC_ISSUER_URL
- value: "https://integrator-XXXX.okta.com/oauth2/default"
- - name: OIDC_CLIENT_ID
- value: "0oa..."
- - name: OIDC_CLIENT_SECRET
+ configs:
+ oidc:
+ enabled: true
+ issuerUrl: "https://integrator-XXXX.okta.com/oauth2/default"
+ clientId: "0oa..."
+ clientSecret:
valueFrom:
secretKeyRef:
name: truefoundry-utils-oidc
key: client-secret
- - name: OIDC_USER_REFERENCE_CLAIM
- value: email
- - name: OIDC_USER_ROLE_CLAIM
- value: groups
- - name: OIDC_ADMIN_ROLE_VALUE
- value: harness-admin
- - name: OIDC_SCOPES
- value: openid,profile,email,groups
+ userReferenceClaim: email
+ userRoleClaim: groups
+ adminRoleValue: harness-admin
+ scopes: "openid,profile,email,groups"
extraObjects:
- apiVersion: v1
kind: Secret
@@ -174,6 +172,8 @@ The default. Do **not** set any `OIDC_*` variables, run TrueForge as usual ([Qui
stringData:
client-secret: "..."
```
+
+ See the [chart README](https://github.com/truefoundry/trueforge/blob/main/charts/truefoundry-utils/README.md#oidc) for the full values shape.
</Tab>
</Tabs>
diff --git a/docs/quickstart.mdx b/docs/quickstart.mdx
index 1ad68e616..c479d7dc4 100644
--- a/docs/quickstart.mdx
+++ b/docs/quickstart.mdx
@@ -50,7 +50,9 @@ TrueForge runs in [two modes](/introduction#two-ways-to-run-it): **local mode**
| ---------------------- | ------- | ------------------------------------------------------------------------ |
| `replicaCount` | `1` | Number of server replicas (peered over Redis). |
| `postgresql.enabled` | `true` | Bundle Postgres; set `false` + `externalPostgres.*` to bring your own. |
- | `redis.enabled` | `true` | Bundle Redis; set `false` + `externalRedis.url` or `existingSecret`. |
+ | `redis.enabled` | `true` | Bundle Redis; set `false` + `externalRedis.url` (string or `valueFrom`). |
+ | `server.publicBaseUrl` | `""` | Public origin; required for OIDC and MCP OAuth callbacks. |
+ | `configs.oidc.enabled` | `false` | Enable IdP login via `configs.oidc.*` (see chart README). |
</Tab>
</Tabs>