4770 Commits
Author SHA1 Message Date
cozystack-ci[bot] 02d611c5de Pin promoted packages artifact for v1.7.3
Signed-off-by: cozystack-ci[bot] <274107086+cozystack-ci[bot]@users.noreply.github.com>
2026-11-28 06:47:54 +00:00
cozystack-ci[bot] 3428236298 Prepare release v1.7.3 (promoted from v1.7.3-rc.2)
Signed-off-by: cozystack-ci[bot] <274107086+cozystack-ci[bot]@users.noreply.github.com>
2026-11-28 06:47:49 +00:00
cozystack-ci[bot] 4535fe9af1 Prepare release v1.7.3-rc.2
Signed-off-by: cozystack-ci[bot] <274107086+cozystack-ci[bot]@users.noreply.github.com>
2026-11-27 17:43:09 +00:00
myasnikovdaniil 37ca3a9667 Merge commit from fork
[Backport release-1.7] security(info): do not render the tenant ServiceAccount token under OIDC
2026-11-27 18:34:40 +05:00
myasnikovdaniil 50fca7ee75 Merge commit from fork
[Backport release-1.7] fix(bucket): refuse COSI classes of another SeaweedFS instance
2026-11-27 18:22:12 +05:00
Andrei Kvapil aa76e62c5b Merge commit from fork
[Backport release-1.7] security(harbor): give the inner registry its own credential and port policy
2026-11-27 13:50:54 +01:00
Myasnikov Daniil d845c7d6c8 security(info): bind the real tenant ServiceAccount without OIDC
The RoleBinding subject was built as tenant-<namespace> in namespace
tenant-<namespace>, but the release namespace already starts with
tenant-, so the binding did not name the tenant's own ServiceAccount.
The name it did form is one another tenant can claim: a child named
root of a tenant named tenant owns the ServiceAccount
tenant-tenant-root, which would then be granted the token Secret of
tenant-root. Bind the tenant's own ServiceAccount instead.

Assisted-by: LLM
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2026-11-27 13:48:46 +01:00
Myasnikov Daniil 2537b58156 security(info): do not render the tenant ServiceAccount token under OIDC
The Info application selects the ServiceAccount token Secret for the
tenantsecrets API, and the use tier can read tenantsecrets, so the token
and the rights bound to its ServiceAccount were readable by every use
member of the tenant.

With OIDC enabled the dashboard signs in with the user's own ID token and
nothing consumes the token, so the Secret is no longer rendered. Removing
it also invalidates tokens that were already read.

Assisted-by: LLM
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
(cherry picked from commit 5674d01c95)
2026-11-27 13:48:45 +01:00
myasnikovdaniil 9189218252 Merge commit from fork
[Backport release-1.7] security(monitoring): give Alerta a real signing key and its own admin password
2026-11-27 14:47:20 +05:00
cozystack-ci[bot] 72df042983 Pin promoted packages artifact for v1.7.2
Signed-off-by: cozystack-ci[bot] <274107086+cozystack-ci[bot]@users.noreply.github.com>
2026-11-27 07:00:22 +00:00
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
Andrei Kvapil b62e07dffc security(monitoring): pin the Alerta image by digest
The entrypoint and nginx template mounted over the image are copies of
alerta-web 9.1.0 at this digest. A retagged image could carry different
files, and the mounted copies would then no longer match it.

Assisted-by: LLM
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2026-11-27 05:46:02 +01:00
Andrei Kvapil 760cc700a4 security(monitoring): reset the Alerta admin password on every start
The entrypoint creates admin users only when they are missing, so an
admin user created before Alerta had a password of its own keeps the
Grafana password, which stays valid after an operator rotates Grafana's.
The mounted entrypoint runs a step right after user creation that sets
every admin user's password to ADMIN_PASSWORD, and stops the container
if it fails.

Assisted-by: LLM
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2026-11-27 05:40:32 +01:00
Andrei Kvapil 8b0b122557 security(monitoring): show tenants Alerta's login apart from its keys
Tenants logged in to the Alerta UI with the Grafana credentials, the
only Secret of the release they are shown. With Alerta on a password of
its own, that password moves to a Secret that holds nothing but the
login, listed for tenants next to Grafana's, so the signing key and the
API key in the alerta Secret stay hidden. The alerta Secret is now
rendered under data alone.

Assisted-by: LLM
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2026-11-27 05:40:01 +01:00
Andrei Kvapil e762bf4c08 security(monitoring): keep Alerta credentials out of its container log
The Alerta entrypoint prints the whole environment, including the admin
password and API key, and echoes the admin API keys it creates, while
nginx logs the request line where Alertmanager passes the key as a
query parameter. Pod logs are readable at lower tenant tiers than the
credentials themselves.

This line runs the upstream image, so the entrypoint and nginx template
are mounted over the image's copies from a ConfigMap, changed only to
drop that output and mask the parameter.

Assisted-by: LLM
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2026-11-27 05:13:47 +01:00
Andrei Kvapil f49d130171 fix(monitoring): give Alerta a real signing key and its own admin password
Alerta signs its session JWTs with SECRET_KEY, but the upstream image never
wires a real value into it: the entrypoint renders the generated key into
alertad.conf under the name SECRET (which the application never reads) and
unsets SECRET_KEY before exec, so at runtime the built-in default from
alerta.settings ("changeme") signs and verifies every token. Anyone can mint
a valid admin token without credentials.

Alerta's admin account also reused Grafana's credentials
(grafana-admin-password), and Alerta exposes the whole process environment via
/api/management/properties to any admin-scoped caller, so admin on Alerta
yielded Grafana's admin password.

Generate a strong SECRET_KEY and a dedicated admin password, persist both in
the alerta Secret so they survive upgrades and restarts, feed the key to the
application through a mounted alertad.conf under the name it actually reads,
and stop referencing grafana-admin-password. Add a unittest covering the key,
the mount and the credential decoupling.

Assisted-by: LLM
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2026-11-27 05:11:44 +01:00
Andrei Kvapil 83cada8035 fix(harbor): roll jobservice without a surge
jobservice keeps its job log on a ReadWriteOnce volume, but the
upstream chart rolls it with the default surge. When the replacement
lands on another node it waits on the volume attach for good, and the
nested release fails as stalled. The registry credential rotation
restarts jobservice on every existing release, so the upgrade would hit
this on any multi-node cluster.

Only jobservice is changed, through a post-renderer: the chart's own
switch to Recreate also applies to the registry, which keeps its data
in S3 and should go on rolling without an outage.

Assisted-by: LLM
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
(cherry picked from commit 4d0331167b)
2026-11-27 05:11:22 +01:00
Andrei Kvapil 58e13a689e security(harbor): give the inner registry its own credential and port policy
The Harbor application never set a credential for the registry that
Harbor core and jobservice talk to, so the vendored chart's published
default applied, and the registry Service accepted it from any pod the
tenant network policies let through. That bypasses Harbor's own
authorisation, quotas and audit log.

Each release now gets a random registry password with a matching
htpasswd line, kept in a Secret that stays out of the tenant-visible
allowlist and is reused across upgrades so the bcrypt salt does not
restart the registry on every reconcile. An existing installation
rotates on upgrade: core, jobservice and registry roll together because
their Secret checksums change; registry storage is untouched.

The inner chart also ships a CiliumNetworkPolicy that denies the
registry and registryctl ports to everything but core, jobservice and
trivy of the same release. A deny is needed because the tenant base
policy already allows the traffic and Cilium allow rules are additive.

Assisted-by: LLM
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
(cherry picked from commit 40525fc756)
2026-11-27 05:11:21 +01: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
Yan Bondarenko d803d8d516 fix(kubernetes): include the namespace in the kubevirt-csi ClusterRole name
The ClusterRole that lets the kubevirt-csi controller get
PersistentVolumes, and its ClusterRoleBinding, were named after the
release only. They are cluster-scoped, and a release is named after the
cluster, so two tenants with a cluster of the same name render the same
pair. Installing the second one does not fail: the existing objects are
patched and adopted. Deleting either cluster then deletes the pair, and
the other cluster's CSI controller fails every ControllerExpandVolume
with "persistentvolumes ... is forbidden" until its own release is
upgraded again, so a PVC resize stays in Resizing.

Name both objects after the namespace and the release, the way the
kccm ClusterRole already is. On upgrade Helm creates the new pair before
it deletes the old one, so the driver keeps its access.

Signed-off-by: Yan Bondarenko <202671653+yankawai@users.noreply.github.com>
Assisted-by: LLM
(cherry picked from commit aaedcef7d9)
Signed-off-by: cozystack-ci[bot] <274107086+cozystack-ci[bot]@users.noreply.github.com>
2026-11-26 15:42:14 +00:00
Myasnikov Daniil 643ee1e7af revert(postgres): take the standard-trixie image move out of release-1.7
The upgrade test from v1.7.1 to v1.7.2-rc.1 on a live cluster found
blockers in this change, so v1.7.2 ships tenant PostgreSQL as v1.7.1
had it, and the change comes back to this line once the fixes are on
main.

This reverts the unit e4b2e99378 that the 2026-11-13 backport batch
carried for #5405 (main 30ce2a3cb1).

CVE-2026-116331 stays open for tenant PostgreSQL on this line until
then: CloudNativePG publishes the fixed minors (18.7, 17.12, 16.16,
15.20, 14.25) only as bookworm and trixie images, with no bare
(bullseye) tag, so the fix needs the image move this reverts.

A cluster that ran v1.7.2-rc.1 is on the standard-trixie images
already. Moving it to this revision puts it back on the bullseye
images without the collation rebuild, so its text indexes on a non-C
collation need a REINDEX afterwards, and a database whose postgis
extension was updated to 3.7.0 does not load with the 3.6.1 image.
No stable 1.7 release carried #5405.

The picks of #5405 stay in this line's history, and backport-batch
counts an original as carried by those picks, so the next batch does not
take #5405 again.

Refs: #5459
Assisted-By: LLM
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-26 15:06:20 +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
Aleksei Sviridkin d3711f2380 fix(bucket): refuse COSI classes of another SeaweedFS instance
BucketClass and BucketAccessClass are cluster-scoped and every
SeaweedFS instance names its classes after its own namespace. The
bucket chart builds class names from the resolved SeaweedFS namespace
and the free-form storagePool, and a child tenant's namespace is its
parent's namespace plus its name, so a storagePool could produce the
name of a class that belongs to a different tenant's instance and
provision the bucket there.

Before rendering, the chart now looks up every class the release will
reference and refuses the render when a class exists with a driver
other than the resolved instance's, or when storagePool is set and the
class does not exist. The driver, not the name, identifies the
instance, and requiring the pool class to exist keeps a claim from
waiting for a matching class to appear later. The check fails a
release that already references such a class on its next upgrade; a
bucket with a pool of its own instance, or with no pool, renders
unchanged. Offline renders, where the release namespace is not found,
skip the check.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-11-26 11:03:20 +03:00
Aleksei Sviridkin 9d5ea2b919 style(ingress): drop blank lines from the Cloudflare geo block
The range over the Cloudflare ranges kept the newlines around its
actions, so the rendered geo block had an empty line between every
entry. nginx accepts either form; the trimmed one is easier to read
when debugging the generated config.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
(cherry picked from commit ed4a378428)
Signed-off-by: cozystack-ci[bot] <274107086+cozystack-ci[bot]@users.noreply.github.com>
2026-11-26 06:38:37 +00:00
toribru ad3e088104 fix(ingress): restore visitor IPs through SSL passthrough
With cloudflareProxy enabled, HTTPS reaches nginx from the
ssl-passthrough proxy on loopback. Without trusting that proxy, the
whitelist sees 127.0.0.1 instead of the visitor address; trusting it
without checking the PROXY-protocol peer would reopen the spoofing
closed by #4444.

Checking the transport peer before the whitelist preserves that
protection, while port 80 needs its direct peer because no
PROXY-protocol address exists there.

Tested with helm-unittest and an isolated ingress-nginx controller:
trusted PROXY peers pass the whitelist with the restored visitor
address, while spoofed headers on HTTP and HTTPS return 403.

Closes: #5327
Assisted-by: LLM
Signed-off-by: toribru <161638395+toribru@users.noreply.github.com>
(cherry picked from commit 00a540eb62)
Signed-off-by: cozystack-ci[bot] <274107086+cozystack-ci[bot]@users.noreply.github.com>
2026-11-26 06:38:37 +00:00
Mattia Eleuteri 23464e5b00 fix(kubernetes-nodes): surge one worker at a time during a pool rollout
A worker pool rolled out with maxSurge set to its maxReplicas, so CAPI
could create up to maxReplicas replacement VMs before draining any old
one. A pool running 8 workers under a ceiling of 10 could reach 18 VMs
at the peak of an instance type, image or version change.

Those extra VMs run in the tenant's namespace. Today the namespace
ResourceQuota counts them, so a tenant near its quota sees replacement
launchers refused and the rollout stall. Under quotas as reservation
limits, where a pool reserves maxReplicas workers and the namespace
quota goes away, the surge is capacity the platform lends for the
length of a rollout: rollouts are mostly platform-driven, and counting
them against the tenant would block a platform upgrade for any tenant
whose pool sits at its ceiling. That loan has to be bounded, and with
a surge tied to maxReplicas it was as large as the pool itself.

The surge is now one Machine whatever the pool's size. It stays out of
the values: tenants write them, and would then size the platform's
margin. maxUnavailable is unchanged, so a node is still only drained
once its replacement is up; a large pool now rolls one worker at a
time.

Tested with helm unittest on kubernetes-nodes, with the golden renders
updated for the new surge.

Refs: cozystack/community#48
Assisted-by: LLM
Signed-off-by: Mattia Eleuteri <mattia@hidora.io>
(cherry picked from commit fffbb97ac9)
Signed-off-by: cozystack-ci[bot] <274107086+cozystack-ci[bot]@users.noreply.github.com>
2026-11-26 06:38:36 +00:00
Myasnikov Daniil 92d78d24de fix(platform): do not gate cert-manager-issuers on ClusterIssuer readiness
A ClusterIssuer turns Ready only after cert-manager has registered an
ACME account with the CA. Under the kstatus wait helm-controller applies
by default, an unreachable Let's Encrypt endpoint, staging included,
keeps the cert-manager-issuers upgrade in progress until it times out.
Every package that dependsOn cozystack.cert-manager then waits behind
that release, so one unreachable CA leaves the platform half rolled out
while the issuers that are in use keep issuing.

Report the issuers as current through healthCheckExprs. The release
completes once the manifests are applied, and the issuers recover on
their own when the CA is reachable again.

Assisted-by: LLM
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
(cherry picked from commit 13fefcedda)
Signed-off-by: cozystack-ci[bot] <274107086+cozystack-ci[bot]@users.noreply.github.com>
2026-11-26 06:38:36 +00:00
Andrey Kolkov f0820507aa fix(postgres): move the default flavor to patched standard-trixie images
The default flavor pinned bare image tags, which are the system variant
on Debian bullseye. Upstream stopped building that variant, so the minors
that fix CVE-2026-116331 (18.7, 17.12, 16.16, 15.20, 14.25) are published
for bookworm and trixie only. The CVE is a type confusion in the min/max
aggregate optimisation that lets a role able to create objects run code
as the operating system user of the server, and tenants hold such roles.

Pin the patched minors on standard-trixie, and move the postgis flavor to
the same minors. The standard variant, because backups go through the
barman-cloud plugin and need none of the barman binaries the system
variant adds. trixie, because the postgis flavor is on it already, so
both image families share one Debian release. PostgreSQL 13 has no
patched release: it keeps 13.22 and moves to trixie with the rest.

For a running default-flavor cluster this changes the Debian release under
the data directory. The init Job rebuilds the indexes that depend on a
collation whose library version changed.

Assisted-by: LLM
Signed-off-by: Andrey Kolkov <androndo@gmail.com>
(cherry picked from commit b40be51a6b)
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-25 10:49:47 +00:00
Andrey Kolkov 98866c9b49 fix(postgres): rebuild indexes whose collation changed version
An operand image built on another Debian release ships another glibc and
ICU. An index ordered by a collation of either library is then ordered by
rules the server no longer applies: lookups through it miss rows, and a
unique index stops seeing duplicates. PostgreSQL only logs a warning.

The init Job compares the library version each collation was created with
against the one the server reports, rebuilds the indexes that depend on a
collation whose version changed, and refreshes the recorded versions once
every rebuild in the database succeeded. A database on the C or POSIX
collation with no explicitly collated index, which is what the chart
creates by default, has nothing to rebuild and is not delayed.

The pass has to hold on a hook that starts while the instances are still
rolling, runs as the superuser in databases tenants own, and is retried
after a failure:

- It runs after the passes that manage roles and databases, so that a
  rebuild that fails costs none of them, and it waits for the server to
  report the PostgreSQL version and Debian release of its own image when
  an index depends on a versioned collation. The rebuild counter of the
  package is left out of that comparison, because a tag is rebuilt in
  place.
- Every session pins search_path to pg_catalog, so that a function or an
  operator a tenant defined in public cannot stand in for a built-in.
- A retry continues where the last run stopped. REINDEX CONCURRENTLY gives
  an index a new OID, so the highest OID seen when a repair begins marks
  what is left; an index rebuilt in place keeps its OID and is told apart
  by its storage file. Both live in a setting of the database.
- A rebuild that cannot finish is not started for ever: after two
  attempts the index is left to an operator, the pass says how to clear
  it, and the release stays failed until then. Lock waits and in-place
  rebuilds are bounded by what is left of the Job.
- A collation that a range partition key depends on keeps its recorded
  version, because rebuilding an index moves no row between partitions.

PostgreSQL records a collation for an index only where it orders a key,
so the collations of the columns an index reads in its expressions and
predicate count as well. Before PostgreSQL 15 the server records no
version for a database's default collation, and the libc collation of the
same locale stands in for it.

The e2e suite creates a collation with a stale version and checks that an
upgrade rebuilds a unique index and an exclusion constraint's index on it,
refreshes the version and removes the repair setting.

Assisted-by: LLM
Signed-off-by: Andrey Kolkov <androndo@gmail.com>
(cherry picked from commit a10e449a56)
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-25 10:49:47 +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
Nimesh Kulkarni 6be80ea299 docs(tenant): qualify LimitRange defaults by the bounded resource
tenant-range-limits now defaults cpu, memory and ephemeral-storage
each only when resourceQuotas bounds that resource, and is not
rendered at all under a quota on none of them. Comments in the
operator, the tenant quota controller, the backup controller and the
barman and kafka charts still said every tenant with resourceQuotas
gets a 128Mi memory default, which would mislead the next change made
on that assumption.

The tenant quota controller's gate on limits.cpu or limits.memory
stays: a root rendered by an older chart may still carry a LimitRange
under a quota that bounds no compute.

Assisted-by: LLM
Signed-off-by: Nimesh Kulkarni <167794819+GitNimay@users.noreply.github.com>
(cherry picked from commit 46f03b8748)
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-25 10:49:46 +00:00
Nimesh Kulkarni 3bda3f4e95 fix(tenant): default only the resources the tenant quota bounds
The tenant chart rendered tenant-range-limits whenever resourceQuotas
was non-empty. Its 128Mi default memory limit then applied under a
quota on load balancers, storage or GPUs alone, or on cpu or
ephemeral-storage without memory, and refused any pod that requests
more memory without a limit of its own, virt-launcher included, so
VMs could not start in such a tenant.

The LimitRange is there so pods without requests or limits pass a
quota that tracks cpu, memory or ephemeral-storage. Default each of
those three only when the flattened quota bounds that resource, and
render no LimitRange when it bounds none of them. A quota on all
three renders the LimitRange exactly as before, with the same values.

Closes: #4930

Assisted-by: LLM
Signed-off-by: Nimesh Kulkarni <167794819+GitNimay@users.noreply.github.com>
(cherry picked from commit 6014860c93)
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
Ray Low 223785486d fix(harbor): meter the registry bucket under the registry WorkloadMonitor
The WorkloadMonitor controller finds BucketClaims by the monitor's
label selector. The registry BucketClaim carried no labels, so it
never got a Workload and Harbor's object storage was invisible to
billing. Before the registry moved to S3 its PVC carried the vendored
chart's release and component labels and was reported under the
registry monitor; labelling the BucketClaim the same way restores that.

Assisted-by: LLM
Signed-off-by: Ray Low <crossrt@gmail.com>
(cherry picked from commit 732165eebd)
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
somaz 9037cf175e fix(gateway): skip a child apex the wildcard certificate already covers
In DNS-01 mode every inheriting child tenant's apex went into the
parent Gateway's wildcard Certificate. When a wildcard in the same
Certificate already covers that apex one label up, Let's Encrypt
refuses the whole order as redundant and the parent Gateway gets no
certificate at all. Skip such a SAN, matching the single-label check
Boulder runs in wildcardOverlap.

A child may also use a broader custom domain than the gateway. Its
wildcard then covers the gateway apex, so the same check drops the
gateway SAN too.

Closes: #5125
Co-authored-by: Yan Bondarenko <202671653+yankawai@users.noreply.github.com>
Assisted-by: LLM
Signed-off-by: somaz <genius5711@gmail.com>
Signed-off-by: Yan Bondarenko <202671653+yankawai@users.noreply.github.com>
(cherry picked from commit 8382ed1a92)
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
Mattia Eleuteri e3b200e8d8 fix(postgres): keep users.app's password across pod restarts
CNPG bootstraps an "app" owner role with a generated password stored in
<release>-app, and a declared users.app adopts that role. The init-job
then sets the role's password from <release>-credentials, but CNPG's
instance manager re-applies the owner's password from the bootstrap
secret whenever it meets a secret version it has not applied, which
includes every pod start. Any restart therefore reverts users.app to
CNPG's generated password, and clients holding the advertised one get
"password authentication failed" with nothing changed on their side.

Render the owner's bootstrap secret from the same password the
credentials Secret holds, and point the live bootstrap method at it, so
both writers agree on one value.

Assisted-by: LLM
Signed-off-by: Mattia Eleuteri <mattia@hidora.io>
(cherry picked from commit 62dee1d132)
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-25 10:49:43 +00:00
Adham Kiwan f6c5ec8527 docs(gateway): stop saying the route-hostname policy admits hostname-less routes
Since 1.7 cozystack-route-hostname-policy requires spec.hostnames to be
present and non-empty on HTTPRoute, TLSRoute and GRPCRoute in tenant-*
namespaces, so the edge-termination section no longer matches the
platform. The website builds its Gateway reference page from this
README, so the stale sentence would be published as is.

Refs: #4938
Assisted-by: LLM
Signed-off-by: Adham Kiwan <adhamkiwan@outlook.com>
(cherry picked from commit 5c690f96bd)
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 0e92bc9862 fix(cozy-lib): state the real lower bound in the goMemLimit error
The limit that floors to 0MiB is anything under 4/3 Mi, not under 2Mi:
1536Ki still yields 1MiB. The message named the wrong bound and the
tests pinned 2Mi and 1Mi, neither of which sits on the edge.

Assisted-by: LLM
Signed-off-by: Mattia Eleuteri <mattia@hidora.io>
(cherry picked from commit 3b893c626a)
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-25 10:15:40 +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 c822846b0a docs(postgres): note how an existing backup schedule changes on upgrade
A release that already sets backup.schedule to "0 2 * * *" runs hourly
at minute 2 today and daily at 02:00 after this change. The README now
says so and gives "0 2 * * * *" for keeping the hourly run.

Assisted-by: LLM
Signed-off-by: Yan Bondarenko <202671653+yankawai@users.noreply.github.com>
(cherry picked from commit c0c5f2580f)
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