Commit Graph
7777 Commits
Author SHA1 Message Date
Nikita Aboltin cb8728dde1 docs: note the measured idle usage next to the empty resources defaults
The resources keys stay empty so requests and limits are opt-in, and the comment
records the measured idle usage next to them, so a limit that does get set is not
placed below what the component needs at idle.

Signed-off-by: Nikita Aboltin <aboltin.nikita@rwb.ru>
2026-09-28 16:43:44 +03:00
IvanHunters 0f4d39f1ef test(charts): add empty-apex guard tests for the remaining guarded charts
Add host_guard_test.yaml for postgres, vpn, bootbox, seaweedfs,
monitoring and bucket. Each renders its guarded template with a
non-empty injected _namespace whose host is empty and no per-app host
override, and asserts the ns-host-required failure, plus a positive
render case with the apex set. Completes guard coverage alongside the
existing harbor, qdrant and kubernetes tests.

Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2026-09-28 16:01:31 +03:00
IvanHunters fe97d4838d test(cozy-lib): exercise the host-override branch of ns-host-required
The override case injected no _namespace, so it passed through the
absent-map branch and never reached the .Values.host override check.
Inject a non-empty _namespace with an empty host so the case actually
covers the override skip.

Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2026-09-28 15:52:52 +03:00
IvanHunters eedb446e8a docs(tenant): clarify that gateway=false behaves like unset
The rewritten gateway description claimed setting false opts out of
Gateway publishing entirely, including inheritance. It does not:
tenant.gatewayEffective returns "false" for both an explicit false and
an unset key, so namespace.yaml keeps _namespace.gateway pointing at the
nearest ancestor that owns a Gateway and the tenant still publishes
through it. State that false currently behaves the same as unset, and
fix the matching stale comment in gateway_default_test.yaml.

Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2026-09-28 15:52:46 +03:00
IvanHunters 6602c080a1 fix(kubernetes): drop apex guard on oidc-rbac-job
The oidc-rbac bootstrap Job renders unconditionally, including the
no-etcd bootstrap path and with OIDC disabled, so guarding its
OIDC_SERVER_URL apex failed a render that must succeed: helm template
of the chart with no etcd DataStore (hack/admin-kubeconfig-invariant.bats)
aborted instead of emitting only the awaiting-etcd beacon. A running
cluster's apiserver endpoint is already guarded in cluster.yaml (etcd
present), which is the meaningful malformed-hostname case, so revert the
oidc-rbac-job guard rather than gate it further. Restore the no-etcd
unit fixture to an empty host so it keeps exercising that path.

Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2026-09-28 15:46:00 +03:00
Nikita Aboltin 8732dc96cf feat(api): add configurable resources and replicas for cozystack-engine components
- cozystack-api, cozystack-controller, lineage-controller-webhook: conditional
  resources block via `{{- with .Values.*.resources }}`, defaulting to `{}` so the
  default render stays unchanged
- cozystack-controller: replicas comes from values (was hardcoded 1); the chart
  now passes --leader-elect unconditionally and grants the Lease verbs through a
  namespaced Role and RoleBinding in cozy-system (the Lease lives in the manager's
  own namespace), so raising replicas adds a standby instead of a second active
  writer over the reconcilers that patch HelmReleases, Gateways, Certificates,
  ResourceQuotas and Secrets

Signed-off-by: Nikita Aboltin <aboltin.nikita@rwb.ru>
2026-09-28 15:19:45 +03:00
IvanHunters 37f59369d3 fix(charts): fail fast on empty tenant apex in host composition
Charts that publish a service compose their hostname as
<sub>.<_namespace.host>. When the injected tenant apex is empty and no
per-app host override is set, they used to emit a malformed trailing-dot
hostname (e.g. "harbor.") into Ingresses, HTTPRoutes and Certificate
dnsNames silently. Source the apex through cozy-lib.ns-host-required at
each hostname-emitting site so the render fails with a clear message
instead, matching the gateway path.

Covered: harbor, postgres (external), qdrant (external), kubernetes
(control-plane endpoint), vpn, seaweedfs, bootbox, monitoring
(grafana, alerta, oidc client), and system/bucket (adds the cozy-lib
subchart symlink it lacked). The guard is placed at the point each
resource is actually emitted, so standalone renders, no-exposure
tenants and the kubernetes no-etcd beacon path are unaffected. The
post-delete cleanup hooks are left unguarded so an empty apex cannot
block uninstall.

Behavior change: a tenant with an empty injected apex and no host
override that enables one of these components now fails its render
(HelmRelease NotReady) instead of deploying a broken hostname. In
practice the apex is always injected (root has root-host, children
inherit it), so this only trips a genuinely misconfigured tenant.

Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2026-09-28 15:14:45 +03:00
IvanHunters 2dc884fe05 docs(tenant): fix stale gateway comment in namespace.yaml
The inline comment still described the old, incorrect behavior, that
tenant.gatewayEffective returns true for a custom non-derived host.
The resolver keys only on an explicit tenant.spec.gateway=true. Align
the comment with the code and the corrected parameter description.

Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2026-09-28 15:12:33 +03:00
IvanHunters e53904e564 feat(cozy-lib): add ns-host-required apex guard helper
Add cozy-lib.ns-host-required: it returns the tenant apex like
cozy-lib.ns-host, but fails the render when the platform has injected
_namespace and its host is empty AND the app sets no host override
(.Values.host). Charts that compose a service hostname as <sub>.<apex>
otherwise emit a malformed trailing-dot host silently when the apex is
unset. The guard is scoped to the injected state, so a standalone render
(helm lint / helm template with no _namespace, or an empty _namespace
map) stays renderable. This mirrors the gateway path, which fails on an
empty apex only when a Gateway is actually rendered. Callers use it only
at a hostname-emitting site, so a tenant with no apex and no public
exposure is unaffected.

Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2026-09-28 15:12:26 +03:00
chathurabuddi 44a06486a9 fix(mariadb): correct webhook cert-manager override key path
The chart schema is webhook.cert.certManager.enabled, not
webhook.certificate.certManager, so the override was silently
ignored and the webhook fell back to mariadb-operator's own
cert-controller instead of cert-manager.

Assisted-by: LLM
Signed-off-by: chathurabuddi <10394110+chathurabuddi@users.noreply.github.com>
2026-09-28 17:41:20 +05:30
IvanHunters 784d290c42 docs(tenant): correct gateway param description to match behavior
The gateway parameter description claimed the chart auto-enables a
Gateway for tenants whose apex is derived from the parent (empty host)
and leaves it off for custom-apex tenants. The resolver
tenant.gatewayEffective never inspects host: an unset gateway key
always means the tenant owns no Gateway and publishes through the
nearest ancestor that owns one, regardless of host. The unit tests in
gateway_default_test.yaml already pin this real behavior.

Rewrite the description to match the code and regenerate the schema,
README, Go types and the tenant-rd CRD.

Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2026-09-28 14:07:51 +03:00
Myasnikov Daniil 47fe04673a fix(tests): reject unreadable RD preset schemas
Discarding jq's exit status lets malformed schemas pass the preset check
or turns a partial read into a misleading missing-preset report.

Assisted-by: LLM
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-09-28 14:29:17 +05:00
Aleksei Sviridkin 29932ddbb0 test(tests): add a render smoke check over every app chart (#4018)
## What this PR does

I added an offline render check for application charts because
helm-unittest suites can leave templates outside their `templates:`
lists unchecked. It runs in `make unit-tests` with fixtures for fresh,
configured and wildcard certificate states.

The fixtures cover injected cluster and namespace values, with checks
for PostgreSQL scheduling, tenant OIDC groups, shared services and
Harbor certificate settings. The two charts that require instance-type
lookup are skipped only while every fixture fails with the expected
lookup error.

I also added ClickHouse tests for generating the backup API password and
preserving an existing one. The render check uses empty lookup results
and checks YAML rendering only.

Closes https://github.com/cozystack/cozystack/issues/4057

### Validation

I ran `make unit-tests` and `make test-controllers`. All 16
render-matrix tests passed under bats and the shell runner with dash.
Deliberately broken rendering, fixture validation and password
generation or reuse made the tests fail.

### Downstream repositories

- [x] No downstream repository is affected by this change

### Release note

```release-note
NONE
```


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Tests**
* Added automated validation that charts render successfully across
fresh, configured, and wildcard cluster states, including checks for
conditional resources and scheduling settings.
* Added coverage confirming ClickHouse backup API passwords are retained
when a Secret already exists.
* Expanded checks for invalid fixtures, skipped charts, and consistent
rendered output.
* **Documentation**
* Documented the render scenarios and how fixture values represent
cluster configuration.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-09-28 12:13:28 +03:00
myasnikovdaniil 56ceb3b427 docs(release): add changelog for v1.6.4 (#4534)
This PR adds the changelog for release `v1.6.4`.

✅ Changelog has been automatically generated in
`docs/changelogs/v1.6.4.md`.
2026-09-28 12:43:34 +05:00
cozystack-ci[bot] 59faddc98a docs: add changelog for v1.6.4
Signed-off-by: cozystack-ci[bot] <274107086+cozystack-ci[bot]@users.noreply.github.com>
2026-09-28 07:39:44 +00:00
Aleksei Sviridkin 11991b9d05 feat(harbor): build the Harbor images for amd64 and arm64
Upstream publishes the Harbor v2.15 component images for amd64 only,
so every Harbor pod crash-loops with "exec format error" on an arm64
node. The multi-arch build upstream exists on main but is in no
release yet, so the package now rebuilds the pinned v2.15.1 release
itself: the Go components cross-compile on the build platform, the
registry and the Trivy adapter build from the tags upstream's Makefile
pins, the Trivy binary is fetched per architecture against its release
checksum, and the runtime images keep upstream's photon base, users
and entrypoints. The build fails when those registry and Trivy pins,
the swagger generator or the golang and node build images no longer
match upstream's Makefile at the pinned release, so a version bump
cannot pair a new core with an old registry, scanner or toolchain.

The portal compiles to static JS, so it lives in its own Dockerfile
listed as architecture-neutral in the cross-compile check, and takes
the release pin from the main one so both files build the same
commit.

Because values.yaml now pins the images, `make update` pins the chart
release that ships the same Harbor version and fails when its
appVersion differs, instead of pulling the newest chart onto old
images. Renovate stops proposing tag bumps for the rebuild's build
bases, which follow upstream's toolchain for that release.

The committed refs stay on the upstream digests until CI stamps the
rebuilt ones.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-09-28 02:11:46 +03:00
Aleksei Sviridkin 5924b3fd34 docs: describe how a pre-release is built and gated for arm64
Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-09-28 01:32:37 +03:00
Aleksei Sviridkin 82aa8a048d ci(release): fail an rc on any single-arch image its e2e pulled
The release gate reads only refs the tree pins by digest, so an image
a vendored chart renders from its defaults, or one an operator
launches, can still be amd64 only. The rc e2e now reads what the
three Talos nodes actually pulled from their image stores, each by the
digest the pull resolved to, and runs verify-multiarch on that list
before the sandbox is torn down. The image store, not the running
pods, because the tests delete what they create.

collect-images.sh writes that list only when every node answered, so
a node that could not be read fails the audit instead of passing the
images only it held. A pre-release fails on the audit; a stable tag's
run only warns, as it ships its rc's images unchanged.

The audit runs in the tree of the tag under test, so a tag cut before
it existed has neither the script nor the image list. That run warns
and skips instead of failing, so such an rc can still be re-validated
from main; a tree that has the script and no list still fails.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-09-28 01:32:37 +03:00
Aleksei Sviridkin e8d4f757e2 ci: build main for arm64 nightly and report its single-arch refs
The arm64 images are built only for a pre-release, so a change that
breaks one would first surface as a failed rc. A daily build of main
on the arm64 pool surfaces it the next morning instead, and is the
one writer of the arm64 build cache that the rc leg only reads.

Before building, it prints hack/verify-multiarch.sh's report on
main's tree, the list of refs the next rc's gate would fail on unless
the stitch turns them into indexes. Nothing consumes its images and
it is not a required check.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-09-28 01:32:36 +03:00
Aleksei Sviridkin 67fa638f2a ci(release): publish every pre-release image as an amd64 and arm64 index
A release was amd64 only: prepare-release built on an x86 runner and
nothing built arm64. A pre-release now builds its images twice, side
by side: build-amd64 on x86, build-arm64 on a native arm64 runner
under <tag>-arm64, reading the arm64 build cache. Neither waits for
the other, so the rc takes as long as the slower build rather than
the sum of both.

prepare-release runs once both have succeeded. It applies the tree
build-amd64 stamped, stitches each image and its arm64 twin into one
index under the tags build-amd64 logged, gates on every pinned image
being multi-arch, republishes the packages artifact and the installer
chart pinned on the index digests, and only then commits, creates and
publishes the release and pushes the staging branch. The stamped
tree, the tag log and the assets reach it as artifacts that must
exist, so a lost hand-off fails loudly. The assets are built in
build-amd64, reusing the Talos images make build produced, while the
arm64 build is still running.

An rc whose arm64 or amd64 build fails is not published at all rather
than published amd64 only. A stable tag skips the arm64 build: it
never builds, and promotion copies the rc's indexes with every
platform. build-amd64 keeps the release-exists no-op and the
rejection of a hand-pushed stable tag, and prepare-release no-ops
with it. A skipped ancestor makes the implicit success() false for
every job below it, so each job below prepare-release states
!cancelled() itself; without it the stable-tag changelog backstop
would never run. The arm64 build makes the same no-op when the tag's
release already exists, so re-running a prepared rc rebuilds nothing.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-09-28 01:32:36 +03:00
Aleksei Sviridkin 144d080342 feat(build): gate a release on every pinned image being multi-arch
A release pins one ref per image for clusters of either architecture.
A ref that resolves to a single-platform manifest, or to an index
missing amd64 or arm64, installs on one and fails to pull on the
other, and nothing before an arm64 install would notice.

hack/verify-multiarch.sh resolves every ref hack/lib/image-refs.sh
enumerates, third-party ones included since an arm64 node pulls them
too, and fails naming each ref that is not an index carrying both
linux/amd64 and linux/arm64. A ref that cannot be resolved fails as
well, rather than passing unchecked. A rate limit or a 5xx is the one
answer retried, a bounded number of times, and a ref still refused
fails as rate-limited rather than as single-arch. --report prints the
same list without failing, for a tree that is not being released.

Images that cannot be built for both architectures go in
hack/multiarch-allowlist by repository, each with a reason, so a bump
needs no edit; they are still listed, and an entry that matches no
single-arch ref is named as stale.

--refs-file checks a list of refs instead of a tree, a tag-only ref
resolved by its tag, with the same allowlist and output. It is for
images the tree does not pin by digest, such as the ones an e2e run's
nodes actually pulled.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-09-28 01:32:36 +03:00
Aleksei Sviridkin 7753394bfe build: rebuild every package that has an image target
flux-plunger, keycloak-operator, kilo and migration-controller have
image targets but were missing from the root build list, which the
build matrix, the main build and release preparation all iterate. No
CI path rebuilt them, so their pins stayed on images pushed by hand
while Dockerfile, patch and base-image changes never shipped, and the
multi-arch pre-release build would find single-arch pins it cannot
replace. migration-controller shipped a bare :latest with no digest.

Add the four packages, and a test that derives the set from the
package Makefiles so a new image target cannot be left out again.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-09-28 00:57:24 +03:00
Aleksei Sviridkin f02963a2c7 fix(keycloak-operator): keep the image host inside repository
The image target stamped only `tag`, leaving the committed
`registry: ghcr.io` in place, so a build against the CI registry would
render the public host with a digest that exists only in the build
registry. Stamping the build host into `registry` instead would split
the source registry across two keys, where the nightly mirror's
substring host rewrite cannot reach it and the published tree would
keep pointing at the private registry.

Set `registry: ""` and keep the whole host in `repository`, stamped
by the image target. The upstream chart joins the two keys, so the
rendered image string is unchanged, and the ref now has the same
shape as every other stamped reference the mirror and promotion
already handle.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-09-28 00:57:24 +03:00
Aleksei Sviridkin cafc8204a5 fix(ci): let the fork e2e lane check out the pull request again (#4514)
<!-- Thank you for making a contribution! Here are some tips for you:
- Use Conventional Commits for the PR title: `type(scope): description`
- Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore
- Scopes are not an exhaustive list — pick the most specific scope for
the change and extend the list when a genuinely new area appears.
Examples:
- System components: dashboard, platform, operator, cilium, kube-ovn,
linstor, fluxcd, cluster-api
- Managed apps: postgres, mariadb, redis, kafka, clickhouse,
virtual-machine, kubernetes
- Development and maintenance: api, hack, tests, ci, docs, maintenance
- Breaking changes: append `!` after type/scope (`feat(api)!: ...`) or
add a `BREAKING CHANGE:` footer
- If it's a work in progress, consider creating this PR as a draft.
- Don't hesistate to ask for opinion and review in the community chats,
even if it's still a draft.
- Add the label `kind/backport` if it's a bugfix that needs to be
backported to a previous version.
-->

## What this PR does

Every fork pull request has a red "E2E Tests" status since the Renovate
roll-up in #4447 moved `e2e-fork.yaml` to actions/checkout v4.4.0. That
release refuses to check out a fork's pull request ref from a
`workflow_run` workflow unless the step sets `allow-unsafe-pr-checkout:
true`, so the publish job stops at its first step and the e2e run never
starts.

This sets the opt-in on both pull-request checkouts in the workflow,
which gives back the v4.3.1 behaviour. The lane already takes fork code
on purpose and its header describes the boundary: `publish` runs no
fork-authored script and `e2e` holds no push token. A new unit test,
`hack/fork-pr-checkout_test.bats`, fails if either checkout loses the
opt-in. Removing it from one step turns the test red under both bats and
`hack/cozytest.sh`.

Closes #4513


### Screenshots

<!-- REQUIRED for UI changes: attach screenshots or screen recordings
demonstrating
the visual impact of your changes. PRs with UI changes without
screenshots will not be merged. -->

Not applicable, CI-only change.

### Downstream repositories

<!--
Cozystack is upstream for repositories that are NOT kept in sync with it
automatically, and nothing in CI compares the two sides, so a change
here can break them silently.

Which change forces what, and which file to touch, is the trigger map in
docs/agents/contributing.md under "Downstream Repositories". Walk it
before you tick anything.

IF YOU ARE AN AI AGENT OR AN LLM, THIS IS PART OF THE TASK, NOT A FORM
TO FILL IN:

1. Walk the trigger map against the actual diff of this PR, file by
file. Do not decide from the PR title or from your memory of what you
changed.
2. For every repository you tick, open the follow-up PR there and link
it on the same line. A ticked box with no link claims work that does not
exist, which is worse than an empty box. Search that repository for an
open PR or issue covering it first, and link that instead of filing a
duplicate.
3. When the follow-up is out of scope, or needs a decision that is not
yours to make, open an issue in that repository instead, link that, and
say so in the PR body. Do not push a speculative PR into another
repository just to fill a line here.
4. Do not tick "No downstream repository is affected" to make the
checklist go away. If you are unsure, leave every box empty and say so
in the PR body, so a human decides.
-->

- [x] No downstream repository is affected by this change
- [ ] [cozystack/website](https://github.com/cozystack/website) -
follow-up:
- [ ]
[cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack)
- follow-up:
- [ ]
[cozystack/ansible-cozystack](https://github.com/cozystack/ansible-cozystack)
- follow-up:
- [ ] [cozystack/ccp](https://github.com/cozystack/ccp) - follow-up:
- [ ] [cozystack/talm](https://github.com/cozystack/talm) - follow-up:
- [ ] [cozystack/cozyhr](https://github.com/cozystack/cozyhr) -
follow-up:
- [ ] [cozystack/cozy-proxy](https://github.com/cozystack/cozy-proxy) -
follow-up:
- [ ]
[cozystack/cozystack-telemetry-server](https://github.com/cozystack/cozystack-telemetry-server)
- follow-up:
- [ ]
[cozystack/external-apps-example](https://github.com/cozystack/external-apps-example)
- follow-up:
- [ ] [cozystack/examples](https://github.com/cozystack/examples) -
follow-up:
- [ ] [cozystack/community](https://github.com/cozystack/community) -
follow-up:

### Release note

<!--  Write a release note:
- Explain what has changed internally and for users.
- Start with the same `type(scope):` prefix as in the PR title
- Follow the guidelines at
https://github.com/kubernetes/community/blob/master/contributors/guide/release-notes.md.
-->

```release-note
fix(ci): run the fork e2e lane again after the actions/checkout v4.4.0 update
```


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Bug Fixes**
- Updated pull request checkouts in the fork workflow to allow the
required checkout behavior for both publishing and end-to-end checks.
- **Tests**
- Added a check to verify that pull request checkouts enable this
setting.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-09-27 20:23:25 +04:00
Aleksei Sviridkin 05fb7385d3 feat(vpn): build shadowbox for amd64 and arm64
Upstream publishes quay.io/outline/shadowbox for amd64 only, so the
VPN app crash-loops with an exec format error on arm64 nodes. The
upstream build already targets arm64 (node base, outline-ss-server,
prometheus), it is just never published for it.

Rebuild the pinned release (v1.12.3) as a multi-arch image following
upstream's own Taskfile layout: the webpack bundle is built once on the
build platform, the Go server and prometheus per target. The runtime
base is the node:18.18.0-alpine3.18 index whose per-arch manifests are
exactly the ones upstream pins, so amd64 keeps the same base layers.

The chart reads the image from images/shadowbox.tag like the other
first-party images, pinned by digest instead of the floating :stable
tag. Until the first build stamps it, the file holds upstream v1.12.3
by digest, which is what :stable resolves to today.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-09-27 19:13:42 +03:00
Aleksei Sviridkin 11ba78a2b9 fix(linstor): adopt existing CR on 409 AlreadyExists in k8s backend
The fabric8 client retries a POST after a 5xx or a dropped
connection, so a create that the apiserver already persisted can come
back as 409 AlreadyExists. A single-object transaction has no
rollback entry, so the controller drops the key from memory while the
CR stays in the apiserver, and the caching client never re-reads it:
every later write of that key fails the same way until the controller
restarts.

This left a CDI scratch PV stuck in Released, because linstor-csi
starts every volume delete by setting BalanceResourcesEnabled on the
resource definition and that write never succeeded.

Treat 409 on create as success when the object exists: take its
resourceVersion and replace it with the intended content.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-09-27 17:50:59 +03:00
frolov.so 15fee54558 docs(kubernetes): clarify node pool Helm timeout semantics
Readiness waiting is disabled for node-pool installs and upgrades, so
the ordinary reconciliation Job runs asynchronously and the configured
timeout is inert. Saying otherwise obscures the actual failure boundary.

Fixes cozystack/cozystack#4406

Assisted-by: LLM
Signed-off-by: frolov.so <opsmon.sh@yandex.com>
2026-09-27 17:18:01 +03:00
frolov.so 7280e2d7cc ci(pre-commit): detect schema drift across all packages
Restricting schema regeneration to application and extra packages left
system and library metadata outside the pre-commit drift check.

The regression tests must exercise the repository unit-test path;
bats-core lifecycle hooks and result helpers are unavailable in that
runner and prevent the assertions from executing.

Fixes cozystack/cozystack#4416

Assisted-by: LLM
Signed-off-by: frolov.so <opsmon.sh@yandex.com>
2026-09-27 16:58:28 +03:00
Aleksei Sviridkin dae5d5c5ae fix(build): name the repository of the keda and kuberture pins
Both packages pinned their images by writing tag@digest into the tag
field alone and left the repository to the vendored chart's defaults.
Tooling that reads refs from the package values saw a bare
"2.20.2@sha256:..." with no image to resolve, so the release gate
could not tell whether these images serve arm64. The values now
repeat the chart's registry and repository beside the pin; the
rendered manifests are unchanged.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-09-27 07:57:31 +03:00
Aleksei Sviridkin 769d3b3897 fix(build): push the kamaji provider image under the build's IMAGE_TAG
The capi-providers-cpprovider Makefile assigned IMAGE_TAG itself, which
beats the value CI puts in the environment. Every PR, main and release
line build therefore pushed the same component-version tag and
overwrote each other's, and its second tag was built from an undefined
TAG variable and ended in a bare "-".

The image now goes through image-tags like every other package: the
build-unique IMAGE_TAG always, the component version only under
PUBLISH_VERSIONED=1. The stamped refs keep the component version as
their tag, so the promote, retag and mirror tooling see the same refs
as before.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-09-27 07:57:31 +03:00
Aleksei Sviridkin 9a7094427e feat(build): stitch amd64 and arm64 builds into multi-arch indexes
The arm64 images are built on native arm64 runners, apart from the
amd64 build, so each build pushes a single-platform image. The stitch
joins every first-party image with its -arm64 twin into one index,
moves every tag this build pushed for it to that index, and repins
the tree on the index digest, so one ref serves both architectures.

Most refs in the tree name only the build's IMAGE_TAG, while under
PUBLISH_VERSIONED=1 the build also pushes the component version, so
the refs alone cannot say which tags to move. The image-tags macro
therefore appends every tag it pushes to PUSHED_TAGS_LOG when that is
set, and the stitch moves exactly those, plus IMAGE_TAG and the tag a
ref carries. It reads no other tag: another build's tag that sits on
the same amd64 bytes is not this build's to move, and scanning every
tag of every repository would cost thousands of registry reads per
release.

It reads refs through hack/lib/image-refs.sh like every other
consumer, rewrites only the files that enumeration names, and then
searches the whole tree outside charts/, gzip payloads included, for
any old digest it re-pointed. A ref whose digest is also pinned where
the rewrite cannot reach is skipped instead of half rewritten.

The kamaji control-plane provider's chart ships its ref only inside
files/components.gz, built from a plain copy with gzip -n, which no
text search sees. The stitch rewrites both copies, recompressing with
gzip -n so the result is what the package's image target would have
written, rather than leaving that image amd64 only.

An image with no arm64 twin (talos, the e2e sandbox), or a pair that
is not one amd64 and one arm64 image, is skipped and named. A
registry read answered with a rate limit or a 5xx is retried a
bounded number of times; any other registry error fails the run at
once rather than reading as a missing arm64 image.

On a rerun after a stitch that failed partway, the build tag can
already sit on an index of the pinned image and an arm64 image, not
necessarily this run's if the arm64 leg rebuilt it. The stitch repins
on that index instead of skipping the image, and copies it to any of
the build's other tags still left on the amd64 image. A tag moved to
anything else fails the run, since the tree then no longer matches
the registry.

MATRIX_ARCH=arm64 makes hack/build-matrix.sh leave out the e2e
sandbox, which pins linux/amd64: an arm64 leg building it would push
a second amd64 image under its -arm64 tag.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-09-27 07:57:30 +03:00
Aleksei Sviridkin 9872b86772 feat(build): keep an arm64 build off the amd64 build cache
A native arm64 leg builds the same images next to the amd64 build and
must not overwrite the cache that build owns. CACHE_TAG moves the
default cache ref, so the leg can write buildcache-arm64 without every
write evicting the amd64 cache layers, and without a change to each
package Makefile. An explicit per-call cache tag still wins.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-09-27 05:47:17 +03:00
Aleksei Sviridkin fd8839aa61 fix(ci): verify nightly mirror copies against the raw manifest digest
Without --raw, skopeo inspect resolves a multi-arch index to the child
manifest for the host platform and reports that digest. The tree pins
the index digest, so once main publishes indexes every mirrored image
would fail its own post-copy verification. Hash the raw manifest
instead, which is the digest the tree pins for an index and a single
manifest alike.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-09-27 05:47:17 +03:00
Aleksei Sviridkin 07700c74ce fix(redis): run the multi-arch redis_exporter so the sidecar starts on arm64
The redis, valkey and harbor Redis failovers pin
oliver006/redis_exporter:v1.55.0-alpine, which upstream publishes for
amd64 only. On an arm64 node the exporter sidecar exits with an exec
format error, so the Redis pod never becomes fully ready.

The unsuffixed v1.55.0 tag is a multi-arch index (amd64, arm, arm64)
of the same exporter release, with the same entrypoint, user and
port, and none of these charts run a shell in that container. Pin it
by digest, so the reference is reproducible.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-09-27 03:04:44 +03:00
Aleksei Sviridkin d4dfae656f fix(ingress): run the default backend on arm64
The ingress-nginx chart defaults the default backend to
registry.k8s.io/defaultbackend-amd64, which ships no arm64 build and
crash-loops there with "exec format error". Every ingress controller
rendered from this package, the host and tenant ingresses and the
tenant Kubernetes addon, enables that backend without naming an image.

Pin the upstream multi-arch replacement, custom-error-pages, by its
index digest. It answers 404 on :8080 and serves /healthz, so the
chart's port, probes and restricted securityContext apply unchanged.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-09-26 22:32:06 +03:00
Aleksei Sviridkin 1bc7effadb fix(ci): let the fork e2e lane check out the pull request again
actions/checkout v4.4.0 refuses to check out a fork's pull request ref
from a workflow_run workflow unless the step opts in. The Renovate
roll-up that moved e2e-fork.yaml to v4.4.0 made the publish job fail
at checkout for every fork PR, so the required "E2E Tests" status now
goes red on all of them regardless of the change.

The lane was built to take fork code this way: publish runs no
fork-authored script and e2e holds no push token. Opting in restores
the behaviour it had on v4.3.1, and a unit test fails if either
pull-request checkout loses the opt-in.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-09-26 20:37:41 +03:00
Aleksei Sviridkin 9eb3a64dd1 fix(foundationdb-operator)!: drop the amd64-only 7.1 init container
Every foundationdb/fdb-kubernetes-monitor 7.1.x tag is a single amd64
image, so on arm64 the operator's 7.1 init container fails with exec
format error and the operator pod never starts. No multi-arch 7.1
monitor exists to bump to, and upstream already swaps its own 7.1
client for 7.3 when building the operator for arm64.

The vendoring recipe now deletes the 7.1 entry from the upstream chart
values, and the committed chart matches its output. A null override in
the package values was rejected: Helm 4.2 and later ignore a null the
parent chart sets for a subchart key when no user-supplied values reach
that subchart (helm/helm#32132), and the platform passes this package
none. helm-unittest renders with Helm 3, so the override would stop
working on a Flux bump without any test noticing.

The app defaults to 7.3.63, which keeps its init container, as does
7.4.

BREAKING CHANGE: the operator no longer carries the 7.1 fdbcli and
client library, so it can neither manage nor upgrade a FoundationDB
cluster pinned to a 7.1.x version. Upgrade such clusters to 7.3 before
installing this release.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-09-26 20:30:50 +03:00
Aleksei Sviridkin 72ec1189fd feat(velero): build the KubeVirt plugin image for amd64 and arm64
Upstream publishes quay.io/kubevirt/kubevirt-velero-plugin for amd64
only, so on an arm64 cluster the velero server never starts: its
plugin init container fails with "exec format error". Rebuild the
plugin in-tree from the v0.9.0 release tag, cross-compiled on the
build platform, into an image that behaves like upstream's: it copies
the plugin binary into the plugins volume at /target.

The image target stamps the built reference by digest into
values.yaml, and the package joins the root build list so every build
path refreshes that pin. Until the first stamp is committed the
upstream reference stays in place, which the chart test accepts
alongside the digest-pinned in-tree one.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-09-26 20:30:40 +03:00
Aleksei Sviridkin 6bb563f123 feat(release): publish the arm64 Talos assets
arm64 users can only take the Talos ISO, disk images, kernel and
initramfs from the Image Factory today, because a release carries the
amd64 ones only. The tag build now builds the assets for both arches
and uploads the arm64 set next to the amd64 one under the same naming.

It also pushes the talos installer image as a two-arch index, because
a node installed from the arm64 assets pulls its installer from that
image. The rest of the build stays amd64.

Signed-off-by: Aleksei Sviridkin <f@lex.la>
Assisted-by: LLM
2026-09-26 17:53:13 +03:00
Aleksei Sviridkin 101d1d9861 chore(seaweedfs): bump chart to 4.45 (#4079)
## What this PR does

Refreshes the vendored SeaweedFS chart from 4.31 to 4.45 through `make
update`. This supersedes #2918, which stopped at 4.34: both things that
bump was after (SIGHUP hot-reload of the JWT signing keys, and native
`expires_after_seconds` under
`global.seaweedfs.securityConfig.jwtSigning`) are in 4.45 too, along
with three months of chart fixes.

What changes in a rendered cozystack install:

- Every SeaweedFS server moves from `chrislusf/seaweedfs:4.31` to
`4.45`. The chart takes its image tag from `appVersion`, so the
`master`, `volume` and `filer` StatefulSets and the `s3` Deployment all
get a new image and roll. None of them sets an `updateStrategy`, so they
fall back to RollingUpdate and restart one pod at a time, in every
tenant that runs SeaweedFS. Selectors, `serviceName` and
`volumeClaimTemplates` are byte-identical across the bump, so no
immutable field is touched and no volume is recreated.
- The mysql Secret and the `WEED_MYSQL_*` env block now render only for
the mysql filer store, so the dummy `seaweedfs-db-secret` and its env
vars drop out of a postgres2 install. That Secret is a `pre-install`
hook resource and Helm never deletes hook resources on upgrade, so an
existing one stays behind unused; the tenant cleanup hook still removes
it when the tenant goes away.
- The filer ServiceMonitor selects on a `monitoring: "true"` label that
upstream moved from the filer-client Service onto the filer Service, so
metrics come from one Service instead of two. See the upgrade note
below.
- The filer db-init ConfigMap volume is marked optional.
- S3 gained a Lance catalog port (9101), rendered on the deployment and
published on the Service. This package pins it off, see below.
- The new per-component NetworkPolicy templates are opt-in and off by
default.

The rendered s3 port set is therefore unchanged from 4.31: `swfs-s3` and
`metrics`, same as before the bump.

## Catalog listeners

`weed s3` ships two table-catalog listeners that default to on: Lance on
9101, new in this bump and published on the s3 Service, and Iceberg on
8181, which predates it and stays on the pod IP. Both are served over
plain HTTP with no way to supply a certificate, while every other port
on this gateway is TLS by way of `s3-tls-main-port.patch`, and both
expose writable namespace and table routes. Nothing in cozystack
consumes either.

- Lance is pinned off in `values.yaml`, which drops the container port
and the Service port with it.
- Iceberg could not be pinned off at all: the chart wraps
`-port.iceberg` in an `if` and the value defaults to null, so the flag
was dropped and weed served its own 8181. A new carried patch renders
the flag the way 4.45 already renders `-port.lance`, so null reaches
weed as 0. An explicitly configured port still wins in both cases.

## Volume resize hook

The hook decides twice: one gate emits the `--cascade=orphan` delete of
the volume StatefulSet, the other emits the PVC patches. Both were
comparing sizes as strings, in different ways, and the two disagreed
about what a size change is.

The PVC gate reached its operands through an `include`, which returns a
string, so byte counts were compared lexicographically. A grow that
crossed a decimal exponent and lowered the leading digit (5Gi to 10Gi,
8Gi to 16Gi, 20Gi to 100Gi) read as a shrink: the patches were skipped
while the delete above them still ran, leaving the StatefulSet recreated
and the claims at the old size, hook exit 0 and nothing logged. The same
comparison read a real shrink across an exponent as a grow and emitted a
patch the API server rejects, failing the pre-upgrade hook after the
delete had landed.

The delete gate compared the live `volumeClaimTemplates` size against
the desired one raw. Since the API server re-emits a quantity in
canonical form, that never converges for a non-canonical spelling:
values saying `10240Mi` come back from the cluster as `10Gi`, so the
volume StatefulSet is deleted and recreated on every upgrade for a size
that never moved, and no patch follows because the numeric gate
correctly sees no growth.

A third defect sits in the patch command itself, which formatted the
desired size with `%s`. Helm decodes values through JSON, so a size
written without quotes arrives as a float64 and the rendered command
carried a Go format error where the quantity belongs. The hook fails on
it, and it fails after the orphan delete has already run. It is `%v`
now: `21474836480` renders as `2.147483648e+10`, which
`resource.ParseQuantity` accepts and the API server stores as
`21474836480`. The tenant app always quotes `size`, so no tenant could
reach this.

Carried as one patch normalising both gates through
`seaweedfs.resource-quantity`, with unit tests on the exponent-crossing
grow, a grow that always worked, a shrink, a respelling, and a size set
as a number.

## Upgrade notes

Two things to know before upgrading.

`filer.ingress` is gone from the chart's values. Upstream replaced it
with `filer.ingresses.http.*` and added `filer.ingresses.grpc.*`; those
six removed keys are the only contract break in the whole values file
across the bump. Nothing in tree sets the old key and the tenant-facing
SeaweedFS resource has no filer-ingress field, so a default install is
unaffected. An operator who set `filer.ingress.enabled: true` through a
platform-level `spec.components.seaweedfs-system.values` override is
not: Helm accepts the unknown key without complaint and the Ingress
simply stops rendering, with nothing in an event or a log to read.

Filer metrics stop being double-counted. Before this bump both
`seaweedfs-filer` and `seaweedfs-filer-client` matched the filer
ServiceMonitor, so Prometheus scraped two targets per filer pod and
every filer series was duplicated. One target is the correct number, but
panels built on `rate(SeaweedFS_filer_request_total{...})` and
`rate(SeaweedFS_filerStore_request_total{...})` in the shipped dashboard
step down by half at upgrade time. That step is the duplicate going
away, not a throughput loss. Quantile panels are ratios and are
unaffected.

## Patches

Ten carried patches, all applying cleanly from a fresh download.
`resize-api-server-annotation.diff` needed a rebase: upstream now
renders pod-template labels on the resize hook, so the patch appends the
cozystack apiserver label to them instead of creating the block. Two are
new and are described above: `s3-iceberg-port-explicit.patch` and
`volume-resize-quantity.diff`. Both belong upstream and are carried only
until they land there.

## Verification

Checked locally: a fresh download of 4.45 with all ten patches applied
in Makefile order reproduces the committed tree byte for byte; `helm
unittest` passes 73 in `packages/system/seaweedfs` and 35 in
`packages/extra/seaweedfs`; the naming-guard canary still refuses a
blind upgrade; and a rendered diff against 4.31 comes back identical for
object names, StatefulSet selectors, `serviceName` and
`volumeClaimTemplates`, so a running install keeps its workloads and
volumes across the upgrade. Each fix above has a unit test that is red
without it.

Not checked locally, worth an eye in review or e2e: the live upgrade
path, since `helm template` cannot exercise the `lookup` that preserves
the security.toml JWT keys, and server-side apply convergence when the
`monitoring` label moves between the two filer Services.

### Screenshots

N/A, no UI change.

### Downstream repositories

- [x] No downstream repository is affected by this change
- [ ] [cozystack/website](https://github.com/cozystack/website) -
follow-up:
- [ ]
[cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack)
- follow-up:
- [ ]
[cozystack/ansible-cozystack](https://github.com/cozystack/ansible-cozystack)
- follow-up:
- [ ] [cozystack/ccp](https://github.com/cozystack/ccp) - follow-up:
- [ ] [cozystack/talm](https://github.com/cozystack/talm) - follow-up:
- [ ] [cozystack/cozyhr](https://github.com/cozystack/cozyhr) -
follow-up:
- [ ] [cozystack/cozy-proxy](https://github.com/cozystack/cozy-proxy) -
follow-up:
- [ ]
[cozystack/cozystack-telemetry-server](https://github.com/cozystack/cozystack-telemetry-server)
- follow-up:
- [ ]
[cozystack/external-apps-example](https://github.com/cozystack/external-apps-example)
- follow-up:
- [ ] [cozystack/examples](https://github.com/cozystack/examples) -
follow-up:
- [ ] [cozystack/community](https://github.com/cozystack/community) -
follow-up:

### Release note

```release-note
chore(seaweedfs): bump the vendored SeaweedFS chart to 4.45, with the Lance and Iceberg table catalogs kept off and both gates of the volume resize hook comparing sizes numerically. Every SeaweedFS server moves to the 4.45 image, so the master, volume and filer StatefulSets and the s3 Deployment roll one pod at a time on upgrade. Two operator-visible notes: filer metrics stop being double-counted, so filer rate panels step down by half at upgrade time, and the chart's `filer.ingress` values key is replaced by `filer.ingresses.http`, so an override still using the old key is silently inert.
```



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Updated SeaweedFS to version 4.45, with expanded chart configuration
for enterprise licensing, NetworkPolicies, custom scheduling,
certificate-based SFTP authentication, and existing-secret credentials.
* Added separate HTTP and gRPC filer ingress options, S3 Lance ingress
and listener settings, and Lance worker support.
  * Added a Grafana dashboard view for filer object-size distributions.
* **Improvements**
* Added configurable node ports and load-balancer settings across
services, plus custom certificate DNS names.
* Improved volume-resize handling for equivalent storage quantities and
added support for resizing PVCs.
* **Documentation**
* Expanded chart guidance for persistence, credentials, networking,
licensing, and MySQL configuration.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-09-26 18:51:48 +04:00
Aleksei Sviridkin 9a92537b19 ci(workflows): pin flux version across CI toolchain steps (#4442)
## What this PR does

The flux CLI was installed across the build, PR, tag, nightly and
e2e-fork workflows and in the e2e-sandbox image through the vendor
`install.sh` with no version pin, so each install resolved the
installer's floating `latest`. `latest` had advanced to v2.9.5, and a
matrix job on #4429 failed when that release's checksums transiently
4xx'd during install. Pinning does not stop the checksum host from
returning a transient error, so it is not a fix for that flake; what it
fixes is the uncontrolled version. This sets `FLUX_VERSION` to 2.8.6 and
guards each flux install on the installed client version (workflows,
with a fixed-string match) or passes it to `install.sh` (the e2e-sandbox
image), matching the already-pinned "Set up promotion toolchain" steps,
so the flux CLI is fixed and reproducible across CI with no flux install
resolving floating `latest`. This is scoped to the flux CLI only: other
tools some of these steps install (yq, helm, mc) are not touched here,
and the yq floating-latest is tracked separately in #3640.

### Screenshots

<!-- REQUIRED for UI changes. Not applicable: this PR changes CI
workflows and a test image only. -->

Not applicable — CI and test-image change, no UI impact.

### Downstream repositories

- [x] No downstream repository is affected by this change
- [ ] [cozystack/website](https://github.com/cozystack/website) -
follow-up:
- [ ]
[cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack)
- follow-up:
- [ ]
[cozystack/ansible-cozystack](https://github.com/cozystack/ansible-cozystack)
- follow-up:
- [ ] [cozystack/ccp](https://github.com/cozystack/ccp) - follow-up:
- [ ] [cozystack/talm](https://github.com/cozystack/talm) - follow-up:
- [ ] [cozystack/cozyhr](https://github.com/cozystack/cozyhr) -
follow-up:
- [ ] [cozystack/cozy-proxy](https://github.com/cozystack/cozy-proxy) -
follow-up:
- [ ]
[cozystack/cozystack-telemetry-server](https://github.com/cozystack/cozystack-telemetry-server)
- follow-up:
- [ ]
[cozystack/external-apps-example](https://github.com/cozystack/external-apps-example)
- follow-up:
- [ ] [cozystack/examples](https://github.com/cozystack/examples) -
follow-up:
- [ ] [cozystack/community](https://github.com/cozystack/community) -
follow-up:

### Release note

```release-note
ci(workflows): pin the flux CLI version across CI toolchain steps and the e2e-sandbox image so the flux CLI is fixed and reproducible instead of following the installer's floating latest
```


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Chores**
* Build, release, and end-to-end test environments now use Flux CLI
version 2.8.6.
* Flux is installed when it is missing or does not match version 2.8.6;
an existing matching installation is reused.
* The end-to-end sandbox image now installs Flux version 2.8.6 by
default.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-09-26 18:50:14 +04:00
Aleksei Sviridkin 6907c22302 docs(agents): describe the talos package as multi-arch
The build notes said the talos package pins linux/amd64, which no
longer holds and would steer an agent into re-adding the pin.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-09-26 17:44:19 +03:00
Aleksei Sviridkin 2df6015414 ci(talos): keep the Talos builds in CI amd64
The talos package now builds for every arch in PLATFORM, and the jobs
that build it without setting PLATFORM would pick up arm64 as well:
the PR Talos build, the nightly disk and the release assets. None of
them has a consumer for arm64 output, since e2e boots amd64 and the
release publishes the amd64 assets only, so each one pins amd64 the
way the image builds already do.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-09-26 17:44:19 +03:00
Aleksei Sviridkin 8b20260105 feat(talos): build the installer and matchbox for arm64
The package pinned linux/amd64 because its assets were amd64 only.
With arm64 profiles it follows PLATFORM like every other image.

The installer is published as one index under every tag. skopeo
cannot assemble an index from the imager's docker archives, so the
archives go into one OCI layout and a small script writes the index
there for skopeo to push. buildx could build it from OCI layout
sources, but the release job builds on the classic docker driver,
which has no such source.

matchbox carries the kernel and initramfs of both arches whatever
PLATFORM is, rather than those of TARGETARCH: the node matchbox runs
on is not the arch of the machines it boots, so a per-arch image would
hand an amd64 machine an arm64 kernel whenever the pod lands on an
arm64 node. The amd64 assets stay at their old paths, and a group
keyed on the arch iPXE reports sends arm64 machines to the arm64 ones.

Signed-off-by: Aleksei Sviridkin <f@lex.la>
Assisted-by: LLM
2026-09-26 17:44:19 +03:00
Aleksei Sviridkin 0123edd647 feat(talos): generate arm64 imager profiles
Cozystack runs on arm64 nodes, but the Talos assets it builds are
amd64 only, so arm64 clusters have to use an Image Factory schematic
instead of the cozystack build.

The arm64 profiles install drbd and zfs, which Cozystack needs, plus
the firmware of the PCIe NICs whose drivers the arm64 Talos kernel
carries. x86 CPU microcode is useless there, and the arm64 builds of
amdgpu and i915 are empty. The generator checks every listed extension
for a build of the target arch so an upstream change fails generation
rather than the imager. The amd64 profiles keep their names and
content.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-09-26 17:22:21 +03:00
Aleksei Sviridkin e62f510faf chore(deps): move the Kubernetes libraries to v0.37.1
The root module's k8s.io/* move from v0.35 to v0.37.1 and
controller-runtime from v0.23 to v0.25.1, its release for Kubernetes
1.37. Two things held them back: the apimachinery fork, which had to be
rebased onto every minor, and the watch handler that from
k8s.io/apiserver v0.36 panicked on the initial-events-end bookmark the
aggregated storages sent to plain watches. Both are gone.

The rest of the upgrades are what these releases require: cel-go
v0.29.2, the etcd client v3.7.0, kube-openapi, structured-merge-diff and
the x/ modules. code-generator moves with the libraries.

Regenerating the strategy CRDs that embed core types adds the
Kubernetes 1.37 fields and follows one removal: the alpha PodSpec field
workloadRef became schedulingGroup upstream. Once the new CRD is
applied, the apiserver prunes workloadRef from every stored strategy it
serves, and the object's next write erases it from etcd. It only ever
took effect behind an alpha feature gate.

The gateway README and the tenantgateway CRD tests cite the
apiextensions-apiserver list-type ratchet at the pinned version; it is
byte-identical in v0.37.1, so only the version they name changes.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-09-26 16:08:25 +03:00
Aleksei Sviridkin ef491f5ee8 fix(api): keep the MutatingAdmissionPolicy plugin out of admission
From k8s.io/apiserver v0.36 the MutatingAdmissionPolicy feature is GA
and on by default, and the plugin sits in the recommended admission
order, so cozystack-api would run it. The plugin refuses every write
with "not yet ready to handle request" until its informer has synced
mutatingadmissionpolicies. This server has no RBAC to list them, and
clusters older than 1.36 do not serve the resource at all, so every
create, update and delete on its resources would fail.

Disable the plugin in the default options, and again in Complete,
because --disable-admission-plugins replaces the default list instead
of adding to it. Naming the plugin in --enable-admission-plugins still
turns it on: that operator has granted it what it needs, and leaving it
on both lists would fail validation. On the v0.35 libraries the feature
gate already keeps the plugin off, so nothing changes today.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-09-26 16:08:25 +03:00
Aleksei Sviridkin 3dde6503ec refactor(api): keep each app's kind without the apimachinery fork
Every apps kind is registered on the one Application Go type, and the
stock Scheme.ConvertToVersion picks the first kind registered for a
type, so without help a Redis comes back from the API as whichever app
kind was registered first. So far the fix lived in a fork of
k8s.io/apimachinery that patches ConvertToVersion. Upstream has not
taken the change, and the fork has to be rebased onto every Kubernetes
minor before the libraries can move.

The apps group now encodes through a serializer that picks the kind the
object carries, along the lines upstream suggested instead of changing
Scheme. The replace directive goes, and with it the Renovate rule that
kept the fork's stale release tags from being proposed as updates. The
serializer relies on the storage stamping the kind on every object it
returns, which it does. A test drives create, get, list, update, watch,
apply and table through the real handler chain for two kinds and fails
without the serializer on upstream apimachinery.

One path converts through the Scheme rather than the serializer and
goes back to the first registered kind: the row objects of a Table
requested with includeObject=Object, which kubectl asks for only with
--sort-by. Admission webhooks and ValidatingAdmissionPolicy get the
request kind set explicitly.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-09-26 16:08:24 +03:00
Aleksei Sviridkin dab250d210 fix(kamaji): resolve Gateway API availability once at startup
Kamaji checked for the Gateway API on every TenantControlPlane
reconcile. That discovery call ignores the reconcile context, so it is
bounded only by the client's 32s default timeout, which is longer than
the 30s reconcile budget. A slow discovery endpoint could therefore use
up the whole reconcile. The result could also disagree with the
watches, which were set up once at startup.

The patch carries the fix proposed upstream in clastix/kamaji#1327,
not yet merged there, onto the Kamaji tag cozystack ships.
Availability is resolved once when the manager starts, and the same
value drives the watches, the indexer, the reconciled resources and the
admission webhook's Gateway API check. A discovery error at startup now
stops the manager, so it is no longer read as "Gateway API not
installed". A Gateway API installed after Kamaji starts needs a Kamaji
restart. On this platform Kamaji depends on cert-manager, which depends
on gateway-api-crds, so the CRDs are already present when Kamaji
starts.

The patch keeps the upstream tests so that it matches the upstream
commit. The docs hunk is left out because it is not part of the image.
Drop this patch once Kamaji ships the change.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-09-26 15:44:26 +03:00
Aleksei Sviridkin 93ba1472ed fix(api): send the initial-events-end bookmark only to WatchList clients
The apiserver defaults SendInitialEvents on for every watch whose
resourceVersion is empty or "0", and leaves AllowWatchBookmarks off. The
aggregated storages read SendInitialEvents alone as a WatchList request,
so a plain `kubectl get -w` on applications, tenant modules, namespaces,
secrets or security groups got a bookmark annotated as the end of
initial events.

The k8s.io/apiserver v0.35 watch handler lets that through. From v0.36
it treats the annotated bookmark as the end of a WatchList and calls the
WatchList completion hook, which it only sets up when SendInitialEvents
and AllowWatchBookmarks are both on, so the handler dereferences nil and
the watch dies. The handler is the one compiled into cozystack-api, so
bumping the library is what breaks it, whatever the cluster version.

The marker now requires both flags, the same condition the watch cache
uses, and the backing watches ask for bookmarks only when the client
did, since every backing bookmark is forwarded. Security groups still
forward SendInitialEvents to their backing watch so it replays existing
objects as ADDED.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-09-26 15:33:39 +03:00