@intentius/chant-lexicon-helm 0.0.24 → 0.1.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.
@@ -65,6 +65,53 @@ import { If, values } from "@intentius/chant-lexicon-helm";
65
65
  export const ingress = If(values.ingress.enabled, new Ingress({ ... }));
66
66
  ```
67
67
 
68
+ ### Runtime values and value overrides
69
+
70
+ Use `runtimeSlot()` for deploy-time values that cannot be known at build time (database IPs, bucket names, etc.):
71
+
72
+ ```typescript
73
+ import { Values, runtimeSlot } from "@intentius/chant-lexicon-helm";
74
+
75
+ export const vals = new Values({
76
+ global: {
77
+ psql: {
78
+ host: runtimeSlot("Cloud SQL private IP"), // → '' in values.yaml
79
+ },
80
+ redis: {
81
+ host: runtimeSlot("Memorystore persistent host"),
82
+ },
83
+ },
84
+ });
85
+ ```
86
+
87
+ `runtimeSlot()` generates two outputs:
88
+ - `values.yaml` — the field emits `''` (empty placeholder, safe for `helm template`)
89
+ - `values-runtime-slots.yaml` — lists only the slots with descriptions as YAML comments, for use as a deploy-time checklist
90
+
91
+ **WHM004** fires when `v.xxx` (the values proxy) is used inside `new Values({...})` — values.yaml is not a Go template, so `{{ .Values.x }}` would silently become `''`. Use `runtimeSlot()` instead.
92
+
93
+ Use `ValuesOverride` for static configuration shared across all deployments, like disabling bundled services:
94
+
95
+ ```typescript
96
+ import { ValuesOverride } from "@intentius/chant-lexicon-helm";
97
+
98
+ export const baseOverride = new ValuesOverride({
99
+ filename: "values-base", // → generates chart-dir/values-base.yaml
100
+ values: {
101
+ postgresql: { install: false },
102
+ redis: { install: false },
103
+ certmanager: { install: false },
104
+ },
105
+ });
106
+ ```
107
+
108
+ Pass the generated file at deploy time:
109
+ ```bash
110
+ helm upgrade --install my-release chart/
111
+ -f chart/values-base.yaml # generated by ValuesOverride
112
+ -f values-prod.yaml # runtime overrides (from values-runtime-slots.yaml)
113
+ ```
114
+
68
115
  ### Built-in objects
69
116
 
70
117
  ```typescript
@@ -218,28 +265,30 @@ const lifecycle = HelmCRDLifecycle({
218
265
 
219
266
  ## Lint rules
220
267
 
221
- | Rule | Description |
222
- |------|-------------|
223
- | WHM001 | Chart must have name, version, apiVersion |
224
- | WHM002 | Values should not contain bare secrets |
225
- | WHM003 | Container images should use values references |
226
- | WHM101 | Chart.yaml has valid apiVersion (v2) |
227
- | WHM102 | values.schema.json present when Values used |
228
- | WHM103 | Go template syntax valid (balanced braces) |
229
- | WHM104 | NOTES.txt exists for application charts |
230
- | WHM105 | _helpers.tpl exists |
231
- | WHM201 | Resources have standard Helm labels |
232
- | WHM301 | At least one test for application charts |
233
- | WHM302 | Resource limits set |
234
- | WHM401 | Image uses :latest tag or no tag |
235
- | WHM402 | runAsNonRoot not set |
236
- | WHM403 | readOnlyRootFilesystem not set |
237
- | WHM404 | privileged: true detected |
238
- | WHM405 | Resource spec missing cpu/memory |
239
- | WHM406 | CRD lifecycle limitation |
240
- | WHM407 | Secret with inline data |
241
- | WHM501 | Unused values keys |
242
- | WHM502 | Deprecated K8s API versions |
268
+ | Rule | Phase | Description |
269
+ |------|-------|-------------|
270
+ | WHM001 | pre-synth | Chart must have name, version, apiVersion |
271
+ | WHM002 | pre-synth | Values should not contain bare secrets |
272
+ | WHM003 | pre-synth | Container images should use values references |
273
+ | WHM004 | pre-synth | HelmTpl (`v.xxx`) has no effect in Values — use `runtimeSlot()` |
274
+ | WHM005 | post-synth | Chart with dependencies but no templates — deploy upstream chart directly |
275
+ | WHM101 | post-synth | Chart.yaml has valid apiVersion (v2) |
276
+ | WHM102 | post-synth | values.schema.json present when Values used |
277
+ | WHM103 | post-synth | Go template syntax valid (balanced braces) |
278
+ | WHM104 | post-synth | NOTES.txt exists for application charts |
279
+ | WHM105 | post-synth | _helpers.tpl exists |
280
+ | WHM201 | post-synth | Resources have standard Helm labels |
281
+ | WHM301 | post-synth | At least one test for application charts |
282
+ | WHM302 | post-synth | Resource limits set |
283
+ | WHM401 | post-synth | Image uses :latest tag or no tag |
284
+ | WHM402 | post-synth | runAsNonRoot not set |
285
+ | WHM403 | post-synth | readOnlyRootFilesystem not set |
286
+ | WHM404 | post-synth | privileged: true detected |
287
+ | WHM405 | post-synth | Resource spec missing cpu/memory |
288
+ | WHM406 | post-synth | CRD lifecycle limitation |
289
+ | WHM407 | post-synth | Secret with inline data |
290
+ | WHM501 | post-synth | Unused values keys |
291
+ | WHM502 | post-synth | Deprecated K8s API versions |
243
292
 
244
293
  ## OCI registry workflow
245
294