2824 Commits
Author SHA1 Message Date
cozystack-ci[bot] d53bb81312 Prepare release v1.7.2 (promoted from v1.7.2-rc.2)
Signed-off-by: cozystack-ci[bot] <274107086+cozystack-ci[bot]@users.noreply.github.com>
2026-11-27 07:00:14 +00:00
cozystack-ci[bot] 49834470d9 Prepare release v1.7.2-rc.2
Signed-off-by: cozystack-ci[bot] <274107086+cozystack-ci[bot]@users.noreply.github.com>
2026-11-26 17:11:43 +00:00
Andrei Kvapil 692f78c082 fix(ingress-nginx): pick up the nginx rebuild with the remaining CVE fixes
The v1.11.6-cozystack.3 controller image adds to nginx 1.25.5 the
fixes for the remaining advisories the controller can reach, from
nginx 1.26.3 to 1.30.8.

Assisted-by: LLM
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
(cherry picked from commit c873a50c24)
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-26 08:48:34 +00:00
Andrei Kvapil 98ced7da42 fix(ingress-nginx): turn off TLS session tickets for CVE-2026-97629
With tickets on and no fixed ticket key, nginx rotates the keys and,
before 1.30.6 and 1.31.7, leaves one of them uninitialized in the
worker processes, which may let a session be forged. The controller's
nginx 1.25.5 does not have the fix yet. Resumption still works through
the shared session cache, and with no fixed key tickets never resumed
across replicas anyway.

Assisted-by: LLM
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
(cherry picked from commit 3002f3183b)
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-25 10:49:46 +00:00
Mattia Eleuteri f9552cebe6 fix(cozystack-basics): make the tenant super-admin VirtualMachine grant read-only
cozy:tenant:super-admin:base carried '*' on kubevirt.io virtualmachines.
A VirtualMachine written directly is sized outside any application: it
is not a HelmRelease the tenant ordered, so nothing that accounts for
applications sees it, and the same verbs let a super-admin raise the
guest size of a VM a VMInstance release rendered. Nothing in tree needs
the write: power goes through the virtualmachines start/stop/restart
subresources, console and VNC through the VMI subresources, size, disks
and networking through VMInstance values. The grant arrived together
with a '*' on helmreleases that was later removed; this one was missed.

watch stays, because the dashboard watches the VirtualMachine for its
live power state and no other tenant role grants it.

The tenant roles are aggregated from ClusterRoles in several packages,
so a write path can reach a tenant without touching the role that
names it; the install e2e now guards against that.

Assisted-by: LLM
Signed-off-by: Mattia Eleuteri <mattia@hidora.io>
(cherry picked from commit ad47521c95)
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-25 10:49:46 +00:00
Andrey Kolkov b5e19bdfa3 fix(platform): bump system PostgreSQL to 17.12
The system databases (Keycloak, Harbor, Grafana, Alerta, SeaweedFS) are
pinned to PostgreSQL 17.7, which is affected by CVE-2026-116331: a type
confusion in the min/max aggregate optimisation lets a role that can
create objects run code as the operating system user of the server.
The 17.x line fixes it in 17.12.

Move the pin to 17.12-standard-trixie. The image variant and the Debian
release stay the same, so glibc and ICU do not change under the data
directory. Clusters on another major keep their image, as before.

Assisted-by: LLM
Signed-off-by: Andrey Kolkov <androndo@gmail.com>
(cherry picked from commit 8800d0177b)
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-25 10:49:45 +00:00
Adham Kiwan 206bf78c56 fix(linstor): run the NFS server wait init container on the platform CSI image
The LinstorCluster set no nfsServer.podTemplate, so the
linstor-wait-node-online init container of the NFS server DaemonSet ran
piraeus-operator's default CSI image. That image follows the operator
release, not linstorCSI.image, so a cluster that pulls only from a
mirror of the platform images still needed quay.io for it, and a client
behaviour change between the two (as with the certificate variables)
would reach this container without the platform choosing it.

Pin it to linstorCSI.image like the CSI node and controller pods.
nfsServer.enabled is set explicitly, because the operator treats an
absent nfsServer as enabled.

Closes: #5307
Assisted-by: LLM
Signed-off-by: Adham Kiwan <adhamkiwan@outlook.com>
(cherry picked from commit 323bd8bd33)
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-25 10:49:44 +00:00
Mattia Eleuteri b9fa1de239 fix(linstor): roll affinity controller and scheduler on client cert rotation
linstor-affinity-controller and the linstor-scheduler extender read their
LINSTOR API client certificate from secretKeyRef env vars, which kubelet
resolves only when the container starts. cert-manager renews these 90-day
certificates every 60 days, but neither workload is restarted on rotation,
so a pod that lives longer than the certificate keeps presenting the expired
one. The controller then refuses every new TLS handshake and the Go client
reports a bare EOF.

For the affinity controller this means PV node affinities stop following
replica moves; for the scheduler, once a pod with an expired certificate
holds the leader lease, pods with LINSTOR volumes are no longer placed next
to their replicas.

Add the Reloader auto annotation to linstor-affinity-controller through the
LinstorCluster patches, as already done for the controller and the CSI
workloads, and annotate the linstor-scheduler Deployment with the client
secret it consumes. The scheduler annotation goes on the Deployment rather
than podAnnotations, which the admission Deployment shares and would roll
for a secret it does not use.

Assisted-by: LLM
Signed-off-by: Mattia Eleuteri <mattia@hidora.io>
(cherry picked from commit f7c1850017)
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-25 10:49:44 +00:00
Adham Kiwan 1771a8f3f5 fix(seaweedfs): point the Lance catalog consumers at the renamed s3 Service
s3-service-name.patch renames the S3 Service to <name>-s3, but the Lance
catalog that arrived with chart 4.45 still builds the name from
seaweedfs.componentName, which gives <fullname>-s3. With the catalog on
and a fullname that differs from the chart name, the Lance ingress
points at a Service that does not exist and the worker gets a Lance URL
that does not resolve. The shipped values hide this because lancePort
is 0 and fullnameOverride makes both names equal.

Carry both consumers in s3-service-name-consumers.patch, the same way
the S3, Iceberg and COSI consumers are, and cover them in the consumer
tests with the catalog turned on.

Closes: #4878
Assisted-by: LLM
Signed-off-by: Adham Kiwan <adhamkiwan@outlook.com>
(cherry picked from commit 2de43d406c)
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-25 10:49:43 +00:00
Andrey Kolkov e1d3161e75 fix(backups): keep completed Velero backups of failed BackupJobs
The failed-job sweep treated a Completed Velero backup as deletable. A
BackupJob can fail after Velero completed, when creating or recording its
Backup fails transiently, and that Velero backup may be the only copy of a
good backup. The sweep now deletes only Failed, PartiallyFailed and
FailedValidation backups, also when several Velero backups reference one
job, and it reads the Backups that may reference them through the uncached
API reader, so a Backup the cache has not seen yet still protects its data.

The Velero strategy no longer requests the deletion before it records the
failure. If that status write failed, Velero removed the backup and the
retried run created a new one, so the failure was lost. The deletion now
comes only from the sweep, which runs on the reconcile that the persisted
Failed phase triggers; the BackupJob watch has no predicate that drops
status updates.

Replacing a request that Velero processed with errors deletes it, and the
backupstrategy-controller ClusterRole only allowed create, get, list and
watch on deletebackuprequests. That Delete failed with 403, and since the
Backup finalizer uses the same helper, a Backup deletion could get stuck
on it. The rule now includes delete.

Nothing watches DeleteBackupRequests, so the sweep did not run again after
Velero processed a request with errors. A Failed job now requeues every
5 minutes while a failed Velero backup of it remains, which replaces such a
request, and every minute while one is still running, instead of every 5
seconds.

Unit tests cover a rejected Failed status write, Completed, Deleting and
FailedValidation backups, a request processed with and without errors, the
UID precondition on the replacement, a Backup visible only to the uncached
reader, and API errors from the helper.

Refs: #5355
Assisted-by: LLM
Signed-off-by: Andrey Kolkov <androndo@gmail.com>
(cherry picked from commit 887453c008)
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-25 10:15:41 +00:00
Aleksei Sviridkin ff21a70985 fix(seaweedfs): remove identities left behind by deleted BucketAccesses
Since SeaweedFS 4.08 the S3 gateways move every identity from
/etc/iam/identity.json into /etc/iam/identities/<name>.json, and the
COSI driver up to v0.3.1 revokes only from identity.json. Every
BucketAccess deleted on such a filer left its identity file behind,
with its keys still accepted (seaweedfs/seaweedfs-cosi-driver#11). A
driver that deletes the file on revoke does nothing for the files
already left.

A post-install/post-upgrade hook removes a ba-<uid>.json file when no
BucketAccess in any namespace names it, by uid or by
status.accountID. The uid covers a BucketAccess still being granted,
the accountID one restored with its status. The identity directory is
listed before the BucketAccesses: a BucketAccess exists before its
grant writes a file, so a file seen in the first listing whose
BucketAccess still exists is always named by the second. File ages are
not used, because grants and gateway migrations rewrite left-over
files as well. A failed or empty listing removes nothing. Each removal
is logged and recorded as an Event on the HelmRelease. The hook runs
before the Object Lock hook, so in delete mode a left-over identity is
removed before that hook grants it anything.

A filer published for Client-topology clusters holds identities whose
BucketAccesses live in those clusters, so cosi.orphanIdentities
defaults to auto: report there, delete otherwise. An operator can
force either.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
(cherry picked from commit 045f1a9bbc)
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-25 10:15:41 +00:00
Yasar Rahman 73d7822952 fix(vpa): explain that the webhook waits add up within one request
failurePolicy Ignore applies only after the timeout; the Pod CREATE
webhooks are called sequentially within one request, so their waits
accumulate and can pass the request deadline.

Assisted-by: LLM
Signed-off-by: Yasar Rahman <yasar.rehman@gmail.com>
(cherry picked from commit d1b472319a)
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-25 10:15:41 +00:00
Yasar Rahman f07c1065f3 fix(vpa): shorten the admission webhook timeout to 5s
The VPA admission controller registers its Pod CREATE webhook in every
namespace with failurePolicy Ignore and a 30s timeout. When its pod is
down and the Service IP blackholes (a cold start after a full cluster
shutdown, before the CNI is back), each Pod creation waits the full 30s
here on top of the other webhooks and fails with "context deadline
exceeded". That includes the CNI's own DaemonSet pods, so the cluster
cannot recover without deleting the webhook configuration by hand.

A mutation takes milliseconds; 5s keeps slow responses working and lets
Ignore actually ignore. Uses the admission controller's documented
--webhook-timeout-seconds flag through the chart's extraArgs.

Refs #3125

Assisted-by: LLM
Signed-off-by: Yasar Rahman <yasar.rehman@gmail.com>
(cherry picked from commit 291b1fa3c0)
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-25 10:15:41 +00:00
Mattia Eleuteri bef343133a fix(seaweedfs, cozy-lib): cap the Go heap so components survive their memory limit
Every SeaweedFS component is a Go binary running under a cgroup memory
limit, and none of them set GOMEMLIMIT. The collector then works from
GOGC alone, a target relative to the live heap with no absolute ceiling,
so a burst of allocation grows the heap past the limit and the kernel
kills the container.

Seen on an S3 gateway holding 6.4 GiB of heap_sys against an 8 GiB limit
while only 389 MiB was actually in use: ten kills in seven days, each one
an interruption of the object store every tenant writes its backups to.
Raising the limit does not help, since nothing bounds the growth; it only
moves the ceiling the heap climbs to.

Derive the value from the limit already computed for each component, at
the same 75% the javaHeap helper uses for the JVM. The remaining quarter
covers what GOMEMLIMIT does not account for, goroutine stacks and mmap'd
regions among them.

Volume pools and zones carry their own value: the subchart merges volume
into every entry of volumes, so a pool would otherwise inherit the value
sized for the default volume's limit, above its own. The lifecycle admin
and worker run the same binary under limits the parent chart does not
set, so their value is pinned next to those limits.

A limit under 2Mi floors to 0MiB, which Go accepts and then collects
almost continuously; the render fails instead.

Assisted-by: LLM
Signed-off-by: Mattia Eleuteri <mattia@hidora.io>
(cherry picked from commit e3e2018075)
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-25 10:15:40 +00:00
Yan Bondarenko ca1b59243e fix(postgres): accept a standard five-field backup schedule
The mongodb app and backup Plans take a standard five-field cron, but
the postgres chart hands backup.schedule to a CloudNativePG
ScheduledBackup, which parses it with robfig/cron v1 Parse. That parser
reads the first field as seconds and makes day-of-week optional, so a
five-field value passes admission with only a warning and runs one
field off. 0 2 * * * runs hourly and 5 * * * * every minute.

A five-field schedule now gets a leading 0 seconds field. Six fields
and descriptors pass through, and any other field count fails the
render. A release that already sets five fields gets the standard
meaning on upgrade, so 0 2 * * * goes from hourly to daily.

Assisted-by: LLM
Signed-off-by: Yan Bondarenko <202671653+yankawai@users.noreply.github.com>
(cherry picked from commit 982db83dd2)
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-25 10:15:40 +00:00
Alexey Artamonov 14f06074e5 fix(backups): keep a ClickHouse archive an earlier attempt finished
A backup Pod that loses sight of its upload, by dying or by losing six
polls in a row, is retried while the sidecar finishes that upload. The
retry found it in the action log as a success, took the sidecar for
idle and asked for create_remote with resume again. clickhouse-backup
then rebuilds the local backup and uploads it once more over the
archive already in the bucket, which is left broken if that second
upload dies halfway.

The archive name belongs to one BackupJob, so a success row of exactly
this upload can only be an earlier attempt's, and the retry now takes
it as its result. An error or cancel row still leads to a resumed
upload, and a restore still runs again, since a restore is not named
per RestoreJob.

Assisted-by: LLM
Signed-off-by: Alexey Artamonov <aleksei.artamonov@aenix.io>
(cherry picked from commit d530ca8cf5)
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-25 10:15:39 +00:00
Alexey Artamonov c90765771e test(backups): cover a ClickHouse restore against an unreachable sidecar
The restore path resolves its archive from list/remote before the start
gate runs, so it carries its own wait for a sidecar that is not up, and
only the backup path had a test for a sidecar that never answers. The
retry comment also miscounted: the limit is attempts, not retries.

Assisted-by: LLM
Signed-off-by: Alexey Artamonov <aleksei.artamonov@aenix.io>
(cherry picked from commit ae1e1830ce)
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-25 10:15:39 +00:00
Alexey Artamonov 817b59a45a fix(backups): take over a running ClickHouse restore on Job retry
restore_remote drops every table it restores before recreating it, so
running it twice discards whatever was written after the first run
finished. The strategy Job retries a failed Pod up to twice, and with
the start gate waiting for an idle sidecar instead of hitting 423, a
retry whose predecessor died after its POST waited for that restore to
finish and then started a second one. A retry now takes over a
restore_remote of the same archive that is still running.

A finished row is not taken over: the sidecar never trims its action
log, so a success row of the archive may belong to an earlier
RestoreJob, and treating it as this one would report a restore that
never ran. A retry that arrives after the restore finished therefore
still runs it again.

Once the operation is accepted, one failed poll no longer ends the
attempt under errexit; six in a row do. An operation that ends
cancelled now fails the Pod instead of being polled forever.

A retried backup still starts a new create_remote, because its archive
name changes on every attempt; taking it over needs a name fixed for
the whole BackupJob.

Assisted-by: LLM
Signed-off-by: Alexey Artamonov <aleksei.artamonov@aenix.io>
(cherry picked from commit 993b79bb37)
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-25 10:15:39 +00:00
Alexey Artamonov 1e5e3a45df fix(backups): fail a ClickHouse backup whose operation the sidecar lost
The sidecar keeps its action log only in memory, so a sidecar restart
after create_remote was accepted drops the operation's row, and the
strategy kept polling for it forever under a Job with no deadline.
Until now the resumed upload re-added a row ending in the archive name
and ended the loop, but resume is now off so a failed attempt never
reaches the bucket, which leaves nothing to end it. The row is logged
before the POST is acknowledged, so its absence means the operation is
gone and the attempt has to fail.

Assisted-by: LLM
Signed-off-by: Alexey Artamonov <aleksei.artamonov@aenix.io>
(cherry picked from commit d0a73302d9)
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-25 10:15:38 +00:00
Alexey Artamonov 8b76529539 fix(backups): wait for an idle ClickHouse backup sidecar before starting
The sidecar refuses a new operation with 423 while another one is in
progress, but the strategy only waited for the API to answer, and went
on to start its operation even when it never did. An operation already
running in the sidecar therefore failed the attempt within seconds.

Poll the action log until nothing is in progress, and fail the Pod
instead of proceeding when the sidecar stays busy or unreachable, so
the failure names the cause rather than surfacing as a 423 or a
connection error from the operation itself.

Assisted-by: LLM
Signed-off-by: Alexey Artamonov <aleksei.artamonov@aenix.io>
(cherry picked from commit a25db5aeb6)
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-25 10:15:38 +00:00
Alexey Artamonov 48aa4188b4 fix(seaweedfs): keep the metadata database storage class a string
db.storageClass went unquoted into the values of the database release
and again into its CNPG Cluster. A class name made only of digits,
which Kubernetes allows, became a number that the Cluster rejects, and
a line break in the value could add keys to the database release
values. It is quoted at both steps.

Assisted-by: LLM
Signed-off-by: Alexey Artamonov <aleksei.artamonov@aenix.io>
(cherry picked from commit f5114ae04c)
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-25 10:15:38 +00:00
Alexey Artamonov 1a01f171ea fix(seaweedfs): quote every storage class the upstream claims carry
The master, filer, volume index, log and all-in-one claims of the
upstream chart write storageClassName unquoted, like the data claims
did, so a class name made only of digits renders as a number and the
claim is rejected. None of them is set by Cozystack today, but they
are values of the same chart that a later change can start handing on,
and the patch already exists for the data claims. They follow the same
rule: quoted, and left out when no class is named so that the cluster
default applies. The deprecated filer.enablePVC claim is left alone:
it renders only with filer.data unset, and the template fails earlier on
an unset filer.data, so it cannot be reached.

Assisted-by: LLM
Signed-off-by: Alexey Artamonov <aleksei.artamonov@aenix.io>
(cherry picked from commit f83db514b0)
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-25 10:15:38 +00:00
Alexey Artamonov bb1af44417 fix(seaweedfs): keep storage class names strings in the volume claims
The upstream admin and volume StatefulSets write storageClassName
unquoted, so a class name made only of digits, which Kubernetes allows
and the parent chart now hands on as a string, turned back into a
number there and the claim was rejected. The field is quoted, and left
out when no class is named: quoting an empty value would set an empty
storageClassName, which disables dynamic provisioning instead of using
the cluster default. Upstream 4.52 and master still write both fields
unquoted, so this is a chart patch, applied with --forward so make
update stops once upstream carries an equivalent change.

Assisted-by: LLM
Signed-off-by: Alexey Artamonov <aleksei.artamonov@aenix.io>
(cherry picked from commit e7b5a5a1a9)
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-25 10:15:38 +00:00
Alexey Artamonov 7a6aac9ede fix(seaweedfs): hand storage class names to the data plane as strings
The volume and admin storage classes were written unquoted into the
values of the data-plane release. A class name made only of digits,
which Kubernetes allows, arrived there as a number, and a value with a
line break could add keys next to the field, past the schema that is
the tenant's input gate. Both are now quoted. lifecycle.storageClass,
new in this release, also carries the StorageClass name rules in its
schema, so a value that cannot name a class is refused when the
application is written instead of leaving the admin claim pending.

Assisted-by: LLM
Signed-off-by: Alexey Artamonov <aleksei.artamonov@aenix.io>
(cherry picked from commit 7c9aa2fe10)
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-25 10:15:38 +00:00
Alexey Artamonov 9a6715502d fix(seaweedfs): give the lifecycle admin volume its own storage class
volume.storageClass is picked for volume server data, and in a
MultiZone instance it can name a class whose volumes exist in one zone
or on one node. Reusing it for the admin volume would tie the admin to
that zone or node, so losing it would stop lifecycle enforcement for
the whole instance, a placement nobody chose for the admin. The admin
volume now takes lifecycle.storageClass, and the cluster default when
that is empty.

Assisted-by: LLM
Signed-off-by: Alexey Artamonov <aleksei.artamonov@aenix.io>
(cherry picked from commit 5cbb3a633e)
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-25 10:15:37 +00:00
Alexey Artamonov e59a9db440 fix(seaweedfs): keep bucket lifecycle enforcement off unless enabled
The daily walk that expires objects sends its deletes without an object
identity, and the s3 server skips its compare-and-swap when none is
given (walker_dispatcher.go and identityMatches, unchanged from 4.45
through 4.52). It does not re-check the object's age either, so a key
overwritten between the walk's listing and the delete loses its new
content. Backup buckets write unique keys and barely meet that window;
a tenant bucket that rewrites a fixed key does.

Turning enforcement on by default would also start applying, on
upgrade, every rule that was stored and ignored until now. Both are
retention changes an operator should choose, so the admin server and
the worker now run only where lifecycle.enabled is set. On by default
can return once the walk carries identity.

Assisted-by: LLM
Signed-off-by: Alexey Artamonov <aleksei.artamonov@aenix.io>
(cherry picked from commit 62b4213784)
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-25 10:15:37 +00:00
Alexey Artamonov df3f13354c fix(seaweedfs): let the lifecycle worker roll out on a single node
The worker is a one-replica Deployment, so a rollout surges a second
pod before stopping the first, and the subchart pins worker pods apart
with a hard hostname anti-affinity. On a single-node cluster the surge
pod never schedules and the release waits out its timeout on every
change to the worker template. A preference keeps the spread where
there are nodes for it, as the master and s3 settings here already do.

Assisted-by: LLM
Signed-off-by: Alexey Artamonov <aleksei.artamonov@aenix.io>
(cherry picked from commit 7eabb9b517)
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-25 10:15:37 +00:00
Alexey Artamonov 2305b5cd3e build(seaweedfs): stop make update when the [grpc.s3] backport lands
The backport becomes redundant once the vendored chart reaches 4.46.
Re-applied to a chart that already carries the section, BSD patch takes
it as reversed, removes the section and exits 0, so a re-vendor would
quietly return the s3 gRPC listener to plaintext. --forward refuses an
already-applied patch with a non-zero exit, which stops the update at
the point where the patch should be dropped.

Assisted-by: LLM
Signed-off-by: Alexey Artamonov <aleksei.artamonov@aenix.io>
(cherry picked from commit c3d1a73d8c)
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-25 10:15:37 +00:00
Alexey Artamonov f966ddb939 fix(seaweedfs): run the worker that enforces bucket lifecycle rules
SeaweedFS accepts and stores a bucket lifecycle configuration, but only
the s3_lifecycle job of its plugin worker acts on it, and that job is
scheduled by the admin server. Neither ran here, so a rule returned 200
and no object ever expired, on the platform backup bucket and on tenant
buckets alike, and the documented way to bound backup storage did
nothing.

Both now run in Simple and MultiZone instances, behind lifecycle.enabled
(on by default). A Client instance has no data plane of its own; its
rules are enforced where the master it connects to runs. The worker
registers for s3_lifecycle alone, so enabling lifecycle does not also
start vacuum, balancing or erasure coding. The admin keeps its job state
on a small volume (on volume.storageClass when set), and its UI gets a
generated password, because a tenant namespace admits traffic from the
whole cluster and the server is unauthenticated without one. The
data-plane chart keeps both off unless its parent turns them on, so it
never starts an admin without that password.

Existing rules start applying minutes after the upgrade: the admin's
scheduler runs the first pass within one idle cycle of its lifecycle
lane, then once a day, and objects the rules have already expired are
deleted on that first pass.

Assisted-by: LLM
Signed-off-by: Alexey Artamonov <aleksei.artamonov@aenix.io>
(cherry picked from commit f36d864e99)
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-25 10:15:37 +00:00
Alexey Artamonov d3afba46b3 fix(seaweedfs): serve the s3 internal gRPC over mTLS
weed s3 takes its gRPC server identity from [grpc.s3] in security.toml
and serves plaintext when the section is missing, which it is in the
4.45 chart. Every peer dials that port with mTLS: the s3_lifecycle
worker with its [grpc.worker] certificate, other s3 replicas with
[grpc.client] for IAM cache propagation. Both fail the handshake, so
lifecycle deletes cannot run and identity changes do not reach the
other replicas.

The section is backported from upstream (seaweedfs/seaweedfs#11157,
first released in 4.46) as a chart patch. It uses the internal
CA-signed client certificate the s3 pods already mount, not the public
listener's tlsSecret, which internal peers would not trust.

security.toml is mounted by subPath, so a running s3 pod never sees the
new section. A pod annotation changes the s3 template in this release
so the upgrade restarts it.

Assisted-by: LLM
Signed-off-by: Alexey Artamonov <aleksei.artamonov@aenix.io>
(cherry picked from commit 2cc90b18f5)
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-25 10:15:37 +00:00
Mattia Eleuteri 482e3e85f8 fix(talos): bump Talos to v1.14.4 (CVE-2026-99999)
Talos v1.14.4 ships Linux 6.18.57, which carries the upstream fix
6785011f8b16 ("ipv4: validate checksum_start before completing
checksum") for CVE-2026-99999, known as PwnEscape.

A guest controls the csum_start field of the virtio_net_hdr it hands
to the host through TAP or vhost-net. When the host fragments such a
packet, skb_checksum_help() writes two guest-chosen bytes inside the
IPv4 header, and ip_frag_next() then copies host memory past the
packet into every fragment. The bug reads host kernel memory and has
been chained into code execution on the host. KubeVirt VMs on
Cozystack use the bridge binding, a TAP device with vhost-net and
checksum offload on, so root in any guest reaches this path on the
host node. v1.14.2 runs Linux 6.18.54 and is affected.

The Talos CNI plugins stay at containernetworking/plugins v1.9.1, so
the multus staging marker moves to v1.14.4 with no version change.

Assisted-by: LLM
Signed-off-by: Mattia Eleuteri <mattia@hidora.io>
(cherry picked from commit d28316671c)
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-25 10:15:36 +00:00
Yan Bondarenko 0de36b85ef fix(platform): honour a bool false in ingress-enabled and monitoring-enabled
Helm's default treats a bool false as empty, so an unquoted false in
either _cluster flag still rendered _namespace.ingress and the monitoring
redirects. Check for a missing key first and require "true" or a bool
true otherwise.

Assisted-by: LLM
Signed-off-by: Yan Bondarenko <202671653+yankawai@users.noreply.github.com>
(cherry picked from commit a314dacb86)
Signed-off-by: cozystack-ci[bot] <274107086+cozystack-ci[bot]@users.noreply.github.com>
2026-11-25 09:58:13 +00:00
Andrei Kvapil 4d7515ab3e fix(ingress-nginx): pick up the nginx rebuild with the HTTP/2 CVE fixes
The controller image v1.11.6 ships nginx 1.25.5, and the upstream
project is archived, so no 1.11.x with a fixed nginx will come. The
cozystack fork now rebuilds that same nginx with the two HTTP/2 commits
from the 1.30 stable branch (CVE-2026-123633, CVE-2026-123007), and
this moves the controller to that build.

Assisted-by: LLM
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
(cherry picked from commit 64cc6d2ff1)
Signed-off-by: cozystack-ci[bot] <274107086+cozystack-ci[bot]@users.noreply.github.com>
2026-11-25 09:58:12 +00:00
Aleksei Sviridkin cf7f622089 fix(kamaji): drop kubelet config fields older tenants do not know
Kamaji is built on the Kubernetes 1.37 libraries and renders the
tenant's kube-system/kubelet-config from 1.37 defaults. That output
carries fields the kubelet config API of an older tenant does not
have: memoryReservationPolicy (added in 1.36),
mergeDefaultEvictionSettings (1.33) and crashLoopBackOff (1.32).
Strict decoding on such a tenant fails, for example kubeadm join on
v1.35 logs:

  strict decoding error: unknown field "memoryReservationPolicy"

kubeadm logs this as a warning and decodes leniently, dropping the
field, so the join succeeds, but any strict consumer of the ConfigMap
breaks.

Drop each field from the rendered object when the tenant version
predates it. The removal works on the encoded object because
crashLoopBackOff is a non-pointer struct: zeroing it still renders
"crashLoopBackOff: {}". A pre-release counts as older than its minor,
since the early alphas of a minor do not have its fields yet.

The patch ships a test for the rendered fields per tenant version,
run by the image build.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
(cherry picked from commit 932d1ac136)
Signed-off-by: cozystack-ci[bot] <274107086+cozystack-ci[bot]@users.noreply.github.com>
2026-11-25 09:58:12 +00:00
Aleksei Sviridkin 9366997a4b fix(seaweedfs): declare the vendored chart dependency
Helm lint rejects the wrapper chart while its bundled seaweedfs chart is
undeclared. Reference the local chart without constraining its version
so vendoring remains the source of the dependency.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
(cherry picked from commit 65708a81b8)
Signed-off-by: cozystack-ci[bot] <274107086+cozystack-ci[bot]@users.noreply.github.com>
2026-11-25 09:58:12 +00:00
Aleksei Sviridkin c9a20d45d4 fix(seaweedfs): grant Object Lock actions to existing S3 identities
SeaweedFS 4.48 requires dedicated Object Lock actions, but upgrading the
COSI driver does not re-grant access for ready BucketAccesses. Add the
actions implied by existing Read and Write grants after install and
upgrade, without changing credentials or granting governance bypass.

The anonymous identity that public-read buckets share is skipped: the
COSI driver revokes public read by removing only Read:<bucket>, so
derived Object Lock reads would stay open to unsigned callers.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
(cherry picked from commit 78e21fefcc)
Signed-off-by: cozystack-ci[bot] <274107086+cozystack-ci[bot]@users.noreply.github.com>
2026-11-25 09:58:11 +00:00
Yan Bondarenko 7d3dad2717 fix(etcd): scope tenant alerts to their scrape job
Assisted-by: LLM
Signed-off-by: Yan Bondarenko <202671653+yankawai@users.noreply.github.com>
(cherry picked from commit 81fd5fa872)
Signed-off-by: cozystack-ci[bot] <274107086+cozystack-ci[bot]@users.noreply.github.com>
2026-11-25 09:58:11 +00:00
Yan Bondarenko 9b1c3b5737 feat(monitoring): alert when pods of one workload share a node
Two etcd members, two Redis Sentinels or both replicas of a storage
tier can end up on one node through a soft spread rule, a drain, or a
placement made before a spread rule existed. Nothing reported it, and
the scheduler does not move running pods, so it stays like that until
a pod is recreated. One node failure then costs the quorum or every
copy at once.

etcd-operator owns each member pod by its own EtcdMember, so members
are grouped by the EtcdCluster name their names start with. Owner and
node are read from kube_pod_info because kube_pod_owner and
kube_pod_status_phase get the node of the kube-state-metrics pod as a
target label. Nodes with a NoSchedule or NoExecute taint do not count,
which covers cordoned, not ready and unreachable nodes. The alert waits
an hour, longer than a replacement pod runs next to its terminating
predecessor or a node takes to drain and come back.

Assisted-by: LLM
Signed-off-by: Yan Bondarenko <202671653+yankawai@users.noreply.github.com>
(cherry picked from commit 5632596fe8)
Signed-off-by: cozystack-ci[bot] <274107086+cozystack-ci[bot]@users.noreply.github.com>
2026-11-25 09:58:11 +00:00
Mattia Eleuteri 8b6655e9ee fix(kubernetes-nodes): let ComputePlane pools set maxUnavailable and bound it to int32
The ComputePlane wrapper forwards only the pool fields it names, and maxUnavailable was not one of them. A ComputePlane pool without room for one extra VM therefore had no way back to the drain-first rollout, and its rollouts stalled.

CAPI decodes maxUnavailable as an int32, so a value above 2147483647 passed the chart schema and was then refused by the MachineDeployment decoder.

Assisted-by: LLM
Signed-off-by: Mattia Eleuteri <mattia@hidora.io>
(cherry picked from commit 525e416134)
Signed-off-by: cozystack-ci[bot] <274107086+cozystack-ci[bot]@users.noreply.github.com>
2026-11-25 09:58:10 +00:00
Mattia Eleuteri 0b15baf5f9 docs(kubernetes): say a worker rollout needs room for one extra VM
With maxUnavailable 0 a pool short of quota or capacity for the
replacement VM stalls its rollout instead of shrinking. The field
description, which also feeds the API and dashboard documentation, now
says so and names maxUnavailable: 1 as the way out.

Assisted-by: LLM
Signed-off-by: Mattia Eleuteri <mattia@hidora.io>
(cherry picked from commit ed40d83323)
Signed-off-by: cozystack-ci[bot] <274107086+cozystack-ci[bot]@users.noreply.github.com>
2026-11-25 09:58:10 +00:00
Mattia Eleuteri 8a006c7ee8 feat(kubernetes): let a worker pool set its rollout maxUnavailable
A Proxmox template that passes a GPU through leaves gpus empty, so the
chart renders maxUnavailable 0 for that pool and its replacement VM
waits for the GPU the old worker still holds. The pool can now say so
itself with maxUnavailable, which overrides the 0, or 1 with gpus,
that the chart derives otherwise.

Assisted-by: LLM
Signed-off-by: Mattia Eleuteri <mattia@hidora.io>
(cherry picked from commit 670f33d68c)
Signed-off-by: cozystack-ci[bot] <274107086+cozystack-ci[bot]@users.noreply.github.com>
2026-11-25 09:58:10 +00:00
Mattia Eleuteri 3c85446337 fix(controller, platform): give unbounded pool members the root's LimitRange
The tenant chart renders the tenant-range-limits LimitRange only next to
the tenant-quota of a tenant that declares resourceQuotas. Since quotas
became hierarchical, an unbounded sub-tenant shares its parent's pool
and gets a controller-owned tenant-quota-allocated ResourceQuota, but
still no LimitRange. A ResourceQuota on limits.cpu or limits.memory
makes admission reject any container that omits that limit, and with
no LimitRange nothing fills it in. Pods that ran before the quota was
introduced fail as soon as they are recreated; the barman-cloud plugin
sidecar, which sets no CPU limit, takes every backed-up postgres
instance in such a namespace down on its next restart.

The controller already knows which namespaces it clamps, so it copies
the pool root's chart LimitRange into each unbounded member, under its
own name so that Helm can still create the chart object if the tenant
later declares a quota of its own, and removes the copy once the
namespace leaves the pool.

Assisted-by: LLM
Signed-off-by: Mattia Eleuteri <mattia@hidora.io>
(cherry picked from commit c368c48fd8)
Signed-off-by: cozystack-ci[bot] <274107086+cozystack-ci[bot]@users.noreply.github.com>
2026-11-25 09:58:09 +00:00
Yan Bondarenko 8a6914768c fix(cozystack-basics): refuse a direct delete of a tenant namespace
A tenant namespace is meant to go away with its Tenant. The tenant
chart's pre-delete hook deletes the applications first and the tenant
modules such as etcd after them, and helm-controller deletes the
namespace at the end. A direct delete hands the namespace to the
namespace controller instead. It deletes the pods first and then
everything else together, so the tenant etcd and its etcd-ca-tls Secret
can be gone before the TenantControlPlanes that use them. Kamaji then
cannot reach the datastore to clean up, the TenantControlPlane finalizer
never clears and the namespace stays Terminating.

The policy refuses DELETE of a namespace labelled
tenant.cozystack.io/tenant-root, which the tenant chart puts on every
tenant namespace below tenant-root. tenant-root carries no such label
and stays with the no-delete guardrail. Two callers are let through.
helm-controller and its shards run as the flux ServiceAccount in
cozy-fluxcd and delete the namespace during a Tenant uninstall. The
garbage collector runs in kube-system and removes a child namespace
through its ownerReference once the parent namespace is gone. The
namespace controller only finalizes a namespace and never sends a
DELETE for it, so it is not affected. Everyone else is refused,
system:masters included, as with the no-delete guardrail. The message
names the Tenant to delete and the label to remove when the Tenant is
already gone.

The policy test helpers take the template path now, so the new test
compiles the shipped template with the apiserver CEL compiler like the
external TLS policy test does.

Assisted-by: LLM
Signed-off-by: Yan Bondarenko <202671653+yankawai@users.noreply.github.com>
(cherry picked from commit 6bb0fda706)
Signed-off-by: cozystack-ci[bot] <274107086+cozystack-ci[bot]@users.noreply.github.com>
2026-11-25 09:58:09 +00:00
Yan Bondarenko 3a342b1e5f fix(keycloak): apply keycloak-operator CRD updates on upgrade
keycloak-operator ships its CRDs in the chart's crds/ directory and its
PackageSource sets no upgradeCRDs policy, so helm-controller never
replaces them. A cluster installed before v1.2.0 therefore runs the
v1.32.0 operator against the v1.25.0 CRDs, whose ClusterKeycloakRealm
schema has no spec.sessions, spec.login or spec.organizationsEnabled.
The apiserver drops those fields from the realm keycloak-configure
renders, so the operator never applies the session limits the platform
sets. On a v1.6.4 cluster in that state Keycloak also rejected the
dashboard client with HTTP 400, and replacing the CRDs from the chart
by hand, with an operator restart, cleared it.

The v1.32.0 CRDs are not purely additive. They drop the realm,
targetRealm and keycloakOwner fields that v1.25.0 marked deprecated and
require realmRef and keycloakRef instead. Every Keycloak object the
platform renders already uses the refs, and each CRD keeps its single
version, so replacing them loses nothing the platform relies on.

helm-controller applies the policy only when it upgrades the release,
and it runs an upgrade only when the release artifact or its values
change, which a PackageSource edit does not do. The package test added
here also changes the keycloak-operator artifact, so the replace runs
on the upgrade that ships this change even where nothing else in the
package changes. The test itself pins the realm fields
keycloak-configure sets against the CRD the chart ships.

Assisted-by: LLM
Signed-off-by: Yan Bondarenko <202671653+yankawai@users.noreply.github.com>
(cherry picked from commit b74029cb39)
Signed-off-by: cozystack-ci[bot] <274107086+cozystack-ci[bot]@users.noreply.github.com>
2026-11-25 09:58:08 +00:00
Yan Bondarenko 62ee8da0ee fix(piraeus-operator): keep the LINSTOR error-report alerts quiet when the controller pod moves
linstor_error_reports_count comes from the LINSTOR controller, so its
series carry the controller pod's instance and controller_node labels.
When the pod moves to another node, or an external label of the scrape
changes, the existing report counts come back as new series.
VictoriaMetrics' increase() counts the first samples of a series from
zero when they are small, and report counts are small, so
linstorSatelliteErrorRate fires for every node with an old report and
keeps firing for 15 minutes. The up guard matches on instance and lets
the new series through.

The controller also leaves a satellite out of the metric while it is
not connected, so a satellite that comes back after more than five
minutes has its old count counted again in the same way.

Keyed on hostname, a moved controller or a changed label continues the
same series, and holding the last value for an hour bridges a
disconnect or a slow controller restart. The up guard matches on()
because the result no longer has an instance label. The controller
rule takes the same form. Its hostname is the pod name and a new pod
starts with no reports, but a label change hit it the same way.

Assisted-by: LLM
Signed-off-by: Yan Bondarenko <202671653+yankawai@users.noreply.github.com>
(cherry picked from commit 8502629995)
Signed-off-by: cozystack-ci[bot] <274107086+cozystack-ci[bot]@users.noreply.github.com>
2026-11-25 09:58:08 +00:00
Yan Bondarenko 6b3c4fe435 fix(kubevirt): let tenant admins upload a VMDisk image with virtctl
A VMDisk created with source upload waits in UploadReady for an image,
but no tenant role can fill it. virtctl image-upload reads the disk PVC
and CDI's PVC Prime and requests an upload token, and the tenant roles
grant neither get on persistentvolumeclaims nor create on
uploadtokenrequests, so the command stops on a forbidden PVC read.

cozy:tenant:admin:base now grants both, so tenant admins and
super-admins get them in their own namespaces through the existing
RoleBindings, while the use and view tiers do not. Reading the
DataVolume is already granted for the disk's own name by the vm-disk
chart's dashboard role. The vm-disk notes print the command with
--no-create, because the chart has already created the DataVolume, and
the security self-assessment and threat model list the new grants.

The rules, their tests, the notes change and the docs lines come from
#3847, which also carries a console upload panel and an upload proxy
certificate that are still in review there.

Fixes #3759

Co-authored-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
Assisted-by: LLM
Signed-off-by: Yan Bondarenko <202671653+yankawai@users.noreply.github.com>
(cherry picked from commit bcc5f3216a)
Signed-off-by: cozystack-ci[bot] <274107086+cozystack-ci[bot]@users.noreply.github.com>
2026-11-25 09:58:08 +00:00
Yan Bondarenko e6468a30fc test(vertical-pod-autoscaler): check maxSkew and whenUnsatisfiable of the spread
The test only looked at the topology key and the label selector, so a
change to maxSkew or to whenUnsatisfiable went unnoticed.

Assisted-by: LLM
Signed-off-by: Yan Bondarenko <202671653+yankawai@users.noreply.github.com>
(cherry picked from commit 70e1e8b145)
Signed-off-by: cozystack-ci[bot] <274107086+cozystack-ci[bot]@users.noreply.github.com>
2026-11-25 09:58:08 +00:00
Yan Bondarenko 0f9715dcce fix(vertical-pod-autoscaler): run two admission controllers spread over nodes
With one admission controller and failurePolicy Ignore, a pod created
while that controller is being rescheduled is admitted without its VPA
recommendation, and with updateMode Initial it keeps the defaults for
the rest of its life. On a v1.6.5 cluster a vmstorage pod created during
a node drain got the operator defaults, a 1500Mi limit against a 3.4Gi
recommendation, and was OOMKilled weeks later.

A second replica on another node and a PodDisruptionBudget keep one
controller serving through a drain. The controller still deletes and
recreates its webhook configuration on start, so a restart leaves only
that short gap instead of the whole reschedule.

Assisted-by: LLM
Signed-off-by: Yan Bondarenko <202671653+yankawai@users.noreply.github.com>
(cherry picked from commit 34766ff0b5)
Signed-off-by: cozystack-ci[bot] <274107086+cozystack-ci[bot]@users.noreply.github.com>
2026-11-25 09:58:08 +00:00
Yan Bondarenko f050496011 test(monitoring): check the listed alert still reaches email after the blackhole
The case lists InfoInhibitor in email.alertnames but only asserted the
route order up to the blackhole, so it would still pass if the email
route for a listed name stopped being rendered.

Assisted-by: LLM
Signed-off-by: Yan Bondarenko <202671653+yankawai@users.noreply.github.com>
(cherry picked from commit 00c11c7a74)
Signed-off-by: cozystack-ci[bot] <274107086+cozystack-ci[bot]@users.noreply.github.com>
2026-11-25 09:58:07 +00:00
Yan Bondarenko caca8c61c3 fix(monitoring): route InfoInhibitor to the blackhole receiver
InfoInhibitor exists to be the source side of an Alertmanager inhibit
rule and, as its own description says, to go to a null receiver. The
platform Alertmanager config has no inhibit rule, and the rule has
carried severity major since it was imported alongside Alerta, so
Alerta shows it one level below critical. Alerta's Telegram and Slack
plugins forward it by default, and a notify_email label inherited from
the info alert gets it emailed too.

It fires whenever a rule labelled severity="info" is active with no
warning or critical alert in the same namespace and cluster. The
platform's own rules no longer use info, but rules it does not write
still do. CDI generates CDIStorageProfilesIncomplete, KubeVirt
generates KubeVirtVMGuestMemoryAvailableLow, and operators add their
own. Each of them turns into a major InfoInhibitor in Alerta.

none is the severity upstream kube-prometheus gives this rule, and the
platform config already sends severity="none" to the blackhole ahead
of every route that delivers. The severity contract refuses none
because such an alert is never delivered, so InfoInhibitor is named as
the one alert for which that is the point. Tests hold both ends, so
neither the label nor the route order can drift back to delivering it.

Assisted-by: LLM
Signed-off-by: Yan Bondarenko <202671653+yankawai@users.noreply.github.com>
(cherry picked from commit 89028b455e)
Signed-off-by: cozystack-ci[bot] <274107086+cozystack-ci[bot]@users.noreply.github.com>
2026-11-25 09:58:07 +00:00