@crewhaus/helm-chart 0.1.8 → 0.2.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/index.d.ts +15 -1
- package/dist/index.js +14 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -31,8 +31,22 @@ export type ChartValues = {
|
|
|
31
31
|
readonly target: TargetShape;
|
|
32
32
|
readonly nameOverride?: string;
|
|
33
33
|
readonly image: {
|
|
34
|
-
|
|
34
|
+
/**
|
|
35
|
+
* Registry + namespace prefix for the per-shape images; the image NAME is
|
|
36
|
+
* always derived from `target` (`<registry>/<target>`). Defaults to
|
|
37
|
+
* `ghcr.io/crewhaus` — where the release workflow actually publishes
|
|
38
|
+
* (nothing publishes to docker.io).
|
|
39
|
+
*/
|
|
40
|
+
readonly registry: string;
|
|
35
41
|
readonly tag: string;
|
|
42
|
+
/**
|
|
43
|
+
* Optional content-digest pin (`sha256:<64 hex>`, a REGISTRY MANIFEST
|
|
44
|
+
* digest as recorded in packages/docker-images/docker/digests.json by
|
|
45
|
+
* pushed builds / release CI — item 47). When set, the Deployment
|
|
46
|
+
* references `<registry>/<target>@sha256:...` and `tag` is ignored:
|
|
47
|
+
* reproducible, tamper-evident deploys. Unset → tag-based ref.
|
|
48
|
+
*/
|
|
49
|
+
readonly digest?: string;
|
|
36
50
|
readonly pullPolicy: "IfNotPresent" | "Always" | "Never";
|
|
37
51
|
readonly pullSecrets: ReadonlyArray<{
|
|
38
52
|
readonly name: string;
|
package/dist/index.js
CHANGED
|
@@ -56,7 +56,12 @@ export function readTemplate(name) {
|
|
|
56
56
|
export function defaultValues() {
|
|
57
57
|
return {
|
|
58
58
|
target: "channel",
|
|
59
|
-
image: {
|
|
59
|
+
image: {
|
|
60
|
+
registry: "ghcr.io/crewhaus",
|
|
61
|
+
tag: "latest",
|
|
62
|
+
pullPolicy: "IfNotPresent",
|
|
63
|
+
pullSecrets: [],
|
|
64
|
+
},
|
|
60
65
|
replicas: 1,
|
|
61
66
|
spec: { configMap: "crewhaus-spec", fileName: "crewhaus.yaml" },
|
|
62
67
|
secrets: {
|
|
@@ -107,6 +112,14 @@ export function validateValues(values) {
|
|
|
107
112
|
if (!values.image.tag) {
|
|
108
113
|
throw new HelmChartError("image.tag must be non-empty");
|
|
109
114
|
}
|
|
115
|
+
if (!values.image.registry ||
|
|
116
|
+
/[\s\n\r]/.test(values.image.registry) ||
|
|
117
|
+
values.image.registry.endsWith("/")) {
|
|
118
|
+
throw new HelmChartError(`image.registry must be a non-empty registry/namespace prefix without whitespace or a trailing slash (e.g. "ghcr.io/crewhaus"); got ${JSON.stringify(values.image.registry)}`);
|
|
119
|
+
}
|
|
120
|
+
if (values.image.digest !== undefined && !/^sha256:[0-9a-f]{64}$/.test(values.image.digest)) {
|
|
121
|
+
throw new HelmChartError(`image.digest must be "sha256:<64 hex>" (as recorded in docker/digests.json); got ${JSON.stringify(values.image.digest)}`);
|
|
122
|
+
}
|
|
110
123
|
for (const entry of values.secrets.provider ?? []) {
|
|
111
124
|
if (!entry.name || !entry.secretName || !entry.key) {
|
|
112
125
|
throw new HelmChartError(`secrets.provider entries need name + secretName + key; got ${JSON.stringify(entry)}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crewhaus/helm-chart",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Kubernetes Helm chart (templates + values schema + ServiceMonitor + OTel collector sidecar) plus an in-process renderChart() for tests (Section 32)",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"test": "bun test src"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@crewhaus/docker-images": "0.
|
|
19
|
-
"@crewhaus/errors": "0.
|
|
18
|
+
"@crewhaus/docker-images": "0.2.0",
|
|
19
|
+
"@crewhaus/errors": "0.2.0"
|
|
20
20
|
},
|
|
21
21
|
"license": "Apache-2.0",
|
|
22
22
|
"author": {
|