mirror of
https://github.com/cozystack/cozystack.git
synced 2026-12-02 21:30:46 +09:00
v1.6.6-rc.1
5639
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
7214c8ab90 |
fix(backport): batch for release-1.6, 2026-11-13 (#5312)
## What this PR does Backports to `release-1.6` from `main`, picked by the rules of the [backport policy](https://github.com/cozystack/cozystack/blob/main/docs/release/backports.md) in merge order. A merged pull request comes as its own commits, picked with `git cherry-pick -x` so each keeps its author, message and sign-offs, and a merge commit that carries the original's merge message with a `Backported-from:` trailer naming it; a squash-merged one comes as one pick. `backport-batch verify` checks that shape. A pick listed as changed differs from the commit it came from, and its release note waits under Check these notes. A conflict or a failing check here is a [backport task](https://github.com/cozystack/cozystack/blob/main/docs/release/backport-tasks/README.md). - [#3633](https://github.com/cozystack/cozystack/pull/3633) `fix(tenant): retry failed monitoring and gateway installs in place`, 1 commit - [#4095](https://github.com/cozystack/cozystack/pull/4095) `fix(harbor): give the nginx proxy explicit resources so it survives the tenant LimitRange`, 1 commit - [#4289](https://github.com/cozystack/cozystack/pull/4289) `fix(bucket): stop the ACME cleanup hook from talking to localhost, and gate the class`, 1 commit - [#4427](https://github.com/cozystack/cozystack/pull/4427) `fix(monitoring): give kube-apiserver its own scrape size limit`, 3 commits - [#4537](https://github.com/cozystack/cozystack/pull/4537) `fix(mariadb): correct webhook cert-manager override key path`, 1 commit - [#4673](https://github.com/cozystack/cozystack/pull/4673) `fix(backups): create no driver object for a job that already finished`, 2 commits, changed in the pick: `c7dc37258041` - [#5025](https://github.com/cozystack/cozystack/pull/5025) `test(harbor): pin the resources of the nginx proxy and the portal`, 2 commits - [#4985](https://github.com/cozystack/cozystack/pull/4985) `fix(etcd): stop counting canceled watch streams as failed gRPC requests`, 1 commit - [#5005](https://github.com/cozystack/cozystack/pull/5005) `fix(tcp-balancer): cap HAProxy fds and threads by the pod's own limits`, 1 commit - [#5086](https://github.com/cozystack/cozystack/pull/5086) `fix(tenant): stop the gateway release waiting on TenantGateway listeners and certificates`, 1 commit - [#5087](https://github.com/cozystack/cozystack/pull/5087) `fix(controller): carry healthCheckExprs and waitStrategy to existing releases`, 1 commit - [#4004](https://github.com/cozystack/cozystack/pull/4004) `fix(dashboard): link a tenant row to its detail page`, 2 commits, changed in the pick: `663cf9edf85f` - [#5212](https://github.com/cozystack/cozystack/pull/5212) `fix(cilium): pass the CiliumNode list to jq on stdin in the IPAM hook`, 1 commit - [#5213](https://github.com/cozystack/cozystack/pull/5213) `fix(kubernetes): move the OIDC users out of the bootstrap Job's script`, 1 commit - [#5208](https://github.com/cozystack/cozystack/pull/5208) `fix(clickhouse): restore the archive a Backup was taken as`, 3 commits - [#5091](https://github.com/cozystack/cozystack/pull/5091) `fix(postgres): render the declared databases in a stable order`, 1 commit - [#5123](https://github.com/cozystack/cozystack/pull/5123) `fix(mariadb-operator): derive the cluster name from the platform domain`, 2 commits - [#5124](https://github.com/cozystack/cozystack/pull/5124) `fix(lineage, kubernetes): resolve CAPK node VMs to their cluster`, 2 commits, changed in the pick: `9ca427589e57` - [#5184](https://github.com/cozystack/cozystack/pull/5184) `fix(api): read pool usage under the quota key the controller counts`, 1 commit - [#5190](https://github.com/cozystack/cozystack/pull/5190) `fix(platform): remove the dead registries value and patch-containerd Secret`, 2 commits - [#5207](https://github.com/cozystack/cozystack/pull/5207) `fix(mariadb): fail backup and restore jobs whose operator Job failed`, 5 commits - [#5024](https://github.com/cozystack/cozystack/pull/5024) `fix(kubernetes, monitoring): send tenant cluster metrics to the tenant's vminsert`, 1 commit - [#5284](https://github.com/cozystack/cozystack/pull/5284) `fix(seaweedfs): bump the COSI driver to v0.4.0 for the lost-grant fix`, 1 commit - [#5152](https://github.com/cozystack/cozystack/pull/5152) `fix(monitoring-agents): let the release uninstall when the VictoriaMetrics operator is gone first`, 1 commit - [#5270](https://github.com/cozystack/cozystack/pull/5270) `fix(vm-instance): keep an external PortList VM valid with no ports`, 1 commit - [#5280](https://github.com/cozystack/cozystack/pull/5280) `fix(backups): give the barman-cloud sidecar an explicit CPU limit`, 1 commit - [#5100](https://github.com/cozystack/cozystack/pull/5100) `fix(etcd): size the defrag job for the client it runs`, 1 commit - [#5094](https://github.com/cozystack/cozystack/pull/5094) `fix(monitoring): select the vmalert Service the operator creates`, 1 commit - [#5250](https://github.com/cozystack/cozystack/pull/5250) `fix(ingress-nginx): raise client keepalive_time above the 1h default`, 1 commit - [#5102](https://github.com/cozystack/cozystack/pull/5102) `fix(monitoring-agents): make a silent Watchdog an alarm in Alerta`, 1 commit - [#4948](https://github.com/cozystack/cozystack/pull/4948) `fix(monitoring): route InfoInhibitor to the blackhole receiver`, 2 commits - [#5098](https://github.com/cozystack/cozystack/pull/5098) `fix(vertical-pod-autoscaler): run two admission controllers spread over nodes`, 2 commits - [#5119](https://github.com/cozystack/cozystack/pull/5119) `fix(postgres): accept a standard five-field backup schedule`, 2 commits, changed in the pick: `600a268351c7` - [#4993](https://github.com/cozystack/cozystack/pull/4993) `feat(monitoring): alert when pods of one workload share a node`, 1 commit - [#5114](https://github.com/cozystack/cozystack/pull/5114) `fix(kubevirt): let tenant admins upload a VMDisk image with virtctl`, 1 commit - [#4963](https://github.com/cozystack/cozystack/pull/4963) `fix(piraeus-operator): keep the LINSTOR error-report alerts quiet when the controller pod moves`, 1 commit - [#4946](https://github.com/cozystack/cozystack/pull/4946) `fix(keycloak, foundationdb): apply operator CRD updates on upgrade`, 2 commits - [#4965](https://github.com/cozystack/cozystack/pull/4965) `fix(tcp-balancer): render the kubernetes and talos Service ports only with kubernetesAndTalos`, 1 commit - [#5242](https://github.com/cozystack/cozystack/pull/5242) `fix(vpa): shorten the admission webhook timeout to 5s`, 2 commits - [#5265](https://github.com/cozystack/cozystack/pull/5265) `fix(controller, platform): give unbounded pool members the root's LimitRange`, 3 commits - [#5183](https://github.com/cozystack/cozystack/pull/5183) `fix(etcd): scope tenant alerts to their scrape job`, 1 commit - [#5189](https://github.com/cozystack/cozystack/pull/5189) `fix(cozy-lib): render tenant hugepages quota only as requests`, 1 commit - [#4893](https://github.com/cozystack/cozystack/pull/4893) `fix(seaweedfs): keep Object Lock working for COSI credentials on SeaweedFS 4.48`, 2 commits - [#4915](https://github.com/cozystack/cozystack/pull/4915) `fix(seaweedfs): remove identities left behind by deleted BucketAccesses`, 1 commit, changed in the pick: `9d15a98369ec` - [#4896](https://github.com/cozystack/cozystack/pull/4896) `fix(kamaji): drop kubelet config fields older tenants do not know`, 1 commit - [#5364](https://github.com/cozystack/cozystack/pull/5364) `fix(backups): delete the Velero backup of a failed BackupJob`, 4 commits, changed in the pick: `9967676a6841` - [#5373](https://github.com/cozystack/cozystack/pull/5373) `fix(opensearch): disable the Base64 intrinsics hit by CVE-2026-114938`, 1 commit, changed in the pick: `330e8c516fb8` - [#5340](https://github.com/cozystack/cozystack/pull/5340) `fix(qdrant): scrape TLS metrics over HTTPS`, 1 commit - [#5331](https://github.com/cozystack/cozystack/pull/5331) `fix(kubernetes): remove cilium dependency from coredns HelmRelease`, 1 commit - [#5134](https://github.com/cozystack/cozystack/pull/5134) `fix(securitygroups): reject port ranges and malformed FQDNs on the SecurityGroup path`, 2 commits - [#4984](https://github.com/cozystack/cozystack/pull/4984) `fix(postgres): keep users.app's password across pod restarts`, 1 commit - [#5160](https://github.com/cozystack/cozystack/pull/5160) `fix(linstor): roll affinity controller and scheduler on client cert rotation`, 1 commit - [#5358](https://github.com/cozystack/cozystack/pull/5358) `fix(linstor): run the NFS server wait init container on the platform CSI image`, 1 commit - [#5326](https://github.com/cozystack/cozystack/pull/5326) `fix(api): make monitor watch versions usable as delete preconditions`, 4 commits - [#5348](https://github.com/cozystack/cozystack/pull/5348) `fix(api): validate workload memory before storing an application`, 1 commit - [#5392](https://github.com/cozystack/cozystack/pull/5392) `fix(harbor): meter the registry bucket under the registry WorkloadMonitor`, 1 commit - [#5403](https://github.com/cozystack/cozystack/pull/5403) `fix(platform): bump system PostgreSQL to 17.12`, 1 commit - [#4797](https://github.com/cozystack/cozystack/pull/4797) `fix(cozystack-basics): make the tenant super-admin VirtualMachine grant read-only`, 1 commit - [#5407](https://github.com/cozystack/cozystack/pull/5407) `fix(ingress-nginx): turn off TLS session tickets for CVE-2026-97629`, 1 commit - [#5210](https://github.com/cozystack/cozystack/pull/5210) `fix(platform): do not gate cert-manager-issuers on ClusterIssuer readiness`, 1 commit, changed in the pick: `9061f9a5e1a1` - [#5443](https://github.com/cozystack/cozystack/pull/5443) `fix(ingress): restore visitor IPs through SSL passthrough`, 2 commits ### Check these notes These picks differ from their originals, so their release notes are left out of the release-note block until someone checks that each still holds for this line. Each comes with what to compare: every pick that differs against the commit it came from, and the original's change against the unit's. [#4673](https://github.com/cozystack/cozystack/pull/4673) `fix(backups): create no driver object for a job that already finished`, carried by `4eb480d83bbf`: ```text fix(backups): a BackupJob or RestoreJob that the controller has just marked Failed no longer gets a driver object created for it by the next reconcile, which could start on a cache that had not yet seen the Failed status and retry the step that failed — leaving, for instance, an untracked Velero Backup behind a Failed BackupJob, or a restore that halts the VM after its RestoreJob failed. ``` - `git range-diff --creation-factor=999 eafa441b9c36^! c7dc37258041^!` - `git diff b1192bfcbcf4^1 b1192bfcbcf4` - `git diff 4eb480d83bbf^1 4eb480d83bbf` [#4004](https://github.com/cozystack/cozystack/pull/4004) `fix(dashboard): link a tenant row to its detail page`, carried by `19693538013e`: ```text fix(dashboard): tenant name in the tenant list links to its detail page now (where Delete is), and top level tenants get their Edit button back. ``` - `git range-diff --creation-factor=999 7f55ff5d85fd^! 663cf9edf85f^!` - `git diff a2cc9a30168f^1 a2cc9a30168f` - `git diff 19693538013e^1 19693538013e` [#5124](https://github.com/cozystack/cozystack/pull/5124) `fix(lineage, kubernetes): resolve CAPK node VMs to their cluster`, carried by `529b3b67295e`: ```text fix(lineage, kubernetes): the virt-launcher pods of Kubernetes worker nodes are now resolved to their Kubernetes application and marked as managed by Cozystack, so a SecurityGroup attached to a Kubernetes cluster now applies to its worker nodes, not only to its control plane. ``` - `git range-diff --creation-factor=999 93faa7a8620d^! 9ca427589e57^!` - `git diff 1f35c26ece02^1 1f35c26ece02` - `git diff 529b3b67295e^1 529b3b67295e` [#5119](https://github.com/cozystack/cozystack/pull/5119) `fix(postgres): accept a standard five-field backup schedule`, carried by `d54b11f14f0c`: ```text fix(postgres): backup.schedule accepts a standard five-field cron such as 0 2 * * *, and the chart prepends a 0 seconds field before handing it to CloudNativePG, which reads the first field as seconds. Six-field values and descriptors render as before, and any other field count fails the render. A release that already sets five fields gets the standard meaning on upgrade, so 0 2 * * * moves from hourly to daily. ``` - `git range-diff --creation-factor=999 982db83dd22d^! 600a268351c7^!` - `git diff 5fe356f57e8a^1 5fe356f57e8a` - `git diff d54b11f14f0c^1 d54b11f14f0c` [#4915](https://github.com/cozystack/cozystack/pull/4915) `fix(seaweedfs): remove identities left behind by deleted BucketAccesses`, carried by `ccdaa7779174`: ```text fix(seaweedfs): remove S3 identities left behind by deleted BucketAccesses on install and upgrade. The new cosi.orphanIdentities value (auto, report, delete) controls it; auto only reports on a filer published to Client-topology clusters. ``` - `git range-diff --creation-factor=999 045f1a9bbc64^! 9d15a98369ec^!` - `git diff 15e87fdbeaa1^1 15e87fdbeaa1` - `git diff ccdaa7779174^1 ccdaa7779174` [#5364](https://github.com/cozystack/cozystack/pull/5364) `fix(backups): delete the Velero backup of a failed BackupJob`, carried by `6b310132a6e1`: ```text fix(backups): a BackupJob whose Velero backup ends Failed, PartiallyFailed or FailedValidation now asks Velero to delete that backup and its data in the bucket, instead of leaving them until Velero's TTL expires. A Velero backup that completed is never deleted this way. If Velero cannot carry out the deletion (for example, the backup storage location is missing, read-only or unavailable), the BackupJob gets a `VeleroBackupDeletionFailed` Warning event with Velero's errors, and the deletion is retried at a growing interval of up to one hour. After upgrading, the Velero backups of BackupJobs that already failed are deleted as well; to keep one for a manual `velero restore`, copy it before the upgrade. The backupstrategy-controller ClusterRole gains `delete` on `deletebackuprequests`. ``` - `git range-diff --creation-factor=999 5fbf7e9a3806^! 9967676a6841^!` - `git diff 7f31011b99a2^1 7f31011b99a2` - `git diff 6b310132a6e1^1 6b310132a6e1` [#5373](https://github.com/cozystack/cozystack/pull/5373) `fix(opensearch): disable the Base64 intrinsics hit by CVE-2026-114938`, carried by `2fab06097342`: ```text fix(opensearch): mitigate CVE-2026-114938 (Java4Shell) by starting OpenSearch nodes with -XX:-UseBASE64Intrinsics, which disables the vulnerable OpenJDK Base64 decoder. Every OpenSearch cluster restarts once on upgrade. ``` - `git range-diff --creation-factor=999 65f094371015^! 330e8c516fb8^!` - `git diff 026b0156355a^1 026b0156355a` - `git diff 2fab06097342^1 2fab06097342` [#5210](https://github.com/cozystack/cozystack/pull/5210) `fix(platform): do not gate cert-manager-issuers on ClusterIssuer readiness`, carried by `150d36e0f65c`: ```text fix(platform): the cert-manager-issuers release no longer waits for ClusterIssuers to become Ready, so an unreachable ACME endpoint (staging included) does not hold other platform packages in DependencyNotReady. ``` - `git range-diff --creation-factor=999 13fefcedda13^! 9061f9a5e1a1^!` - `git diff a1be486fb6fd^1 a1be486fb6fd` - `git diff 150d36e0f65c^1 150d36e0f65c` ### Parked These cannot land on `release-1.6` whole, so the batch does not pick them: each would leave part of it without effect there, or builds on a change that never reaches the line. A maintainer ports what applies as a pull request of its own, or drops the original with `backport-batch run --drop`; `backport/include` does not lift a park. - [#5071](https://github.com/cozystack/cozystack/pull/5071) `fix(marketplace): do not install a connected repository's components on connect`: builds on [#3940](https://github.com/cozystack/cozystack/pull/3940), [#4308](https://github.com/cozystack/cozystack/pull/4308), which never reaches this line - [#5088](https://github.com/cozystack/cozystack/pull/5088) `fix(ingress-nginx): drop the admission-webhook policy a rebase brought back`: only part of it applies; it would leave `packages/system/ingress-nginx/templates/admission-webhook-networkpolicy.yaml`, `packages/system/ingress-nginx/tests/admission_webhook_networkpolicy_test.yaml` without effect - [#4917](https://github.com/cozystack/cozystack/pull/4917) `fix(kubernetes): run Proxmox CCM v0.16.1 and pin the Proxmox images by digest`: builds on [#4089](https://github.com/cozystack/cozystack/pull/4089), which never reaches this line - [#4974](https://github.com/cozystack/cozystack/pull/4974) `fix(kubernetes-nodes): plan autoscaler capacity on the cores the VM actually gets`: builds on [#3315](https://github.com/cozystack/cozystack/pull/3315), [#4386](https://github.com/cozystack/cozystack/pull/4386), which never reaches this line - [#4971](https://github.com/cozystack/cozystack/pull/4971) `fix(e2e): keep the Proxmox tenant kubeconfig per run and remove it`: builds on [#4089](https://github.com/cozystack/cozystack/pull/4089), which never reaches this line - [#4970](https://github.com/cozystack/cozystack/pull/4970) `fix(e2e): read the KubernetesNodes pool release in the HelmRelease guard`: builds on [#3594](https://github.com/cozystack/cozystack/pull/3594), which never reaches this line - [#4972](https://github.com/cozystack/cozystack/pull/4972) `fix(e2e): validate the leak allowlist against every suite layout`: builds on [#4492](https://github.com/cozystack/cozystack/pull/4492), [#4658](https://github.com/cozystack/cozystack/pull/4658), [#4713](https://github.com/cozystack/cozystack/pull/4713), which never reaches this line - [#5082](https://github.com/cozystack/cozystack/pull/5082) `fix(marketplace): pin a tapped repository to a digest instead of a mutable tag`: builds on [#3940](https://github.com/cozystack/cozystack/pull/3940), which never reaches this line - [#5230](https://github.com/cozystack/cozystack/pull/5230) `fix(backups): re-render the default backup objects when the S3 endpoint changes`: builds on [#3562](https://github.com/cozystack/cozystack/pull/3562), [#3990](https://github.com/cozystack/cozystack/pull/3990), [#3992](https://github.com/cozystack/cozystack/pull/3992), [#4000](https://github.com/cozystack/cozystack/pull/4000), [#4929](https://github.com/cozystack/cozystack/pull/4929), which never reaches this line - [#5133](https://github.com/cozystack/cozystack/pull/5133) `fix(securitygroups): project a membership-only group to a policy Cilium accepts`: builds on [#4447](https://github.com/cozystack/cozystack/pull/4447), which never reaches this line - [#5151](https://github.com/cozystack/cozystack/pull/5151) `fix(redis): run one Sentinel when Redis runs a single pod`: builds on [#4832](https://github.com/cozystack/cozystack/pull/4832), which never reaches this line - [#5211](https://github.com/cozystack/cozystack/pull/5211) `fix(postgres): fail a backup job as soon as its cnpg Backup fails`: builds on [#4674](https://github.com/cozystack/cozystack/pull/4674), which never reaches this line - [#5226](https://github.com/cozystack/cozystack/pull/5226) `fix(platform): leave tenant-root's ingress empty when the root tenant has none`: builds on [#3280](https://github.com/cozystack/cozystack/pull/3280), which never reaches this line - [#5228](https://github.com/cozystack/cozystack/pull/5228) `fix(seaweedfs): enforce S3 bucket lifecycle rules`: builds on [#3562](https://github.com/cozystack/cozystack/pull/3562), [#3580](https://github.com/cozystack/cozystack/pull/3580), which never reaches this line - [#5308](https://github.com/cozystack/cozystack/pull/5308) `fix(seaweedfs): stop the master crashing on the crowded volume map`: builds on [#4819](https://github.com/cozystack/cozystack/pull/4819), which never reaches this line - [#4986](https://github.com/cozystack/cozystack/pull/4986) `fix(etcd): require an even spread of members over nodes by default`: builds on [#3962](https://github.com/cozystack/cozystack/pull/3962), [#3964](https://github.com/cozystack/cozystack/pull/3964), which never reaches this line - [#5249](https://github.com/cozystack/cozystack/pull/5249) `fix(kubernetes): detach volumes when the infra PVC is missing`: builds on [#4447](https://github.com/cozystack/cozystack/pull/4447), which never reaches this line - [#4234](https://github.com/cozystack/cozystack/pull/4234) `fix(seaweedfs, cozy-lib): cap the Go heap so components survive their memory limit`: builds on [#5228](https://github.com/cozystack/cozystack/pull/5228), which never reaches this line - [#5096](https://github.com/cozystack/cozystack/pull/5096) `fix(workloadmonitor): report a bucket's workloads not ready until its claim is provisioned`: builds on [#4380](https://github.com/cozystack/cozystack/pull/4380), which never reaches this line - [#4945](https://github.com/cozystack/cozystack/pull/4945) `fix(apps): keep Job and CronJob names within the Kubernetes limits`: builds on [#2352](https://github.com/cozystack/cozystack/pull/2352), which never reaches this line - [#5011](https://github.com/cozystack/cozystack/pull/5011) `fix(cozystack-basics): refuse a direct delete of a tenant namespace`: builds on [#4639](https://github.com/cozystack/cozystack/pull/4639), which never reaches this line - [#5329](https://github.com/cozystack/cozystack/pull/5329) `fix(ci): take main's ref for a bare first-party image ref in a drifted file`: builds on [#4261](https://github.com/cozystack/cozystack/pull/4261), [#4756](https://github.com/cozystack/cozystack/pull/4756), which never reaches this line - [#5153](https://github.com/cozystack/cozystack/pull/5153) `fix(kubernetes): bring up a replacement worker before draining the old one`: builds on [#3280](https://github.com/cozystack/cozystack/pull/3280), [#3315](https://github.com/cozystack/cozystack/pull/3315), [#4713](https://github.com/cozystack/cozystack/pull/4713), which never reaches this line - [#5175](https://github.com/cozystack/cozystack/pull/5175) `fix(tests): reject matcher failures in negative file assertions`: builds on [#3548](https://github.com/cozystack/cozystack/pull/3548), [#3637](https://github.com/cozystack/cozystack/pull/3637), [#3676](https://github.com/cozystack/cozystack/pull/3676), [#3723](https://github.com/cozystack/cozystack/pull/3723), [#3804](https://github.com/cozystack/cozystack/pull/3804), [#3836](https://github.com/cozystack/cozystack/pull/3836), [#3843](https://github.com/cozystack/cozystack/pull/3843), [#3886](https://github.com/cozystack/cozystack/pull/3886), [#3888](https://github.com/cozystack/cozystack/pull/3888), [#3889](https://github.com/cozystack/cozystack/pull/3889), [#3890](https://github.com/cozystack/cozystack/pull/3890), [#3919](https://github.com/cozystack/cozystack/pull/3919), which never reaches this line - [#5377](https://github.com/cozystack/cozystack/pull/5377) `fix(ingress-nginx): pick up the nginx rebuild with the HTTP/2 CVE fixes`: builds on [#4549](https://github.com/cozystack/cozystack/pull/4549), which never reaches this line - [#5354](https://github.com/cozystack/cozystack/pull/5354) `fix(platform): honour a bool false in ingress-enabled and monitoring-enabled`: builds on [#5226](https://github.com/cozystack/cozystack/pull/5226), which never reaches this line - [#5045](https://github.com/cozystack/cozystack/pull/5045) `fix(talos): bump Talos to v1.14.4 (CVE-2026-99999)`: builds on [#4552](https://github.com/cozystack/cozystack/pull/4552), [#4598](https://github.com/cozystack/cozystack/pull/4598), which never reaches this line - [#5352](https://github.com/cozystack/cozystack/pull/5352) `docs(gateway): stop saying the route-hostname policy admits hostname-less routes`: builds on [#3861](https://github.com/cozystack/cozystack/pull/3861), which never reaches this line - [#5356](https://github.com/cozystack/cozystack/pull/5356) `fix(seaweedfs): point the Lance catalog consumers at the renamed s3 Service`: builds on [#4079](https://github.com/cozystack/cozystack/pull/4079), which never reaches this line - [#5357](https://github.com/cozystack/cozystack/pull/5357) `fix(api): skip an invalid ApplicationDefinition instead of failing startup`: builds on [#4424](https://github.com/cozystack/cozystack/pull/4424), which never reaches this line - [#5148](https://github.com/cozystack/cozystack/pull/5148) `fix(gateway): skip a child apex the wildcard certificate already covers`: builds on [#3342](https://github.com/cozystack/cozystack/pull/3342), which never reaches this line - [#4167](https://github.com/cozystack/cozystack/pull/4167) `fix(gateway): copy allowed routes for the edge listener`: builds on [#3861](https://github.com/cozystack/cozystack/pull/3861), which never reaches this line - [#4954](https://github.com/cozystack/cozystack/pull/4954) `fix(tenant): render the LimitRange only under a compute quota`: builds on [#3494](https://github.com/cozystack/cozystack/pull/3494), which never reaches this line - [#5399](https://github.com/cozystack/cozystack/pull/5399) `fix(kubernetes-nodes): surge one worker at a time during a pool rollout`: builds on [#3315](https://github.com/cozystack/cozystack/pull/3315), [#5153](https://github.com/cozystack/cozystack/pull/5153), which never reaches this line - [#5436](https://github.com/cozystack/cozystack/pull/5436) `fix(ingress-nginx): pick up the nginx rebuild with the remaining CVE fixes`: builds on [#5377](https://github.com/cozystack/cozystack/pull/5377), which never reaches this line - [#5236](https://github.com/cozystack/cozystack/pull/5236) `fix(kubernetes): include the namespace in the kubevirt-csi ClusterRole name`: builds on [#4563](https://github.com/cozystack/cozystack/pull/4563), which never reaches this line ### Maintainer overrides - [#3633](https://github.com/cozystack/cozystack/pull/3633) `fix(tenant): retry failed monitoring and gateway installs in place`: `backport/include`, on this branch - [#4095](https://github.com/cozystack/cozystack/pull/4095) `fix(harbor): give the nginx proxy explicit resources so it survives the tenant LimitRange`: `backport/include`, on this branch - [#4289](https://github.com/cozystack/cozystack/pull/4289) `fix(bucket): stop the ACME cleanup hook from talking to localhost, and gate the class`: `backport/include`, on this branch - [#4427](https://github.com/cozystack/cozystack/pull/4427) `fix(monitoring): give kube-apiserver its own scrape size limit`: `backport/include`, on this branch - [#4537](https://github.com/cozystack/cozystack/pull/4537) `fix(mariadb): correct webhook cert-manager override key path`: `backport/include`, on this branch - [#4673](https://github.com/cozystack/cozystack/pull/4673) `fix(backups): create no driver object for a job that already finished`: `backport/include`, on this branch - [#5025](https://github.com/cozystack/cozystack/pull/5025) `test(harbor): pin the resources of the nginx proxy and the portal`: `backport/include`, on this branch - [#4985](https://github.com/cozystack/cozystack/pull/4985) `fix(etcd): stop counting canceled watch streams as failed gRPC requests`: `backport/include`, on this branch - [#5005](https://github.com/cozystack/cozystack/pull/5005) `fix(tcp-balancer): cap HAProxy fds and threads by the pod's own limits`: `backport/include`, on this branch - [#5083](https://github.com/cozystack/cozystack/pull/5083) `fix(workloadmonitor): stop doubling the bucket- prefix in bucket Workload names`: `backport/skip`, left out - [#4973](https://github.com/cozystack/cozystack/pull/4973) `fix(kubernetes-nodes): refuse a partial resources spec on every pool`: `backport/skip`, left out - [#5180](https://github.com/cozystack/cozystack/pull/5180) `fix(tests): keep two unit tests green after the release image restamp`: `backport/skip`, left out - [#4993](https://github.com/cozystack/cozystack/pull/4993) `feat(monitoring): alert when pods of one workload share a node`: `backport/include`, on this branch - [#5352](https://github.com/cozystack/cozystack/pull/5352) `docs(gateway): stop saying the route-hostname policy admits hostname-less routes`: `backport/include`, parked: builds on [#3861](https://github.com/cozystack/cozystack/pull/3861), which never reaches this line - [#4990](https://github.com/cozystack/cozystack/pull/4990) `fix(redis, valkey, harbor): spread sentinels and data pods over nodes`: `backport/skip`, left out - [#4989](https://github.com/cozystack/cozystack/pull/4989) `fix(monitoring): spread monitoring replicas over nodes`: `backport/skip`, left out - [#5393](https://github.com/cozystack/cozystack/pull/5393) `fix(kubernetes-nodes): label worker disks with the WorkloadMonitor selector`: `backport/skip`, left out - [#4817](https://github.com/cozystack/cozystack/pull/4817) `feat(kubernetes): give each tenant Kubernetes cluster its own etcd`: `backport/skip`, left out - [#5407](https://github.com/cozystack/cozystack/pull/5407) `fix(ingress-nginx): turn off TLS session tickets for CVE-2026-97629`: `backport/include`, on this branch - [#5156](https://github.com/cozystack/cozystack/pull/5156) `fix(kafka)!: require SCRAM-SHA-512 on the external listener`: `backport/skip`, left out - [#5186](https://github.com/cozystack/cozystack/pull/5186) `ci(workflows): run push and schedule workflows only in cozystack/cozystack`: `backport/skip`, left out - [#4921](https://github.com/cozystack/cozystack/pull/4921) `feat(api): add the credentials API with mint and revoke subresources`: `backport/skip`, left out - [#5163](https://github.com/cozystack/cozystack/pull/5163) `docs(release): add the v1.7.0 release notes`: `backport/skip`, left out - [#5337](https://github.com/cozystack/cozystack/pull/5337) `feat(kubernetes): run tenant clusters inside a cozyplane VPC`: `backport/skip`, left out ### Skipped - Rule 1, merged before `release-1.6` started under the policy on 2026-10-26: 553, too many to list here; the run's output lists them - Rule 2, the title type is not `fix` or `security`, or the scope is `deps`: 80, too many to list here; the run's output lists them - Rule 3, a breaking change: 6 - Rule 4, touches platform migrations, `targetVersion` or a CRD, or makes a sizeable API change: 3 - Rule 6, not on `release-1.7` yet: 16 - Dropped from `release-1.6` by a maintainer: 5 <details><summary>Rule 3, a breaking change</summary> - [#5085](https://github.com/cozystack/cozystack/pull/5085) `fix(kubernetes, opensearch, foundationdb)!: restrict managed application images`, `! in the title` - [#4818](https://github.com/cozystack/cozystack/pull/4818) `fix(keycloak)!: make the KMS proxy keep its keys across restarts`, `! in the title` - [#5167](https://github.com/cozystack/cozystack/pull/5167) `fix(monitoring-agents)!: isolate merged log payload under log_processed`, `! in the title` - [#5009](https://github.com/cozystack/cozystack/pull/5009) `fix(cozy-lib)!: refuse memory below 1Mi instead of rendering a few bytes`, `! in the title` - [#5191](https://github.com/cozystack/cozystack/pull/5191) `fix(kubernetes)!: remove the talos block and other leftovers of the worker pool split`, `! in the title` - [#4802](https://github.com/cozystack/cozystack/pull/4802) `fix(vm-disk, kubernetes-nodes)!: refuse golden images whose import keeps failing`, `! in the title` </details> <details><summary>Rule 4, touches platform migrations, `targetVersion` or a CRD, or makes a sizeable API change</summary> - [#5223](https://github.com/cozystack/cozystack/pull/5223) `fix(backups): report sizeBytes for MariaDB and CNPG backup artifacts`, `a CRD` - [#5166](https://github.com/cozystack/cozystack/pull/5166) `fix(linstor): update piraeus-operator to v2.12.1`, `a CRD` - [#5430](https://github.com/cozystack/cozystack/pull/5430) `fix(linstor): gate group snapshots on the v1 group snapshot API`, `platform migrations` </details> <details><summary>Rule 6, not on `release-1.7` yet</summary> - [#5232](https://github.com/cozystack/cozystack/pull/5232) `fix(clickhouse): let a running backup sidecar pick up system-bucket credentials`, `not on release-1.7 yet` - [#5229](https://github.com/cozystack/cozystack/pull/5229) `fix(clickhouse): keep failed backup attempts out of the bucket`, `not on release-1.7 yet` - [#5221](https://github.com/cozystack/cozystack/pull/5221) `fix(postgres): stop backup jobs from fighting over the WAL archive destination`, `not on release-1.7 yet` - [#5227](https://github.com/cozystack/cozystack/pull/5227) `fix(mariadb): restore the dump a Backup was taken as`, `not on release-1.7 yet` - [#5309](https://github.com/cozystack/cozystack/pull/5309) `fix(linstor): restore snapshots on a schedulable node`, `not on release-1.7 yet` - [#5294](https://github.com/cozystack/cozystack/pull/5294) `fix(postgres): hold the WAL archive destination for backups no job tracks`, `not on release-1.7 yet` - [#5295](https://github.com/cozystack/cozystack/pull/5295) `fix(postgres): restore from an archive with the access it was written with`, `not on release-1.7 yet` - [#5344](https://github.com/cozystack/cozystack/pull/5344) `fix(backups): stop leaking MariaDB dumps of stuck runs and torn-down namespaces`, `not on release-1.7 yet` - [#5375](https://github.com/cozystack/cozystack/pull/5375) `fix(kubernetes): apply addons.monitoringAgents.valuesOverride`, `not on release-1.7 yet` - [#5224](https://github.com/cozystack/cozystack/pull/5224) `fix(clickhouse): delete the archive when its Backup is deleted`, `not on release-1.7 yet` - [#5398](https://github.com/cozystack/cozystack/pull/5398) `fix(cluster-api): name the kubeconfig the upgrade hook runs with`, `not on release-1.7 yet` - [#5415](https://github.com/cozystack/cozystack/pull/5415) `fix(clickhouse): keep a quota-held archive delete and count a failed one once`, `not on release-1.7 yet` - [#5049](https://github.com/cozystack/cozystack/pull/5049) `fix(kubernetes): bump tenant worker Talos to v1.13.12 (CVE-2026-99999)`, `not on release-1.7 yet` - [#5426](https://github.com/cozystack/cozystack/pull/5426) `fix(seaweedfs): stop reserving storage pool name suffixes`, `not on release-1.7 yet` - [#5427](https://github.com/cozystack/cozystack/pull/5427) `fix(kubernetes): stop refusing extraOutputs hooks monitoring-agents accepts`, `not on release-1.7 yet` - [#5320](https://github.com/cozystack/cozystack/pull/5320) `fix(postgres): bound a backup whose cnpg Backup stalls in pending`, `not on release-1.7 yet` </details> <details><summary>Dropped from `release-1.6` by a maintainer</summary> - [#5142](https://github.com/cozystack/cozystack/pull/5142) `fix(release): keep release bodies within GitHub's size limit`, `dropped on #5312: not needed on release-1.6, it ships only patches now and their changelogs are 8-22 KB, far below release body limit` - [#5155](https://github.com/cozystack/cozystack/pull/5155) `fix(postgres): refuse system databases and never drop them`, `dropped on #5312: builds on init script passes from #4078 and #4574, release-1.6 doesn't have them and #4078 is breaking` - [#4960](https://github.com/cozystack/cozystack/pull/4960) `fix(vm-disk): refuse a disk smaller than the golden image it clones`, `dropped on #5312: builds on golden image checks of #4796, which is breaking and won't reach release-1.6` - [#4920](https://github.com/cozystack/cozystack/pull/4920) `fix(lineage-webhook): keep an explicit tenantresource false`, `dropped on #5312: its test needs newHandleTestWebhook from #4447, which never reaches release-1.6` - [#5405](https://github.com/cozystack/cozystack/pull/5405) `fix(postgres): move tenant PostgreSQL to patched standard-trixie images`, `dropped on #5312: reverted on release-1.7 in #5461, comes to release-1.6 only as the hand port #5433 after #5459 is fixed` </details> ```backport-batch {"version":3,"line":"release-1.6","built":{"main":"a2b341e31be2fc4d7c044a4f5ad5239d5f342af6","line":"5de32a56267d6fb8e8c858af0e3b022e2dad0ec0","newer":"d096e1006921674455330a1b498a30a8b1309a67","policy":"a2b341e31be2fc4d7c044a4f5ad5239d5f342af6","batch":"6b310132a6e13e0f7df0fca067e6816e9a660fc1","tool":"fba9fa8278a08150215670406c7e6e63832c9dee","run":"","at":"2026-11-26T16:35:08Z","options":{"noWorkflowFiles":true,"mode":"drop"}},"report":"09ba042bd04aab5f5fe57b593a4959c24b9eee7dac2ab6acaca60a4e61c37759","closing":null,"deferred":[],"dropped":[{"original":4920,"merge":"65cb73e38098a127d9c09bca3cf16d431222696e","reason":"its test needs newHandleTestWebhook from #4447, which never reaches release-1.6","on":5312,"date":"2026-11-26"},{"original":4960,"merge":"a5c58e5e985399a687e5f676a7321f828eda5ff7","reason":"builds on golden image checks of #4796, which is breaking and won't reach release-1.6","on":5312,"date":"2026-11-26"},{"original":5142,"merge":"5c564f9154ddc03387fd4cd6b7a9185b11b0bdb3","reason":"not needed on release-1.6, it ships only patches now and their changelogs are 8-22 KB, far below release body limit","on":5312,"date":"2026-11-25"},{"original":5155,"merge":"b53ca1fedebcc6288856995ada2629c06c9e4ae7","reason":"builds on init script passes from #4078 and #4574, release-1.6 doesn't have them and #4078 is breaking","on":5312,"date":"2026-11-26"},{"original":5405,"merge":"30ce2a3cb1de5b64e629780ef70349608d5cd05d","reason":"reverted on release-1.7 in #5461, comes to release-1.6 only as the hand port #5433 after #5459 is fixed","on":5312,"date":"2026-11-26"}],"stale":[],"parked":[{"original":4167,"merge":"2af1e21299e161041e87d07d21fbfa4d81f97903","kind":"dependency","needs":[3861],"announced":true},{"original":4234,"merge":"df42104b13ff01ca23a5a9f0835530b38824af16","kind":"dependency","needs":[5228],"announced":true},{"original":4917,"merge":"44848b9c9d08f529bbef6e1347c2533a24121406","kind":"dependency","needs":[4089],"announced":true},{"original":4945,"merge":"ea4968cf4613f696cd955bb1f66a7cfd877529ce","kind":"dependency","needs":[2352],"announced":true},{"original":4954,"merge":"94d710e50fe728827cb34c0ff7023c772984d1d0","kind":"dependency","needs":[3494],"announced":true},{"original":4970,"merge":"013b166967e72cdd441e3efde58a4bc1ef75192c","kind":"dependency","needs":[3594],"announced":true},{"original":4971,"merge":"048c029e29607a0b4c5b9e3d9e3b70c76e53bb51","kind":"dependency","needs":[4089],"announced":true},{"original":4972,"merge":"ba0b1ac6ef250048dd33657ff0aca9934900d612","kind":"dependency","needs":[4492,4658,4713],"announced":true},{"original":4974,"merge":"60d1f53e82419ad2138807a54d1045007921d986","kind":"dependency","needs":[3315,4386],"announced":true},{"original":4986,"merge":"e4d059ceddfee96d30dabe3c1a4fade5e18c55cf","kind":"dependency","needs":[3962,3964],"announced":true},{"original":5011,"merge":"29e8522f4b8d2fdef964a8e3f60e1af44fcd08e9","kind":"dependency","needs":[4639],"announced":true},{"original":5045,"merge":"382169be52d15f1a0ae4f3500039e0e8a9beb7fb","kind":"dependency","needs":[4552,4598],"announced":true},{"original":5071,"merge":"7dc5c0b5e63e1a7b7308f8d18adf42cfb900148e","kind":"dependency","needs":[3940,4308],"announced":true},{"original":5082,"merge":"94ada11eefdccc9040db71b710334c878f6bed83","kind":"dependency","needs":[3940],"announced":true},{"original":5088,"merge":"b36628661f60d8076a1122487356406c6d5b86b9","kind":"partial","files":["packages/system/ingress-nginx/templates/admission-webhook-networkpolicy.yaml","packages/system/ingress-nginx/tests/admission_webhook_networkpolicy_test.yaml"],"announced":true},{"original":5096,"merge":"6f8171db8990e5a0c12b216c37877abd0798213e","kind":"dependency","needs":[4380],"announced":true},{"original":5133,"merge":"72ff22dc9ebd51c899f024ebefec111d8a36b7b1","kind":"dependency","needs":[4447],"announced":true},{"original":5148,"merge":"b7e72840f92b15241f8dc451819f3a054e70d84a","kind":"dependency","needs":[3342],"announced":true},{"original":5151,"merge":"23461e065d0fa210c2990122663e7f084f7b2a50","kind":"dependency","needs":[4832],"announced":true},{"original":5153,"merge":"da17254bbc2c739c33c06139e7c2cfb280ae60c5","kind":"dependency","needs":[3280,3315,4713],"announced":true},{"original":5175,"merge":"5a5d5cd3d85fec610516651ab9bc5623a83f62cf","kind":"dependency","needs":[3548,3637,3676,3723,3804,3836,3843,3886,3888,3889,3890,3919]},{"original":5211,"merge":"10e0ef9ece2b7a527c5c2c3fed9bdbecacdb668f","kind":"dependency","needs":[4674],"announced":true},{"original":5226,"merge":"aa97451bc2cec98e9ac04131b9efd2a065983fff","kind":"dependency","needs":[3280],"announced":true},{"original":5228,"merge":"238b3ee491f513302722972b50060e689292f826","kind":"dependency","needs":[3562,3580],"announced":true},{"original":5230,"merge":"9e8e10c307584061f497e9b6506765c0e87b6c91","kind":"dependency","needs":[3562,3990,3992,4000,4929],"announced":true},{"original":5236,"merge":"a2b341e31be2fc4d7c044a4f5ad5239d5f342af6","kind":"dependency","needs":[4563]},{"original":5249,"merge":"e5ab1d6a7e09ff10d92c497a3468c3f9800cff5b","kind":"dependency","needs":[4447],"announced":true},{"original":5308,"merge":"30c4232be19bc1b887228d66e5e0fb8dc508547a","kind":"dependency","needs":[4819],"announced":true},{"original":5329,"merge":"90797d9de977d791d32d16acf7286c848fa6aab2","kind":"dependency","needs":[4261,4756],"announced":true},{"original":5352,"merge":"dec14c736d32cd12798de9af23363469986c7ed4","kind":"dependency","needs":[3861],"announced":true},{"original":5354,"merge":"18a9530b873e557d0198c1b6f2bfeddead746445","kind":"dependency","needs":[5226],"announced":true},{"original":5356,"merge":"4190aa82f5ef93a2bd4edd59a7e1db3f75bc8d01","kind":"dependency","needs":[4079],"announced":true},{"original":5357,"merge":"ec8088e54c719be89fff58fcd17f88950a6cb1a0","kind":"dependency","needs":[4424],"announced":true},{"original":5377,"merge":"d7573c009c482aacfc957954b9c1ae228c844ce7","kind":"dependency","needs":[4549],"announced":true},{"original":5399,"merge":"22843c5c5c204249cf2599ad23abef203d492948","kind":"dependency","needs":[3315,5153],"announced":true},{"original":5436,"merge":"40b4fc6ad4f39d3c449beee2a492fbd7f621b8ba","kind":"dependency","needs":[5377],"announced":true}],"changed":[4004,4673,4915,5119,5124,5210,5364,5373]} ``` ```backport-batch-report {"format":2,"id":"09ba042bd04aab5f5fe57b593a4959c24b9eee7dac2ab6acaca60a4e61c37759","line":"release-1.6","built":{"main":"a2b341e31be2fc4d7c044a4f5ad5239d5f342af6","line":"5de32a56267d6fb8e8c858af0e3b022e2dad0ec0","newer":"d096e1006921674455330a1b498a30a8b1309a67","policy":"a2b341e31be2fc4d7c044a4f5ad5239d5f342af6","batch":"6b310132a6e13e0f7df0fca067e6816e9a660fc1","tool":"fba9fa8278a08150215670406c7e6e63832c9dee","run":"","at":"2026-11-26T16:35:08Z","options":{"noWorkflowFiles":true,"mode":"drop"}},"overrides":{"backport/include":[3633,4095,4289,4427,4537,4673,4985,4993,5005,5025,5352,5407],"backport/skip":[4817,4921,4973,4989,4990,5083,5156,5163,5180,5186,5337,5393]},"primary":{"picked":[3633,4004,4095,4289,4427,4537,4673,4797,4893,4896,4915,4946,4948,4963,4965,4984,4985,4993,5005,5024,5025,5086,5087,5091,5094,5098,5100,5102,5114,5119,5123,5124,5134,5152,5160,5183,5184,5189,5190,5207,5208,5210,5212,5213,5242,5250,5265,5270,5280,5284,5326,5331,5340,5348,5358,5364,5373,5392,5403,5407,5443],"missing":[],"deferred":[],"parked":[{"original":4167,"merge":"2af1e21299e161041e87d07d21fbfa4d81f97903","kind":"dependency","needs":[3861]},{"original":4234,"merge":"df42104b13ff01ca23a5a9f0835530b38824af16","kind":"dependency","needs":[5228]},{"original":4917,"merge":"44848b9c9d08f529bbef6e1347c2533a24121406","kind":"dependency","needs":[4089]},{"original":4945,"merge":"ea4968cf4613f696cd955bb1f66a7cfd877529ce","kind":"dependency","needs":[2352]},{"original":4954,"merge":"94d710e50fe728827cb34c0ff7023c772984d1d0","kind":"dependency","needs":[3494]},{"original":4970,"merge":"013b166967e72cdd441e3efde58a4bc1ef75192c","kind":"dependency","needs":[3594]},{"original":4971,"merge":"048c029e29607a0b4c5b9e3d9e3b70c76e53bb51","kind":"dependency","needs":[4089]},{"original":4972,"merge":"ba0b1ac6ef250048dd33657ff0aca9934900d612","kind":"dependency","needs":[4492,4658,4713]},{"original":4974,"merge":"60d1f53e82419ad2138807a54d1045007921d986","kind":"dependency","needs":[3315,4386]},{"original":4986,"merge":"e4d059ceddfee96d30dabe3c1a4fade5e18c55cf","kind":"dependency","needs":[3962,3964]},{"original":5011,"merge":"29e8522f4b8d2fdef964a8e3f60e1af44fcd08e9","kind":"dependency","needs":[4639]},{"original":5045,"merge":"382169be52d15f1a0ae4f3500039e0e8a9beb7fb","kind":"dependency","needs":[4552,4598]},{"original":5071,"merge":"7dc5c0b5e63e1a7b7308f8d18adf42cfb900148e","kind":"dependency","needs":[3940,4308]},{"original":5082,"merge":"94ada11eefdccc9040db71b710334c878f6bed83","kind":"dependency","needs":[3940]},{"original":5088,"merge":"b36628661f60d8076a1122487356406c6d5b86b9","kind":"partial","files":["packages/system/ingress-nginx/templates/admission-webhook-networkpolicy.yaml","packages/system/ingress-nginx/tests/admission_webhook_networkpolicy_test.yaml"]},{"original":5096,"merge":"6f8171db8990e5a0c12b216c37877abd0798213e","kind":"dependency","needs":[4380]},{"original":5133,"merge":"72ff22dc9ebd51c899f024ebefec111d8a36b7b1","kind":"dependency","needs":[4447]},{"original":5148,"merge":"b7e72840f92b15241f8dc451819f3a054e70d84a","kind":"dependency","needs":[3342]},{"original":5151,"merge":"23461e065d0fa210c2990122663e7f084f7b2a50","kind":"dependency","needs":[4832]},{"original":5153,"merge":"da17254bbc2c739c33c06139e7c2cfb280ae60c5","kind":"dependency","needs":[3280,3315,4713]},{"original":5175,"merge":"5a5d5cd3d85fec610516651ab9bc5623a83f62cf","kind":"dependency","needs":[3548,3637,3676,3723,3804,3836,3843,3886,3888,3889,3890,3919]},{"original":5211,"merge":"10e0ef9ece2b7a527c5c2c3fed9bdbecacdb668f","kind":"dependency","needs":[4674]},{"original":5226,"merge":"aa97451bc2cec98e9ac04131b9efd2a065983fff","kind":"dependency","needs":[3280]},{"original":5228,"merge":"238b3ee491f513302722972b50060e689292f826","kind":"dependency","needs":[3562,3580]},{"original":5230,"merge":"9e8e10c307584061f497e9b6506765c0e87b6c91","kind":"dependency","needs":[3562,3990,3992,4000,4929]},{"original":5236,"merge":"a2b341e31be2fc4d7c044a4f5ad5239d5f342af6","kind":"dependency","needs":[4563]},{"original":5249,"merge":"e5ab1d6a7e09ff10d92c497a3468c3f9800cff5b","kind":"dependency","needs":[4447]},{"original":5308,"merge":"30c4232be19bc1b887228d66e5e0fb8dc508547a","kind":"dependency","needs":[4819]},{"original":5329,"merge":"90797d9de977d791d32d16acf7286c848fa6aab2","kind":"dependency","needs":[4261,4756]},{"original":5352,"merge":"dec14c736d32cd12798de9af23363469986c7ed4","kind":"dependency","needs":[3861]},{"original":5354,"merge":"18a9530b873e557d0198c1b6f2bfeddead746445","kind":"dependency","needs":[5226]},{"original":5356,"merge":"4190aa82f5ef93a2bd4edd59a7e1db3f75bc8d01","kind":"dependency","needs":[4079]},{"original":5357,"merge":"ec8088e54c719be89fff58fcd17f88950a6cb1a0","kind":"dependency","needs":[4424]},{"original":5377,"merge":"d7573c009c482aacfc957954b9c1ae228c844ce7","kind":"dependency","needs":[4549]},{"original":5399,"merge":"22843c5c5c204249cf2599ad23abef203d492948","kind":"dependency","needs":[3315,5153]},{"original":5436,"merge":"40b4fc6ad4f39d3c449beee2a492fbd7f621b8ba","kind":"dependency","needs":[5377]}],"skipped":{"on-line":[],"before-start":[2195,2196,2198,2252,2352,2618,2621,2654,2666,2667,2680,2682,2683,2692,2698,2729,2914,2956,2984,3031,3115,3116,3158,3195,3208,3228,3260,3262,3266,3280,3315,3340,3341,3342,3353,3372,3373,3378,3379,3380,3383,3385,3391,3398,3399,3406,3407,3408,3409,3411,3412,3417,3421,3422,3427,3428,3429,3430,3435,3436,3441,3443,3444,3446,3447,3449,3454,3455,3460,3462,3463,3466,3468,3470,3471,3475,3476,3494,3495,3496,3500,3501,3505,3506,3507,3510,3511,3520,3522,3523,3524,3527,3529,3531,3535,3539,3546,3548,3551,3552,3557,3562,3564,3567,3569,3571,3572,3574,3575,3579,3580,3581,3584,3585,3586,3590,3591,3592,3593,3594,3595,3596,3598,3599,3602,3604,3605,3606,3607,3608,3616,3617,3620,3621,3622,3627,3630,3632,3636,3637,3639,3645,3647,3651,3659,3661,3662,3664,3670,3672,3673,3676,3677,3715,3723,3727,3735,3738,3742,3750,3760,3762,3763,3768,3769,3772,3775,3777,3780,3783,3784,3790,3791,3795,3797,3798,3799,3800,3802,3804,3808,3815,3817,3833,3834,3836,3837,3839,3840,3841,3843,3844,3845,3846,3848,3849,3856,3859,3860,3861,3862,3863,3872,3874,3886,3887,3888,3889,3890,3891,3897,3898,3899,3901,3907,3908,3910,3914,3919,3920,3922,3925,3926,3928,3931,3932,3934,3935,3936,3937,3938,3940,3945,3951,3954,3955,3956,3959,3960,3962,3963,3964,3967,3968,3969,3973,3980,3990,3992,3995,3997,4000,4011,4012,4013,4014,4015,4018,4019,4020,4021,4022,4023,4035,4039,4041,4042,4058,4063,4064,4077,4078,4079,4087,4088,4089,4090,4096,4097,4098,4099,4100,4101,4102,4103,4107,4109,4110,4121,4129,4130,4133,4134,4135,4136,4138,4143,4148,4152,4163,4170,4171,4182,4184,4185,4186,4188,4191,4200,4204,4220,4221,4222,4223,4225,4226,4228,4231,4232,4233,4236,4237,4242,4251,4252,4253,4254,4255,4256,4261,4271,4277,4278,4279,4280,4281,4282,4284,4286,4290,4291,4292,4293,4296,4299,4300,4306,4308,4317,4323,4326,4331,4333,4340,4341,4347,4356,4362,4363,4366,4367,4376,4379,4380,4381,4383,4386,4387,4390,4392,4394,4398,4399,4403,4405,4407,4411,4414,4415,4417,4424,4425,4426,4429,4436,4439,4441,4442,4443,4444,4447,4448,4451,4453,4455,4457,4458,4459,4460,4461,4462,4468,4469,4471,4473,4478,4480,4483,4485,4490,4492,4493,4494,4496,4497,4498,4501,4505,4512,4514,4517,4521,4522,4532,4534,4538,4544,4545,4549,4552,4557,4558,4562,4563,4567,4568,4569,4572,4573,4574,4576,4578,4583,4584,4585,4586,4587,4594,4595,4598,4603,4606,4608,4610,4612,4627,4632,4633,4634,4635,4637,4638,4639,4640,4643,4645,4648,4651,4652,4654,4657,4658,4660,4663,4664,4666,4669,4671,4672,4674,4675,4678,4682,4689,4692,4694,4695,4697,4701,4707,4710,4712,4713,4722,4724,4729,4738,4741,4742,4751,4754,4756,4757,4761,4766,4767,4768,4778,4779,4789,4790,4791,4792,4796,4799,4803,4804,4805,4807,4811,4812,4815,4819,4826,4828,4830,4831,4832,4833,4834,4843,4845,4847,4848,4861,4865,4866,4867,4873,4881,4888,4889,4898,4899,4914,4929,4936,4939,4940,4941,4955,4959,5027],"type":[2622,2664,2665,3149,3382,3440,4495,4508,4822,4859,4860,4869,4877,4879,4900,4902,4931,4944,4952,4953,4969,4983,4997,5000,5034,5039,5043,5046,5050,5090,5106,5110,5112,5144,5162,5168,5171,5174,5188,5214,5215,5216,5217,5218,5219,5220,5237,5238,5239,5240,5252,5254,5260,5264,5266,5267,5269,5277,5282,5285,5286,5287,5288,5306,5310,5318,5334,5336,5349,5360,5362,5372,5374,5376,5404,5408,5411,5424,5425,5428],"breaking":[4802,4818,5009,5085,5167,5191],"touches":[5166,5223,5430],"newer":[5049,5221,5224,5227,5229,5232,5294,5295,5309,5320,5344,5375,5398,5415,5426,5427],"skip-label":[4817,4921,4973,4989,4990,5083,5156,5163,5180,5186,5337,5393],"dropped":[4920,4960,5142,5155,5405]}},"overlays":{"dropped":[{"original":4920,"merge":"65cb73e38098a127d9c09bca3cf16d431222696e","reason":"its test needs newHandleTestWebhook from #4447, which never reaches release-1.6","on":5312,"date":"2026-11-26"},{"original":4960,"merge":"a5c58e5e985399a687e5f676a7321f828eda5ff7","reason":"builds on golden image checks of #4796, which is breaking and won't reach release-1.6","on":5312,"date":"2026-11-26"},{"original":5142,"merge":"5c564f9154ddc03387fd4cd6b7a9185b11b0bdb3","reason":"not needed on release-1.6, it ships only patches now and their changelogs are 8-22 KB, far below release body limit","on":5312,"date":"2026-11-25"},{"original":5155,"merge":"b53ca1fedebcc6288856995ada2629c06c9e4ae7","reason":"builds on init script passes from #4078 and #4574, release-1.6 doesn't have them and #4078 is breaking","on":5312,"date":"2026-11-26"},{"original":5405,"merge":"30ce2a3cb1de5b64e629780ef70349608d5cd05d","reason":"reverted on release-1.7 in #5461, comes to release-1.6 only as the hand port #5433 after #5459 is fixed","on":5312,"date":"2026-11-26"}],"stale":[],"changed":[4004,4673,4915,5119,5124,5210,5364,5373]},"diag":{},"other":[]} ``` ### Screenshots See the original pull requests. ### Downstream repositories - [ ] 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: ### Release note ```release-note fix(tenant): retry a failed monitoring or gateway install instead of uninstalling the release, so a slow first install no longer runs the cleanup hooks that delete the tenant's metrics and logs volumes or its ACME account key fix(harbor): set resources for the nginx proxy and raise the portal preset so neither is OOMKilled by the tenant LimitRange default (128Mi) fix(bucket): the ACME cleanup hook now reaches the apiserver instead of reporting success while doing nothing fix(monitoring): kube-apiserver is scraped with its own 128MB size limit (`vmagent.apiserverMaxScrapeSize` in the monitoring-agents component) instead of the global 32MB, so a large `/metrics` no longer makes KubeAPIDown fire on a healthy API server. A new VMAgentScrapeSizeExceeded alert reports any target whose response exceeds the scrape size limit. fix(mariadb): correct webhook cert-manager override key path so cert-manager is actually used for the mariadb-operator webhook certificate fix(etcd): the tenant etcd alert etcdHighNumberOfFailedGRPCRequests now counts only the gRPC codes that the etcd mixin and the platform copy of the alert count, so the Canceled watch streams of a Kubernetes API server that stops no longer fire it on every etcd member. fix(tcp-balancer): HAProxy now takes its fd and thread caps from the replica's memory and CPU limits instead of the node, so a t1.nano balancer is no longer OOMKilled on nodes with many CPUs. maxconn follows the memory limit at about 16 connections per MiB, 2035 on t1.nano, and the pods roll once on upgrade. fix(tenant): the tenant gateway release no longer times out on upgrade while TenantGateway listener certificates are pending, it waits only until the controller has observed the current TenantGateway spec. fix(controller): existing HelmReleases now get `healthCheckExprs` and `waitStrategy` from their ApplicationDefinition. vm-disk and postgres releases created before these expressions were added stop waiting on DataVolume and KEDA ScaledObject during upgrades. fix(cilium): the IPAM migration hook no longer fails with "Argument list too long" on clusters with more than a few nodes, which blocked the cilium upgrade and every package that depends on networking. fix(kubernetes): the OIDC bootstrap Job no longer fails to start for a tenant cluster with about 240 or more oidc.users, the bindings now come from a ConfigMap the Job mounts. fix(clickhouse): a RestoreJob now restores the archive its Backup was taken as, not the newest one. New Backups record the archive name, Backups taken before this release are restored best effort from the newest archive stamped no later than their takenAt, with a warning in the restore pod log. A ClickHouse BackupJob created again under a name whose Backup still exists now fails instead of reporting that Backup as its result. fix(postgres): the init script renders the declared databases in a stable order, so an upgrade that leaves the databases unchanged no longer rewrites the init-script Secret. fix(mariadb-operator): the MariaDB operator now uses the platform's networking.clusterDomain instead of a hard-coded cozy.local, so replication and User/Database/Grant reconciliation work on clusters with a non-default cluster domain. fix(api): tenant quota admission now counts the parent pool's usage of extended resources and hugepages, so a child tenant can no longer get a share the parent has already used. After upgrading, updates to existing tenants may be rejected if their quota for these resources exceeds the parent's remaining budget. This includes updates that leave the quota unchanged. fix(mariadb): a MariaDB BackupJob or RestoreJob whose operator Job failed now ends Failed instead of Succeeded, and a failed backup no longer creates a Ready Backup without an archive. Backups created by failed runs before this fix are not removed; restoring from one can fail or select another dump from the shared prefix. fix(kubernetes, monitoring): the vmagent of tenant Kubernetes clusters now writes to the tenant's vminsert and labels series with the owning tenant instead of `cozy-monitoring`. Previously no tenant cluster metric reached the tenant's Monitoring. fix(seaweedfs): bucket users granted together could get S3 keys that never work (403 InvalidAccessKeyId). COSI driver is bumped to v0.4.0, which writes each grant to per-identity IAM file. fix(monitoring-agents): disabling the Monitoring Agents addon of a tenant Kubernetes cluster no longer leaves the monitoring-agents release stuck in UninstallFailed when the VictoriaMetrics operator is removed first; a pre-delete hook now releases the VictoriaMetrics objects' finalizers, and the VPA is only rendered when its CRD is served. fix(vm-instance): an external PortList VM with an empty port list no longer fails to deploy; it keeps its external IP and blocks all inbound TCP and UDP traffic. fix(backups): the barman-cloud sidecar of Postgres backups now has an explicit one-core CPU limit instead of inheriting the tenant LimitRange's 250m default, which made full backups and WAL archiving several times slower. Each instance pod of a tenant with a CPU quota now counts 750m more against `limits.cpu`; check the headroom before instance pods are recreated. Existing ObjectStores pick the limit up at their next backup (platform-managed) or HelmRelease upgrade (chart-rendered), and running pods at their next restart. fix(etcd): the tenant etcd defrag job requests 10m and 32Mi instead of 200m and 256Mi, so it runs in tenants whose quota is nearly used up by their own services. fix(monitoring): vmalert metrics are collected again. The vmalert VMServiceScrape selected app.kubernetes.io/instance=vmalert while the Service is labelled vmalert-<first metrics storage>, so it matched nothing. fix(ingress-nginx): raise the client keepalive_time from the nginx 1h default to 12h, so long-lived HTTP/2 connections (for example kopia maintenance against S3) are no longer cut by a GOAWAY after one hour fix(monitoring-agents): a Watchdog that stops reaching Alerta now raises a major HeartbeatFail about six minutes later. It used to raise an ok alert after a day. fix(monitoring): InfoInhibitor no longer reaches Alerta as a major alert. It carries severity none again, which the platform Alertmanager routes to the blackhole, as upstream kube-prometheus intends. Before, any active alert with severity info, from a custom rule or from one CDI or KubeVirt generates, raised a major InfoInhibitor in Alerta and in its Telegram and Slack notifications. fix(vertical-pod-autoscaler): the admission controller runs two replicas spread over nodes with a PodDisruptionBudget, so pods created during a drain still get their VPA recommendation. feat(monitoring): new warning alert PodReplicasColocated fires when two or more running pods of one StatefulSet, ReplicaSet, CNPG Cluster, StrimziPodSet or etcd cluster have shared a node for an hour while the cluster has a schedulable node for each of them. fix(kubevirt): tenant admins can upload an image into a VMDisk created with source upload using virtctl image-upload. The tenant admin and super-admin roles get get on persistentvolumeclaims and create on upload.cdi.kubevirt.io/uploadtokenrequests, and the vm-disk notes print the command with --no-create. fix(piraeus-operator): the LINSTOR error-report alerts no longer fire on old reports when the LINSTOR controller pod moves to another node, when an external label of the scrape changes, or when a satellite reconnects within an hour. They now count reports per node, and their alerts carry the node's hostname instead of the controller pod's instance, job and controller_node labels. fix(keycloak, foundationdb): keycloak-operator and foundationdb-operator now replace their CRDs on upgrade. Clusters upgraded from before v1.2.0 kept the v1.25.0 keycloak-operator CRDs, under which the apiserver dropped the Keycloak realm session settings and Keycloak could reject the dashboard client, and clusters upgraded from before v1.6.0 kept the v2.13.0 foundationdb-operator CRDs. fix(tcp-balancer): the Service now publishes ports 6443 and 50000 only when kubernetesAndTalos is set, like the Deployment and the HAProxy config. Before, every tcp-balancer Service carried both ports with no container port behind them, on the LoadBalancer too when external was enabled, and a release with kubernetesAndTalos but without httpAndHttps had no Service port for them. [vpa] Shorten the VPA admission webhook timeout to 5s so pod creation does not stall cluster-wide while the admission controller is unreachable. fix(controller, platform): sub-tenants without their own resourceQuotas now receive their parent pool's container defaults (LimitRange) alongside the allocated quota, when that quota bounds a CPU or memory limit, so pods that omit such a limit, such as the postgres barman-cloud backup sidecar, are no longer rejected at admission. fix(etcd): scope tenant etcd alerts to their release and avoid duplicate tenant peer RTT alerts from the global rules fix(cozy-lib): a tenant quota with hugepages-2Mi or hugepages-1Gi now renders only requests.hugepages-<size>, so the tenant installs and its huge pages are bounded. fix(seaweedfs): grant existing bucket credentials the Object Lock actions required by SeaweedFS 4.48 on install and upgrade, preserving their bucket restrictions and credentials. fix(kamaji): stop writing kubelet config fields that older tenant Kubernetes versions do not know, such as memoryReservationPolicy on tenants before v1.36, so strict decoders of the kubelet-config ConfigMap no longer fail. fix(qdrant): restore metrics scraping for TLS-enabled instances by using HTTPS and verifying the server certificate against the issued CA. fix(kubernetes): remove cilium dependency from coredns HelmRelease to prevent a circular startup deadlock when Hubble Relay is enabled fix(securitygroups): a port range now gets a clear "port ranges are not supported" error, and a malformed toFQDNs matchName or matchPattern is rejected on the SecurityGroup field instead of failing on the backing CiliumNetworkPolicy. fix(postgres): a user named `app` no longer loses its password when the Postgres pod restarts. CNPG re-applied its own generated password to the `app` owner role on every pod start; the chart now hands CNPG the password stored in `<release>-credentials`. fix(linstor): linstor-affinity-controller and linstor-scheduler now restart when their LINSTOR client certificate is rotated, instead of failing every LINSTOR API call with EOF once the certificate they loaded at startup expires. fix(linstor): the NFS server's linstor-wait-node-online init container now runs the platform-built linstor-csi image instead of the operator's default. fix(api): a resourceVersion from a WorkloadMonitor-triggered Application watch event now works as a delete precondition, and the event's spec matches its version. fix(api): reject new workload memory values below 1Mi before storing an application. Updates to unrelated fields on existing applications with smaller values still pass admission. fix(harbor): Harbor registry storage is billed again. The WorkloadMonitor controller finds BucketClaims by label, and the registry BucketClaim had no labels. It now carries the registry monitor's `release` and `component` labels, so its storage shows up as Workload under the registry WorkloadMonitor, the same way the registry PVC did before it moved to S3. And also registry WorkloadMonitor now reports not operational while the BucketClaim is not provisioned fix(platform): system PostgreSQL databases (Keycloak, Harbor, Grafana, Alerta, SeaweedFS) move from 17.7 to 17.12-standard-trixie, which fixes CVE-2026-116331. On upgrade each of these databases is rolled: replicas first, then the primary is restarted in place, with a brief interruption of a few minutes per database. fix(cozystack-basics): tenant super-admins can no longer create, edit or delete `kubevirt.io` VirtualMachines directly; they keep read and watch. Virtual machines are managed through VMInstance and VMDisk applications, power through the start/stop/restart actions. The install e2e now fails when a tenant super-admin gains a write verb outside a checked-in allowlist. fix(ingress-nginx): TLS session tickets are turned off in the ingress-nginx controller (CVE-2026-97629). TLS session resumption keeps working through the shared session cache. fix(ingress): restore visitor IP handling for Cloudflare-proxied HTTPS through ssl-passthrough while rejecting spoofed `CF-Connecting-IP` headers before IP whitelists ```v1.6.6-rc.1 |
||
|
|
6b310132a6 |
fix(backups): delete the Velero backup of a failed BackupJob (#5364)
<!-- 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, security (a fix that comes through a security
advisory), 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.
- Fixes merged to `main` reach the release lines the backport batch runs
for automatically, so do not open backport PRs by hand:
https://github.com/cozystack/cozystack/blob/main/docs/release/backports.md
-->
## What this PR does
<!-- Link the issues this PR addresses. For a complete fix targeting the
default branch, use Closes #N (Closes owner/repository#N for another
repository). Otherwise use a non-closing reference; release-branch PRs
need manual issue linking and closure when appropriate. -->
Closes #5355
A BackupJob whose Velero backup ends `Failed` or `PartiallyFailed`
leaves that `backup.velero.io` object and its data in the backup bucket
(partial resources, logs) until Velero's TTL expires it, 720h by
default. No `Backup` is created for a failed run, and the `Backup`
finalizer was the only code that asked Velero to delete backup data;
deleting the BackupJob does not remove it either, because the Velero
backup is only labelled for the job, not owned by it.
The first commit requests deletion of the failed Velero backup through a
`DeleteBackupRequest`, and turns the reconcile of a `Failed` BackupJob,
which returned at once, into a sweep over the Velero backups still
labelled for the job. That sweep also cleans up backups leaked by
earlier versions after an upgrade. The request creation is shared with
the `Backup` finalizer and named after the Velero backup, so repeated
reconciles converge on one request. The failure message is unchanged.
The second commit narrows that sweep and makes it converge:
- Only `Failed`, `PartiallyFailed` and `FailedValidation` Velero backups
are deleted. A `Completed` one is never touched from a job-level
failure: a job can fail after Velero completed (creating or recording
the `Backup` failed), and that Velero backup may be the only copy of
good data.
- Deletion is requested only after `Failed` is persisted. The strategy
no longer sends the request inline, so a failed status write cannot
leave a retried run without the backup it reports the failure from. The
BackupJob watch has no predicate, so the `Failed` status update itself
triggers the sweep.
- While a failed backup still exists, the job is requeued every 5
minutes. Nothing watches `DeleteBackupRequest`, so this is how a request
Velero processed with errors is noticed and replaced. A backup that is
still running is rechecked every minute.
- Backups that reference the Velero backup are read through the uncached
API reader before anything is deleted.
- The ClusterRole of `backupstrategy-controller` gains `delete` on
`deletebackuprequests`, needed to replace a processed-with-errors
request. The `Backup` finalizer shares the helper, and without the verb
that path would fail with 403.
The third commit makes a deletion that Velero could not finish converge,
and makes it visible:
- A Velero backup in `Deleting` goes through the same request path.
Velero sets that phase before it removes the data and leaves it there
when removal fails, so skipping it left the data in place until the TTL.
- Our own request that Velero processed while the backup still exists is
replaced, whether it carries errors or not. The second case is a backup
that the BSL sync brought back.
- Each replacement emits a `VeleroBackupDeletionFailed` Warning event on
the BackupJob with Velero's `status.errors`, and doubles the wait before
the next replacement, 5 minutes up to 1 hour (enforced from the recorded
attempt time since the fourth commit). The count is kept in the
`backups.cozystack.io/velero-deletion-retries` annotation on the
BackupJob. A missing, read-only or unavailable BSL therefore shows up in
`kubectl describe` instead of being retried silently every 5 minutes.
The fourth commit makes the backoff binding rather than advisory:
- Each request the sweep creates records its time in the
`backups.cozystack.io/velero-deletion-attempted-at` annotation, next to
the retry counter. A request Velero has processed is replaced only once
the backoff for the current retry count has passed since that time.
Writing the annotations triggers a reconcile at once, because the
BackupJob watch has no predicate; that reconcile now only computes the
remaining wait. Before, with a BSL that fails instantly, it could
replace the request again right away.
- A request Velero has not processed yet, and a Velero backup still in
`New` or with no phase, are checked again after as long as they have
already waited: between 5 minutes (1 minute for a running backup) and 1
hour. Waiting emits no event.
- If the job was deleted before the annotations are written, the sweep
stops quietly. Any other error writing them is logged, and the computed
requeue is kept, because the request already exists.
Points for the reviewer:
- The sweep matches on the BackupJob labels, not on the strategy kind,
because a `Failed` job's BackupClass may be gone. The Kubernetes
strategy labels its Velero backup the same way and has the same leak on
failure, so a failed Kubernetes strategy run is cleaned up by the sweep
as well.
- The Velero strategy still treats a `FailedValidation` Velero backup as
in progress and requeues the BackupJob indefinitely. That is unchanged
here; the sweep already treats `FailedValidation` as deletable.
- After the upgrade, the Velero backups of BackupJobs that already
failed are deleted. An operator who wants one of them for a manual
`velero restore` must copy it first.
### 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. -->
N/A — no UI changes.
### 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.
-->
The diff touches Go code in `internal/backupcontroller/` and one chart
file, `packages/system/backupstrategy-controller/templates/rbac.yaml`,
which adds the `delete` verb on `deletebackuprequests` to the
controller's ClusterRole. Walked against the trigger map:
- website: no package, platform value, variant, component, release
asset, ApplicationDefinition, Talos or tooling change. The ClusterRole
is not documented there.
- terraform-provider-cozystack: no app, schema field, enum, default,
`kind`/`plural`, prefix, or `Package`/`Plan`/`RestoreJob` CRD change.
- ansible-cozystack, talm, examples: no installer value, namespace,
variant, platform value, node prerequisite, or object the role waits on.
- ccp, external-apps-example: nothing under `hack/`, no package layout,
`-rd` path, variant, `tags.yaml`, `ApplicationDefinition` CRD or
commit-convention change.
- cozyhr, cozy-proxy, cozystack-telemetry-server, community: none of
their annotations, labels, metrics, `hack/package.mk` targets, PR
template or commit convention change.
No entry applies.
- [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(backups): a BackupJob whose Velero backup ends Failed, PartiallyFailed or FailedValidation now asks Velero to delete that backup and its data in the bucket, instead of leaving them until Velero's TTL expires. A Velero backup that completed is never deleted this way. If Velero cannot carry out the deletion (for example, the backup storage location is missing, read-only or unavailable), the BackupJob gets a `VeleroBackupDeletionFailed` Warning event with Velero's errors, and the deletion is retried at a growing interval of up to one hour. After upgrading, the Velero backups of BackupJobs that already failed are deleted as well; to keep one for a manual `velero restore`, copy it before the upgrade. The backupstrategy-controller ClusterRole gains `delete` on `deletebackuprequests`.
```
Backported-from:
|
||
|
|
40af058885 |
fix(clickhouse): restore the archive a Backup was taken as (#5208)
## What this PR does
A ClickHouse `RestoreJob` restored the newest archive under the app
prefix, whichever `Backup` it named. Strategy pod generated the archive
name with `date -u` and nothing was recorded on the `Backup`, so restore
could only list the remote archives and take the last one. Restoring an
older `Backup` brought back the latest data.
Now the controller names the archive before it creates the backup Job
(`clickhouse-<app>-<startedAt>` from persisted `status.startedAt`, so
retried pods write the same one), passes it to the pod as `.ArchiveName`
and records it in the `Backup` `driverMetadata`. Restore takes exactly
that archive and fails with its name when storage has no such archive.
The name is recorded only when the Job's pod got it, so a Job left from
the previous controller during an upgrade, or a custom strategy with its
own names, leaves no name instead of a wrong one.
A retried pod reuses the name, so it waits for an attempt the sidecar
still runs (no 423) and asks for `resume`.
A `Backup` outlives its `BackupJob` and a Plan names `BackupJob`s after
the schedule slot, so a `BackupJob` created again under a used name met
the earlier run's `Backup` when its Job completed, took it as its result
and left the archive it just wrote recorded nowhere. Now it fails if
that `Backup` records another archive, and the message names both. A
retry of the same run still gets its own `Backup` back.
Old `Backup`s have no recorded name and stay restorable: the pod logs a
`WARNING` and takes the newest archive stamped no later than `takenAt`,
and fails when nothing qualifies. While the chart rolls out, previous
controller pod can still render the new template and pass no `takenAt`,
so a restore of a `Backup` without recorded name fails before it touches
any table, and works when created again after the rollout.
Fixes https://github.com/cozystack/cozystack/issues/5199
Tests are go unit tests for naming, recording, a reused `BackupJob` name
and restore render, and `hack/altinity-backup-strategy.bats`, which runs
the shipped script against a stubbed clickhouse-backup API (the restore
tests go red on the old template). Checked on a live ClickHouse with two
backups of 1500 and 2000 rows: restore of the older one by recorded name
ends with 1500 rows, fallback for an unnamed older backup picks the same
archive with the warning, a missing archive fails without touching the
table, a retry over an existing local backup completes under the same
name. The controller binary itself was not run on the cluster, only its
rendered output in the pod.
### 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
fix(clickhouse): a RestoreJob now restores the archive its Backup was taken as, not the newest one. New Backups record the archive name, Backups taken before this release are restored best effort from the newest archive stamped no later than their takenAt, with a warning in the restore pod log. A ClickHouse BackupJob created again under a name whose Backup still exists now fails instead of reporting that Backup as its result.
```
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **New Features**
* Backups now use a consistent archive name tied to the backup job, and
completed backups retain that name for future restores.
* Restores can select the recorded archive and backup timestamp. If no
archive was recorded, the system selects the newest eligible archive for
the application.
* **Bug Fixes**
* A restore now fails when its recorded archive is missing instead of
silently selecting a different one.
* Backup requests avoid starting a duplicate action when the matching
action is already in progress.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Backported-from:
|
||
|
|
ee1d64c4e2 |
fix(backups): enforce the Velero deletion backoff of failed BackupJobs
The retry backoff of the failed-job sweep only set RequeueAfter. Writing the
retry counter onto the BackupJob triggers a reconcile at once, since the
BackupJob watch has no predicate. When Velero processes a request instantly,
as it does when the backup storage location is missing or read-only, that
reconcile replaced the request again, emitted another event and raised the
counter without any wait. The sweep now records when it last created a
request, in the backups.cozystack.io/velero-deletion-attempted-at annotation,
and replaces a processed request only after the backoff for the current
count has passed since then. Before that, it requeues for the remaining
time.
A request Velero never processes, because Velero is down, and a Velero
backup stuck in New or with no phase were checked at a fixed interval,
each check with an uncached list of Backups. They are now checked again
after as long as they have already waited, from the request's or the
backup's creation time, capped at one hour. Waiting emits no event.
Recording the attempt can fail after the request was created. If the job
was deleted meanwhile, the sweep ends without an error. Any other error is
logged and the computed requeue is kept, because failing the reconcile
would only retry sooner.
Unit tests drive the clock through two back-to-back reconciles of an
instantly processed request (one replacement, one event), then three
retries at 10, 20 and 40 minutes. They also check the waiting intervals for
requests and backups of different ages, and both annotation write errors.
Refs: #5355
Assisted-by: LLM
Signed-off-by: Andrey Kolkov <androndo@gmail.com>
(cherry picked from commit
|
||
|
|
0acc4d3dfa |
fix(backups): fail a ClickHouse BackupJob whose Backup name is taken
A Backup outlives the BackupJob that made it, so a BackupJob created
again under a name already used meets the earlier run's Backup when its
own Job completes. That happens by hand, and from a Plan reconciled
again inside its starting deadline, since a Plan names each BackupJob
after its schedule slot. The Altinity driver took the earlier Backup as
its result: the BackupJob turned Succeeded with a BackupRef recording
the earlier run's archive, the archive this run wrote was recorded on
nothing, and restoring what the BackupJob reported brought back the
older data.
An existing Backup is now taken as this run's only when it records this
run's archive, which is what an earlier reconcile of the same run
leaves when its status write is lost. Any other fails the BackupJob,
naming both archives, and leaves the earlier Backup untouched.
Assisted-by: LLM
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
(cherry picked from commit
|
||
|
|
6d70eb20de |
fix(backups): retry stuck Velero deletions of failed BackupJobs and report them
Velero marks a backup Deleting before it removes the data and leaves it in
that phase when removing the data fails, with the deletion request
processed with errors. The failed-job sweep skipped Deleting backups and
did not requeue for them, so their data stayed in the bucket until
Velero's TTL. Deleting backups now go through the same request path: a
pending request is left alone, and a processed one of ours is replaced.
A request of ours that Velero processed without errors is also replaced
when the backup still exists, for example after the BSL sync brought it
back. Otherwise the request name blocked a new attempt until Velero
garbage-collects processed requests a day later.
When Velero can never carry out the deletion, because the backup storage
location is missing, read-only or unavailable, the sweep replaced the
request every 5 minutes without any sign of it. Each replacement now
emits a VeleroBackupDeletionFailed Warning event on the BackupJob with
Velero's status.errors, and doubles the requeue interval from 5 minutes
up to 1 hour. The count is kept in the
backups.cozystack.io/velero-deletion-retries annotation, because the
replaced request is gone and a requeue carries no state. The
controller's ClusterRole already allows patching BackupJobs.
Unit tests cover a Deleting backup with a pending request and with an
errored one, a cleanly processed request whose backup still exists, an
errored request under a foreign name that is left alone, three
consecutive failed deletions (three events, 10m, 20m and 40m requeues,
the 1h cap), and a cluster without the Velero CRDs.
Refs: #5355
Assisted-by: LLM
Signed-off-by: Andrey Kolkov <androndo@gmail.com>
(cherry picked from commit
|
||
|
|
1dc45c6ec6 |
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
|
||
|
|
9967676a68 |
fix(backups): delete the Velero backup of a failed BackupJob
When a Velero strategy run ended Failed or PartiallyFailed, no Backup was
created, and the Backup finalizer was the only code that asked Velero to
delete backup data. The failed backup.velero.io object, labelled for the
BackupJob but not owned by it, stayed in the bucket with its partial
resources and logs until Velero's TTL (720h by default) expired it, and
deleting the BackupJob did not remove it.
The strategy now requests the deletion through a DeleteBackupRequest before
it marks the job Failed, and the failure message is still read from the
Velero backup first. A direct delete is not enough, because the BSL sync
recreates the object from the object store. A reconcile of a Failed
BackupJob, which used to return at once, now requests deletion of every
Velero backup still labelled for the job. That retries a request that could
not be created and removes backups that earlier versions leaked, after an
upgrade. A Velero backup that a Backup references (the job failed after its
Backup was created) is left alone, and one still running is polled until
Velero accepts a request for it. The sweep matches on the job labels, so it
also covers the Velero backup of a failed Kubernetes strategy run.
The request is named after the Velero backup, and the Backup finalizer uses
the same helper, so repeated reconciles converge on one request. Nothing is
created while another request for the backup is pending. A request that
Velero processed with errors is replaced, because Velero keeps it for a day
and its name would block the retry until then. A job with more than one
Velero backup now fails with a message that names them, not with an empty
one.
Fake-client unit tests cover Failed and PartiallyFailed runs, a repeated
reconcile, leftovers of already Failed jobs (no request, a pending request,
a request processed with errors, a Backup-referenced backup, a running
backup) and the unchanged Succeeded path.
Closes: #5355
Assisted-by: LLM
Signed-off-by: Andrey Kolkov <androndo@gmail.com>
(cherry picked from commit
|
||
|
|
529b3b6729 |
fix(lineage, kubernetes): resolve CAPK node VMs to their cluster (#5124)
<!-- 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
The virt-launcher pods of Kubernetes worker nodes are never marked as
managed by the lineage webhook, so anything that relies on the webhook
having resolved them misses them. The visible symptom: a SecurityGroup
attached to a `Kubernetes` application labels the control-plane pods but
never the worker nodes, because the securitygroup-controller caches only
pods carrying `internal.cozystack.io/managed-by-cozystack=true`.
**Root cause.** The webhook is not skipped for these pods (they do not
carry the managed-by label, so the `objectSelector` lets them through);
it runs and fails to resolve their owner chain. The walk goes Pod →
VirtualMachineInstance → VirtualMachine and stops there: the Cluster API
KubeVirt provider creates the VirtualMachine with no ownerReference and
links it to its KubevirtMachine through the
`capk.cluster.x-k8s.io/kubevirt-machine-{name,namespace}` labels only.
With no ownerReference, no HelmRelease kind and no
`helm.toolkit.fluxcd.io/name` label on the VM, `WalkOwnershipGraph`
returns no ancestor, `computeLabels` returns nothing and the pod is
admitted unmanaged. The
`apps.cozystack.io/application.{group,kind,name}` labels the pods do
carry come from the `KubevirtMachineTemplate` in
`packages/apps/kubernetes-nodes/templates/nodegroup.yaml`, not from the
webhook.
**Measured on a v1.6.5 cluster.** Every Kubernetes cluster on it showed
the same shape (three clusters across two tenants). For one worker node:
the pod carries the three lineage labels but not `managed-by-cozystack`;
the pod is owned by its VMI and the VMI by its VM; the VM has no
ownerReferences, and its labels include
`capk.cluster.x-k8s.io/kubevirt-machine-name` and
`capk.cluster.x-k8s.io/kubevirt-machine-namespace` pointing at a
KubevirtMachine in the same namespace. From there ownerReferences run
KubevirtMachine → Machine → MachineSet → MachineDeployment → Cluster,
and the CAPI Cluster carries `helm.toolkit.fluxcd.io/name:
kubernetes-<name>`. The bridge is one hop. Setting
`managed-by-cozystack=true` by hand on a worker's virt-launcher pod made
the securitygroup-controller stamp the membership label within ten
seconds.
**Fix.** `WalkOwnershipGraph` now follows a VirtualMachine without
ownerReferences to the KubevirtMachine named by its CAPK labels, and
keeps walking from there. Node pods then resolve to the parent
`Kubernetes` application, which is the attribution the machine template
already hard-codes, and they get `managed-by-cozystack` like every other
managed pod. The bridge is only taken when the label names the VM's own
namespace: CAPK can target an external infrastructure cluster, and the
walk must never attribute an object across namespaces. The webhook's
ClusterRole already grants `get` on every resource, so no RBAC change is
needed.
**Why at the source rather than in the consumer.** Relaxing the
securitygroup-controller's pod cache to
`apps.cozystack.io/application.kind` Exists would also have fixed the
symptom, but it would leave every other consumer of the managed-by label
blind to node pods, and it would rest membership on labels the webhook
never vouched for. Stamping `managed-by-cozystack` from the machine
template was ruled out too: the `objectSelector` would then skip these
pods entirely, and they would lose the scheduling-class injection the
webhook performs on every pod.
**Blast radius.** Only objects below a CAPK VM change: the VMI, the
virt-launcher pods and the PVCs of the VM's `dataVolumeTemplates` now
get the lineage labels of their Kubernetes application. None of them
match a resource selector of the `Kubernetes` ApplicationDefinition, so
they get `tenantresource=false`. Nothing selects PVCs on
`application.kind=Kubernetes` (the Velero strategy selects `VMDisk`).
The `-userdata` cloud-init Secret CAPK creates is not affected either
way: at the pinned provider commit, `reconcileKubevirtBootstrapSecret`
creates it with the bootstrap Secret's labels and no ownerReferences, so
the walk reaches neither the VM nor the KubevirtMachine from it, before
or after this change. Existing node pods pick the labels up on their
next admission (recreation, live migration, or any update).
**Tests.** `pkg/lineage/capk_test.go` builds the observed chain in a
fake dynamic client and checks that a worker's virt-launcher pod
resolves to `Kubernetes/cluster-a`, that a VM pointing at a
KubevirtMachine in another namespace is not followed, that a VM without
CAPK labels still has no ancestor, and, in a table of negative cases,
that the CAPK labels are ignored on any object other than a
`kubevirt.io/v1` VirtualMachine (another kind of the `kubevirt.io`
group, a VirtualMachineInstance, a VirtualMachine of another group or
version). Weakening the kind and API version guard to match on either
field alone fails all four cases. With the bridge disabled, the first
test fails. No chainsaw case: the only suites that bring up worker VMs
are `kubernetes-latest` and `kubernetes-previous`, whose shared runner
script is already over its time budget, and the unit test covers the
walk exactly as it runs in the webhook.
### 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. -->
### 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(lineage, kubernetes): the virt-launcher pods of Kubernetes worker nodes are now resolved to their Kubernetes application and marked as managed by Cozystack, so a SecurityGroup attached to a Kubernetes cluster now applies to its worker nodes, not only to its control plane.
```
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **New Features**
* Lineage results now connect supported virtual machines to their
associated machine and Kubernetes application when the required
association labels are present.
* **Bug Fixes**
* Association tracing is limited to supported virtual machine resources
and machines in the same namespace. Unlabelled standalone virtual
machines and machines in another namespace do not gain ancestors through
this association.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Backported-from:
|
||
|
|
51d4668029 |
test(backups): remove the Altinity strategy tests' scratch directories
Every test in hack/altinity-backup-strategy.bats made a directory with
mktemp -d and never removed it, so each passing run of the file left
nine directories in TMPDIR, and they pile up on any machine that keeps
it between runs.
Each test now removes its directory as its last statement. A failed
assertion aborts the body before that line, so a failing test keeps
its stub log and rendered script for inspection.
Assisted-by: LLM
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
(cherry picked from commit
|
||
|
|
150d36e0f6 |
fix(platform): do not gate cert-manager-issuers on ClusterIssuer readiness (#5210)
## What this PR does
This PR makes the cert-manager-issuers release stop waiting for
ClusterIssuers to become Ready. ClusterIssuer is Ready only after
cert-manager registered an ACME account with the CA, so when
letsencrypt-stage can't reach the staging endpoint, helm upgrade of the
release hangs until timeout with `timeout waiting for:
[ClusterIssuer/letsencrypt-stage status: 'InProgress']`. The release
stays not Ready and every package that dependsOn cozystack.cert-manager
stays in DependencyNotReady, even when letsencrypt-prod works and all
certificates are already issued.
Fix is `healthCheckExprs` with `current: "true"` for ClusterIssuer on
the component, the same mechanism vm-default-images uses. It covers the
prod issuer too, I did not special-case staging because the wait is the
same.
Issuers keep their own status and retry registration, so they start
issuing when the CA is back. Certificate requests that come before that
stay Pending with `IssuerNotReady`, they are not failed.
Downside is that unreachable CA no longer shows up as non-Ready Package.
Only signal left is ClusterIssuer's own Ready condition and Certificates
at `Ready=False`, and there is no alert on ClusterIssuer in monitoring
packages yet.
On a cluster where the release is already stuck, the running upgrade has
to time out first (10m by default), then the retry uses the new spec.
letsencrypt-stage is still rendered on every cluster. Making it optional
needs a migration, because the issuers carry
`platform.cozystack.io/no-delete`, so it is not part of this PR.
Checked on a 3-node dev cluster running v1.7.0. I made the staging ACME
host unreachable from the cert-manager controller, so letsencrypt-stage
went to Ready=False with ErrRegisterACMEAccount, and forced an upgrade
of cert-manager-issuers. Without the expression the release hung in the
upgrade action and 23 releases went to DependencyNotReady within 15
seconds (67 of 124 at the peak). I then added the expression to the
PackageSource by hand, since I did not install a build of this branch.
The stuck upgrade ran until its timeout, the retry came right after it
and the release was Ready within 2 seconds, a second forced upgrade took
8 seconds, and all 124 releases converged with letsencrypt-stage still
False. After I made the host reachable again the issuer registered by
itself in about 30 seconds.
### Screenshots
### 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
fix(platform): the cert-manager-issuers release no longer waits for ClusterIssuers to become Ready, so an unreachable ACME endpoint (staging included) does not hold other platform packages in DependencyNotReady.
```
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **Bug Fixes**
* Updated cert-manager issuer release checks to use the ClusterIssuer’s
current status and polling. Releases are no longer held up by ACME
readiness, which can remain unavailable even when issuance may recover
without intervention. This also helps prevent dependent packages from
being delayed while waiting for ACME services to become reachable.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Backported-from:
|
||
|
|
8df659f84e |
test(lineage): reject CAPK labels on objects that are not KubeVirt VMs
The bridge from a VirtualMachine to its KubevirtMachine is guarded by
the object's API version and kind, but no test exercised that guard:
weakening it to match on either field alone still passed, and let a
labelled kubevirt.io Cluster or a VirtualMachine of another group
resolve to the Kubernetes application.
Assisted-by: LLM
Signed-off-by: Mattia Eleuteri <mattia@hidora.io>
(cherry picked from commit
|
||
|
|
bf60f024d8 |
fix(backups): restore the ClickHouse archive a Backup was taken as
The Altinity strategy named each archive inside its Pod with date -u
and recorded nothing on the Backup, so a restore could only guess: it
listed the remote archives under the application's prefix and took the
newest. A RestoreJob of an older Backup therefore restored whichever
backup had run last.
The controller now names the archive before it creates the backup Job,
from the BackupJob's persisted StartedAt, so every reconcile and every
retried Pod of the Job writes the same one. The name is recorded in the
Backup's driverMetadata next to the strategy parameters, and a restore
renders it into the strategy Pod, which restores exactly that archive
and fails, naming it, when remote storage no longer holds it. The name
is recorded only when the Job's Pod was given it, so a Job created by
an earlier controller, or a strategy that names its own archives,
leaves the Backup without one instead of pointing it at an archive
that does not exist.
Because a retried Pod reuses the name, it waits on an attempt the
sidecar is still running instead of being refused with 423, and asks
for resume, so a local or partial remote backup an earlier attempt left
is completed rather than refused as existing.
Backups taken before names were recorded stay restorable: the Pod picks
the newest archive whose name is stamped no later than the Backup's
takenAt, which is set only after the backup Job finished, and logs a
warning that the choice is a best effort.
Assisted-by: LLM
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
(cherry picked from commit
|
||
|
|
9061f9a5e1 |
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
|
||
|
|
9ca427589e |
fix(lineage, kubernetes): resolve CAPK node VMs to their cluster
The Cluster API KubeVirt provider creates a node's VirtualMachine
without an ownerReference and links it to its KubevirtMachine through
the capk.cluster.x-k8s.io/kubevirt-machine-{name,namespace} labels
only. The ownership walk therefore stopped at the VM, found no
ancestor, and the lineage webhook left every object below it unmanaged:
the virt-launcher pods of worker nodes never got
internal.cozystack.io/managed-by-cozystack, while still carrying the
application lineage labels copied from the machine template.
Anything that relies on the webhook having resolved those pods misses
them. The securitygroup-controller caches only managed pods, so a
SecurityGroup attached to a Kubernetes application labelled the
control-plane pods and never the nodes.
Follow the CAPK labels from the VM to its KubevirtMachine, whose
ownerReferences reach the CAPI Cluster and from there the cluster's
HelmRelease. Only a KubevirtMachine in the VM's own namespace is
followed: CAPK can target an external infrastructure cluster, and the
walk must never attribute an object across namespaces.
Signed-off-by: Mattia Eleuteri <mattia@hidora.io>
Assisted-by: LLM
(cherry picked from commit
|
||
|
|
97d3e0f367 |
fix(controller): carry healthCheckExprs and waitStrategy to existing releases (#5087)
## What this PR does
This PR syncs `healthCheckExprs` and `waitStrategy` from
ApplicationDefinition to HelmReleases that already exist. cozystack-api
writes both fields only when it builds a release, and the definition
reconciler copied chartRef, valuesFrom, disable-wait setting and labels
but not these two, so release created before its definition got
expressions keeps waiting on objects the definition already exempts.
Most visible case is vm-disk. Every disk created before the DataVolume
`current: "true"` expression was added still waits on its DataVolume, so
after platform upgrade an existing disk with import still in progress
fails the upgrade after 10 minutes with `timeout waiting for:
[DataVolume/<namespace>/vm-disk-<name> status: 'InProgress']`, then
retries forever and holds one of 5 workers of its helm-controller shard.
Reconciler now derives both fields same way the API does
(`config.ResolveWaitStrategy`) and syncs them in both directions, so
existing release ends up same as freshly written one. On current
definitions only vm-disk (DataVolume) and postgres (KEDA ScaledObject)
set expressions, both `current: "true"`, so this can only relax waits.
Releases of other kinds have nothing to sync and are not rewritten.
HelmReleases rendered by another chart (tenant modules like Etcd,
Ingress, Monitoring) carry Flux origin label
`helm.toolkit.fluxcd.io/name` and are skipped, their gate comes from
their own chart. Their chartRef is still synced as before.
Failed update was logged and dropped before, and nothing requeues the
definition for hours after that. Now errors are returned, so a conflict
is retried.
Unit tests cover both sync directions, `waitStrategy: legacy` without
expressions, no rewrite of in-sync release (nil vs empty slice too),
chart-rendered and other-kind releases left alone, and update failure
returned as error.
Fixes #4409
### 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
fix(controller): existing HelmReleases now get `healthCheckExprs` and `waitStrategy` from their ApplicationDefinition. vm-disk and postgres releases created before these expressions were added stop waiting on DataVolume and KEDA ScaledObject during upgrades.
```
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **Bug Fixes**
* Helm releases now synchronize health-check expressions and wait
strategies configured in their application definition, including when
those values are removed or no expressions are specified.
* Releases with chart-rendered health-check settings retain those
settings, and releases outside the matching application kind are
unaffected.
* Update failures are now reported during reconciliation, while updates
to other releases continue. Reconciliation can retry after a failed
update.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Backported-from:
|
||
|
|
ccdaa77791 |
fix(seaweedfs): remove identities left behind by deleted BucketAccesses (#4915)
## What this PR does Removes SeaweedFS identities left behind by deleted BucketAccesses. The COSI driver up to v0.3.1 revokes only from the legacy `identity.json`, while SeaweedFS since 4.08 keeps each identity in its own file, so those files stayed (seaweedfs/seaweedfs-cosi-driver#11). The upstream driver v0.4.0 from #5284 deletes the file on revoke, so no new files are left. Files that v0.3.1 already left behind still hold working keys and stay until something removes them. A post-install/post-upgrade hook in `seaweedfs-system` removes them. It lists the identity files before the BucketAccesses, so a file whose BucketAccess still exists is never taken for a left-over one. The rest of the rules are in the commit message and at the top of the script. When it is unsure, it removes nothing, and the errors it handles do not fail the release. A filer that other clusters use through Client topology holds identities whose BucketAccesses this cluster cannot see. The new `cosi.orphanIdentities` value of the SeaweedFS application decides what happens there. The default `auto` only reports when `filer.grpcHost` is set and removes otherwise, and an operator can force `report` or `delete`. This builds on #4893, which is now merged. Tested with bats against a fake `weed shell` and with helm-unittest. A mutation that swaps the two listings back makes the ordering test fail. An earlier revision of the script, which also skipped recently changed files, was tried on a live cluster with SeaweedFS 4.45 and driver v0.3.1. It only reported in report mode and removed left-over files in delete mode while live identities kept working. With BucketAccess listing forbidden, it removed nothing. The current revision has not been run on a live cluster. No run has checked that the keys of a removed identity are then rejected. On |
||
|
|
9cc4accbe7 |
fix(controller): carry healthCheckExprs and waitStrategy to existing releases
cozystack-api writes healthCheckExprs and the resolved wait strategy
from the ApplicationDefinition only when it builds a HelmRelease, and
the definition reconciler that keeps existing releases in step copied
neither. A release created before its definition exempted an object
kept waiting on that object at every upgrade. For vm-disk that is
every disk created before the DataVolume expression was added: a disk
whose import is still running after a platform upgrade fails the
upgrade at the timeout and, under RetryOnFailure, retries forever
while holding a helm-controller worker.
The reconciler now derives both fields the way the API does, in both
directions, so an existing release ends up with what a fresh write
would produce. On the shipped definitions this only relaxes waits: the
vm-disk DataVolume and the postgres KEDA ScaledObject. A release that
another chart renders carries Flux's origin label and keeps the gate
its chart sets.
A failed update used to be logged and dropped, and nothing else
re-enqueues the definition for hours, so that release stayed out of
sync. The errors are now returned and the definition is retried.
Fixes https://github.com/cozystack/cozystack/issues/4409
Assisted-by: LLM
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
(cherry picked from commit
|
||
|
|
d54b11f14f |
fix(postgres): accept a standard five-field backup schedule (#5119)
## What this PR does
The postgres app hands `backup.schedule` to a CloudNativePG
`ScheduledBackup`, and the field asks for the six-field CloudNativePG
cron with leading seconds. The mongodb app takes a standard five-field
cron in the same field, and so do backup Plans and the Plan form in the
console, so tenants copy a value from one app into the other and support
has to explain the difference.
CloudNativePG does not reject a five-field value. CloudNativePG 1.30.0,
which main pins, parses the schedule with `cron.Parse` from robfig/cron
v1.2.0 in both the ScheduledBackup webhook and the controller. That
parser takes five or six fields, reads the first one as seconds and
makes day-of-week optional, and the webhook only returns a warning when
the count is not six. CloudNativePG's own webhook test "warn the user if
the schedule has a wrong number of arguments" covers this with `1 2 3 4
5`. So `0 2 * * *`, meant as every day at 02:00, fires every hour at
minute 2, and `5 * * * *` fires every minute.
The chart now counts the fields. A five-field value gets a leading `0`
seconds field, so `0 2 * * *` renders `0 0 2 * * *`. A six-field value
and a descriptor such as `@daily` or `@every 6h` render exactly as
before. Any other field count fails the render with a message that shows
both forms, where before it reached the webhook and was rejected there.
An empty schedule still renders no ScheduledBackup. The field
description that the dashboard form shows and the README now name both
forms.
One thing changes on upgrade. A release that already sets a five-field
value gets the standard meaning of it, so `0 2 * * *` moves from hourly
to daily. Before this change such a value was outside the documented
format and drew the webhook warning.
`packages/system/keycloak` renders its own CloudNativePG ScheduledBackup
from its `backup.schedule`, with a six-field default and a values
comment that says so. It is a platform component with its own template,
so it is not changed here. The other apps with a backup schedule
(mongodb, mariadb, clickhouse) and backup Plans already take five
fields.
- Ran robfig/cron v1.2.0 `Parse` locally from 10:00:00. `5 * * * *`
fires at 10:00:05, 10:01:05 and 10:02:05, and `0 2 * * *` at 10:02:00
and 11:02:00. With the leading `0` they fire at 10:05:00 and 11:05:00,
and daily at 02:00.
- Rendered the whole chart with helm 3.17.3 and the `configured` render
fixture. The output matches main for the defaults, for `0 2 * * * *` and
for `@daily`, and for `0 2 * * *` only the `schedule` line differs.
Unit tests with `helm unittest` 1.1.2, the version CI pins.
`packages/apps/postgres` passes 216 of 216 in 27 suites, against 209 in
26 on main. The new suite has seven cases. With the old template five of
them fail. The six-field and descriptor cases pass on both, and they
fail when the template prepends to six fields too or drops the
descriptor check.
### Screenshots
Not a UI change. The dashboard form picks up the new field description
from the schema.
### Downstream repositories
Walked the trigger map in `docs/agents/contributing.md` against the
diff. A chart template, a new test suite, one field description and the
README, schema, Go types and cozyrd regenerated from it. No field is
added, removed or renamed and no default or enum changes. The terraform
provider does not model `backup.schedule`. The website reference page
for postgres is generated from this README on a stable tag, and the Go
types example there uses a six-field schedule, which keeps working.
- [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
fix(postgres): backup.schedule accepts a standard five-field cron such as 0 2 * * *, and the chart prepends a 0 seconds field before handing it to CloudNativePG, which reads the first field as seconds. Six-field values and descriptors render as before, and any other field count fails the render. A release that already sets five fields gets the standard meaning on upgrade, so 0 2 * * * moves from hourly to daily.
```
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **New Features**
* PostgreSQL backup schedules support standard five-field cron
expressions as well as six-field expressions with a leading seconds
field. Five-field schedules are converted automatically; six-field
schedules and cron descriptors are used as provided.
* **Schedule Changes**
* After upgrading, `0 2 * * *` runs daily at 02:00 instead of hourly at
minute 2. To keep the previous hourly schedule, use `0 2 * * * *`.
* Invalid schedule formats produce a rendering error. Empty schedules
continue to disable chart-managed backups.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Backported-from:
|
||
|
|
9d15a98369 |
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
|
||
|
|
2fab060973 |
fix(opensearch): disable the Base64 intrinsics hit by CVE-2026-114938 (#5373)
## What this PR does
CVE-2026-114938 ("Java4Shell") is an out-of-bounds write in the AVX-512
VBMI Base64 decoder of OpenJDK 17.0.6 and later. OpenSearch decodes the
Basic credentials of a request before it authenticates it, so on an
x86-64 node with AVX-512 VBMI a tenant's cluster can be attacked by
anyone who reaches its HTTP port.
Two of the three versions the `opensearch` application offers bundle an
affected JDK, and OpenSearch has not released a build on a patched one
yet:
| Image | Bundled JDK | Affected |
|---|---|---|
| `opensearchproject/opensearch:3.0.0` | 21.0.7 | yes |
| `opensearchproject/opensearch:2.11.1` | 17.0.8 | yes |
| `opensearchproject/opensearch:1.3.20` | 11.0.25 | no |
This PR starts the nodes with `-XX:-UseBASE64Intrinsics`, the mitigation
[RHSB-2026-018](https://access.redhat.com/security/vulnerabilities/RHSB-2026-018)
recommends: it removes the vulnerable code path and keeps the other
AVX-512 optimizations.
The flag is delivered as a `jvm.options.d` file mounted from a ConfigMap
through `general.additionalVolumes`, because neither obvious route
works:
- `bin/opensearch-env` unsets `JAVA_TOOL_OPTIONS`, so an env var never
reaches the JVM;
- setting `nodePools[].jvm` makes the operator stop sizing the heap from
the memory request and use the string as is.
The operator mounts `general.additionalVolumes` into the node pools and
the bootstrap pod alike, and `restartPods` restarts them when the file
changes.
Verified by starting 3.0.0, 2.11.1 and 1.3.20 with the file mounted:
each server JVM runs with `-XX:-UseBASE64Intrinsics`, and the heap
passed in `OPENSEARCH_JAVA_OPTS` still applies after it. `helm unittest`
passes (156 tests), including a new suite. Not tested through the
operator on a live cluster.
Notes for the reviewer:
- This is a mitigation, not a fix. A version bump has to wait for an
OpenSearch release on a patched JDK.
- Upgrading restarts every OpenSearch cluster once.
- The securityadmin update Job is left alone: it is a client and accepts
no inbound connections. OpenSearch Dashboards is Node.js.
- The commit picks onto `release-1.7` cleanly and conflicts in
`templates/opensearch.yaml` on `release-1.6` (checked with a merge-tree
dry run).
### Screenshots
N/A — no UI changes.
### Downstream repositories
Walked the trigger map against the diff: one template, one new template
and one unit test under `packages/apps/opensearch`; no values key,
`values.schema.json`, README, version enum or default changes.
- [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
fix(opensearch): mitigate CVE-2026-114938 (Java4Shell) by starting OpenSearch nodes with -XX:-UseBASE64Intrinsics, which disables the vulnerable OpenJDK Base64 decoder. Every OpenSearch cluster restarts once on upgrade.
```
Backported-from:
|
||
|
|
9863aa926e |
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
|
||
|
|
600a268351 |
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
|
||
|
|
1969353801 |
fix(dashboard): link a tenant row to its detail page (#4004)
## What this PR does
Fixes #3822
Tenant list showed name as plain text and the only link in a row was
Edit button, so tenant detail page with its tabs and Delete was
reachable only by opening edit form and cancelling out of it. Name cell
is a link to that page now, it appears exactly where Edit appears and
points to the same CR. Plain click switches selected tenant to the row's
parent first, same as Edit does, because detail page takes namespace
from selected tenant. Ctrl, cmd and shift click don't run that switch,
so the tab you open a tenant from stays where it was.
First commit fixes what the link depends on. Console recovers a tenant's
parent from namespace name (`tenant-a-b` sits under `tenant-a`), but
root is the one level that naming skips: tenant `acme` ordered in
`tenant-root` owns `tenant-acme`, not `tenant-root-acme`. So
`realParentNamespace` returned undefined for every top level tenant,
which is most tenants on a normal cluster, and Edit button has been
missing there for as long as it exists. Ancestor labels carry the parent
that the name does not. Root level tenant named `root-x` resolves to CR
`root-x` now, not `x`.
### Notes
I first tried to make links carry their tenant in the url (`?tenant=`),
so a detail page opened in new tab resolves on its own. That turned into
questions about tenant context itself: what to do with a tenant in a
link the user can't see, what localStorage may hold, and TenantNamespace
LIST ignoring `labelSelector`. Detail route addresses a Tenant CR by
relative name and takes namespace from selected tenant, and making that
robust is a refactor of tenant context and routing, which should start
with study and planning, not with patches on patches. So this PR only
closes the UX gap (no way from tenant list into a tenant's page), going
deeper is out of scope.
Known limit that comes with it: link has no tenant in it, so opening it
in a new tab (ctrl/cmd/middle click, open in new tab, copied url)
resolves against the tenant last selected in any tab, because selection
lives in shared localStorage. For a row directly under that tenant it
opens the right page. For a row deeper in the tree the page says
`Application <name> not found.` and there is no Delete. If that tenant
also has a direct child tenant with the same relative name, new tab
opens that other tenant's page with working Edit and Delete, and delete
confirm says only `Delete Tenant "<name>"?`. Plain click in the same tab
is not affected. Detail page's own tabs and Edit link already behave
this way, it's how detail route resolves its namespace today and fixing
it properly is the refactor above.
A row links, and offers Edit, exactly when namespace holding its Tenant
CR is one the apiserver returns to this user. It returns a tenant
namespace only if the user is subject of a RoleBinding in it, so
sub-tenant admin that cant act in `tenant-root` sees no link there.
No row level Delete button. Issue allows either that or a route to
detail page, I took the route so confirm and mutation stay in one place.
Covered by tests, every source change here fails a test when reverted:
- top level tenant, nested one, root level tenant named `root-x`, forest
root without ancestor labels
- bridged row whose real parent is invisible gets neither link nor Edit
- plain click switches to the row's parent and opens detail page
- ctrl click leaves selection and location alone
### Screenshots
Tenant list under root on a dev cluster. Every row name is a link to
tenant page now (`pr4078` is hovered), top level tenants had neither
link nor Edit before. Host column redacted.
<!-- SCREENSHOT: drag in 01-tenant-list-links.png here -->
<img width="1440" height="900" alt="01-tenant-list-links"
src="https://github.com/user-attachments/assets/39cd723a-1ac5-4d3b-8c36-b70ddc626961"
/>
### 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:
All changed files are under `packages/system/dashboard/images/console`,
console has no downstream copy (standalone UI repo is archived).
### 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(dashboard): tenant name in the tenant list links to its detail page now (where Delete is), and top level tenants get their Edit button back.
```
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **Bug Fixes**
* Root-level tenant names are now displayed without incorrectly removing
prefixes, and tenants ordered directly under the root are correctly
recognized in the hierarchy.
* Tenant rows link to their detail pages when the parent tenant is
accessible. Same-tab navigation updates the active tenant, while opening
a link in another tab leaves the current selection unchanged.
* Edit links and navigation now use consistent tenant routes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Backported-from:
|
||
|
|
330e8c516f |
fix(opensearch): disable the Base64 intrinsics hit by CVE-2026-114938
CVE-2026-114938 is an out-of-bounds write in the AVX-512 VBMI Base64
decoder of OpenJDK 17.0.6 and later, reachable on x86-64 hosts with
attacker-supplied Base64. OpenSearch decodes the Basic credentials of a
request before it authenticates it, so a tenant's cluster is exposed to
anyone who can reach its HTTP port.
Two of the three versions this chart offers bundle an affected JDK:
opensearchproject/opensearch:3.0.0 carries 21.0.7 and 2.11.1 carries
17.0.8. 1.3.20 carries 11.0.25, which is not affected. OpenSearch has
not released a build on a patched JDK yet.
Start the nodes with -XX:-UseBASE64Intrinsics, which removes the
vulnerable code path and leaves the other AVX-512 optimizations in
place. It is delivered as a jvm.options.d file mounted from a
ConfigMap, because neither obvious route works: bin/opensearch-env
unsets JAVA_TOOL_OPTIONS, and setting nodePools[].jvm makes the
operator stop sizing the heap from the memory request. The operator
mounts general.additionalVolumes into the node pools and the bootstrap
pod alike.
Rolling this out restarts every OpenSearch cluster once.
Tested with helm unittest, and by starting 3.0.0, 2.11.1 and 1.3.20
with the file mounted: each server JVM runs with the flag, and the heap
passed in OPENSEARCH_JAVA_OPTS still applies.
Assisted-by: LLM
Signed-off-by: Andrey Kolkov <androndo@gmail.com>
(cherry picked from commit
|
||
|
|
1a494cef41 |
fix(tenant): stop the gateway release waiting on TenantGateway listeners and certificates (#5086)
## What this PR does
After platform upgrade the tenant `gateway` HelmRelease fails with
`timeout waiting for: [TenantGateway/<namespace>/cozystack status:
'InProgress']`, retries every 30s without end (`RetryOnFailure`) while
holding a helm-controller worker, and parent tenant release that waits
on it fails too.
helm-controller waits on every object of the release with kstatus on
install and on every upgrade, and kstatus reads TenantGateway
`Ready=False/ListenersNotReady` as InProgress. TenantGateway stays there
while any listener certificate is pending, which depends on ACME or DNS
and on routes owned by other releases, so waiting longer doesn't help.
It passed before only because the wait runs inside a Helm action and the
install happened before those listeners showed up.
I added `healthCheckExprs` for `TenantGateway` with `current: "true"`
and pinned `waitStrategy: poller`, because expressions are evaluated
only under poller. Wait stays on. Flux returns InProgress while
`status.observedGeneration` lags `metadata.generation` before it reads
any expression, so release still waits until controller observed the new
TenantGateway spec, but not for listeners or certificates. tenant-root
renders same template and gets the change too. Gateway release that is
already stuck picks this up on its next attempt, after the current one
times out.
New helm-unittest suite
(`packages/apps/tenant/tests/gateway_wait_test.yaml`) pins the strategy
and the whole expression list, checks there is no `disableWait` on
install or upgrade, and that no gateway release is rendered when
`gateway` is unset.
### 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
fix(tenant): the tenant gateway release no longer times out on upgrade while TenantGateway listener certificates are pending, it waits only until the controller has observed the current TenantGateway spec.
```
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **Bug Fixes**
* Gateway releases now determine readiness from the gateway resource’s
current status, rather than waiting for its listeners and certificates
to become ready. Releases still wait for the latest resource update to
be observed.
* **Tests**
* Added checks for gateway release readiness behavior and for tenants
configured without a gateway.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Backported-from:
|
||
|
|
663cf9edf8 |
fix(dashboard): link a tenant row to its detail page
The tenant list rendered the name as plain text and put the row's only
link on an Edit button, so nothing in the list reached the detail page
that every other kind gets, tabs and a Delete action included. The only
way there was to open the edit form and cancel out of it.
The name cell becomes a link wherever Edit is offered, to the same CR.
The detail page reads the namespace from the tenant context, so a plain
click aligns the context to the row's parent first, the way Edit
already does. React runs that handler for a ctrl-, cmd- or shift-click
too, which the browser turns into a new tab or window, so it runs only
for the click that navigates its own tab; otherwise opening a tenant
beside the current one would move the tab left behind as well.
Assisted-by: LLM
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
(cherry picked from commit
|
||
|
|
772f08b966 |
fix(monitoring-agents): let the release uninstall when the VictoriaMetrics operator is gone first (#5152)
<!-- Thank you for making a contribution! Here are some tips for you:
- Use Conventional Commits for the PR title: `type(scope): description`
- Add the label `kind/backport` if it's a bugfix that needs to be
backported to a previous version.
-->
## What this PR does
Disabling the Monitoring Agents addon of a tenant Kubernetes cluster
leaves `<cluster>-monitoring-agents` (release `cozy-monitoring-agents`,
installed into the tenant cluster) in `UninstallFailed` for good. Seen
in production on 1.6.5 and still reproducible from `main`.
`monitoring-agents`, `victoria-metrics-operator` and
`vertical-pod-autoscaler-crds` in
`packages/apps/kubernetes/templates/helmreleases/` are all gated on
`addons.monitoringAgents.enabled`, so they disappear together and Flux
uninstalls them in parallel: `dependsOn` is not honoured on deletion.
Two things then break the uninstall of `monitoring-agents`:
1. The VictoriaMetrics operator is often gone first. The operator's
`apps.victoriametrics.com/finalizer` stays on the `VMAgent`, nobody
removes it, and the deletion hangs. The manual workaround was to strip
the finalizer, after which GC removes the VMAgent's Deployment, Service,
Secrets and ServiceAccount through their owner references.
2. The VPA CRD was deleted with its own release while the stored
manifest still contains `VerticalPodAutoscaler vpa-vmagent`, so Helm
cannot build the manifest to uninstall. That root cause is fixed by
#3586 (`helm.sh/resource-policy: keep` on the tenant addon CRDs), which
this PR does not redo.
This PR:
- adds a `pre-delete` hook (`templates/vm-cleanup-hook.yaml`) that
deletes every VictoriaMetrics object the release owns, waits up to 60s
for a live operator to finalize them properly, and clears their
finalizers by hand when it has not. Objects are selected through Helm's
`meta.helm.sh/release-name` / `release-namespace` annotations rather
than by name, so the 34 `VMRule`s rendered from `alerts/` and the
`VMServiceScrape` in `cozy-victoria-metrics-operator` are covered along
with the VMAgent. The kinds handled are every VictoriaMetrics kind the
chart renders: `VMAgent`, `VMRule`, `VMServiceScrape`, `VMPodScrape`,
`VMNodeScrape`. Operator v0.68.4 only finalizes the VMAgent; the other
kinds are covered in case another operator version finalizes them, and
for them the patch is a no-op. A kind whose CRD is already gone is
skipped, and the script always exits 0, since a failing pre-delete hook
would itself block the uninstall. The Job is bounded by
`activeDeadlineSeconds: 180` and `backoffLimit: 0`; its kubectl calls
carry no `--request-timeout`, which would make kubectl skip the
in-cluster credentials (`hack/check-hook-request-timeout.bats`) and
reuses the digest-pinned `docker.io/clastix/kubectl:v1.32` image the
etcd-operator hook uses, via a new `kubectlImage` value. The shape
follows
`packages/system/forklift/templates/forklift-cr-cleanup-hook.yaml`.
- guards `templates/vpa.yaml` on `.Capabilities.APIVersions.Has
"autoscaling.k8s.io/v1/VerticalPodAutoscaler"`, so a cluster that does
not serve the CRD never records a VPA in the release manifest. Cheap
defence in depth next to #3586.
Points for review:
- The hook's RBAC is a ClusterRole/ClusterRoleBinding, limited to `get,
list, delete, patch` on the five `operator.victoriametrics.com`
resources, rather than Roles. The objects span two namespaces, and a
Role in `cozy-victoria-metrics-operator` could not be created if that
namespace were already gone or terminating, which would fail the hook
and the uninstall with it. All hook objects carry
`hook-succeeded,hook-failed,before-hook-creation` except the Job, which
keeps a failed pod for its logs (`ttlSecondsAfterFinished: 600`), as in
the forklift hook.
- When the operator is already gone, clearing the finalizer skips
whatever the operator does on finalize, notably the cluster-scoped RBAC
it creates for the VMAgent, which has no owner reference. That residue
is the same the manual workaround left, and it is no worse than today's
stuck release; removing it would mean hard-coding the operator's naming
scheme for those objects, which I preferred not to do.
- When the operator is alive, the hook only brings forward deletions
Helm was about to make, so the operator's normal finalization still
runs.
Tests: `tests/uninstall_test.yaml` asserts that the hook is a
`pre-delete` Job in the release namespace with a bounded runtime, that
its RBAC is hook-scoped and grants exactly the verbs needed on every
VictoriaMetrics kind the chart renders, that the binding targets the
hook's ServiceAccount, that the script selects by release ownership,
deletes, clears finalizers and exits 0, and that the VPA renders only
when the capability is present (using `capabilities.apiVersions`). With
the hook removed and `vpa.yaml` reverted, 6 of the 7 tests fail; with
the fix, `helm unittest packages/system/monitoring-agents` passes 26/26.
`hack/monitoring-agents-vm-cleanup-hook.bats` runs the rendered script
against a fake `kubectl` that keeps the objects in a state file, with
fake `date` and `sleep`. It checks that only objects annotated for this
release are deleted and patched, that with the operator gone the hook
polls through the grace period and then clears the finalizers, that a
live operator's objects are never patched, that a missing CRD still
exits 0 and cleans the other kinds, and that a release with nothing left
exits 0 without deleting anything. Removing the ownership condition,
making the patch a no-op, or inverting the polling condition each turns
this file red. The hook has not yet been run on a live tenant cluster.
Backport: labelled `kind/backport` (release-1.7). The release-1.6
backport is done by hand in #5158. The commit cherry-picks onto
`release-1.6` with a single trivial conflict in `values.yaml` (context
only: 1.6 lacks the `prometheus-node-exporter` resources block the new
`kubectlImage` block sits after on `main`). Resolved locally, the
chart's tests pass on 1.6 (9/9); 1.6's chart renders the same
VictoriaMetrics kinds. Note that `release-1.6`'s monitoring-agents
`Makefile` has no `test:` target, so CI does not run this chart's unit
tests on that branch.
### Screenshots
Not a UI change.
### Downstream repositories
I walked the trigger map against the diff (a system chart's templates,
`values.yaml` and tests): no package added or renamed, no platform
values, no app schema, no CRD, no tooling or convention change. I also
searched cozystack/website for a documented VMAgent finalizer workaround
that this would make obsolete and found none.
- [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
fix(monitoring-agents): disabling the Monitoring Agents addon of a tenant Kubernetes cluster no longer leaves the monitoring-agents release stuck in UninstallFailed when the VictoriaMetrics operator is removed first; a pre-delete hook now releases the VictoriaMetrics objects' finalizers, and the VPA is only rendered when its CRD is served.
```
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **Bug Fixes**
* VictoriaMetrics resources belonging to a release are cleaned up during
uninstall, including resources that remain because of finalizers.
Cleanup is limited to resources owned by that release.
* Vertical Pod Autoscaler resources are rendered only when the cluster
supports the required API.
* **Configuration**
* Added an image setting for the uninstall cleanup job, including a
pinned image version and pull policy.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Backported-from:
|
||
|
|
eca11fa58f |
fix(tenant): stop the gateway release waiting on TenantGateway listeners and certificates
helm-controller waits on every object of a release with the kstatus
poller on install and on every upgrade. kstatus reads a TenantGateway at
Ready=False/ListenersNotReady as InProgress, and a TenantGateway sits
there whenever one listener certificate is pending, which depends on
ACME or DNS and, under HTTP-01, on routes that other releases own. After
a platform upgrade the gateway release therefore times out, retries
without end under RetryOnFailure, holds a helm-controller worker
meanwhile, and fails the tenant release that waits on it. It used to
pass because health is judged only inside a Helm action: the release
was installed while the TenantGateway had no status yet or was still
Ready, and the listeners whose certificates do not issue came later
with other releases' routes.
An always-true expression replaces kstatus for TenantGateway and keeps
the wait on. Flux checks status.observedGeneration against the
generation before it evaluates any expression, so the release still
waits until the controller has observed the new spec, but not for
listener or certificate health. The poller strategy is set explicitly
because expressions are only evaluated under it.
Assisted-by: LLM
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
(cherry picked from commit
|
||
|
|
b56db7d4ec |
fix(dashboard): resolve the Tenant CR of a tenant ordered in the root
A tenant's CR lives in its parent's namespace, and the console recovered
the parent from the namespace name: `tenant-a-b` sits under `tenant-a`.
The root is the one level that naming skips. A tenant `acme` ordered in
`tenant-root` owns `tenant-acme`, not `tenant-root-acme`, so the prefix
test never matched a top-level tenant and `realParentNamespace` returned
undefined for it. That is most tenants on a normal cluster, and the Edit
button, offered only where the CR's namespace resolves, was missing for
all of them.
The ancestor labels carry the parent the name does not, so the lookup
falls back to `tenant-root` when the chain names it. Deriving the CR name
keys on the parent being the root rather than on the child's name
happening to start with it, which keeps a root-level tenant called
`root-x` from resolving to the CR `x`, and the row label agrees with it
rather than showing `x`.
Assisted-by: LLM
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
(cherry picked from commit
|
||
|
|
217b22021e |
fix(monitoring-agents): let the release uninstall when the VictoriaMetrics operator is gone first
Disabling the Monitoring Agents addon of a tenant cluster removes this
release, the VictoriaMetrics operator and the VPA CRDs together, and
Flux deletes them in parallel without honouring dependsOn. When the
operator goes first, nothing clears apps.victoriametrics.com/finalizer
on the VMAgent and the other VictoriaMetrics objects this chart created,
so they stay Terminating and the release sits in UninstallFailed for
good.
Clearing those finalizers has to happen inside the uninstall and must
never be what blocks it, and a live operator still has to get the first
chance to finalize its objects. Only objects of this release may be
touched, and release names are unique only within a namespace, so the
release name alone does not identify them. kubectl loads in-cluster
credentials only while the client config is otherwise default, which a
--request-timeout breaks. A VPA recorded in the release manifest while
its CRD is not served cannot be mapped at uninstall either.
Assisted-by: LLM
Signed-off-by: Mattia Eleuteri <mattia@hidora.io>
(cherry picked from commit
|
||
|
|
8398e8044b |
fix(kamaji): drop kubelet config fields older tenants do not know (#4896)
## What this PR does
Older tenant Kubernetes versions receive kubelet config fields they do
not know. The pinned Kamaji 26.9.4-edge build uses the Kubernetes 1.37
libraries to render `kube-system/kubelet-config`:
| Field | Known since | Rendered for tenants |
| --- | --- | --- |
| `memoryReservationPolicy` | 1.36 | v1.31 to v1.35 |
| `mergeDefaultEvictionSettings` | 1.33 | v1.31 to v1.32 |
| `crashLoopBackOff` | 1.32 | v1.31, as `crashLoopBackOff: {}` |
On a v1.35 tenant, `kubeadm join` logs:
```text
configset.go:176 error unmarshaling configuration schema.GroupVersionKind{Group:"kubelet.config.k8s.io", Version:"v1beta1", Kind:"KubeletConfiguration"}: strict decoding error: unknown field "memoryReservationPolicy"
```
Nodes still join, because kubeadm only logs this and decodes leniently,
dropping the field. Anything that decodes this ConfigMap strictly fails.
The compatibility patch drops these fields when the tenant version
predates them, including fields added by a user JSON patch. Supported
fields are kept. The version checks conservatively treat a pre-release
as older than its minor; early alpha releases can lack that minor's
fields. A running tenant gets the cleaned ConfigMap the next time Kamaji
uploads it.
JSON removals cannot fully replace this on the current build: Kamaji
decodes patched JSON back into a Go struct, restoring a removed
`crashLoopBackOff` as `{}`. The kubernetes chart also does not render
`kubelet.configurationJSONPatches`.
Upstream fixed JSON patch removal in 26.10.4-edge (clastix/kamaji#1347).
With that bump, the chart can render version-dependent removals and
replace this compatibility patch. This PR keeps the fix for 26.9.4-edge.
The regression tests cover field presence for tenants v1.31 to v1.37,
selected pre-releases, user patches, invalid versions, defaults and
`UploadKubeletConfig` with a fake client. The image build runs the tests
of packages touched by its patches.
Tested on Linux:
- Against upstream Kamaji commit
`1c3d84ae94473e94945ad01b2540ec319478bce4`, the new tests fail with the
current main patch in the three compatibility tests. With this patch,
the Go tests in every package touched by the patches pass, and the
Kamaji build succeeds.
- The repository unit lane passes.
I did not run a strict-decoding matrix against each Kubernetes minor for
this version.
### Screenshots
Not a 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
fix(kamaji): stop writing kubelet config fields that older tenant Kubernetes versions do not know, such as memoryReservationPolicy on tenants before v1.36, so strict decoders of the kubelet-config ConfigMap no longer fail.
```
Backported-from:
|
||
|
|
ef1869a56b |
fix(vpa): shorten the admission webhook timeout to 5s (#5242)
## What this PR does
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
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.
Seen on Cozystack (Talos, 3 nodes) after a full shutdown and power-on:
the Cilium DaemonSet stayed at 1/3 and Kube-OVN's `ovn-central` could
not reach quorum until `vpa-webhook-config` was deleted. Once it was
deleted, everything recovered, and VPA re-registered its webhook on
start.
A mutation takes milliseconds; 5s keeps slow responses working and keeps
the total wait of the sequential Pod CREATE webhooks well inside the
request deadline. Uses the admission controller's documented
`--webhook-timeout-seconds` flag through the chart's `extraArgs`.
Refs #3125 (this covers the VPA part of it; `lineage` and
`linstor-scheduler-admission` are separate). Supersedes #4903, rebased
onto current `main` (no conflicts); `helm unittest` of the chart passes.
### Screenshots
No UI change.
### Downstream repositories
Walked the trigger map: the diff is one value in
`packages/system/vertical-pod-autoscaler/values.yaml` (a system package,
no app schema, no platform value, no tooling).
- [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:
### Release note
```release-note
[vpa] Shorten the VPA admission webhook timeout to 5s so pod creation does not stall cluster-wide while the admission controller is unreachable.
```
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **Configuration**
* The vertical pod autoscaler admission controller now uses a 5-second
webhook timeout.
* Configuration comments clarify the timeout and its behavior during Pod
creation.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Backported-from:
|
||
|
|
3bd9c71d69 |
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
|
||
|
|
324703189e |
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
|
||
|
|
8e3f5572a8 |
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
|
||
|
|
df6b721ccf |
fix(ingress): restore visitor IPs through SSL passthrough (#5443)
## What this PR does
Closes #5327.
With `cloudflareProxy: true`, HTTPS reaches nginx through
ssl-passthrough on loopback, so an IP whitelist sees `127.0.0.1` instead
of the visitor and rejects legitimate Cloudflare traffic. This change
validates the original transport peer before the whitelist, restoring
the visitor IP for Cloudflare requests without reopening the spoofing
fixed by #4444.
Direct HTTPS requests that bypass Cloudflare still appear as
`127.0.0.1`, as before.
### Validation
- `helm unittest packages/extra/ingress`: 34/34 tests passed, including
a separate run with helm-unittest 1.1.2.
- `make --directory=packages/extra/ingress show NAMESPACE=tenant-root`:
passed against the test cluster after rebasing on `upstream/main`.
- On an isolated ingress-nginx v1.11.6 controller, `nginx -t` passed.
Spoofed headers over HTTP and HTTPS returned 403. A trusted Cloudflare
PROXY-protocol source with an allowed visitor passed the whitelist and
the access log contained the visitor IP; an untrusted source or a
visitor outside the whitelist returned 403.
- A real Cloudflare end-to-end request was not tested.
### Screenshots
Not applicable; this PR does not change the UI.
### 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
fix(ingress): restore visitor IP handling for Cloudflare-proxied HTTPS through ssl-passthrough while rejecting spoofed `CF-Connecting-IP` headers before IP whitelists
```
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **Bug Fixes**
* Cloudflare-proxied ingress accepts `CF-Connecting-IP` only from
trusted Cloudflare address ranges and returns HTTP 403 when an untrusted
source provides the header.
* When no PROXY protocol address is available, source checks use the
direct connection address.
* Loopback addresses are included in trusted real-IP ranges, and the
existing keepalive setting is preserved.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Backported-from:
|
||
|
|
f2d4305cdd |
fix(ingress-nginx): turn off TLS session tickets for CVE-2026-97629 (#5407)
## What this PR does
Turns off TLS session tickets in the ingress-nginx controller
(`ssl-session-tickets: "false"`).
[CVE-2026-97629](https://nginx.org/en/security_advisories.html): with
session tickets on and no fixed ticket key, nginx rotates its ticket
keys and, before 1.30.6 and 1.31.7, leaves one of them uninitialized in
the worker processes, which may allow a session to be forged. The
platform sets tickets on and no `ssl-session-ticket-key`, so it runs
exactly that path, and the controller nginx 1.25.5 does not carry the
fix ([`fdedba03`](https://github.com/nginx/nginx/commit/fdedba031b))
yet. It will come with the next rebuild of the controller image; this
change closes the hole without waiting for it.
What it costs is small. TLS session resumption keeps working through
`ssl_session_cache`, which the controller has on. And with no fixed
ticket key every pod had its own keys, so a ticket never resumed a
session on another replica anyway.
`make test` in the chart passes.
### Screenshots
N/A, no UI changes.
### Downstream repositories
Walked the trigger map against the diff: one controller ConfigMap value
in `packages/system/ingress-nginx/values.yaml`. No package, platform
values key, schema or app README changes.
- [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
fix(ingress-nginx): TLS session tickets are turned off in the ingress-nginx controller (CVE-2026-97629). TLS session resumption keeps working through the shared session cache.
```
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **Security**
* SSL session tickets are now disabled for ingress connections. TLS
session resumption remains available through the shared session cache,
so existing session reuse behavior continues without session tickets.
This changes how session resumption is handled while preserving the
cache-based option.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Backported-from:
|
||
|
|
96ff9948de |
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
|
||
|
|
0a370428a9 |
fix(cozystack-basics): make the tenant super-admin VirtualMachine grant read-only (#4797)
<!-- 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
`cozy:tenant:super-admin:base` granted `'*'` on
`kubevirt.io/virtualmachines`, so a tenant super-admin could create a
`VirtualMachine` of any size in their namespace, or edit the one a
`VMInstance` release rendered and raise its guest size. Such a VM is not
a HelmRelease the tenant ordered, so nothing that accounts for
applications sees it. The grant arrived in #516 together with a `'*'` on
`helmreleases`; that one was removed since, this one was not.
Nothing in tree needs the write. Power goes through the
`virtualmachines/start|stop|restart` subresources and console/VNC
through the VMI subresources, both granted at the `use` level; size,
disks and networking go through `VMInstance` values; Forklift's Plan
admission check runs against the migration-controller's own service
account, not the tenant. The rule becomes `get`, `list`, `watch`.
`watch` stays on purpose: the dashboard's power controls and VNC/serial
tabs watch the `VirtualMachine` for its live state, and no other tenant
role grants it.
The tenant roles are aggregated from ClusterRoles in several packages
(`cozystack-basics`, `backup-controller`, `migration-controller`,
`cozystack-scheduler`), so a write path can reach a tenant without
touching the role that names it. A new test in
`hack/e2e-install-cozystack.bats`, right after `tenant-test` is created,
reads the effective rules of the `tenant-test-super-admin` group back
from the apiserver in a single `SelfSubjectRulesReview`, fails if that
review reports itself incomplete or carries an `evaluationError` (both
of which `kubectl auth can-i --list` lets through with exit 0),
subtracts what a bare `system:authenticated` identity already holds, and
fails on any write verb that
`hack/e2e-tenant-super-admin-write-verbs.yaml` does not name. A line
covered by a wildcard grant is folded into it, so a new
`apps.cozystack.io` kind does not need an allowlist edit. An allowlisted
entry the cluster does not grant is printed without failing, for lanes
that disable a package through `COZY_DISABLED_PACKAGES`. The allowlist
sits under `hack/e2e-*.yaml`, which `select-e2e.sh` already escalates to
the full suite. A helm-unittest on the role catches the same regression
on the unit lane.
Verified outside CI on a throwaway k3s v1.33 loaded with the rendered
tenant ClusterRoles and the tenant RoleBindings, through
`hack/cozytest.sh`: with `main`'s roles the test fails and names
`virtualmachines.kubevirt.io - *`; with this change it passes; with the
migration-controller roles removed it passes and prints the eight
`forklift.cozystack.io` entries as not granted. The two awk programs
give the same result under mawk and dash (`ubuntu:24.04`) as on macOS.
The new helm-unittest fails against `main`'s template and passes here.
`hack/bats-runner-coverage.bats`, `hack/bats-no-exit-trap.bats` and
`hack/select-e2e_test.bats` pass.
This change is the standalone fix of the RBAC prerequisite described in
the tenant-quota design proposal, cozystack/community#48, where review
asked for it to land on `main` independently of that design.
### Screenshots
No UI 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:
Walked the trigger map against the diff: an RBAC narrowing in
`cozystack-basics` plus e2e harness files touch no values key, CRD,
`ApplicationDefinition`, package list or tooling path. The one website
page that patches `virtualmachines.kubevirt.io` directly,
`networking/virtual-router.md`, is a procedure that "requires a
Cozystack administrator account", which this change does not affect.
### Release note
```release-note
fix(cozystack-basics): tenant super-admins can no longer create, edit or delete `kubevirt.io` VirtualMachines directly; they keep read and watch. Virtual machines are managed through VMInstance and VMDisk applications, power through the start/stop/restart actions. The install e2e now fails when a tenant super-admin gains a write verb outside a checked-in allowlist.
```
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **Access Control**
* Tenant super-admins can view KubeVirt virtual machines with read-only
permissions through the base role; it no longer grants broad write
access to these resources.
* Tenant super-admin write permissions are checked against an explicit
allowlist. Permissions outside the approved list cause the end-to-end
check to fail, while approved permissions not currently granted do not.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Backported-from:
|
||
|
|
29203456a9 |
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
|
||
|
|
5f1f53ec8c |
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
|
||
|
|
f4dac53bc7 |
fix(platform): bump system PostgreSQL to 17.12 (#5403)
## What this PR does
Moves the PostgreSQL image pin of the system databases from
`17.7-standard-trixie` to `17.12-standard-trixie`.
PostgreSQL 17.7 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.
The pin lives in the `Cluster` templates of five system databases, and
the charts expose no value for it, so a release is the only way to move
them:
- Keycloak (`keycloak-db`)
- Harbor
- Grafana (`grafana-db`)
- Alerta (`alerta-db`)
- SeaweedFS (`seaweedfs-db`), together with its unit test
What an upgrade does on a running cluster:
- Every system database on a 17.x image is moved to 17.12. CloudNativePG
rolls the replicas first and then restarts the primary in place.
- The primary restart goes through the smart shutdown window (180
seconds by default) while clients hold connections, followed by a short
hard interruption. Plan for a few minutes per database.
- A database that was moved to another major keeps its image, as before.
The image variant and the Debian release do not change, so glibc and ICU
stay the same under the data directory and no index needs a rebuild.
Verified on live clusters, on both the 1.6 line (CloudNativePG 1.28) and
the 1.7 line (CloudNativePG 1.30):
- a two-instance cluster and a real Keycloak database went from 17.7 to
17.12 with identical row counts, `amcheck` clean on every btree index,
and streaming replication restored;
- Keycloak reported healthy, database check included, after the roll;
- collation versions were the same before and after.
Not in this PR: the tenant `postgres` application. It uses a different
image family and needs separate handling.
Migration 37 keeps its 17.7 target on purpose: it is a one-time step for
clusters coming from older releases, and the chart moves them to 17.12
right after.
### Screenshots
N/A — no UI changes.
### Downstream repositories
Walked the trigger map against the diff: five `Cluster` templates under
`packages/system/` and one unit test. No value, schema, API, CRD,
variant, package or asset changes.
- [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
fix(platform): system PostgreSQL databases (Keycloak, Harbor, Grafana, Alerta, SeaweedFS) move from 17.7 to 17.12-standard-trixie, which fixes CVE-2026-116331. On upgrade each of these databases is rolled: replicas first, then the primary is restarted in place, with a brief interruption of a few minutes per database.
```
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **Updates**
* Updated the default PostgreSQL image to version 17.12 across database
services. Existing custom image handling remains unchanged.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Backported-from:
|
||
|
|
333e027d41 |
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
|
||
|
|
603a8318d9 |
fix(harbor): meter the registry bucket under the registry WorkloadMonitor (#5392)
## What this PR does
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.
### 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
<!-- 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(harbor): Harbor registry storage is billed again. The WorkloadMonitor controller finds BucketClaims by label, and the registry BucketClaim had no labels. It now carries the registry monitor's `release` and
`component` labels, so its storage shows up as Workload under the registry WorkloadMonitor, the same way the registry PVC did before it moved to S3. And also registry WorkloadMonitor now reports not operational while the BucketClaim is not provisioned
```
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **Improvements**
* Harbor registry storage claims now include release and component
labels, making them identifiable as part of the Harbor system and
registry.
* Registry workload monitoring now selects storage claims using these
labels.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Backported-from:
|
||
|
|
14049d98b2 |
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
|
||
|
|
aa9161d134 |
fix(api): validate workload memory before storing an application (#5348)
## What this PR does
The application API accepts `memory: 8` and stores an eight-byte
workload request. On main, #5009 catches it later when Helm renders the
chart. This patch returns HTTP 422 to the caller on create, upsert, or
an update that introduces such a value.
The check follows declared workload resource fields in the chart schema.
An unrelated edit to an existing application with a smaller value still
passes admission. Existing chart checks continue to apply at render
time. A tenant's zero memory quota and arbitrary chart configuration
keep their existing meaning.
The regression tests exercise the REST create and update paths and
verify that a rejected edit leaves storage untouched. The same change
passed the application registry package tests on main and on
release-1.7. Related to #5004 and #5009.
### 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
fix(api): reject new workload memory values below 1Mi before storing an application. Updates to unrelated fields on existing applications with smaller values still pass admission.
```
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **Bug Fixes**
* Application creation and updates reject workload memory settings below
the supported minimum of 1 MiB. Values at or above the minimum are
accepted, and existing below-minimum values may remain unchanged.
* Memory settings in quotas and free-form configuration are not
affected. When concurrent updates occur, memory is rechecked against the
latest stored values, preserving repairs and preventing stale updates
from restoring below-minimum settings.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Backported-from:
|
||
|
|
86f2f3f801 |
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
|
||
|
|
052094a5e1 |
fix(api): make monitor watch versions usable as delete preconditions (#5326)
## What this PR does
A resourceVersion from an Application watch event triggered by a
WorkloadMonitor can now be used as a delete precondition. Today such a
delete always gets 409, because the event carries the monitor's version
and it never matches the HelmRelease.
The event keeps the monitor's version. #2356 added it so a status-only
change reaches informer handlers: client-go's shared informer treats an
update with an unchanged resourceVersion as a resync and hides it from
handlers that are not resyncing. That reason still holds.
The event is now built from a release no older than the monitor. The
cached release is used when it is new enough, otherwise the release is
read live. Before this, the spec came from a cache that can lag behind
the monitor, so the version and the spec in one event could describe
different states. The event carries the newer of the two versions.
A delete precondition is checked against the live release, and only an
older value is a conflict. A newer value is safe to accept because
HelmReleases and WorkloadMonitors live in one etcd, so their versions
come from one sequence. If the live release is still not newer than the
value the client sent, it has not changed since the event's spec was
read. A malformed precondition now gets 400 instead of 409.
Update is not touched. On main it overwrites the caller's
resourceVersion on conflict. #5234 makes it strict with the same rule.
### Limitations
- Late or replayed monitor event. The two backing watches are not
ordered, and a resumed watch replays monitors. When an event would
repeat a version the client may already hold, it falls back to the
monitor's own version, and the object's version steps back. A delete
with that version gets 409 at least until the object's next release
event or monitor change. No write is lost.
- Watch start. An application whose monitors are older than its release
gets an extra MODIFIED event with the lower monitor version. The same
409 window applies.
- Cost. At start and on reconnect a watch reads the release live once
per monitor written after its release last changed. After that it is at
most one live read per monitor status change per open watch. A monitor
whose release is gone or not cached yet now costs a live 404 per event,
where main skipped the event.
- A release event that comes after a monitor event already carried its
version is hidden from informer handlers. Its spec already arrived, and
each monitor's own change still arrives. With several monitors per
application it no longer corrects another monitor's status taken from a
lagging cache. That problem exists on main too: #5325.
- A live read gets one minute, retries included. When it runs out, the
watch ends and the client reconnects. There is no fallback to the cache:
it would pair a stale spec with a newer version again.
- Resuming a watch can still skip an undelivered HelmRelease change of
another application, same as on main: #5324.
Checked consumers: the in-tree console, the Terraform provider (GET then
PUT, no watch), and a downstream UI. None of them filters events by
resourceVersion equality.
### Screenshots
Not a 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
fix(api): a resourceVersion from a WorkloadMonitor-triggered Application watch event now works as a delete precondition, and the event's spec matches its version.
```
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **Bug Fixes**
* Application watch events now report consistent resource versions,
including when updates arrive out of order or are replayed after
reconnecting.
* Watch events use current release data when cached data is missing or
outdated, retry transient read failures, and stop promptly when the
watch is canceled or times out.
* Deletion requests validate supplied resource versions against the
latest release, preventing stale requests from deleting newer changes
and returning clear errors for invalid versions.
* **Tests**
* Added coverage for watch-event version handling, read retries and
cancellation, replay behavior, and deletion requests with current,
stale, or invalid versions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Backported-from:
|
||
|
|
0f0b91aa19 |
fix(api): validate workload memory before storing an application
A memory quantity without a unit is measured in bytes. Reject new values
below 1Mi before storing them, while allowing unrelated API edits to
applications that already carry a smaller value. The check runs against
the live release right before the write, so a stale value read at the
start of Update cannot overwrite memory another writer has fixed since.
Assisted-by: LLM
Signed-off-by: Yan Bondarenko <202671653+yankawai@users.noreply.github.com>
(cherry picked from commit
|