Repository navigation
charts/trueforge: add platform integration extension points - #674
Conversation
Prepare the chart to run as a dependency of a hosting platform's umbrella chart while staying platform-neutral: - env map (server + controller): scalar or valueFrom entries that replace chart-computed variables in place, the extension point for platform env - apiKey value for TRUEFORGE_API_KEY (string or valueFrom); the chart fails fast on an empty key since the server always runs with STANDALONE=false - inherit global.labels/annotations/podLabels/podAnnotations/ imagePullSecrets/nodeSelector/affinity/tolerations from a parent chart, plus commonLabels/commonAnnotations on every rendered object - resource tiers: global.resourceTier presets (small/medium/large) for the server and controller, resourceTierOverride to pin a tier locally - global.customCA: rendered or existing ConfigMap, direct mount or initContainer merge into the system bundle, NODE_EXTRA_CA_CERTS - server/controller deploymentAnnotations for parent-managed rollout ordering (e.g. Argo CD sync waves) - externalRedis.sentinel passthrough (REDIS_SENTINEL_HOSTS/MASTER_NAME/ PASSWORD) so a Sentinel install needs no chart change once the app reads them Bump chart to 0.1.6-rc.3. Signed-off-by: Raman Tehlan <ramantehlan@gmail.com>
|
chiragjn
left a comment
There was a problem hiding this comment.
Added minor comments, keeping it approved
- controller.serverUrl is a plain string again; the serverUrlEnv helper is gone. The computed in-cluster default is now scheme-aware (https when mtls is enabled). - rename resourceTierOverride to resourceTier: tiers are a chart concept, not parent-specific. Precedence: resourceTier > global.resourceTier > explicit resources. - apiKey ships a dev placeholder (placeholder-value-please-generate-your-own) so default installs render; replace it before any shared deployment. - annotations (global.annotations + commonAnnotations) now land on Service, ServiceAccount, HPA, and PDB, not just the Deployments. - drop parent-chart branding from comments and README; trim comment noise added by this branch. Signed-off-by: Raman Tehlan <ramantehlan@gmail.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 10196d1. Configure here.
| args: | ||
| - | | ||
| set -e | ||
| cat /etc/ssl/certs/ca-certificates.crt /custom-ca/ca-certificates.crt > /ssl-certs/ca-certificates.crt |
There was a problem hiding this comment.
Custom CA merge init fails
High Severity
The custom CA merge initContainer runs cat on /etc/ssl/certs/ca-certificates.crt inside the default tfy-mirror/alpine image. Vanilla Alpine does not ship the ca-certificates package, so that path is missing, set -e exits non-zero, and both Deployments stay stuck in init. This is the default path whenever global.customCA.enabled is true without existingConfigMap.overrideCAList.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 10196d1. Configure here.


Summary
Prepares the chart to ship as a dependency of the TrueFoundry
truefoundryumbrella chart (control plane) while keeping the chart itself platform-neutral: nothing TrueFoundry-specific lands here, only generic extension points the parent chart drives.Bumps the chart to
0.1.6-rc.3.Changes
envmap (server + controller): entries are scalars or{valueFrom: secretKeyRef|configMapKeyRef|fieldRef}. A key here replaces the chart-computed variable of the same name (e.g.POSTGRES_HOST,PUBLIC_BASE_URL), so it doubles as the override mechanism. This is how a parent chart injects platform env (TRUEFOUNDRY_*).apiKeyvalue wired toTRUEFORGE_API_KEYon both deployments (string orvalueFrom). The chart fails fast on an empty key: the server always runsSTANDALONE=falseand the app rejects an empty key. The chart never creates the Secret.global.labels,global.annotations,global.podLabels,global.podAnnotations,global.imagePullSecrets,global.nodeSelector,global.affinity,global.tolerationsmerge with local values (local wins). NewcommonLabels/commonAnnotationsapply to every rendered object.global.resourceTier(small / medium / large presets, separate presets for server and the always-single-replica controller) plusresourceTierOverrideto pin a tier locally. Empty tier keeps explicitresources.global.customCA: inline certificate (chart renders a ConfigMap) orexistingConfigMap.name; direct mount over/etc/ssl/certsor initContainer merge with the system bundle; setsNODE_EXTRA_CA_CERTS. New templatecustom-ca-configmap.yaml.server.deploymentAnnotations/controller.deploymentAnnotationsso a parent chart can set rollout ordering (e.g. Argo CD sync waves) per Deployment.externalRedis.sentinelpassthrough: injectsREDIS_SENTINEL_HOSTS/REDIS_SENTINEL_MASTER_NAME/REDIS_SENTINEL_PASSWORDwhen set, so a Sentinel-backed install needs no chart change once the app reads them.Test plan
helm lintpasseshelm templatedefault render (bundled Postgres/Redis) withapiKeysetenvreplace-in-place verified (POSTGRES_HOSToverride appears exactly once per container)global.customCArender: ConfigMap + initContainer merge +NODE_EXTRA_CA_CERTSREDIS_SENTINEL_*varsapiKeyfails template with a clear messagecharts/trueforge@0.1.6-rc.3after merge (umbrella chart pins this version)Note
Medium Risk
Touches env composition, controller→server URL scheme under mTLS, and pod init/volume behavior for custom CA—misconfiguration could break schedules, TLS, or outbound trust in umbrella deployments.
Overview
Bumps the Helm chart to 0.1.6-rc.3 and adds generic hooks so a parent chart (e.g. TrueFoundry control plane) can drive TrueForge without platform-specific values in this chart.
Configuration & auth: New
apiKeymaps toTRUEFORGE_API_KEYon server and controller (dev placeholder; validated non-empty). Newenvmap applies to both workloads and replaces chart-computed vars by name (e.g.POSTGRES_HOST,PUBLIC_BASE_URL) instead of duplicating entries.externalRedis.sentineloptionally injectsREDIS_SENTINEL_*env when external Redis is used.Subchart / ops integration: Merges
global.labels, annotations, pod labels/annotations,imagePullSecrets, scheduling (nodeSelector,affinity, tolerations append), andglobal.resourceTierwith local overrides viacommonLabels/commonAnnotationsandresourceTierpresets (small/medium/large) that replace explicitresourcestables.global.customCAsupports inline PEM (new ConfigMap template) or an existing ConfigMap, with direct mount or initContainer merge plusNODE_EXTRA_CA_CERTS. Deployment-levelserver.deploymentAnnotations/controller.deploymentAnnotationsfor rollout ordering.Runtime wiring: Controller default
SERVER_URLuses https whenmtls.enabled. Resources and/tmpemptyDir size limits derive from tier helpers on both deployments. README and production checklist document the new values.Reviewed by Cursor Bugbot for commit 10196d1. Bugbot is set up for automated code reviews on this repo. Configure here.