feat(k8s): data-declared generic Platform components (K4a)#148
Merged
Conversation
Make Platform install ANY Helm chart with no code change via a generic
`components` map — the Terraform-provider-style path the roadmap calls for.
The named fields (traefik/cloudflared/argocd/nvidia/nfs/longhorn) are now
explicitly PRESETS: default chart coordinates layered on the generic path,
not baked-in opinion.
`components: {<name>: {chart: {repo, name, version?}, namespace?, values?,
wait?, enabled?}}` — enabled defaults true for a listed component (set
false to disable without removing); namespace defaults to the release name;
a generic component sharing a preset's name overrides that preset.
enabledComponents merges presets (declaration order) + generic (sorted by
name) deterministically via a shared buildComponentRelease helper.
#Platform.components? schema entry.
K4(b) — deployment methods as providers (Kustomize/Flux as kinds) — remains.
Tests: generic install (chart/ns/values), enabled:false + missing-chart
skip (defensive), generic-overrides-preset dedup, preset-then-generic order.
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.
K4(a) — Data-declared generic Platform components
Delivers the roadmap's intent that Platform is generic support (Terraform-provider style), not a curated grab-bag of preferred charts. Platform can now install any Helm chart with no code change.
Generic
componentsmaptraefik/cloudflared/argocd/nvidiaDevicePlugin/nfsProvisioner/longhorn) are now explicitly presets — they only fill default chart coordinates on top of the generic path, not baked-in opinion.enableddefaults true (listing it opts in; set false to disable without removing);namespacedefaults to the release name; a generic entry sharing a preset's name overrides it.enabledComponentsmerges presets (declaration order) then generic (sorted by name) deterministically, via a sharedbuildComponentReleasehelper. Get/Delete/prune/plan key on release name and work unchanged.#Platform.components?schema entry (chart.repo + chart.name required).Fully back-compat: existing preset-only specs behave identically (all prior tests pass unchanged).
Remaining
K4(b) — deployment methods as providers (Kustomize/Flux as new kinds) — stays open; tracked in ROADMAP.
Tests
Generic install (chart/ns default-to-name/values thread-through),
enabled:false+ missing-chart-coords skip (defensive), generic-overrides-preset dedup, preset-then-generic ordering.Local CI (k8s plugin module): build,
go test ./..., gofmt, vet, staticcheck, golangci-lint (0 issues), modernize — all green.