mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-22 20:53:52 +09:00
templates/cdi-cr.yaml is ours. Against upstream's bare CDI object it adds Helm templating for cloneStrategyOverride, uploadProxyURL and the worker-pod podResourceRequirements, the ExpandDisks feature gate, a CriticalAddonsOnly toleration, and the two RBAC documents that let a tenant clone from the golden-image namespace. Five of those arrived by hand. The toleration did not: it came in with the first commit, which was byte-identical to upstream v1.58.0, and upstream dropped it at v1.64.0 while this object kept it. That is the same divergence `WebhookPvcRendering` records, running the other way. Either way `wget -O templates/cdi-cr.yaml` was not refreshing a vendored file, it was overwriting a first-party one -- the same loss as the `rm -rf templates` this recipe stopped doing, arriving through the fetch instead of the wipe. What replaces it: the release the object is derived from is pinned rather than resolved from GitHub's releases/latest redirect, and `update` fetches it only to confirm the bytes still hash to a measured sha256. Nothing is written under templates/. The next CDI bump that changes the asset fails that check, which is the point -- upstream moving its own defaults is when the local copy needs a human to reconcile it, not an overwrite. The download survives a mismatch, because reconciling one starts by reading it. RELEASE is v1.66.1, which is the release the operator manifest vendors. ../kubevirt-cdi-operator decides what the platform deploys, and it can move to another release without this file changing. RELEASE is still set by hand rather than derived, because a derived value is not a pin. What `update` adds is a comparison with the cdi-operator image tag that package vendors, failing when the two differ; without it the recipe's closing line would name a release the platform may no longer run. The difference from upstream is stated against v1.66.1 rather than as a standing fact: upstream carried WebhookPvcRendering from v1.63.0 through v1.65.0 and dropped it by v1.66.0, and this object never carried it, so the difference ran both ways for three releases and one way after. The comment says to re-derive it at each bump for that reason. The `test:` target this package needed arrived separately, so what it gains here is the `.PHONY` line that came without: hack/package.mk declares only the targets it defines itself, so a file or directory named test or update beside this Makefile would otherwise make that target up to date and skip the recipe. The package also carried a second, identical `test:` target, so make warned on every invocation in it; that one is gone, and the comment above the remaining target is what should stop another being added. The suite is what makes the local delta checkable rather than described, which is why the comment above `update` no longer lists what the object adds: two copies of that list would diverge, and only one of them can fail. hack/package-update-templates.bats attributed `@#` recipe comments to one named package. The tree writes them in more than one, and this adds another, so the attribution goes; the case below it exercises both spellings without naming who writes which. The header in that file also lost its two-item example of first-party manifests. The list named the two the recipe never wrote, and this change stops it writing `cdi-cr.yaml` as well, so the example would have been short by one the moment it landed. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la>