Repository navigation
AITRAX-2990: codetogether-ai chart 0.2.5 - read-only root filesystem - #233
Draft
CodeTogetherBot wants to merge 2 commits into
Draft
CodeTogetherBot wants to merge 2 commits into
CodeTogetherBot wants to merge 2 commits into
Conversation
The container runs with readOnlyRootFilesystem: true and an emptyDir on each directory the image writes (writableDirectories: runtime, www, logs, tmp, /tmp), each switchable to a customer volume, with an optional sizeLimit. The chart refuses a customer volume on a writable directory's path unless that directory is disabled, a disabled directory with no volume on its path, duplicate paths and volume names, and a non-boolean readOnlyRootFilesystem. The previous layout is kept for readOnlyRootFilesystem: false, for an image tag older than the first image that supports it (with a NOTES warning), and after --reuse-values from a chart before 0.2.5. ctai.readOnlyRootFilesystemMinImage is a placeholder until that release exists, and CI fails until it is set. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CI installs Helm 3.9.0, whose template `and` evaluates every argument: with image.tag latest the version is empty and semverCompare failed, so helm lint failed. The comparison is nested in an if instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AITRAX-2990, public chart part:
codetogether-ai0.2.5 runs the container with a read-only root filesystem, as the internal chart does in CodeTogether-Inc/ct-ai#3222.Draft until the image release. The default
image.tagislatest. An image without ct-ai#3222 crash-loops with a read-only root, so this ships with, or after, the first release that includes it.ctai.readOnlyRootFilesystemMinImageis a placeholder until then, and CI fails until it is set:ctai.readOnlyRootFilesystemMinImageto that release's version, andappVersionto it or later (CI checks min ≤ appVersion).What changes
securityContext.readOnlyRootFilesystem: trueby default.writableDirectories: anemptyDiron/opt/ctai/runtime,/opt/ctai/www,/opt/ctai/logs,/opt/ctai/tmpand/tmp. Each hasenabled,mountPathand an optionalsizeLimit(empty by default, to avoid evictions).The chart refuses:
extraVolumeMountsentry on a writable directory's path, unless that directory is disabled;readOnlyRootFilesystem.Paths are compared after
path.Clean.The previous layout (no
writableDirectories, writable container layer) is used:readOnlyRootFilesystem: false, for a pre-start hook that writes elsewhere;image.tag(orappVersion) is older than the minimum image. The leading x.y.z is compared, so1.2.8000-hotfixcounts, and NOTES warns;helm upgrade --reuse-valuesfrom a chart before 0.2.5, which has noreadOnlyRootFilesystem.README:
CI (
helm-template-check.yml):Test plan
Render matrix: latest, old and new tags (with
vand suffixes), digest,false,--reuse-values,sizeLimit, custom entries.The new CI block run locally. It passes with a real minimum and fails with the placeholder. Negative controls (guard removed, mounts left on with
false) fail.helm lintand the CI block with Helm 3.9.0 (what CI installs; its templateanddoes not short-circuit, which the first push tripped on) and 3.15.4. actionlint shows only the existingactions/checkout@v3warning.CI on this PR: lint passes; the job fails only on the placeholder minimum image, as intended until the release.
Dev cluster, throwaway namespace (deleted): this chart with image
b8762(a ct-ai#3222 feature build) and a real properties secret.ro;runtime/config/;/healthz,/actuator/health,/,/portal/,/clients/,/trackers/,/metric-lineage/all return 200./code-review(high): 9 findings. Fixed:enabled;Not changed:
tmp/nginx, which the image'sstart-ctaicreates since ct-ai#3222, verified on the cluster;Set the minimum image and
appVersiononce the release exists.🤖 Generated with Claude Code