Repository navigation
feat(k8s): a Helm chart deploys its objects, images and values - #2663
Merged
Merged
Conversation
A Chart node had one kind of outgoing edge, DEPENDS_ON for a dependency
its Chart.yaml declares. A chart without dependencies, most of them, was
an isolated leaf: nothing linked it to the objects its templates render,
to its values files, or to the images it runs. On 20 pinned infra
corpora, 238 of 260 Charts had no outgoing edge, while 2,626 objects sat
in chart templates/ directories.
- Chart -DEPLOYS {via: chart}-> each Resource of <chart>/templates/, for
its nearest enclosing chart: a subchart's objects are the subchart's.
The same edge a Flux Kustomization draws to what it applies.
- values.yaml / values-<x>.yaml beside Chart.yaml -CONFIGURES {strategy:
helm_values}-> the Chart.
- Chart -DEPLOYS {via: chart, ref: image}-> each Image its objects name
literally, read after pass_docker.c moved references onto component
Images. A templated image names no Image, and no values default is read.
An incremental closure repair re-runs the K8s pass over its plan only, so
a values file or a template edited alone would lose the chart's edge; such
an edit now declines to the full rebuild, like a Chart.yaml edit.
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
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
Feedback: Kubernetes manifests index well, Helm charts do not. A Chart node was an isolated leaf.
Its only outgoing edge was
DEPENDS_ON, for a dependency itsChart.yamldeclares. The chart directory was used only as a scope, for bundle naming and for include resolution. Nothing linked a chart to the objects its templates render, to its values files, or to the images it runs.Change (
src/pipeline/pass_k8s.c)DEPLOYS {via: chart}<chart>/templates/(nearest enclosing chart, so a subchart's objects are the subchart's). This is the same edge a Flux Kustomization draws to the objects it applies.CONFIGURES {strategy: helm_values}values.yaml/values-<x>.yamlbesideChart.yaml→ Chart. A values file elsewhere, such asci/test-values.yaml, does not.DEPLOYS {via: chart, ref: image}pass_docker.cmoved references onto component Images. A templated image ({{ .Values.image.repository }}) names no Image, and no values default is read.With these edges,
HelmRelease → Chart → Deployment → Imageis one traversable path. No new edge type or label is added.Incremental runs (
pipeline_incremental.c):Chart.yamledit already does:helm_values_changed,helm_template_changed.Proof on real input
Indexed with builds of
ec6427c3and of this branch. The corpora are the 17 pinned infra corpora plus the Phase-8 split-system ones (opentelemetry-helm-charts, podinfo, prometheus/prometheus):DEPLOYS)CONFIGURES)DEPLOYS ref:image)templates/not reached from a Chart__helm_dep__chart without local templates.templates/directories with noChart.yaml:.helm/directories;Tests
probe_helm_chart_deploys_its_objects(grammar_probe_f) uses a chart with a subchart, two values files and aci/values file. Its objects use one templated image and two literal ones. The test asserts the full Chart edge set. Onec6427c3the set is empty.incremental_helm_values_edit_keeps_chart_edge(pipeline_semantic_manifest_repro) editsvalues.yamland checks that itsCONFIGURESedge survives through a full rebuild.ec6427c3it fails atbefore == 0.after == 0: the edge is lost on the edit.Verification
Found, not changed here
{{ .Values.image.repository }}stays the placeholder<.Values.image.repository>. Nothing links it to the values key, or to the overrides that set it: HelmReleasevalues, kustomizehelmCharts.valuesInline, Terraformset {},helm install -f. Value backtracing, and per-release variants with resolved images, are a separate design.crds/objects, which Helm installs beforetemplates/, are not linked from the Chart..helm/directories withoutChart.yamlare not treated as charts.