@intentius/chant-lexicon-helm 0.1.9 → 0.1.11

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "algorithm": "sha256",
3
3
  "artifacts": {
4
- "manifest.json": "9a813a15786c5b5691cfc1ad544f2a2ba1148c0ef7a13a66ca72aeaf9b94a87b",
4
+ "manifest.json": "2c7bc4d157bd44018faab3ac18dfc87077da872f4c16c13ab547adf59caec727",
5
5
  "meta.json": "14243c5730a07c6a6edc35ddd351438547d58df5cf345f2233a355b0c7611ccc",
6
6
  "types/index.d.ts": "5377696ca8698cd2999e4680feb8e8e4b54a7b49fb603a87b2f27356114d1794",
7
7
  "rules/chart-metadata.ts": "8f3377e893d5e2828460b7fe5924fca098334245a9a2fdb90f6b67e490eaf091",
@@ -34,5 +34,5 @@
34
34
  "skills/chant-helm-patterns.md": "9e79e6a46391da46709d8aa57e2825a7cd9eb981cd923f02ad60836c49b2561e",
35
35
  "skills/chant-helm-security.md": "bfc367eabceed2e84f1cf94501b407df78aeed963cec104f24a321d0962063c9"
36
36
  },
37
- "composite": "50e28442c88c8b3fddc2f5c33e9a5ddca3fd44e129c2147d500d91b9f45de1b5"
37
+ "composite": "abb2216f548dee123e70c8f5b74fe028c856b36901f09f66d7713e2445bda641"
38
38
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "helm",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "chantVersion": ">=0.1.0",
5
5
  "namespace": "Helm",
6
6
  "intrinsics": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentius/chant-lexicon-helm",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "description": "Helm chart lexicon for chant — declarative IaC in TypeScript",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://intentius.io/chant",
package/src/render.ts CHANGED
@@ -38,7 +38,10 @@ import { homedir, tmpdir } from "node:os";
38
38
  import { join } from "node:path";
39
39
 
40
40
  import { Composite } from "@intentius/chant";
41
- import { Deployment } from "@intentius/chant-lexicon-k8s/generated";
41
+ // Use the k8s lexicon's Deployment as a generic Declarable wrapper for
42
+ // arbitrary K8s manifests. The k8s serializer reads props.apiVersion and
43
+ // props.kind verbatim when set, so the actual class doesn't matter.
44
+ import { Deployment } from "@intentius/chant-lexicon-k8s/generated/index";
42
45
  import yaml from "js-yaml";
43
46
 
44
47
  export interface HelmRenderProps {
@@ -100,11 +103,26 @@ function renderViaHelm(props: HelmRenderProps): string {
100
103
  if (props.version) fetchArgs.push("--version", props.version);
101
104
  }
102
105
 
106
+ // When --repo is set, isolate helm's repository config + cache to a
107
+ // chant-private directory. Without this, helm tries to refresh ALL of the
108
+ // user's existing repo indexes (eks, jetstack, etc.) and fails with
109
+ // "no cached repo found" if any one has gone stale — even though we
110
+ // only care about the single repo the consumer asked for.
111
+ const isolationArgs: string[] = props.repo
112
+ ? [
113
+ "--repository-config",
114
+ "/dev/null",
115
+ "--repository-cache",
116
+ join(CACHE_ROOT, "_helm-repo-cache"),
117
+ ]
118
+ : [];
119
+
103
120
  const args = [
104
121
  "template",
105
122
  props.name,
106
123
  props.chart,
107
124
  ...fetchArgs,
125
+ ...isolationArgs,
108
126
  ...(props.namespace ? ["--namespace", props.namespace] : []),
109
127
  ...valuesArgs,
110
128
  ];