App Deployments (4a+): config-file mounts via files:#219
Merged
Conversation
Extend the shared compose grammar so file-driven apps (e.g. strfry.conf)
are deployable, not just env-driven ones.
- Service 'files:' entries: read-only config files injected into the
container. Content source is exactly one of inline templated 'content'
(${...} from config/secrets) or 'content_from' a config field (incl. new
ConfigField 'type: file' for a customer-supplied whole file). Optional
'sensitive' renders into a Secret instead of a ConfigMap; the operator
mounts each at its 'path' via subPath (single file, no dir shadowing).
- Validation (shared parser -> admin API): absolute/non-traversal path,
single content source, <=256 KiB inline, content_from must reference a
declared config field, and a file may not overlap a data volume mount.
- resolve_files() renders per-service (path, content, sensitive);
referenced_vars() now also scans file content templates.
- files: (injected, read-only) is kept distinct from volumes: (PVC,
read-write). 4 new tests (strfry.conf example + all rejection paths).
Part of work/app-deployments.md.
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.
Follow-up to the shared compose parser (#218). Adds config-file mounts to the app
composegrammar so file-driven apps (e.g. strfry'sstrfry.conf, nginx, haven) are deployable — env vars alone aren't enough for them.Grammar
A
files:list per service — read-only config files injected into the container:content(templated) orcontent_fromaconfigfield (newtype: file).sensitive: true→ rendered into a Secret; otherwise a ConfigMap. The operator mounts each atpathvia subPath (single file, doesn't shadow the directory).volumes:(persistent read-write PVCs) —files:are injected read-only config.Validation (shared parser → admin API)
Absolute, non-
..path; single content source; ≤256 KiB inline;content_frommust reference a declared config field; a file may not overlap a data-volume mount.API
resolve_files(vars)→ per-service[ResolvedFile { path, content, sensitive }]for the operator.referenced_vars()now also scans file-content templates.Tests
4 new (strfry.conf multi-file example incl.
sensitive+content_from, and every rejection path); 11 total in the crate.Next
4b) operator reconcile — will render
files:into ConfigMaps/Secrets and subPath-mount them alongside Deployment/Service/Ingress/PVC.