@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.
- package/dist/integrity.json +2 -2
- package/dist/manifest.json +1 -1
- package/package.json +1 -1
- package/src/render.ts +19 -1
package/dist/integrity.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"algorithm": "sha256",
|
|
3
3
|
"artifacts": {
|
|
4
|
-
"manifest.json": "
|
|
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": "
|
|
37
|
+
"composite": "abb2216f548dee123e70c8f5b74fe028c856b36901f09f66d7713e2445bda641"
|
|
38
38
|
}
|
package/dist/manifest.json
CHANGED
package/package.json
CHANGED
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
|
-
|
|
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
|
];
|