@intentius/chant-lexicon-helm 0.45.0 → 0.49.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/archive-render.d.ts +94 -0
- package/dist/archive-render.d.ts.map +1 -0
- package/dist/commands.d.ts +54 -0
- package/dist/commands.d.ts.map +1 -0
- package/dist/config.d.ts +135 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/deep-observe-hooks.d.ts +2 -0
- package/dist/deep-observe-hooks.d.ts.map +1 -0
- package/dist/deep-observe.d.ts +54 -0
- package/dist/deep-observe.d.ts.map +1 -0
- package/dist/describe-resources.d.ts +17 -0
- package/dist/describe-resources.d.ts.map +1 -0
- package/dist/index.d.ts +18 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/integrity.json +5 -3
- package/dist/lint/audit-catalog.d.ts.map +1 -1
- package/dist/lint/post-synth/index.d.ts.map +1 -1
- package/dist/lint/post-synth/whm503.d.ts +34 -0
- package/dist/lint/post-synth/whm503.d.ts.map +1 -0
- package/dist/lint/post-synth/whm504.d.ts +20 -0
- package/dist/lint/post-synth/whm504.d.ts.map +1 -0
- package/dist/manifest.json +1 -1
- package/dist/okf/index.md +2 -0
- package/dist/okf/rules/WHM503.md +15 -0
- package/dist/okf/rules/WHM504.md +11 -0
- package/dist/okf/types/Values.md +1 -0
- package/dist/op/activities/cluster-probe.d.ts +44 -0
- package/dist/op/activities/cluster-probe.d.ts.map +1 -0
- package/dist/op/activities/helm.d.ts +179 -5
- package/dist/op/activities/helm.d.ts.map +1 -1
- package/dist/op/activities/index.d.ts +4 -2
- package/dist/op/activities/index.d.ts.map +1 -1
- package/dist/pinnability/actions.d.ts +76 -0
- package/dist/pinnability/actions.d.ts.map +1 -0
- package/dist/pinnability/classify.d.ts +129 -0
- package/dist/pinnability/classify.d.ts.map +1 -0
- package/dist/pinnability/conditions.d.ts +109 -0
- package/dist/pinnability/conditions.d.ts.map +1 -0
- package/dist/pinnability/index.d.ts +17 -0
- package/dist/pinnability/index.d.ts.map +1 -0
- package/dist/pinnability/localize.d.ts +124 -0
- package/dist/pinnability/localize.d.ts.map +1 -0
- package/dist/pinnability/render-stream.d.ts +27 -0
- package/dist/pinnability/render-stream.d.ts.map +1 -0
- package/dist/pinnability/values.d.ts +69 -0
- package/dist/pinnability/values.d.ts.map +1 -0
- package/dist/plugin.d.ts.map +1 -1
- package/dist/release-observe.d.ts +109 -0
- package/dist/release-observe.d.ts.map +1 -0
- package/dist/render-diff.d.ts +192 -0
- package/dist/render-diff.d.ts.map +1 -0
- package/dist/render-digest.d.ts +135 -0
- package/dist/render-digest.d.ts.map +1 -0
- package/dist/render-store.d.ts +310 -0
- package/dist/render-store.d.ts.map +1 -0
- package/dist/render-wrapper.d.ts +140 -0
- package/dist/render-wrapper.d.ts.map +1 -0
- package/dist/render.d.ts +81 -0
- package/dist/render.d.ts.map +1 -1
- package/dist/rules/whm503.ts +101 -0
- package/dist/rules/whm504.ts +52 -0
- package/dist/skills/chant-helm.md +7 -0
- package/dist/values-probe.d.ts +177 -0
- package/dist/values-probe.d.ts.map +1 -0
- package/dist/wrapper-chart.d.ts +61 -0
- package/dist/wrapper-chart.d.ts.map +1 -0
- package/package.json +10 -4
- package/src/archive-render.test.ts +201 -0
- package/src/archive-render.ts +119 -0
- package/src/commands.test.ts +487 -0
- package/src/commands.ts +445 -0
- package/src/config.test.ts +130 -0
- package/src/config.ts +220 -0
- package/src/deep-observe-hooks.ts +20 -0
- package/src/deep-observe.test.ts +165 -0
- package/src/deep-observe.ts +121 -0
- package/src/describe-resources.test.ts +255 -0
- package/src/describe-resources.ts +198 -0
- package/src/index.ts +98 -2
- package/src/lifecycle-integration.test.ts +289 -0
- package/src/lint/audit-catalog.ts +2 -0
- package/src/lint/post-synth/index.ts +4 -0
- package/src/lint/post-synth/whm503.test.ts +134 -0
- package/src/lint/post-synth/whm503.ts +101 -0
- package/src/lint/post-synth/whm504.test.ts +105 -0
- package/src/lint/post-synth/whm504.ts +52 -0
- package/src/op/activities/cluster-probe.test.ts +66 -0
- package/src/op/activities/cluster-probe.ts +148 -0
- package/src/op/activities/helm.test.ts +824 -0
- package/src/op/activities/helm.ts +628 -5
- package/src/op/activities/index.ts +17 -2
- package/src/pinnability/actions.ts +263 -0
- package/src/pinnability/classify.ts +579 -0
- package/src/pinnability/conditions.ts +0 -0
- package/src/pinnability/index.ts +77 -0
- package/src/pinnability/localize.test.ts +234 -0
- package/src/pinnability/localize.ts +644 -0
- package/src/pinnability/pinnability.test.ts +560 -0
- package/src/pinnability/render-stream.ts +59 -0
- package/src/pinnability/values.ts +205 -0
- package/src/plugin.test.ts +3 -1
- package/src/plugin.ts +47 -0
- package/src/release-observe.ts +392 -0
- package/src/render-diff.test.ts +366 -0
- package/src/render-diff.ts +407 -0
- package/src/render-digest.test.ts +186 -0
- package/src/render-digest.ts +207 -0
- package/src/render-store.test.ts +412 -0
- package/src/render-store.ts +621 -0
- package/src/render-wrapper.test.ts +259 -0
- package/src/render-wrapper.ts +274 -0
- package/src/render.test.ts +383 -4
- package/src/render.ts +319 -8
- package/src/skills/chant-helm.md +7 -0
- package/src/values-probe.test.ts +400 -0
- package/src/values-probe.ts +627 -0
- package/src/wrapper-chart.test.ts +110 -0
- package/src/wrapper-chart.ts +124 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `addArchiveHelmRender` — fold a pinned render into a `BuildArchiveManifest`
|
|
3
|
+
* (#1240, epic #1228 Phase 3).
|
|
4
|
+
*
|
|
5
|
+
* #1238 gave a pinned render durable, content-addressed storage
|
|
6
|
+
* (./render-store.ts's `RenderManifest`, modeled on core's
|
|
7
|
+
* `BuildArchiveManifest`). This module is the seam between the two: it folds
|
|
8
|
+
* one render into a *build archive*'s manifest, the same self-contained
|
|
9
|
+
* bundle `docker-build`/`addArchiveTemplate` write into
|
|
10
|
+
* (packages/core/src/components/verbs/build-archive.ts), so a component that
|
|
11
|
+
* composes a `HelmRender` alongside an image/template gets one archive that
|
|
12
|
+
* carries all of it.
|
|
13
|
+
*
|
|
14
|
+
* A rendered chart is a template: it reuses `kind: "template"` rather than
|
|
15
|
+
* adding a new `BuildArchiveEntryKind`. What distinguishes a render from a
|
|
16
|
+
* synthesized CloudFormation/other IaC template is only its media type,
|
|
17
|
+
* `HELM_RENDER_MEDIA_TYPE` — and that is enough. Core's
|
|
18
|
+
* `lifecycle/oras-referrer-lookup.ts` classifies *referrers* (SBOM/
|
|
19
|
+
* provenance/signature) by the referrer's own media type, keyed only by the
|
|
20
|
+
* subject *digest* it discovers against — never by the subject entry's own
|
|
21
|
+
* `kind`/`mediaType`. A render's digest is therefore attachable exactly like
|
|
22
|
+
* an image's: `oras discover <repo>@<renderDigest>` finds the same
|
|
23
|
+
* referrers a signing/attestation pipeline would attach to any other
|
|
24
|
+
* artifact, with no change to that lookup needed (see
|
|
25
|
+
* ./archive-render.test.ts for the referrer-classification proof).
|
|
26
|
+
*
|
|
27
|
+
* Mirrors `addArchiveTemplate` (packages/core/src/components/verbs/build.ts)
|
|
28
|
+
* in every way that matters: a plain, pure function (not a registered
|
|
29
|
+
* capability — rendering happens at chant's existing build/synth time, not
|
|
30
|
+
* as a new deploy-time verb), accumulates onto a caller-supplied manifest so
|
|
31
|
+
* a component's whole build phase shares one archive, and threads an
|
|
32
|
+
* optional `sourceRef` into a `provenance` link (#614). It differs in one
|
|
33
|
+
* respect: rather than recomputing a digest from raw content bytes (core's
|
|
34
|
+
* `contentDigest`), it reuses the render's own `contentDigest` — the real
|
|
35
|
+
* `sha256:` over the canonical rendered stream that `helmContentDigest`
|
|
36
|
+
* already computed and `persistHelmRender` already wrote to the render
|
|
37
|
+
* store — so the archive entry's identity and the render store's identity
|
|
38
|
+
* are the same digest, not two independent hashes of the same bytes.
|
|
39
|
+
*/
|
|
40
|
+
import { type BuildArchiveManifest } from "@intentius/chant/components/verbs/build-archive";
|
|
41
|
+
import type { RenderManifest } from "./render-store.js";
|
|
42
|
+
/**
|
|
43
|
+
* Media type for a pinned helm render folded into a build archive as a
|
|
44
|
+
* `template`-kind entry. `v1` names the canonical-stream shape
|
|
45
|
+
* `canonicalizeRender` (./render-digest.ts) produces — a versioned suffix so
|
|
46
|
+
* a future incompatible canonicalization can be told apart from this one
|
|
47
|
+
* without guessing from content alone.
|
|
48
|
+
*/
|
|
49
|
+
export declare const HELM_RENDER_MEDIA_TYPE = "application/vnd.chant.helm-render.v1+yaml";
|
|
50
|
+
export interface AddArchiveHelmRenderInput {
|
|
51
|
+
/** Where the render is written inside the build archive (e.g. `"external-secrets.render.yaml"`). */
|
|
52
|
+
path: string;
|
|
53
|
+
/**
|
|
54
|
+
* The persisted render this entry describes — see ./render-store.ts's
|
|
55
|
+
* `persistHelmRender`/`loadRenderManifest`. Supplies the entry's digest
|
|
56
|
+
* (`RenderManifest.contentDigest`, the same identity the render store
|
|
57
|
+
* keys its content-addressed entry under).
|
|
58
|
+
*/
|
|
59
|
+
render: RenderManifest;
|
|
60
|
+
/**
|
|
61
|
+
* Manifest to extend, so a component's whole build phase (image/template +
|
|
62
|
+
* render) accumulates one manifest — the same accumulation convention
|
|
63
|
+
* `addArchiveTemplate`/`generate-sbom`'s `manifest` input uses. Omit to
|
|
64
|
+
* start a new manifest holding just this render.
|
|
65
|
+
*/
|
|
66
|
+
manifest?: BuildArchiveManifest;
|
|
67
|
+
/**
|
|
68
|
+
* Source ref/commit this render was produced from (#614), recorded as the
|
|
69
|
+
* entry's `provenance.sourceRef`. Defaults to `render.sourceRef` when the
|
|
70
|
+
* caller omits it — the render already carries this when known; no
|
|
71
|
+
* `provenance` is recorded when neither supplies one.
|
|
72
|
+
*/
|
|
73
|
+
sourceRef?: string;
|
|
74
|
+
}
|
|
75
|
+
export interface AddArchiveHelmRenderOutput {
|
|
76
|
+
/** The render's content digest — `render.contentDigest`, unchanged; returned for symmetry with `addArchiveTemplate`'s output. */
|
|
77
|
+
digest: string;
|
|
78
|
+
/** The build archive's manifest, now including this render's entry. */
|
|
79
|
+
manifest: BuildArchiveManifest;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Fold one pinned render into a build archive's manifest as a
|
|
83
|
+
* `template`-kind entry with `mediaType: HELM_RENDER_MEDIA_TYPE` — the
|
|
84
|
+
* render peer of `addArchiveTemplate`. The entry's digest is the render's
|
|
85
|
+
* own `contentDigest` (real `sha256:` over the canonical rendered stream,
|
|
86
|
+
* ./render-digest.ts's `helmContentDigest`), so the same digest that keys
|
|
87
|
+
* the render store's `sha256-<hex>/` entry (./render-store.ts) also keys
|
|
88
|
+
* this archive entry — one identity, not a second hash of the same bytes.
|
|
89
|
+
* Adding the entry recomputes `manifest.manifestDigest`
|
|
90
|
+
* (`computeManifestDigest`), so the render rolls into the archive's own
|
|
91
|
+
* aggregate identity exactly as an image or template does.
|
|
92
|
+
*/
|
|
93
|
+
export declare function addArchiveHelmRender(input: AddArchiveHelmRenderInput): AddArchiveHelmRenderOutput;
|
|
94
|
+
//# sourceMappingURL=archive-render.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"archive-render.d.ts","sourceRoot":"","sources":["../src/archive-render.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,iDAAiD,CAAC;AAGzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,8CAA8C,CAAC;AAElF,MAAM,WAAW,yBAAyB;IACxC,oGAAoG;IACpG,IAAI,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,MAAM,EAAE,cAAc,CAAC;IACvB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,oBAAoB,CAAC;IAChC;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,0BAA0B;IACzC,iIAAiI;IACjI,MAAM,EAAE,MAAM,CAAC;IACf,uEAAuE;IACvE,QAAQ,EAAE,oBAAoB,CAAC;CAChC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,GAAG,0BAA0B,CAejG"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `chant helm <verb>` — the pinned-renders surface (#1248, epic #1228
|
|
3
|
+
* Phase 6), mounted through the command-group seam (#1078).
|
|
4
|
+
*
|
|
5
|
+
* Four verbs over machinery that already exists but had no CLI reach:
|
|
6
|
+
*
|
|
7
|
+
* - `classify` runs the pinnability gate (#1234) over a chart directory and
|
|
8
|
+
* prints the verdict with every finding located — capability references,
|
|
9
|
+
* open generated inputs, conditional hazards, lookup sites.
|
|
10
|
+
* - `localize` runs the double-render localizer (#1236): it renders the
|
|
11
|
+
* chart twice, maps every unstable output line to the open input that
|
|
12
|
+
* produced it, and prints the validated pins that would close each one.
|
|
13
|
+
* - `renders` discovers the current project and lists every `HelmRender`
|
|
14
|
+
* record with its digests (#1237) and capability profile, plus the
|
|
15
|
+
* stability report grouping renders by input identity.
|
|
16
|
+
* - `diff` (#1238) reports what changed between two renders, dispatching on
|
|
17
|
+
* its arguments and `--live`: `diff <from-digest> <to-digest>` resolves
|
|
18
|
+
* two content digests from the render store and reports added/removed/
|
|
19
|
+
* changed documents with field-level changes inside each changed one —
|
|
20
|
+
* no cluster, no credentials (#1249, render-to-render, offline).
|
|
21
|
+
* `diff <content-digest> <environment> --live` resolves a single stored
|
|
22
|
+
* render and diffs every one of its documents against the live cluster,
|
|
23
|
+
* property by property (#1250, render-to-live). Both modes share
|
|
24
|
+
* ./render-diff.ts and this file's formatting.
|
|
25
|
+
*
|
|
26
|
+
* This module is plain data reachable from plugin.ts — every implementation
|
|
27
|
+
* (classifier, localizer, discovery, differ) sits behind a dynamic import,
|
|
28
|
+
* following `lexicons/k8s/src/kube/group.ts`'s discipline, so loading the
|
|
29
|
+
* plugin never pays for machinery no verb was asked to run.
|
|
30
|
+
*/
|
|
31
|
+
import type { CommandGroup } from "@intentius/chant/cli/command-group";
|
|
32
|
+
import type { PinnabilityReport } from "./pinnability/classify.js";
|
|
33
|
+
import type { LocalizationReport } from "./pinnability/localize.js";
|
|
34
|
+
import type { HelmRenderRecord } from "./render.js";
|
|
35
|
+
import type { RenderStabilityReport } from "./render-digest.js";
|
|
36
|
+
import type { DeepDiffResult } from "@intentius/chant/lifecycle/deep-diff";
|
|
37
|
+
import type { RenderDiffResult } from "./render-diff.js";
|
|
38
|
+
/** The printed classify report — one line per finding, locations included. */
|
|
39
|
+
export declare function formatPinnabilityReport(report: PinnabilityReport): string;
|
|
40
|
+
/**
|
|
41
|
+
* The printed localization table: one block per open input, then the lines
|
|
42
|
+
* nothing explains. Same shape the survey harness prints, kept here so the
|
|
43
|
+
* CLI does not reach into test code.
|
|
44
|
+
*/
|
|
45
|
+
export declare function formatLocalizationReport(loc: LocalizationReport): string;
|
|
46
|
+
/** The printed render-record table plus the stability summary. */
|
|
47
|
+
export declare function formatRenderRecords(records: readonly HelmRenderRecord[], stability: RenderStabilityReport): string;
|
|
48
|
+
/** The printed render-diff report: one line per added/removed document, a block per changed one. */
|
|
49
|
+
export declare function formatRenderDiff(diff: RenderDiffResult): string;
|
|
50
|
+
/** The printed render-to-live diff report: property drift per document, then holes. */
|
|
51
|
+
export declare function formatRenderLiveDiff(contentDigest: string, environment: string, diff: DeepDiffResult): string;
|
|
52
|
+
/** The `chant helm` verb group (#1248). */
|
|
53
|
+
export declare function helmCommandGroup(): CommandGroup;
|
|
54
|
+
//# sourceMappingURL=commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../src/commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAuB,MAAM,oCAAoC,CAAC;AAG5F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAwEtD,8EAA8E;AAC9E,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,CA8BzE;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,kBAAkB,GAAG,MAAM,CAqBxE;AAED,kEAAkE;AAClE,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,SAAS,gBAAgB,EAAE,EACpC,SAAS,EAAE,qBAAqB,GAC/B,MAAM,CAqBR;AAED,oGAAoG;AACpG,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,gBAAgB,GAAG,MAAM,CA6B/D;AAwGD,uFAAuF;AACvF,wBAAgB,oBAAoB,CAAC,aAAa,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,GAAG,MAAM,CA6B7G;AAoDD,2CAA2C;AAC3C,wBAAgB,gBAAgB,IAAI,YAAY,CA4B/C"}
|
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helm capability profiles — the `helm` namespace in `chant.config.ts` (#1235,
|
|
3
|
+
* epic #1228 Phase 1).
|
|
4
|
+
*
|
|
5
|
+
* `helm template` looks like a pure function of (chart, values) and is not:
|
|
6
|
+
* `.Capabilities.KubeVersion` defaults to a version baked into the helm
|
|
7
|
+
* binary (v1.31.0 on helm 3.16.2, v1.35.0 on 4.1.1), and
|
|
8
|
+
* `.Capabilities.APIVersions` is silently empty offline. Two engineers on
|
|
9
|
+
* different helm versions therefore render different bytes from identical
|
|
10
|
+
* inputs unless the capability profile is declared. Declaring it closes both
|
|
11
|
+
* inputs: `--kube-version` and `--api-versions` are passed on every render
|
|
12
|
+
* that references a profile, so the render is a function of
|
|
13
|
+
* (chart, values, profile) and its digest means something.
|
|
14
|
+
*
|
|
15
|
+
* Profiles are scoped **per cluster** (see the epic's Decisions): each
|
|
16
|
+
* cluster declares its own `kubeVersion` / `apiVersions`, and a render is
|
|
17
|
+
* pinned against exactly one profile. This mirrors how the k8s lexicon binds
|
|
18
|
+
* environments to clusters (`k8s.profiles.<env>.context`, chant #1100) — a
|
|
19
|
+
* capability profile is the same per-cluster fact seen from the render side.
|
|
20
|
+
*
|
|
21
|
+
* ```ts
|
|
22
|
+
* export default {
|
|
23
|
+
* lexicons: ["helm", "k8s"],
|
|
24
|
+
* helm: {
|
|
25
|
+
* capabilityProfiles: {
|
|
26
|
+
* prod: { kubeVersion: "1.33.6", apiVersions: ["monitoring.coreos.com/v1"] },
|
|
27
|
+
* staging: { kubeVersion: "1.31.4", apiVersions: [] },
|
|
28
|
+
* },
|
|
29
|
+
* },
|
|
30
|
+
* };
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* A `HelmRender` references a profile by name (`capabilityProfile: "prod"`)
|
|
34
|
+
* or carries one inline. No profile keeps today's unpinned behavior; a
|
|
35
|
+
* reference that resolves to nothing is a build error naming the profile —
|
|
36
|
+
* never a silent fallback to the binary's default.
|
|
37
|
+
*
|
|
38
|
+
* Follows the k8s lexicon's config seam (#1344): the zod schema is the
|
|
39
|
+
* runtime half core validates the namespace with, the interface is the
|
|
40
|
+
* compile-time half projects write `satisfies` against, and the agreement
|
|
41
|
+
* type at the bottom keeps the two from drifting.
|
|
42
|
+
*/
|
|
43
|
+
import { z } from "zod";
|
|
44
|
+
import type { ChantConfig } from "@intentius/chant/config";
|
|
45
|
+
/**
|
|
46
|
+
* What `--kube-version` accepts: `1.33`, `1.33.6`, `v1.33.6`. Deliberately
|
|
47
|
+
* looser than full semver (no prerelease/build tags — helm's capability
|
|
48
|
+
* parsing does not want them) and tighter than "any string" (a typo like
|
|
49
|
+
* `"latest"` must fail at declaration, not render as garbage).
|
|
50
|
+
*/
|
|
51
|
+
export declare const KUBE_VERSION_PATTERN: RegExp;
|
|
52
|
+
/**
|
|
53
|
+
* One cluster's declared capabilities, as written in
|
|
54
|
+
* `helm.capabilityProfiles.<name>`. The profile's name is the record key.
|
|
55
|
+
*/
|
|
56
|
+
export interface HelmCapabilityProfileConfig {
|
|
57
|
+
/** Kubernetes version the cluster runs, e.g. `"1.33.6"` — passed as `--kube-version`. */
|
|
58
|
+
kubeVersion: string;
|
|
59
|
+
/**
|
|
60
|
+
* API versions available on the cluster beyond the core set, e.g.
|
|
61
|
+
* `"monitoring.coreos.com/v1"` — each passed as `--api-versions`. Omit (or
|
|
62
|
+
* declare empty) for a cluster with no extra API groups charts probe for.
|
|
63
|
+
*/
|
|
64
|
+
apiVersions?: string[];
|
|
65
|
+
}
|
|
66
|
+
/** A resolved capability profile: the declared facts plus the name they were declared under. */
|
|
67
|
+
export interface HelmCapabilityProfile extends HelmCapabilityProfileConfig {
|
|
68
|
+
/** The profile's declared name (the `helm.capabilityProfiles` key, or the inline `name`). */
|
|
69
|
+
name: string;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* How a `HelmRender` names its profile: a string resolved against
|
|
73
|
+
* `helm.capabilityProfiles`, or an inline profile object for the rare render
|
|
74
|
+
* whose cluster facts live nowhere else.
|
|
75
|
+
*/
|
|
76
|
+
export type HelmCapabilityProfileRef = string | HelmCapabilityProfile;
|
|
77
|
+
export interface HelmChantConfig {
|
|
78
|
+
/** Per-cluster capability profiles, keyed by profile (cluster/environment) name. */
|
|
79
|
+
capabilityProfiles?: Record<string, HelmCapabilityProfileConfig>;
|
|
80
|
+
}
|
|
81
|
+
export declare const helmCapabilityProfileSchema: z.ZodObject<{
|
|
82
|
+
kubeVersion: z.ZodString;
|
|
83
|
+
apiVersions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
84
|
+
}, z.core.$strict>;
|
|
85
|
+
export declare const helmConfigSchema: z.ZodObject<{
|
|
86
|
+
capabilityProfiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
87
|
+
kubeVersion: z.ZodString;
|
|
88
|
+
apiVersions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
89
|
+
}, z.core.$strict>>>;
|
|
90
|
+
}, z.core.$strict>;
|
|
91
|
+
declare module "@intentius/chant/config" {
|
|
92
|
+
interface ChantConfig {
|
|
93
|
+
helm?: HelmChantConfig;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Compile-time proof the augmentation above reaches `ChantConfig` — the same
|
|
98
|
+
* guard the k8s and forgejo lexicons carry (#1344). Without it, a project
|
|
99
|
+
* writing the documented snippet with `satisfies ChantConfig` fails to
|
|
100
|
+
* compile and nothing in this repo notices.
|
|
101
|
+
*/
|
|
102
|
+
export type HelmConfigNamespace = NonNullable<ChantConfig["helm"]>;
|
|
103
|
+
/**
|
|
104
|
+
* The schema and the documented interface describe the same namespace. If a
|
|
105
|
+
* field is added to one and not the other, this stops compiling.
|
|
106
|
+
*/
|
|
107
|
+
type SchemaMatchesInterface = z.infer<typeof helmConfigSchema> extends HelmChantConfig ? HelmChantConfig extends z.infer<typeof helmConfigSchema> ? true : never : never;
|
|
108
|
+
export type _SchemaAgreesWithInterface = SchemaMatchesInterface;
|
|
109
|
+
/**
|
|
110
|
+
* Validate a resolved profile's fields. Returns one message per problem,
|
|
111
|
+
* each naming the profile — empty when the profile is sound.
|
|
112
|
+
*
|
|
113
|
+
* Config-declared profiles are already schema-checked at config load
|
|
114
|
+
* (`helmConfigSchema` via the plugin's `configSchema`); this covers inline
|
|
115
|
+
* profiles handed straight to `HelmRender`, and re-checks resolved ones so a
|
|
116
|
+
* config loaded outside the CLI (a bare API caller) fails identically.
|
|
117
|
+
*/
|
|
118
|
+
export declare function validateCapabilityProfile(profile: HelmCapabilityProfile): string[];
|
|
119
|
+
/**
|
|
120
|
+
* Resolve a `HelmRender`'s profile reference to a concrete profile.
|
|
121
|
+
*
|
|
122
|
+
* - An inline profile object is validated and returned as-is.
|
|
123
|
+
* - A string is looked up in `helm.capabilityProfiles` of the nearest
|
|
124
|
+
* `chant.config.ts`/`.json` above `opts.startDir` (default: cwd).
|
|
125
|
+
*
|
|
126
|
+
* A reference that resolves to nothing throws, naming the missing profile,
|
|
127
|
+
* the profiles that ARE declared, and where to declare it — a declared but
|
|
128
|
+
* unresolvable profile must be a build error, never a silent fall-through to
|
|
129
|
+
* the helm binary's default capabilities (epic #1228, finding 1).
|
|
130
|
+
*/
|
|
131
|
+
export declare function resolveCapabilityProfile(ref: HelmCapabilityProfileRef, opts?: {
|
|
132
|
+
startDir?: string;
|
|
133
|
+
}): HelmCapabilityProfile;
|
|
134
|
+
export {};
|
|
135
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAI3D;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,QAAyB,CAAC;AAE3D;;;GAGG;AACH,MAAM,WAAW,2BAA2B;IAC1C,yFAAyF;IACzF,WAAW,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB;AAED,gGAAgG;AAChG,MAAM,WAAW,qBAAsB,SAAQ,2BAA2B;IACxE,6FAA6F;IAC7F,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;GAIG;AACH,MAAM,MAAM,wBAAwB,GAAG,MAAM,GAAG,qBAAqB,CAAC;AAEtE,MAAM,WAAW,eAAe;IAC9B,oFAAoF;IACpF,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,2BAA2B,CAAC,CAAC;CAClE;AAED,eAAO,MAAM,2BAA2B;;;kBAKtC,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;kBAE3B,CAAC;AAEH,OAAO,QAAQ,yBAAyB,CAAC;IACvC,UAAU,WAAW;QACnB,IAAI,CAAC,EAAE,eAAe,CAAC;KACxB;CACF;AAED;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG,WAAW,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;AAEnE;;;GAGG;AACH,KAAK,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,SAAS,eAAe,GAClF,eAAe,SAAS,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,GACtD,IAAI,GACJ,KAAK,GACP,KAAK,CAAC;AACV,MAAM,MAAM,0BAA0B,GAAG,sBAAsB,CAAC;AAEhE;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,qBAAqB,GAAG,MAAM,EAAE,CAyBlF;AAmBD;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,wBAAwB,EAC7B,IAAI,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,GAC3B,qBAAqB,CAyBvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deep-observe-hooks.d.ts","sourceRoot":"","sources":["../src/deep-observe-hooks.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,0BAA0B,oDAA4B,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helm deep observation (#1247, epic #1228 phase 5) — property-level live
|
|
3
|
+
* trees for the resources a release manages, read through the k8s lexicon's
|
|
4
|
+
* machinery rather than a second implementation.
|
|
5
|
+
*
|
|
6
|
+
* The objects a release deploys are Kubernetes objects, so the deep read
|
|
7
|
+
* composes rather than reimplements:
|
|
8
|
+
*
|
|
9
|
+
* 1. The helm half (shared with `describeResources`, `./release-observe.ts`)
|
|
10
|
+
* resolves each declared `Helm::Chart` to its release and parses what
|
|
11
|
+
* the release holds — `helm get manifest` plus `helm get hooks`, both
|
|
12
|
+
* channels. Each rendered document becomes a synthetic declared entity:
|
|
13
|
+
* the release's stored manifest IS the declared side of a helm deep
|
|
14
|
+
* diff — what the cluster is supposed to hold is what the release
|
|
15
|
+
* applied.
|
|
16
|
+
* 2. The k8s half (`observeResourcesDeepK8s`) reads the live property tree
|
|
17
|
+
* for each of those entities over the typed API client, resolves
|
|
18
|
+
* per-field ownership from `metadata.managedFields` (#1189), and
|
|
19
|
+
* normalizes with `k8sDeepNormalizationHooks` — so Secret-value masking
|
|
20
|
+
* and the managed-fields rules apply to helm rows exactly as they do to
|
|
21
|
+
* k8s rows, from the same hook object (see `./deep-observe-hooks.ts`).
|
|
22
|
+
*
|
|
23
|
+
* Verdicts compose per the deep contract (#1014/#1089): a helm-side failure
|
|
24
|
+
* (missing binary, unreachable cluster, unreadable release) lands the chart
|
|
25
|
+
* entity in `unobserved` with a total reason; a k8s-side failure lands the
|
|
26
|
+
* specific resource row there. Chart-authoring entities (`Helm::Chart`,
|
|
27
|
+
* `Helm::Values`, …) have no property tree of their own — their deep form is
|
|
28
|
+
* the per-resource rows this read returns — so on a successful read they are
|
|
29
|
+
* deliberately in neither map, which core's deep diff treats as
|
|
30
|
+
* nothing-to-compare rather than drift.
|
|
31
|
+
*/
|
|
32
|
+
import type { DeepObservationResult } from "@intentius/chant/lexicon";
|
|
33
|
+
import type { K8sConnector } from "@intentius/chant-lexicon-k8s/api/connect";
|
|
34
|
+
import { type HelmRunner } from "./release-observe.js";
|
|
35
|
+
export interface HelmDeepObserveOptions {
|
|
36
|
+
environment: string;
|
|
37
|
+
buildOutput: string;
|
|
38
|
+
entityNames: string[];
|
|
39
|
+
entities: Map<string, {
|
|
40
|
+
entityType: string;
|
|
41
|
+
props: Record<string, unknown>;
|
|
42
|
+
}>;
|
|
43
|
+
stack?: string;
|
|
44
|
+
region?: string;
|
|
45
|
+
owned?: boolean;
|
|
46
|
+
}
|
|
47
|
+
/** Injectable seams, so tests run without a helm binary or a kubeconfig. */
|
|
48
|
+
export interface HelmDeepObserveDeps {
|
|
49
|
+
run?: HelmRunner;
|
|
50
|
+
/** Forwarded to the k8s reader — a test passes a fake cluster's connector. */
|
|
51
|
+
connect?: K8sConnector;
|
|
52
|
+
}
|
|
53
|
+
export declare function observeResourcesDeepHelm(options: HelmDeepObserveOptions, deps?: HelmDeepObserveDeps): Promise<DeepObservationResult>;
|
|
54
|
+
//# sourceMappingURL=deep-observe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deep-observe.d.ts","sourceRoot":"","sources":["../src/deep-observe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,KAAK,EAAE,qBAAqB,EAAoB,MAAM,0BAA0B,CAAC;AAIxF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AAC7E,OAAO,EAGL,KAAK,UAAU,EAChB,MAAM,mBAAmB,CAAC;AAE3B,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,CAAC,CAAC;IAC9E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,4EAA4E;AAC5E,MAAM,WAAW,mBAAmB;IAClC,GAAG,CAAC,EAAE,UAAU,CAAC;IACjB,8EAA8E;IAC9E,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;AAeD,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,sBAAsB,EAC/B,IAAI,GAAE,mBAAwB,GAC7B,OAAO,CAAC,qBAAqB,CAAC,CA6ChC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ObservationResult } from "@intentius/chant/observation";
|
|
2
|
+
import { type HelmRunner } from "./release-observe.js";
|
|
3
|
+
export interface HelmDescribeOptions {
|
|
4
|
+
environment: string;
|
|
5
|
+
buildOutput: string;
|
|
6
|
+
entityNames: string[];
|
|
7
|
+
entities: Map<string, {
|
|
8
|
+
entityType: string;
|
|
9
|
+
props: Record<string, unknown>;
|
|
10
|
+
}>;
|
|
11
|
+
stack?: string;
|
|
12
|
+
region?: string;
|
|
13
|
+
owned?: boolean;
|
|
14
|
+
namespace?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function describeResources(options: HelmDescribeOptions, run?: HelmRunner): Promise<ObservationResult>;
|
|
17
|
+
//# sourceMappingURL=describe-resources.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"describe-resources.d.ts","sourceRoot":"","sources":["../src/describe-resources.ts"],"names":[],"mappings":"AA0CA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAGtE,OAAO,EAKL,KAAK,UAAU,EAEhB,MAAM,mBAAmB,CAAC;AAE3B,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,CAAC,CAAC;IAC9E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA2BD,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,mBAAmB,EAC5B,GAAG,GAAE,UAA8B,GAClC,OAAO,CAAC,iBAAiB,CAAC,CAwG5B"}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,8 +3,22 @@ export { helmPlugin } from "./plugin.js";
|
|
|
3
3
|
export { helmCapabilityPlugin, HELM_VERB_FAMILIES } from "./components/capability-plugin.js";
|
|
4
4
|
export { helmUpgradeCapability, createHelmUpgradeCapability, type HelmUpgradeInput, type HelmUpgradeOutcome } from "./components/helm-upgrade.js";
|
|
5
5
|
export { Chart, Values, ValuesOverride, HelmTest, HelmNotes, HelmHook, HelmDependency, HelmMaintainer, HelmCRD } from "./resources.js";
|
|
6
|
-
export { HelmRender } from "./render.js";
|
|
7
|
-
export type { HelmRenderProps } from "./render.js";
|
|
6
|
+
export { HelmRender, getHelmRenderRecords, clearHelmRenderRecords } from "./render.js";
|
|
7
|
+
export type { HelmRenderProps, HelmRenderRecord } from "./render.js";
|
|
8
|
+
export { canonicalizeRender, helmContentDigest, helmInputDigest, renderStability } from "./render-digest.js";
|
|
9
|
+
export type { HelmInputDigestSource, RenderStabilityGroup, RenderStabilityReport } from "./render-digest.js";
|
|
10
|
+
export { helmValuesDigest, indexRenderDocuments, renderCacheKey, renderStoreRoot, persistHelmRender, loadRenderManifest, loadRenderContent, listRenderManifests, findRenderByCacheKey, readRenderDocument, } from "./render-store.js";
|
|
11
|
+
export type { RenderManifest, RenderDocumentEntry, RenderDocumentRef, RenderCacheKeySource, RenderInputsIndexEntry, PersistHelmRenderInput, PersistedHelmRender, } from "./render-store.js";
|
|
12
|
+
export { routeRender, routeStoredRender } from "./render-wrapper.js";
|
|
13
|
+
export type { RoutedRender, RoutedDocument, RoutedRenderWarning, RoutedRenderWarningCode, RouteRenderOptions, } from "./render-wrapper.js";
|
|
14
|
+
export { materializeWrapperChart, wrapperChartName } from "./wrapper-chart.js";
|
|
15
|
+
export type { MaterializedWrapperChart } from "./wrapper-chart.js";
|
|
16
|
+
export { addArchiveHelmRender, HELM_RENDER_MEDIA_TYPE } from "./archive-render.js";
|
|
17
|
+
export type { AddArchiveHelmRenderInput, AddArchiveHelmRenderOutput } from "./archive-render.js";
|
|
18
|
+
export { probeCoalescedValues, coalescedValuesDigest, computeValueSources, findDeadAssignments, rootCoalescedValues, getValuesProbeRecords, recordValuesProbe, clearValuesProbeRecords, } from "./values-probe.js";
|
|
19
|
+
export type { ValuesProbeOptions, CoalescedValuesProbe, CoalescedChartValues, DisabledDependency, SuppliedValuesLayer, ValueOrigin, ValuesAttributionInput, DeadAssignment, HelmValuesProbeRecord, } from "./values-probe.js";
|
|
20
|
+
export { helmConfigSchema, helmCapabilityProfileSchema, resolveCapabilityProfile, validateCapabilityProfile, KUBE_VERSION_PATTERN, } from "./config.js";
|
|
21
|
+
export type { HelmChantConfig, HelmCapabilityProfile, HelmCapabilityProfileConfig, HelmCapabilityProfileRef, } from "./config.js";
|
|
8
22
|
export { HelmTpl, HELM_TPL_KEY, HELM_IF_KEY, HELM_RANGE_KEY, HELM_WITH_KEY, RuntimeSlot, RUNTIME_SLOT_KEY, runtimeSlot, values, Release, ChartRef, include, required, helmDefault, toYaml, quote, printf, tpl, lookup, Capabilities, Template, filesGet, filesGlob, filesAsConfig, filesAsSecrets, ElseIf, If, Range, With, withOrder, argoWave, } from "./intrinsics.js";
|
|
9
23
|
export type { HelmConditional } from "./intrinsics.js";
|
|
10
24
|
export { generateHelpers } from "./helpers.js";
|
|
@@ -18,6 +32,8 @@ export { HelmParser } from "./import/parser.js";
|
|
|
18
32
|
export { HelmGenerator } from "./import/generator.js";
|
|
19
33
|
export { stripTemplateExpressions, classifyExpression } from "./import/template-stripper.js";
|
|
20
34
|
export type { StrippedExpression, StripResult, ExpressionKind } from "./import/template-stripper.js";
|
|
35
|
+
export { classifyChart } from "./pinnability/index.js";
|
|
36
|
+
export type { PinnabilityVerdict, PinnabilityReport, ClassifyChartOptions, CapabilityRequirement, ClosedInput, ConditionalHazard, RenderEvidence, } from "./pinnability/index.js";
|
|
21
37
|
export { helmCompletions } from "./lsp/completions.js";
|
|
22
38
|
export { helmHover } from "./lsp/hover.js";
|
|
23
39
|
export { generateDocs } from "./codegen/docs.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAG9C,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAKtC,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAC1F,OAAO,EAAE,qBAAqB,EAAE,2BAA2B,EAAE,KAAK,gBAAgB,EAAE,KAAK,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAG/I,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,cAAc,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAGpI,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAG9C,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAKtC,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAC1F,OAAO,EAAE,qBAAqB,E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"}
|
package/dist/integrity.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"algorithm": "sha256",
|
|
3
3
|
"artifacts": {
|
|
4
|
-
"manifest.json": "
|
|
4
|
+
"manifest.json": "e240eeef5865a87bce3a27111adc0c59a76c410ceb701f6510c4d559c5320767",
|
|
5
5
|
"meta.json": "14243c5730a07c6a6edc35ddd351438547d58df5cf345f2233a355b0c7611ccc",
|
|
6
6
|
"types/index.d.ts": "5377696ca8698cd2999e4680feb8e8e4b54a7b49fb603a87b2f27356114d1794",
|
|
7
7
|
"rules/chart-metadata.ts": "8f3377e893d5e2828460b7fe5924fca098334245a9a2fdb90f6b67e490eaf091",
|
|
@@ -30,9 +30,11 @@
|
|
|
30
30
|
"rules/whm407.ts": "200190f5de2d86d2bcc5aee0b5ce4807919ec727b1fc14576ea17b9b3073838b",
|
|
31
31
|
"rules/whm501.ts": "e6afa7c0eface9820380bf189fe8be58f4a6997dd5b74f76335022650616d080",
|
|
32
32
|
"rules/whm502.ts": "c3ed7b4b5215d96e46eba758aca2171928d8f8fb1eb20452ea6b4393672755b0",
|
|
33
|
-
"
|
|
33
|
+
"rules/whm503.ts": "72808bba7c66ef71757a2dc73c9c3afff5980fd729bbdd5ba00af9c0c2213304",
|
|
34
|
+
"rules/whm504.ts": "15c03b47c271270eee93de45310ff6dfc2665dfe221d457665a638cfd9637005",
|
|
35
|
+
"skills/chant-helm.md": "828a169f9275c58df0a079287befb14c450ad8a92257e3cb6960450221941973",
|
|
34
36
|
"skills/chant-helm-patterns.md": "9e79e6a46391da46709d8aa57e2825a7cd9eb981cd923f02ad60836c49b2561e",
|
|
35
37
|
"skills/chant-helm-security.md": "bfc367eabceed2e84f1cf94501b407df78aeed963cec104f24a321d0962063c9"
|
|
36
38
|
},
|
|
37
|
-
"composite": "
|
|
39
|
+
"composite": "b26091a74a2371c308b68c2a63b99428d753ef68dc49564774295ac611a4e094"
|
|
38
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-catalog.d.ts","sourceRoot":"","sources":["../../src/lint/audit-catalog.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAqD,KAAK,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAElH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"audit-catalog.d.ts","sourceRoot":"","sources":["../../src/lint/audit-catalog.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAqD,KAAK,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAElH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAwBrD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAyBvE,eAAO,MAAM,eAAe,EAAE,cAAc,EAwB3C,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WHM503: Pinned render artifact carries Secret data.
|
|
3
|
+
*
|
|
4
|
+
* WHM407 covers the pre-render concern — a chart TEMPLATE with an inline,
|
|
5
|
+
* literal `data`/`stringData` value baked into `templates/`. This rule
|
|
6
|
+
* covers a different concern (#1241, epic #1228 Phase 3): the STORED,
|
|
7
|
+
* POST-RENDER artifact (`render-store.ts`, #1238). A pinned render is
|
|
8
|
+
* durable, promoted, and pushed to a registry — unlike a normal `helm
|
|
9
|
+
* upgrade`, whose rendered bytes are computed at deploy time and discarded.
|
|
10
|
+
* By the time a render lands in the store, every `.Values` reference and
|
|
11
|
+
* `{{ }}` expression is resolved, so a `kind: Secret` document with
|
|
12
|
+
* populated `data`/`stringData` there is a live credential baked into
|
|
13
|
+
* something that outlives the deploy that produced it.
|
|
14
|
+
*
|
|
15
|
+
* Scans every pinned render recorded so far in this process
|
|
16
|
+
* (`getHelmRenderRecords()` from `../../render`) that carries a
|
|
17
|
+
* `contentDigest`, loads its manifest + canonical content from the render
|
|
18
|
+
* store, and flags any `Secret` document whose `data` or `stringData` is
|
|
19
|
+
* non-empty.
|
|
20
|
+
*/
|
|
21
|
+
import type { PostSynthCheck, PostSynthDiagnostic } from "@intentius/chant/lint/post-synth";
|
|
22
|
+
import type { HelmRenderRecord } from "../../render.js";
|
|
23
|
+
/**
|
|
24
|
+
* Scan a set of `HelmRenderRecord`s for pinned renders whose stored artifact
|
|
25
|
+
* carries a `Secret` document with populated `data`/`stringData`. Exported
|
|
26
|
+
* separately from `whm503` so tests can drive it directly with hand-built
|
|
27
|
+
* records — no real `helm` binary required, unlike a `HelmRender()` call.
|
|
28
|
+
* `opts.root` overrides the render store root (test isolation).
|
|
29
|
+
*/
|
|
30
|
+
export declare function checkRenderRecordsForSecrets(records: readonly HelmRenderRecord[], opts?: {
|
|
31
|
+
root?: string;
|
|
32
|
+
}): PostSynthDiagnostic[];
|
|
33
|
+
export declare const whm503: PostSynthCheck;
|
|
34
|
+
//# sourceMappingURL=whm503.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"whm503.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/whm503.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAoB,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAG9G,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAcrD;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,SAAS,gBAAgB,EAAE,EACpC,IAAI,CAAC,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GACvB,mBAAmB,EAAE,CAwCvB;AAED,eAAO,MAAM,MAAM,EAAE,cAUpB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WHM504: Dead value assignment (#1252, epic #1228 Phase 7).
|
|
3
|
+
*
|
|
4
|
+
* A supplied value that never survives coalescing is a lie in the config:
|
|
5
|
+
* it reads as if it configures something, and nothing ever sees it. The
|
|
6
|
+
* coalesced-values probe (#1251, ../../values-probe.ts) knows three ways a
|
|
7
|
+
* supplied value dies — shadowed by a later supplied layer, targeting a
|
|
8
|
+
* dependency a `condition:` disabled, or a values map under a top-level key
|
|
9
|
+
* that names no dependency at all (the silently-ignored subchart typo).
|
|
10
|
+
*
|
|
11
|
+
* The check reports over the probe records of the current process
|
|
12
|
+
* (`getValuesProbeRecords`): whatever ran the probe — the pinned-render
|
|
13
|
+
* build path, a test, a direct call — this check turns its dead assignments
|
|
14
|
+
* into diagnostics. No probe run, nothing to report; the probe itself needs
|
|
15
|
+
* the helm binary and the chart source, which a post-synth check must not
|
|
16
|
+
* require on its own.
|
|
17
|
+
*/
|
|
18
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
19
|
+
export declare const whm504: PostSynthCheck;
|
|
20
|
+
//# sourceMappingURL=whm504.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"whm504.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/whm504.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAc9G,eAAO,MAAM,MAAM,EAAE,cAmBpB,CAAC"}
|
package/dist/manifest.json
CHANGED
package/dist/okf/index.md
CHANGED
|
@@ -37,3 +37,5 @@ okf_version: '0.2'
|
|
|
37
37
|
* [WHM407](/rules/WHM407.md) - Secrets with inline data should use ExternalSecret or SealedSecret
|
|
38
38
|
* [WHM501](/rules/WHM501.md) - Detect values keys that are defined but never referenced in templates
|
|
39
39
|
* [WHM502](/rules/WHM502.md) - Detect deprecated or invalid Kubernetes API versions
|
|
40
|
+
* [WHM503](/rules/WHM503.md) - Pinned render artifact must not carry populated Secret data/stringData
|
|
41
|
+
* [WHM504](/rules/WHM504.md) - Detect supplied values that never survive coalescing (shadowed, disabled subchart, unknown subchart)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: post-synth-check
|
|
3
|
+
title: WHM503
|
|
4
|
+
description: Pinned render artifact must not carry populated Secret data/stringData
|
|
5
|
+
id: WHM503
|
|
6
|
+
severity: error
|
|
7
|
+
category: post-synth
|
|
8
|
+
lexicon: helm
|
|
9
|
+
docs: https://intentius.io/chant/lexicons/helm/rules/
|
|
10
|
+
---
|
|
11
|
+
Pinned render artifact must not carry populated Secret data/stringData
|
|
12
|
+
|
|
13
|
+
## Applies to
|
|
14
|
+
|
|
15
|
+
- [Values](/types/Values.md)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: post-synth-check
|
|
3
|
+
title: WHM504
|
|
4
|
+
description: Detect supplied values that never survive coalescing (shadowed, disabled subchart, unknown subchart)
|
|
5
|
+
id: WHM504
|
|
6
|
+
severity: error
|
|
7
|
+
category: post-synth
|
|
8
|
+
lexicon: helm
|
|
9
|
+
docs: https://intentius.io/chant/lexicons/helm/rules/
|
|
10
|
+
---
|
|
11
|
+
Detect supplied values that never survive coalescing (shadowed, disabled subchart, unknown subchart)
|
package/dist/okf/types/Values.md
CHANGED
|
@@ -22,3 +22,4 @@ Typed values definition — emits values.yaml and values.schema.json.
|
|
|
22
22
|
- [WHM405](/rules/WHM405.md): Resource specs should include cpu and memory in limits/requests
|
|
23
23
|
- [WHM407](/rules/WHM407.md): Secrets with inline data should use ExternalSecret or SealedSecret
|
|
24
24
|
- [WHM501](/rules/WHM501.md): Detect values keys that are defined but never referenced in templates
|
|
25
|
+
- [WHM503](/rules/WHM503.md): Pinned render artifact must not carry populated Secret data/stringData
|