Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
ca1b560
fix: separate SSL certificates (#101)
wgalanciak May 7, 2025
b64df46
fix: Set environment variables via .env file. (#99)
nmorenor May 8, 2025
2c6b287
fix: add env_file to codetogether-intel (#105)
wgalanciak May 10, 2025
2605843
fix: missing CT_HQ_BASE_URL env var (#107)
wgalanciak May 12, 2025
fb116ee
feat: nginx auto config (#109)
wgalanciak May 12, 2025
4d79a6d
fix: add step for sso provider (#110)
wgalanciak May 12, 2025
063a4eb
fix: add client_max_body_size to intel (#112)
wgalanciak May 12, 2025
d665be1
fix: tweak name of dhparam.pem env var (#113)
wgalanciak May 12, 2025
56d5eee
fix: missing env file on collab (#114)
nmorenor May 12, 2025
f21332a
fix: handle nil ai.openai.api_key to prevent template er… (#116)
danc094codetogether May 12, 2025
11960dd
fix: cleanup for sso tenants (#117)
wgalanciak May 12, 2025
9cd2f48
feat(intel): add option to disable AI integration entirely (#120)
danc094codetogether May 16, 2025
c7bee30
Change gen ai image name on values file (#122)
nmorenor Jun 10, 2025
75c414f
fix: bump up version number (#123)
nmorenor Jun 10, 2025
aacad57
docs: remove outdated metrics section from README (#130)
danc094codetogether Jun 16, 2025
23ddc3e
fix: add note to env-template file (#127)
nmorenor Jun 17, 2025
447a8a7
fix: update LLM image URL to hub.edge (#132)
danc094codetogether Jun 18, 2025
61a8250
docs: add deprecation notice to old Live chart (#131)
danc094codetogether Jun 18, 2025
d4665b0
126 automatically configure ollama integration when llm is enabled (#…
danc094codetogether Jun 18, 2025
9e1cae0
Gen AI Changes (#124)
nmorenor Jun 18, 2025
4fab2ad
Fix collab helm chart to allow usage of locator. (#134)
nmorenor Jun 18, 2025
8033f54
fix: invalid values in AI values section (#137)
wgalanciak Jun 30, 2025
5547e74
fix: support automatic configuration of the LLM integration if AI is …
wgalanciak Jun 30, 2025
6e96ea7
Fixes after Testing (#139)
danc094codetogether Jun 30, 2025
b55b89c
Changes to use localhost always to avoid dns issues (#142)
nmorenor Jun 30, 2025
ea40024
Merge branch 'main' into dev
nmorenor Jun 30, 2025
c481aed
feat: support for optional keycloak deployment (#145)
wgalanciak Jul 10, 2025
40dffd5
144 keycloak (#146)
nmorenor Jul 10, 2025
502eb16
144 keycloak (#147)
nmorenor Jul 10, 2025
f3790b8
144 keycloak (#149)
nmorenor Jul 10, 2025
a044e60
fixes on properties file
nmorenor Jul 10, 2025
98cd5b5
Prepare examples for deployment with keycloak.
nmorenor Jul 10, 2025
0191fcd
move files
nmorenor Jul 10, 2025
65d2a48
feat(charts, compose): add CT_TRUST_ALL_CERTS support (#158)
danc094codetogether Jul 21, 2025
5f5741c
feat(chart): guard `ai-secrets` template behind `ai.enabled` (#161)
danc094codetogether Aug 11, 2025
264c8e4
fix: improve keycloak compose health check (#162)
nmorenor Aug 12, 2025
ecf00a4
fix(helm/intel): scope AI resources per-release to avoid cross-releas…
danc094codetogether Aug 27, 2025
b7f92f8
chore(keycloak): switch to KC_BOOTSTRAP_* admin vars and update compo…
danc094codetogether Sep 5, 2025
2256e9d
feat(helm): add RO rootfs support for Intel and Collab (#169)
danc094codetogether Sep 18, 2025
54402d5
feat(helm-collab): Support optional existing secret for Intel connect…
danc094codetogether Sep 18, 2025
fd6aec4
Merge branch 'main' into dev
danc094codetogether Sep 18, 2025
d382f96
collab, intel: align read-only handling with live legacy chart (#175)
danc094codetogether Sep 24, 2025
5bfed1d
Bump version from 1.2.5 to 1.2.6
danc094codetogether Sep 24, 2025
7a46a70
Bump version to 1.2.3 in Chart.yaml
danc094codetogether Sep 24, 2025
3c5c184
Merge branch 'main' into dev
danc094codetogether Sep 24, 2025
8ca5b5d
Fix indentation in deployment.yaml
danc094codetogether Sep 24, 2025
71c7bdf
Remove initContainers for readOnlyMode
danc094codetogether Sep 24, 2025
6d3ed2a
Bump version from 1.2.6 to 1.2.7
danc094codetogether Sep 25, 2025
75aa28f
Bump version from 1.2.3 to 1.2.4
danc094codetogether Sep 25, 2025
dc6854c
177 collab intel rofs on open shift avoid run as user 0 support fs gr…
danc094codetogether Oct 1, 2025
0bfa15d
Allow to set the CT_CUSTOM_CLIENTS_ORIGIN env variable.
nmorenor Oct 1, 2025
f914f00
fix env variable name
nmorenor Oct 2, 2025
f66443d
Allow to add custom ide location url (#184)
nmorenor Oct 2, 2025
f22274c
Merge branch 'main' into dev
danc094codetogether Oct 2, 2025
29e56fb
Remove volumeMounts for readOnlyRootFilesystem
danc094codetogether Oct 2, 2025
d489e34
Update codetogether-tmp volume medium configuration
danc094codetogether Oct 2, 2025
235a2dd
Simplify emptyDir volume definition in deployment.yaml
danc094codetogether Oct 2, 2025
0c577f7
Update version and appVersion in Chart.yaml
danc094codetogether Oct 2, 2025
a9aa401
refactor(helm): decouple customClientsUrl from AI config (#187)
danc094codetogether Oct 15, 2025
b38154c
Bump version and appVersion in Chart.yaml
danc094codetogether Oct 15, 2025
eb0923f
Bump version and appVersion in Chart.yaml
danc094codetogether Oct 15, 2025
6864944
Merge branch 'main' into dev
danc094codetogether Oct 15, 2025
d7781b9
fix: enable read-only FS support (#189)
danc094codetogether Nov 18, 2025
aa788ea
Bump version and appVersion in Chart.yaml
danc094codetogether Nov 18, 2025
f7c5c32
Bump version to 1.2.7 and appVersion to 2025.4.2
danc094codetogether Nov 18, 2025
264abe2
Merge branch 'main' into dev
danc094codetogether Nov 18, 2025
261565d
Remove run-nginx volume mount
danc094codetogether Nov 18, 2025
cb24f6f
Add run-volatile mount and volume to deployment.yaml
danc094codetogether Nov 27, 2025
4f8670b
Refactor deployment.yaml for memory-backed volumes
danc094codetogether Nov 27, 2025
8fbe8b3
feat: add warning log when deprecated AV settings are detected (#193)
danc094codetogether Nov 27, 2025
42d4167
192 add warning log when av related helm values are detected (#194)
danc094codetogether Nov 28, 2025
6416900
Bump version and appVersion in Chart.yaml
danc094codetogether Nov 28, 2025
bfc07e0
Bump version and appVersion in Chart.yaml
danc094codetogether Nov 28, 2025
6df6ba1
Merge branch 'main' into dev
danc094codetogether Nov 28, 2025
1df2081
fix(intel-chart): ensure Ingress v1 + pathType for modern Kubernetes …
danc094codetogether Jan 23, 2026
5c14696
feat(helm): add optional service annotations to collab chart Service …
danc094codetogether Feb 10, 2026
b9918b1
Bump version and appVersion in Chart.yaml
danc094codetogether Feb 10, 2026
2384e38
Merge branch 'main' into dev
danc094codetogether Feb 10, 2026
9a6874d
Bump version and appVersion in Chart.yaml
danc094codetogether Feb 10, 2026
bb4dbaa
feat(helm): add configurable initContainers (startup containers) to I…
danc094codetogether Feb 18, 2026
af2e7a0
feat: add configurable initContainers to collab helm chart (#204)
danc094codetogether Feb 23, 2026
ebeab76
Add dedicated Keycloak readiness gate to prevent Intel starting too e…
danc094codetogether Mar 5, 2026
a64d856
Support adding extra volume mounts via the values.yml file in Helm
TimWebb Mar 20, 2026
2e4fa51
Add extraContainers support for sidecar injection (#206)
danc094codetogether Mar 23, 2026
3f285f5
Merge branch 'main' into dev
danc094codetogether Mar 23, 2026
673c1e1
feat: make health probe path/port configurable (v1.3.5) (#208)
danc094codetogether Apr 9, 2026
358b209
Merge branch 'main' into dev
danc094codetogether Apr 9, 2026
1f6b30b
This is a test
danc094codetogether May 18, 2026
662b9bd
This is a test
danc094codetogether May 18, 2026
7c64b0f
Testing
danc094codetogether May 18, 2026
dc154d4
Publish/codetogether ai helm chart (#212)
danc094codetogether Jun 30, 2026
b4a77e8
Remove local MCP config and test artifacts from dev.
danc094codetogether Jun 30, 2026
08b0b2f
[codex] AITRAX-581 support immutable standalone Live images (#215)
CodeTogetherBot Jul 22, 2026
31382a1
AITRAX-2721: codetogether-ai chart - Gateway API (HTTPRoute) and clie…
CodeTogetherBot Oct 20, 2026
4fe445f
AITRAX-2721: codetogether-ai chart 0.2.1 - appVersion 1.2.8165 (#218)
CodeTogetherBot Oct 20, 2026
e1e3da9
AITRAX-2721: codetogether-ai chart 0.2.2 - keep helm upgrade --reuse-…
CodeTogetherBot Oct 20, 2026
6374cb9
AITRAX-2853: codetogether-ai chart 0.2.3 - optional Gateway API Liste…
CodeTogetherBot Nov 2, 2026
81657a3
AITRAX-2853: fail when gateway.listenerSet.enabled is set without gat…
CodeTogetherBot Nov 2, 2026
31c6d20
AITRAX-2853: codetogether-ai chart 0.2.3 - appVersion 1.2.8616 (#225)
CodeTogetherBot Nov 5, 2026
1ee6cb4
Merge pull request #228 from CodeTogether-Inc/main
CodeTogetherBot Nov 5, 2026
eca8de8
AITRAX-2881: codetogether-collab chart 1.3.0 - optional Gateway API H…
CodeTogetherBot Nov 9, 2026
23a71c2
AITRAX-2881: collab README - adopt the hand-applied HTTPRoute too (#231)
CodeTogetherBot Nov 9, 2026
1aa810a
AITRAX-2921: codetogether-ai chart 0.2.4 - deploymentStrategy, old po…
CodeTogetherBot Nov 12, 2026
3164d2e
AITRAX-2990: codetogether-ai chart 0.2.5 - read-only root filesystem …
CodeTogetherBot Nov 18, 2026
2998f4a
codetogether-ai chart 0.2.5: appVersion 1.2.8821 (#234)
danc094codetogether Nov 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 104 additions & 0 deletions .github/workflows/helm-template-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,34 @@ jobs:
- name: Validate Collab Chart
run: |
helm template collab ./charts/collab --values ./charts/collab/values.yaml
# Gateway API: HTTPRoute on an existing Gateway listener
helm template collab ./charts/collab --values ./charts/collab/values.yaml \
--set ingress.enabled=false \
--set gateway.enabled=true \
--set 'gateway.parentRefs[0].name=shared-gateway' \
--set 'gateway.parentRefs[0].namespace=gateway-system' \
--api-versions gateway.networking.k8s.io/v1/HTTPRoute
# ListenerSet on a shared Gateway; the HTTPRoute attaches to it
helm template collab ./charts/collab --values ./charts/collab/values.yaml \
--set ingress.enabled=false \
--set gateway.enabled=true \
--set gateway.listenerSet.enabled=true \
--set gateway.listenerSet.parentRef.name=shared-gateway \
--set gateway.listenerSet.parentRef.namespace=gateway-system \
--api-versions gateway.networking.k8s.io/v1/HTTPRoute \
--api-versions gateway.networking.k8s.io/v1/ListenerSet \
> /tmp/collab-listenerset.yaml
grep -q '^kind: ListenerSet$' /tmp/collab-listenerset.yaml
grep -q 'kind: ListenerSet$' <(sed -n '/^kind: HTTPRoute$/,/^---/p' /tmp/collab-listenerset.yaml)
# listenerSet without gateway.enabled must fail instead of rendering nothing
if helm template collab ./charts/collab --values ./charts/collab/values.yaml \
--set gateway.listenerSet.enabled=true \
--set gateway.listenerSet.parentRef.name=shared-gateway > /tmp/collab-ls-no-gw.out 2>&1; then
echo "listenerSet without gateway.enabled rendered" >&2; exit 1
fi
grep -q 'requires gateway.enabled=true' /tmp/collab-ls-no-gw.out
# helm upgrade --reuse-values from a chart without `gateway` drops the key
helm template collab ./charts/collab --values ./charts/collab/values.yaml --set gateway=null

- name: Validate HQ Chart
run: |
Expand Down Expand Up @@ -85,6 +113,82 @@ jobs:
--set imageCredentials.username=test \
--set imageCredentials.password=test \
--set gateway=null
# Read-only root filesystem: an emptyDir on each writable directory by
# default; the previous layout for ro=false, an image older than the first
# one that supports it, and --reuse-values from a chart before 0.2.5.
ai_ro() {
helm template test ./charts/ai \
--set-file ctaiPropertiesFile=./charts/ai/ctai-configuration.properties.template \
--set service.fqdn=https://example.codetogether.io \
--set imageCredentials.username=test \
--set imageCredentials.password=test \
--show-only templates/deployment.yaml "$@"
}
ro_min="$(sed -n '/define "ctai.readOnlyRootFilesystemMinImage"/{n;p}' ./charts/ai/templates/_helpers.tpl)"
if ! [[ "$ro_min" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Set ctai.readOnlyRootFilesystemMinImage to the first release that runs read-only (got $ro_min)" >&2; exit 1
fi
app_version="$(sed -n 's/^appVersion: "\(.*\)"$/\1/p' ./charts/ai/Chart.yaml)"
if [ "$(printf '%s\n%s\n' "$ro_min" "$app_version" | sort -V | head -1)" != "$ro_min" ]; then
echo "appVersion $app_version is older than ctai.readOnlyRootFilesystemMinImage $ro_min" >&2; exit 1
fi
out="$(ai_ro)"
grep -q 'readOnlyRootFilesystem: true' <<<"$out"
[ "$(grep -c 'name: writable-' <<<"$out")" = 10 ]
for args in "--set securityContext.readOnlyRootFilesystem=false" \
"--set image.tag=1.0.0" \
"--set image.tag=1.0.0-hotfix" \
"--set securityContext.readOnlyRootFilesystem=null --set writableDirectories=null"; do
# shellcheck disable=SC2086
out="$(ai_ro $args)"
grep -q 'readOnlyRootFilesystem: false' <<<"$out"
if grep -q 'name: writable-' <<<"$out"; then echo "writable volumes with $args" >&2; exit 1; fi
done
# A customer volume instead of one writable directory, and the refusals.
out="$(ai_ro --set writableDirectories.logs.enabled=false \
--set 'extraVolumes[0].name=logs' --set 'extraVolumes[0].persistentVolumeClaim.claimName=logs' \
--set 'extraVolumeMounts[0].name=logs' --set 'extraVolumeMounts[0].mountPath=/opt/ctai/logs/')"
grep -q 'claimName: logs' <<<"$out"
if grep -q 'name: writable-logs' <<<"$out"; then echo "writable-logs mounted while disabled" >&2; exit 1; fi
[ "$(grep -c 'name: writable-' <<<"$out")" = 8 ]
ai_ro_fails() {
local pattern="$1"; shift
if ai_ro "$@" > /tmp/ro.out 2>&1; then echo "rendered: $*" >&2; exit 1; fi
grep -q "$pattern" /tmp/ro.out || { cat /tmp/ro.out >&2; exit 1; }
}
ai_ro_fails 'which writableDirectories.logs already mounts' \
--set 'extraVolumes[0].name=logs' --set 'extraVolumes[0].emptyDir.medium=Memory' \
--set 'extraVolumeMounts[0].name=logs' --set 'extraVolumeMounts[0].mountPath=/opt/ctai/logs/'
ai_ro_fails 'extraVolumes has a volume named writable-logs' \
--set 'extraVolumes[0].name=writable-logs' --set 'extraVolumes[0].emptyDir.medium=Memory' \
--set 'extraVolumeMounts[0].name=writable-logs' --set 'extraVolumeMounts[0].mountPath=/data'
ai_ro_fails 'writableDirectories.systemTmp is disabled but nothing is mounted on /tmp' \
--set writableDirectories.systemTmp.enabled=false
ai_ro_fails 'both mount /opt/ctai/www' --set writableDirectories.runtime.mountPath=/opt/ctai/www
ai_ro_fails 'must be an absolute path' --set writableDirectories.www.mountPath=opt/ctai/www
ai_ro_fails 'must be true or false' --set-string securityContext.readOnlyRootFilesystem=false
ai_ro_fails 'writableDirectories.logs must be a map' --set writableDirectories.logs=false
# Rollout strategy: the default, what --reuse-values from a chart
# before 0.2.4 leaves (no deploymentStrategy), and a Recreate override.
ai_strategy() {
helm template test ./charts/ai \
--set-file ctaiPropertiesFile=./charts/ai/ctai-configuration.properties.template \
--set service.fqdn=https://example.codetogether.io \
--set imageCredentials.username=test \
--set imageCredentials.password=test \
--show-only templates/deployment.yaml "$@" \
| sed -n '/^ strategy:$/,/^ selector:$/p'
}
default_strategy="$(ai_strategy)"
grep -q 'type: RollingUpdate' <<<"$default_strategy"
grep -q 'maxSurge: 0' <<<"$default_strategy"
grep -q 'maxUnavailable: 1' <<<"$default_strategy"
[ "$(ai_strategy --set deploymentStrategy=null)" = "$default_strategy" ]
recreate_strategy="$(ai_strategy --set deploymentStrategy.type=Recreate --set deploymentStrategy.rollingUpdate=null)"
grep -q 'type: Recreate' <<<"$recreate_strategy"
if grep -q 'rollingUpdate' <<<"$recreate_strategy"; then
echo "Recreate rendered rollingUpdate" >&2; exit 1
fi

- name: Validate Live Chart
run: |
Expand Down
4 changes: 2 additions & 2 deletions charts/ai/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: codetogether-ai
description: CodeTogether AI on-premises Kubernetes deployment

type: application
version: 0.2.3
appVersion: "1.2.8616"
version: 0.2.5
appVersion: "1.2.8821"

icon: https://www.codetogether.com/wp-content/uploads/2020/02/codetogether-circle-128.png
home: https://www.codetogether.com
Expand Down
163 changes: 163 additions & 0 deletions charts/ai/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,9 @@ The following table lists the primary configurable parameters and defaults.
| `readinessProbe.path` | Readiness endpoint on port 1080 | `/healthz` |
| `livenessProbe.path` | Liveness endpoint on port 8080 | `/actuator/health` |
| `startupProbe.enabled` | Enable startup probe | `true` |
| `securityContext.readOnlyRootFilesystem` | Run with a read-only root filesystem; the container writes only to `writableDirectories`. See [Read-only root filesystem](#read-only-root-filesystem) | `true` |
| `writableDirectories.<name>.enabled` | Mount an `emptyDir` on that directory (`runtime`, `www`, `logs`, `tmp`, `systemTmp`); `false` to mount your own volume there | `true` |
| `writableDirectories.<name>.sizeLimit` | Optional `emptyDir` size limit (for example `2Gi`); the pod is evicted when it is exceeded | `""` |

`image.tag` controls which container image the Deployment pulls at install or
upgrade time. `appVersion` in `Chart.yaml` is chart metadata only; it does not
Expand Down Expand Up @@ -374,6 +377,121 @@ If login fails after returning from Google or another identity provider with
and that the registered OAuth redirect URI exactly matches
`{service_fqdn}/api/v1/auth/sso/provider/callback`.

### What the container image contains

The image is built on [Wolfi](https://github.com/wolfi-dev), a minimal Linux
distribution, and runs as the non-root user `ctai` (uid and gid `2200`).

- Shell and tools: `bash`, BusyBox `sh` (`/bin/sh`), `curl`, `ps`, `top`,
`ping`, `netstat`, `vi`, `less`, and the GNU core utilities. `ss`, `ip`,
`openssl` and `dig` are not included.
- Java: OpenJDK 25 with its tools (`jcmd`, `jstack`, `jmap`, `jfr`,
`keytool`). `JAVA_HOME` is `/usr/lib/jvm/default-jvm`, and the JDK's trust
store is `/etc/ssl/certs/java/cacerts`.
- Packages: the package manager is `apk`. It needs root, so it cannot install
anything in the running container. An image built `FROM` this one installs
packages with `apk add` as root before switching back to `USER 2200`.

### Inspect a running pod

`kubectl exec` is enough for the tools above:

```bash
kubectl exec -it -n codetogether-ai deploy/codetogether-ai -c codetogether-ai -- bash
```

For a tool the image does not have, attach an ephemeral debug container. It
shares the application's process namespace and network, so it sees the Java
process, its files under `/proc/<pid>/root` and `localhost`, and nothing
restarts. Use kubectl 1.32 or later, and any image your cluster can pull:

```bash
POD=$(kubectl get pod -n codetogether-ai -l app.kubernetes.io/name=codetogether-ai -o name | head -1)
kubectl debug -it -n codetogether-ai "$POD" \
--image=<a debugging image> \
--target=codetogether-ai --profile=general -c debug -- sh
```

If the namespace enforces the Pod Security `restricted` profile, which does not
allow a root debug container, use the CodeTogether AI image itself as the debug
image and run it as the application's user. The image names its user (`ctai`),
so the numeric uid has to be given:

```bash
echo '{"securityContext":{"runAsUser":2200,"runAsGroup":2200}}' > uid2200.json
IMAGE=$(kubectl get "$POD" -n codetogether-ai -o jsonpath='{.spec.containers[0].image}')
kubectl debug -it -n codetogether-ai "$POD" --image="$IMAGE" \
--target=codetogether-ai --profile=restricted --custom=uid2200.json \
-c debug-app -- bash
```

An ephemeral container stays in the pod's spec until the pod is replaced, and
each one needs a new name (`-c`). The process environment and the mounted
properties file contain secrets: do not paste them into tickets or chat.

### Read-only root filesystem

From chart 0.2.5 the container runs with `readOnlyRootFilesystem: true`: the
image's binaries, scripts and configuration cannot be changed from inside the
pod. It writes only to these directories, each an `emptyDir` that lives as long
as the pod (`writableDirectories`):

| Name | Path | What |
|---|---|---|
| `runtime` | `/opt/ctai/runtime` | Artifacts unpacked at start with the server URL injected into the IDE plugins (about 200 MB), and the YAML generated from the properties file (`config/ctai-configuration.yml`) |
| `www` | `/opt/ctai/www` | nginx's document root: the portal and metric lineage |
| `logs` | `/opt/ctai/logs` | `server.log`, the nginx logs, heap dumps (the newest is kept) |
| `tmp` | `/opt/ctai/tmp` | nginx's pid file and temp files |
| `systemTmp` | `/tmp` | JVM and Tomcat temp files |

A container restart keeps them, and reuses the unpacked artifacts; a new pod
starts empty. To keep logs on a volume of your own, turn that directory over to
it:

```yaml
writableDirectories:
logs:
enabled: false
extraVolumes:
- name: ctai-logs
persistentVolumeClaim:
claimName: ctai-logs
extraVolumeMounts:
- name: ctai-logs
mountPath: /opt/ctai/logs
```

The chart refuses:
- a volume in `extraVolumeMounts` on a path a writable directory already mounts;
- a disabled writable directory with no volume of yours on its path, which would be read-only;
- two writable directories on one path;
- a volume in `extraVolumes` named like the volume of an enabled writable
directory (`writable-logs`, `writable-system-tmp`, …): rename yours;
- `readOnlyRootFilesystem` as a string (`"true"` or `"false"`): it must be a boolean.

Paths are compared after cleaning, so `/opt/ctai/logs/` is `/opt/ctai/logs`.

**When the previous layout is used.** With the previous layout there are no
`writableDirectories`, and the container writes to its own layer. The chart
uses it:
- when `securityContext.readOnlyRootFilesystem` is `false`. Set that if a
pre-start hook (`/opt/ctai/hooks/pre-start.d`) writes outside these
directories.
- when `image.tag` (or `appVersion`, when the tag is empty) names an image
older than 1.2.8793, the first one that supports a read-only root filesystem. Older
images crash-loop under it. `helm install` prints a warning when this
happens. A tag that is not a version, such as `latest`, or an `image.digest`,
is taken as supporting it.
- after `helm upgrade --reuse-values` from a chart before 0.2.5, whose values
have no `readOnlyRootFilesystem`. Add
`--set securityContext.readOnlyRootFilesystem=true` to turn it on.

**Upgrading from 0.2.4 with a volume of your own on one of these paths** (for
example a PVC on `/opt/ctai/logs` in `extraVolumeMounts`): `helm upgrade` stops
with "extraVolumeMounts mounts /opt/ctai/logs, which writableDirectories.logs
already mounts". Add `--set writableDirectories.logs.enabled=false` (or the
same in your values file) and run it again; your volume keeps that path.

## Upgrade

```bash
Expand All @@ -399,6 +517,51 @@ helm upgrade codetogether-ai codetogether/codetogether-ai \

The Deployment rolls when the chart-managed properties Secret changes.

### Rollout strategy

From chart 0.2.4 the Deployment stops the old pod before it starts the new one
(`deploymentStrategy`: `RollingUpdate` with `maxSurge: 0`, `maxUnavailable: 1`).
On a single replica an upgrade therefore has a short outage while the new pod
starts. Earlier charts used the Kubernetes default, which starts the new pod
first.

The pods of one release share an embedded Hazelcast cluster, and a pod only
joins a cluster that runs its own Hazelcast minor version. When a release
changes that version (the release notes say so), any old pod still running
makes the new pod fail to join: its container exits and restarts in a loop, and
the rollout never completes while the old pods keep serving. `helm upgrade`
without `--wait` still prints `deployed`; `kubectl rollout status` shows the
stall.

- **One replica:** the default strategy handles it, as long as the release was
upgraded to chart 0.2.4 or later. Upgrade the chart and the image in the same
`helm upgrade`, as above.
- **More than one replica:** upgrade across a Hazelcast version with
`Recreate`, which stops every old pod first (a short outage):

```bash
helm upgrade codetogether-ai codetogether/codetogether-ai \
--namespace codetogether-ai \
--reset-then-reuse-values \
--set deploymentStrategy.type=Recreate \
--set deploymentStrategy.rollingUpdate=null
```

`rollingUpdate=null` is required: Helm merges overrides into the existing
values, and Kubernetes rejects `Recreate` while `rollingUpdate` is set. The
same command completes a rollout that has already stalled.
`--reset-then-reuse-values` keeps `Recreate` for later upgrades; to return to
the default on a later upgrade, add (Helm 3.10 or later)
`--set-json 'deploymentStrategy={"type":"RollingUpdate","rollingUpdate":{"maxSurge":0,"maxUnavailable":1}}'`.

If a rollout has already stalled on a chart older than 0.2.4, switch the
Deployment to `Recreate` directly:

```bash
kubectl -n codetogether-ai patch deployment codetogether-ai \
-p '{"spec":{"strategy":{"type":"Recreate","rollingUpdate":null}}}'
```

## Uninstall

```bash
Expand Down
9 changes: 9 additions & 0 deletions charts/ai/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,12 @@ Gateway API:
serve this host. Set ingress.enabled=false once the Gateway path works.
{{- end }}
{{- end }}
{{- if and (eq (include "ctai.readOnlyRootFilesystemRequested" .) "true") (eq (include "ctai.imageTooOldForReadOnlyRoot" .) "true") }}

WARNING: image {{ .Values.image.tag | default .Chart.AppVersion }} is older than {{ include "ctai.readOnlyRootFilesystemMinImage" . }}, the first image that
runs with a read-only root filesystem, so this release runs with the previous
layout (a writable root filesystem). Use a newer image to get it.
{{- else if not (eq (include "ctai.readOnlyRootFilesystem" .) "true") }}

Read-only root filesystem: off (securityContext.readOnlyRootFilesystem is not true).
{{- end }}
Loading
Loading