fix(talos-log-collector): keep image ref out of generated schema

The first-party image-ref guard rejects values.schema.json: the annotated
image struct baked ghcr.io/cozystack/cozystack/vector into the generated
schema default, an unenumerated second copy of the runtime ref that the
promote and mirror tooling never touches. Move the reference into
images/vector.tag (the enumerated .tag storage shape, read via
.Files.Get) so the schema no longer carries it, matching every other
package. Stamp the tag from make image and regenerate schema and README.

Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
This commit is contained in:
IvanHunters committed 2026-07-23 17:56:25 +03:00
1 parent f96d0ecefd
commit bf9c5d37bf
7 files changed
+14 -51

No files matched your search

+2 -4
View File
@@ -18,10 +18,8 @@ image:
$(call cache-args,vector) \
--metadata-file images/vector.json \
$(BUILDX_ARGS)
REPOSITORY="$(REGISTRY)/vector" \
yq -i '.image.repository = strenv(REPOSITORY)' values.yaml
TAG=$(IMAGE_TAG)@$$(yq e '."containerimage.digest"' images/vector.json -o json -r) \
yq -i '.image.tag = strenv(TAG)' values.yaml
echo "$(REGISTRY)/vector:$(IMAGE_TAG)@$$(yq e '."containerimage.digest"' images/vector.json -o json -r)" \
> images/vector.tag
rm -f images/vector.json
generate:
+7 -11
View File
@@ -78,17 +78,13 @@ url: "tcp://127.0.0.1:5170/"
### Common parameters
| Name | Description | Type | Value |
| ------------------ | ---------------------------------------------------------------------------------------- | ---------- | --------------------------------------------------------------------------------------- |
| `logLevel` | Vector log verbosity (trace, debug, info, warn, error). | `string` | `warn` |
| `listenPort` | TCP port bound on the node loopback (127.0.0.1) where Talos machine.logging pushes logs. | `int` | `5170` |
| `image` | Vector container image. | `object` | `{}` |
| `image.repository` | Image repository. | `string` | `ghcr.io/cozystack/cozystack/vector` |
| `image.tag` | Image tag (digest-pinned by the build). | `string` | `0.56.0-alpine@sha256:0eb66216f5f9322264e2ba83f4606428ef77a2cd4dea619a5bea610ac80ccc43` |
| `image.pullPolicy` | Image pull policy. | `string` | `IfNotPresent` |
| `resources` | Compute resources for the collector. | `object` | `{}` |
| `resources.cpu` | CPU request. | `quantity` | `100m` |
| `resources.memory` | Memory request and limit. | `quantity` | `128Mi` |
| Name | Description | Type | Value |
| ------------------ | ---------------------------------------------------------------------------------------- | ---------- | ------- |
| `logLevel` | Vector log verbosity (trace, debug, info, warn, error). | `string` | `warn` |
| `listenPort` | TCP port bound on the node loopback (127.0.0.1) where Talos machine.logging pushes logs. | `int` | `5170` |
| `resources` | Compute resources for the collector. | `object` | `{}` |
| `resources.cpu` | CPU request. | `quantity` | `100m` |
| `resources.memory` | Memory request and limit. | `quantity` | `128Mi` |
### VictoriaLogs destination
@@ -0,0 +1 @@
ghcr.io/cozystack/cozystack/vector:0.56.0-alpine@sha256:0eb66216f5f9322264e2ba83f4606428ef77a2cd4dea619a5bea610ac80ccc43
@@ -39,8 +39,8 @@ spec:
type: RuntimeDefault
containers:
- name: vector
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
image: "{{ $.Files.Get "images/vector.tag" | trim }}"
imagePullPolicy: IfNotPresent
args: ["--config", "/etc/vector/vector.yaml"]
livenessProbe:
tcpSocket:
@@ -2,7 +2,8 @@ suite: talos-log-collector receive/forward wiring
# Pins the surface this package owns:
# - the DaemonSet pulls the first-party vector image from the cozystack
# registry (repository is the load-bearing ref re-pinned by `make image`);
# registry (the load-bearing ref lives in images/vector.tag, re-pinned by
# `make image`);
# - Talos logs are received on the node loopback via hostPort+hostIP (the pod
# stays on the pod network for the sink; the loopback socket is published
# via portmap), NOT via hostNetwork;
@@ -21,28 +21,6 @@
"maximum": 65535,
"minimum": 1
},
"image": {
"description": "Vector container image.",
"type": "object",
"default": {},
"properties": {
"pullPolicy": {
"description": "Image pull policy.",
"type": "string",
"default": "IfNotPresent"
},
"repository": {
"description": "Image repository.",
"type": "string",
"default": "ghcr.io/cozystack/cozystack/vector"
},
"tag": {
"description": "Image tag (digest-pinned by the build).",
"type": "string",
"default": "0.56.0-alpine@sha256:0eb66216f5f9322264e2ba83f4606428ef77a2cd4dea619a5bea610ac80ccc43"
}
}
},
"resources": {
"description": "Compute resources for the collector.",
"type": "object",
@@ -17,17 +17,6 @@ logLevel: warn
## @maximum 65535
listenPort: 5170
## @typedef {struct} Image - Vector container image.
## @field {string} [repository] - Image repository.
## @field {string} [tag] - Image tag (digest-pinned by the build).
## @field {string} [pullPolicy] - Image pull policy.
## @param {Image} [image] - Vector container image.
image:
repository: ghcr.io/cozystack/cozystack/vector
tag: 0.56.0-alpine@sha256:0eb66216f5f9322264e2ba83f4606428ef77a2cd4dea619a5bea610ac80ccc43
pullPolicy: IfNotPresent
## @typedef {struct} Resources - Compute resources for the collector.
## @field {quantity} [cpu] - CPU request.
## @field {quantity} [memory] - Memory request and limit.