Install with Helm
Once the four dependencies from Prepare your environment
are ready, the deployment is a short checklist of one-time prerequisites followed by a single
Helm install. This page covers what to prepare and where to enter the values you collected.
The full parameter reference, upgrade, uninstall, and troubleshooting are in helm/README.md
inside your installation package — open that file for anything this page does not cover. If
you are evaluating and do not yet have the installation package, ask your CodeTogether
contact for it; the full reference travels with the chart it documents.
- Deployment: On-premises
Packaging
CodeTogether AI is a single container image. The Helm chart manages the Deployment, Service, Secrets, the directories the container writes, and the route into the cluster — an Ingress, or an HTTPRoute on a Gateway you already run — for that container in your cluster. Configuration is supplied as a properties file; a separate Kubernetes Secret holds the protected storage master key.
The container runs with a read-only root filesystem, so the image's binaries, scripts and configuration cannot be altered from inside a running pod, and the five directories the server does write are mounted for it. See The read-only root filesystem.
Multiple replicas are supported and recommended for production. Set replicaCount in
your values to the desired count; see helm/README.md in your package for details.
Sizing guidance for the server pod is not yet finalized; ask your CodeTogether contact for interim sizing for your environment before you provision hardware or set resource requests and limits.
Raw capture data retention
The server keeps the raw data workstations upload for as long as the deployment lives, so
database storage grows with the amount of development activity captured. Dropping old weeks
is an explicit decision: set CTAI_INGEST_TRACKER_RAW_RETENTION on the deployment, through
the chart's extraEnvVars, to an ISO-8601 duration such as P90D, and weeks older than that
are pruned. Left unset — or set to none, forever, or keep — every week is kept. Size
the database for the retention you choose.
Before you begin: one-time prerequisites checklist
Work through these steps before running the install command. Each is a one-time setup — upgrades do not repeat them.
-
Registry credentials — your CodeTogether contact provides a username and password for the container image registry,
hub.edge.codetogether.com(the chart's defaultimageCredentials.registry; seehelm/README.md). Confirm the registry hostname in your credentials email if it differs from this default. -
Namespace — decide on a Kubernetes namespace (for example
ctai). Create it now withkubectl create namespace ctai, or let the install command create it with--create-namespace. Create it now if you plan to apply the protected storage master key Secret before running the install command —kubectl applyinto a namespace that does not exist yet fails. -
Properties file — the
helm/directory in your installation package containsctai-configuration.properties.templateand the helper scripts. Copy the template and fill in all values using the table in Values to configuration. Rungenerate-properties-secrets.sh(inhelm/) to generate the two secret values the properties file requires —github_state_secretandsso_jwt_secret:./generate-properties-secrets.shThe script prints the values; paste them into your copy of the properties file. They enter the install through
ctaiPropertiesFilelike every other properties value — there is no separate Secret to apply for these.One value in the template comes from no team: set
company_nameto your company name. See Organization.No
<placeholder>text must remain — Helm fails at template time if any does. -
Protected storage master key — run
generate-master-key.sh(inhelm/) to create the Kubernetes Secret, then apply it before the install. This requires the namespace from the previous step to already exist:./generate-master-key.sh --k8s-secret-yaml --secret-name ctai-master-key \> ctai-master-key-secret.yamlkubectl apply -f ctai-master-key-secret.yaml -n ctaiStore
ctai-master-key-secret.yamland the base64 key value in your password manager. That stored copy is the recovery path: if the Secret is ever lost from the cluster, reapply it from the stored YAML and encrypted values remain readable. There is no recovery without it — if you change or lose the key after the database holds data, existing encrypted values cannot be decrypted, so a database backup is only restorable together with the key that was in use when it was taken. Protect the stored copy with the same rigor as those backups. -
TLS — on the Ingress route, either confirm the pre-created TLS Secret is present in your namespace, or confirm cert-manager is configured for your ingress. On the Gateway route, confirm which of the two arrangements your networking team chose: a listener the Gateway already serves for your hostname, holding its own certificate, or a listener the chart contributes to a shared Gateway. The chart never creates the Gateway, and it never issues a certificate.
-
Route — confirm which route your networking team returned, because the Networking values differ by it:
- Ingress, the chart's default. If your cluster has no default ingress class, note the
class name to pass as
ingress.className. - Gateway. Confirm the cluster serves
gateway.networking.k8s.io/v1HTTPRoute— the install stops with a message naming the CRDs to install if it does not. Then note either the Gateway's name, namespace and listener name forgateway.parentRefs, where the Gateway already has an HTTPS listener serving your hostname, or the shared Gateway's name and namespace for a listener the chart adds. Plan to setingress.enabled=falseunless you are deliberately running both during a migration.
- Ingress, the chart's default. If your cluster has no default ingress class, note the
class name to pass as
Install
Apply the master-key Secret (if not already applied in the checklist) — this requires the
ctai namespace to already exist, since --create-namespace below only creates it once the
install itself starts. Then install the chart, running the command from the chart directory in
your installation package — the . in it is that directory:
helm install ctai . \
--namespace ctai --create-namespace \
--set-file ctaiPropertiesFile=./ctai-configuration.properties \
--set imageCredentials.username=<registry-username> \
--set imageCredentials.password=<registry-password> \
--set masterKey.source=secret \
--set masterKey.existingSecret=ctai-master-key
Replace <registry-username> and <registry-password> with the credentials from your
CodeTogether contact.
--set imageCredentials.password=<registry-password> places the password in your shell
history and in the Helm release's stored values. If that is a concern, create the pull
Secret yourself and set imageCredentials.pullSecret to its name instead — see
helm/README.md's Private registry section.
masterKey.source=secret and masterKey.existingSecret=ctai-master-key match the chart
defaults. If you used a different Secret name when applying the master key in the prerequisites
checklist, replace ctai-master-key with that name. See helm/README.md for non-default
master key configurations.
After install, Helm prints the application URL and health-check endpoints. See helm/README.md
in your installation package for how to confirm the deployment, run helm test, and for the
full upgrade, uninstall, and troubleshooting reference.
Set replicaCount to 2 or more for production deployments. The chart manages the
Deployment; the cluster distributes pods across nodes.
helm install ctai . ... --set replicaCount=2


Values to configuration
This table shows where each value collected in
Prepare your environment enters the configuration. Most
values go into ctai-configuration.properties; a few are Helm chart values.
Organization
One properties value is not collected from any of the four teams. Set your company name
yourself before you install, as company_name=<your-company-name> — the template ships it
as a <placeholder>, and Helm fails at template time if a placeholder remains.
This is the name the portal displays on Settings > General. An administrator can change it there later.
Networking
| Collected value | Properties key | Helm chart value |
|---|---|---|
| Service hostname | service_fqdn=https://<hostname> | service.fqdn=https://<hostname> |
| TLS Secret name (Ingress route) | — | ingress.tls.secretName=<name> |
| Ingress class name (Ingress route) | — | ingress.className=<name> |
| Gateway name, namespace, listener (Gateway route) | — | gateway.enabled=true with gateway.parentRefs |
| Shared Gateway name and namespace (Gateway route, listener added by the chart) | — | gateway.enabled=true with gateway.listenerSet.enabled=true and gateway.listenerSet.parentRef |
service_fqdn in the properties file and service.fqdn in Helm values must match exactly.
The hostname is taken from that one value whichever route you use; on the Gateway route any
port is dropped from it, because a Gateway API hostname cannot carry one.
Setting ingress.className to the literal value codetogether-nginx also makes the chart
create a cluster-scoped IngressClass of that name. Use a different class name if your
cluster already has its ingress class defined elsewhere.
The Gateway route
gateway.enabled=false is the default, and the chart creates an Ingress. Set
gateway.enabled=true to have it create an HTTPRoute attached to a Gateway you already
run. gateway.parentRefs is then required — the install stops with
gateway.enabled=true requires gateway.parentRefs if it is empty — and it names the Gateway
and the listener:
gateway:
enabled: true
parentRefs:
- name: shared-gateway
namespace: gateway-system
sectionName: https
ingress:
enabled: false
gateway.annotations and gateway.labels add your own metadata to the HTTPRoute.
The chart never creates the Gateway itself and never issues a certificate, and
ingress.tls.secretName plays no part on this route. TLS terminates at the listener the
HTTPRoute attaches to. That is either a listener your Gateway already serves, named by
sectionName, or one the chart contributes to a shared Gateway — see
Add a listener to a shared Gateway.
Request body size. Developer workstations upload telemetry in batches larger than a
gateway's typical 1 MB default, which rejects them with a 413 before they reach the server.
On NGINX Gateway Fabric the chart renders a ClientSettingsPolicy for the route carrying
gateway.nginxGatewayFabric.clientSettingsPolicy.bodyMaxSize, 16m by default. Its
enabled value is auto, meaning it is rendered when the cluster serves that policy
resource; set it to true to render it regardless, or false on another Gateway
implementation — in which case set the equivalent limit on your Gateway yourself. Helm warns
after an install that rendered no body limit.
Three values work only through the Ingress. ingress.denySourceRanges,
clientIp.realIpFrom, and telemetryMirror are implemented as an ingress-nginx
server snippet and have no effect on an HTTPRoute, so the chart refuses them rather than
silently dropping them: with gateway.enabled=true and ingress.enabled=false, an install
that sets any of them stops and names the ones it found. Turn them off, or keep
ingress.enabled=true.
Add a listener to a shared Gateway
Where one Gateway fronts several applications, the chart can contribute this release's own HTTPS listener to it, so the shared Gateway needs no listener edited for each application. This is off by default. Turn it on with the shared Gateway's name and namespace:
gateway:
enabled: true
listenerSet:
enabled: true
parentRef:
name: shared-gateway
namespace: gateway-system
ingress:
enabled: false
The chart then renders a ListenerSet, named after the release, carrying one HTTPS listener
for your service hostname. Its values:
| Helm chart value | What it sets | Default |
|---|---|---|
gateway.listenerSet.enabled | Whether the ListenerSet is rendered at all | false |
gateway.listenerSet.parentRef | The shared Gateway's name and namespace. The name is required | {} |
gateway.listenerSet.listenerName | The listener's name, which is also the HTTPRoute's sectionName | https |
gateway.listenerSet.port | The listener's port | 443 |
gateway.listenerSet.tlsSecretName | The TLS Secret in the release's namespace that the listener terminates with | the release's own <release-name>-tls |
gateway.listenerSet.annotations | Metadata on the ListenerSet, such as a cert-manager issuer annotation | {} |
Leave gateway.parentRefs empty and the HTTPRoute attaches to this listener. An explicit
gateway.parentRefs wins over it, so a route you want on a listener the Gateway already
serves is unaffected.
What this arrangement needs from your networking team differs from the plain Gateway route:
- Gateway API v1.5 or later, with the standard resources installed. The render stops if
the cluster does not serve
gateway.networking.k8s.io/v1ListenerSet, and it stops ifgateway.listenerSet.parentRefcarries no name. - A Gateway whose
spec.allowedListenersadmits listeners from this release's namespace. gateway.enabled=truealongside it. The ListenerSet carries the HTTPRoute's listener, sogateway.listenerSet.enabled=trueon its own stops the render.
The certificate. The chart does not issue one. Put a cert-manager.io/cluster-issuer or
cert-manager.io/issuer annotation in gateway.listenerSet.annotations and cert-manager
issues the certificate into gateway.listenerSet.tlsSecretName; that needs cert-manager 1.21
or later with its own ListenerSet support enabled. Otherwise, place the certificate in that
Secret yourself.
A ListenerSet of the same name that you created by hand can be taken over by the release
rather than replaced, which keeps the certificate it already holds: label it
app.kubernetes.io/managed-by=Helm and annotate it with meta.helm.sh/release-name and
meta.helm.sh/release-namespace before you upgrade.
Helm names the Gateway the listener was added to when the install finishes, and prints the
kubectl command that reports whether the ListenerSet was accepted.
If your networking team returned cert-manager as the TLS method rather than a pre-created
Secret name, add the appropriate cert-manager issuer annotation to ingress.annotations and
set ingress.tls.secretName to the name of the Secret cert-manager will write the certificate
into. The exact annotation key (cert-manager.io/cluster-issuer or cert-manager.io/issuer)
depends on your cert-manager configuration; see helm/README.md in your installation package.
Single sign-on
Enter each provider as a numbered block (sso_provider1, sso_provider2, …). The example
shown here is for a single Keycloak provider; other OIDC providers follow the same shape.
| Collected value | Properties key |
|---|---|
| Provider type | sso_provider1_type=keycloak |
| Provider name | sso_provider1=keycloak |
| Client ID | sso_provider1_client_id=<value> |
| Client secret | sso_provider1_client_secret=<value> |
| Issuer URL | sso_provider1_client_issuer_url=<value> |
| Display label (optional) | sso_provider1_display_label=<value> |
For GitHub and other OAuth-only providers, use _auth_uri, _token_uri, _info_uri, and
_jwt_set_uri instead of _client_issuer_url. See the comments in the properties template
for the standard GitHub endpoint values and for configuring more than one provider.
Outbound email
| Collected value | Properties key |
|---|---|
| SMTP hostname | smtp_host=<value> |
| SMTP port | smtp_port=587 |
| Requires auth | smtp_auth_enabled=true or false |
| SMTP username | smtp_username=<value> |
| SMTP password | smtp_password=<value> |
| Sender address | email_from_address=<value> |
| Sender display name | email_from_name=<value> |
PostgreSQL database
| Collected value | Properties key |
|---|---|
| Database URL | database_url=jdbc:postgresql://<host:port>/<database> |
| Database username | database_username=<value> |
| Database password | database_password=<value> |
| Telemetry schema | database_telemetry_schema=telemetry |
| Platform schema | database_platform_schema=platform |
| Datamart schema | database_datamart_schema=datamart |
Registry credentials
Registry credentials are passed as Helm values and are not stored in the properties file.
| Value | Helm chart value |
|---|---|
| Registry username | imageCredentials.username=<value> |
| Registry password | imageCredentials.password=<value> |

One of the areas on the portal's Settings page. The tabs across the top — General, SMTP, Output Analysis, Cost Policies, License, and Tracker Updates — reflect the configuration values supplied during the Helm install. Tracker Updates holds the switch that pauses automatic tracker updates for the trackers connected to this server.
The Company name shown on the General tab is the company_name value from your properties file.
The read-only root filesystem
The container's root filesystem is read-only. securityContext.readOnlyRootFilesystem is
true by default, so the image's binaries, scripts and configuration cannot be altered from
inside a running pod, and the five directories the server does write are mounted for it. Each
is an entry under writableDirectories with its own enabled, true by default, and its own
sizeLimit, empty by default and therefore uncapped:
| Helm chart value | Path | What the server keeps there |
|---|---|---|
writableDirectories.runtime | /opt/ctai/runtime | The artifacts unpacked at start, about 200 MB, and the configuration generated from your properties file |
writableDirectories.www | /opt/ctai/www | The portal's own files |
writableDirectories.logs | /opt/ctai/logs | The server and web-server logs, and heap dumps |
writableDirectories.tmp | /opt/ctai/tmp | The web server's pid file and its temporary files |
writableDirectories.systemTmp | /tmp | The JVM's and the application server's temporary files |
Each of them lives as long as the pod: a container restart keeps what is in it and reuses the artifacts already unpacked, and a new pod starts with them empty. Because the logs directory survives a container restart, only the newest heap dump is kept in it.
sizeLimit caps one of them — 2Gi, for example. The cluster evicts the pod when the cap is
exceeded, so leave it empty unless the node's ephemeral storage needs protecting.
To keep one of these directories on storage of your own — a persistent volume for the
logs, typically — set that entry's enabled to false and mount your own volume on the same
path through extraVolumes and extraVolumeMounts:
writableDirectories:
logs:
enabled: false
extraVolumes:
- name: ctai-logs
persistentVolumeClaim:
claimName: ctai-logs
extraVolumeMounts:
- name: ctai-logs
mountPath: /opt/ctai/logs
The chart refuses two volumes on one path, and refuses a disabled directory with nothing of
yours mounted on its path, which would leave that path read-only. Either stops the install or
the upgrade with a message naming the entry and the fix. Paths are compared after cleaning, so
/opt/ctai/logs/ and /opt/ctai/logs are the same path, and
securityContext.readOnlyRootFilesystem has to be a boolean rather than the string "false"
— set it without quotes, or with --set rather than --set-string.
A pre-start hook in /opt/ctai/hooks/pre-start.d can write only to these five directories.
Set securityContext.readOnlyRootFilesystem: false where a hook of yours must write somewhere
else, or where you pin the chart to an image that is not built to run this way. An image that
is built for it carries the label com.codetogether.ctai.read-only-root-filesystem=true,
which is how to tell the two apart. With the value
set to false, no writable directories are mounted and the container writes to its own layer
instead.
Upgrading an existing release
Run the upgrade from the chart directory in your installation package, with
--reset-then-reuse-values:
helm upgrade ctai . \
--namespace ctai \
--reset-then-reuse-values \
--set-file ctaiPropertiesFile=./ctai-configuration.properties
--reuse-values is the flag to avoid. It keeps the release's existing values and skips
the chart's own defaults, so any value the chart sets and your release does not is left
unrendered, with no error and nothing in the output to say so. Two of them matter here:
securityContext.readOnlyRootFilesystem and the writableDirectories that go with it, so
that the pod runs without the hardening and without the mounts; and the Gateway route's
request-body policy, which is not rendered unless you set it explicitly.
Three things to check before you upgrade:
- Take the chart and the image from the same installation package. A chart from this
package pinned to an image that is not built for a read-only root filesystem needs
securityContext.readOnlyRootFilesystem: false. - Check any volume of your own against the five writable directories. A volume of yours
on
/opt/ctai/runtime,/opt/ctai/www,/opt/ctai/logs,/opt/ctai/tmpor/tmpstops the upgrade until you set that directory'senabledtofalse. - Check any pre-start hook. A hook that writes outside those five directories fails.
See The read-only root filesystem for all five paths and for the arrangement that hands one of them to a volume of your own.
Analytics are rebuilt after an upgrade
The first time the upgraded server starts its analytics work, it rebuilds the analytics it holds across the whole history in your database. Nothing is asked of you — the rebuild runs by itself — but it takes a while on a large history, and reports read while it runs can cover fewer periods than usual. Allow it to finish before reading a report as thin or treating a short window as a fault. See Verify your installation.
After install
Once the pod is running and the portal is reachable, continue with:
- Set up your organization — enter your license, connect source control, and invite co-administrators.
- Activate a workstation against your server — point developer machines at the server URL.
Related
- Prepare your environment — the values this install consumes.
- Set up your organization — what to do once the server is running.
- Deploy CodeTogether AI on-premises — the deployment overview.