mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-30 12:16:03 +09:00
57bb0d703f5f25fb945a130bbafa36d09b7ea219
5049
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
57bb0d703f |
feat(cozyplane): give tenants the cozyplane API through cozy:tenant
The cozyplane chart's tenant roles aggregate into the built-in admin/edit/view ClusterRoles, which no Cozystack tenant is bound to, so VPC self-service was Forbidden for every tenant. The wrapper carries them across: one role aggregates the chart's edit role into cozy:tenant (the tenant ServiceAccount Flux applies tenant releases as) and the admin tier, another the view role into the view tier. Aggregating the chart's roles instead of copying their rules keeps the list of tenant kinds the chart's to maintain, the NAT gateways and route tables the last re-vendor added included. Assisted-by: LLM Signed-off-by: Timofei Larkin <lllamnyp@gmail.com> |
||
|
|
02914f60ec |
refactor(cozyplane): vendor the charts inside wrapper charts
cozyplane is an upstream project and must not carry anything Cozystack-specific, so each of the three packages now follows the umbrella pattern the rest of packages/system uses: the upstream chart lives verbatim under charts/<name>, re-vendored by make update from a pinned ref, and every Cozystack setting lives in the wrapper. The wrapper owns the Talos overlays (KubePrism, the 00- conflist), the apiserver's etcd storage class, which the platform used to inject and the chart's own default contradicted, and the apiserver's replica count, now two since it backs every tenant's SDN API. The platform nests the egress values it threads under the cozyplane subchart key. Rendered output is unchanged apart from the replica count. The update target extracts into a temporary directory and replaces the chart only once the download has succeeded. Assisted-by: LLM Signed-off-by: Timofei Larkin <lllamnyp@gmail.com> |
||
|
|
952e05836d |
fix(cozystack-api): stop serving sdn.cozystack.io when serveSDN is off
serveSDN=false removed only the sdn APIService. The binary still installed the group, so its /openapi/v3 index kept listing apis/sdn.cozystack.io/v1alpha1 beside the server that owns the group (cozyplane-apiserver in the cozyplane variant). kube-aggregator merges every APIService backend's index and serves a group-version from whichever backend it meets first in map order, so the index hash and the spec request often land on different backends. The backend answers the stale hash with a 301, the aggregator refuses to forward it, and `kubectl explain` fails for every kind in the group with "the backend attempted to redirect this request, which is not permitted"; when the two do match, kubectl gets cozystack-api's SecurityGroup-only spec and reports the other kinds as missing. The chart now passes --serve-sdn=false with serveSDN off, and the server then leaves the group uninstalled. Assisted-by: LLM Signed-off-by: Timofei Larkin <lllamnyp@gmail.com> |
||
|
|
2065b7a523 |
feat(cozyplane): bump to VPC egress and the netlink retry
Re-vendor at upstream a0f32e2. VPC egress becomes NAT gateways, route tables and routes in sdn.cozystack.io (lllamnyp/cozyplane#65), served by the aggregated apiserver like the other tenant kinds; the gateways' leased port blocks are a new NATPortBlock kind in the local group, the only new CRD. VPCGateway's nat.enabled keeps working as a transition: the controller creates and owns a NATGateway, a default RouteTable and a default route per family, adopting the existing NAT Services so the egress address does not change. The agent also retries netlink dumps the kernel interrupted, instead of failing them (lllamnyp/cozyplane#67). Chart-side the change is the matching agent, controller and tenant RBAC and the image pin; the kpr image is unchanged. Assisted-by: LLM Signed-off-by: Timofei Larkin <lllamnyp@gmail.com> |
||
|
|
2c3f9f125d |
chore(cozyplane): bump to the stand-fix builds
Re-vendor from upstream main: kpr's svc_vips reconciler is supervised and dials the configured apiserver endpoint rather than dying silently with the default one (lllamnyp/cozyplane#57), and the agent re-creates the FabricIP claim of a pod that already holds the address instead of wedging it (lllamnyp/cozyplane#58). Both are binary fixes, so both image pins move; the charts themselves are unchanged. Assisted-by: LLM Signed-off-by: Timofei Larkin <lllamnyp@gmail.com> |
||
|
|
81bac71eee |
chore(cozyplane): re-vendor at the hardened-chart build
Brings in the upstream review fixes (lllamnyp/cozyplane#52-#54): kpr's cilium.io RBAC wildcard is dropped outright — the wired cells watch only Services/EndpointSlices and node-local Pods/Namespaces, proven on a cluster serving no cilium.io group at all; controller leader election is on with its leases Role, so raising replicas can no longer run uncoordinated writers; the agent's per-VPC metrics are authenticated (TokenReview/SubjectAccessReview, secure by default, fail-closed) and bound to the node's primary address — the values file documents that an existing anonymous scrape gets 401 until the shipped cozyplane-metrics-reader ClusterRole is bound to the monitoring ServiceAccount; and the chart comments that shipped inside rendered manifests are trimmed to mechanism statements with doc pointers. The cozyplane image pin moves to the build carrying the agent changes; the kpr binary is unchanged, so its pin stays. Assisted-by: LLM Signed-off-by: Timofei Larkin <lllamnyp@gmail.com> |
||
|
|
2149b53070 |
build(cozyplane): vendoring recipe for the Cilium CRDs
The two policy CRDs were copied by hand with nothing recording where from, so they would drift from the cilium package's upstream bumps with no signal. The Makefile pins the Cilium release (the in-tree files are byte-identical to its upstream CRDs) and make update re-fetches them. Assisted-by: LLM Signed-off-by: Timofei Larkin <lllamnyp@gmail.com> |
||
|
|
673cd43d28 |
fix(platform): pin the apiserver etcd to the local storage class
The chart default is the replicated class, written into the EtcdCluster's storageClassName — a field that is immutable post-create. A fresh install without that class leaves the PVCs Pending and the sdn apiserver down, recoverable only by deleting the EtcdCluster and with it every sdn object. The platform now sets the class on the component: local, because a 3-member etcd already replicates at the application level and the local class exists before any replication pool is configured. Assisted-by: LLM Signed-off-by: Timofei Larkin <lllamnyp@gmail.com> |
||
|
|
296ce0bf7f |
fix(platform): validate the cozyplane variant's networking inputs
An empty networking.podCIDR rendered an empty egress.clusterCIDR, which silently drops the agent's masquerade and the controller's internal denies; a non-IPv4 serviceCIDR made the clusterDNS octet derivation die with an index error that names no field. Refuse both legibly: the variant requires podCIDR and serviceCIDR, and a service CIDR the derivation cannot read requires an explicit networking.clusterDNS. Assisted-by: LLM Signed-off-by: Timofei Larkin <lllamnyp@gmail.com> |
||
|
|
f0d1a802f0 |
feat(platform): cozyplane networking variant
An opt-in bundles.system.networkingVariant for the isp-full (Talos) bundle: "cozyplane" swaps kube-ovn, Cilium and kube-proxy for the cozyplane eBPF CNI, its aggregated sdn.cozystack.io apiserver and the cozyplane-kpr socket-LB proxy. The default "kubeovn-cilium" renders identically to main. The variant drops the packages that assume the replaced stack — kubeovn-webhook/-plunger, multus, securitygroup-controller, the virtualprivatecloud app — and turns off sdn aggregation in cozystack-api, since cozyplane owns the group. The selector is validated before any branch is taken: accepted off isp-full it would half-apply, stripping the kube-ovn control plane and the sdn APIService while the Cilium networking package keeps running; and the default "cilium" gateway class is refused on cozyplane, where nothing serves it. The platform's networking.podCIDR and serviceCIDR (and clusterDNS, derived from the service CIDR when not set explicitly) are threaded into the cozyplane component, so the egress masquerade and the VPC gateways' internal denies match the cluster rather than the chart defaults. CiliumNetworkPolicy objects apply but are not enforced on this variant; the values comment, the networking source and the threat model say so, and the threat model records the SecurityGroup split: cozyplane's is a first-class tenant instrument for traffic inside and across VPCs, not cozystack-api's projection onto CiliumNetworkPolicy. Tenant isolation rebuilt on native NetworkPolicy + HostFirewall is a follow-up. Assisted-by: LLM Signed-off-by: Timofei Larkin <lllamnyp@gmail.com> |
||
|
|
12260c43b0 |
feat(cozystack-api): gate the sdn APIService
cozyplane serves sdn.cozystack.io through its own aggregated apiserver; a second APIService for the group from cozystack-api would hijack it and 404 every kind but SecurityGroup. cozystackAPI.serveSDN (default true, so nothing changes off the cozyplane variant) lets the platform turn exactly that APIService off; the suite pins that the toggle removes it and nothing else. Assisted-by: LLM Signed-off-by: Timofei Larkin <lllamnyp@gmail.com> |
||
|
|
f28354eb7f |
feat(cozyplane): ship Cilium policy CRDs inert
Many stock components (linstor, tenant, monitoring-agents, ...) embed CiliumNetworkPolicy objects and fail to install without the CRDs. On the Cilium variants the cilium chart provides them; the cozyplane variant runs no Cilium, so this package ships the two policy CRDs (vendored verbatim from Cilium 1.19.5) purely so those manifests apply. Nothing enforces them — the platform docs and threat model say so, and rebuilding tenant isolation on what cozyplane does enforce (native NetworkPolicy, HostFirewall) is a follow-up. Assisted-by: LLM Signed-off-by: Timofei Larkin <lllamnyp@gmail.com> |
||
|
|
4e35e52421 |
feat(cozyplane): vendor the sdn apiserver chart
The aggregated apiserver serves sdn.cozystack.io (VPC tenancy, policy) and is a separate package precisely so the CNI slot stays cert-manager-free: this component needs cert-manager Certificates, the etcd-operator and, for its PVC-backed etcd, storage — with no cycle, since linstor depends on the CNI rather than on this. The tenant kinds deliberately have no CRDs: one group served by both a CRD and an APIService collides in the kube-apiserver's OpenAPI merge and the group's schema never serves. The etcd is an etcd-operator v1alpha2 EtcdCluster in certManager TLS mode, PVC-backed on the replicated class by default (its objects are cluster state; a memory-backed member loses them on a full-cluster restart), addressed through the operator's Service because the operator names member pods randomly. The helm-unittest suite pins the EtcdCluster shape and the Service endpoint. Assisted-by: LLM Signed-off-by: Timofei Larkin <lllamnyp@gmail.com> |
||
|
|
aafed8e571 |
feat(cozyplane): vendor the kube-proxy replacement
cozyplane-kpr imports Cilium's LB control plane and socket-LB as the cluster's only service proxy — a separate component and image from the CNI agent on purpose, since it carries Cilium's cell framework. It dials KubePrism on Talos for the same bootstrap reason the agent does, needs its node name (downward API) to tell node-local endpoints apart — without it no external address is served — and keeps DSR strictly opt-in, because the fleet-wide LB-IP spoof permission DSR needs is an underlay property. The helm-unittest suite pins those three. Assisted-by: LLM Signed-off-by: Timofei Larkin <lllamnyp@gmail.com> |
||
|
|
28d54a2591 |
feat(cozyplane): vendor the eBPF CNI chart
packages/system/cozyplane vendors chart/cozyplane from lllamnyp/cozyplane (ref-pinned; make update re-vendors and re-applies the Cozystack-side Chart.yaml version stanza). The CNI slot installs before everything else, so its dependency floor is the kube API alone: the chart ships only the LOCAL group's CRDs (local.sdn.cozystack.io, underlay IPAM) — the tenant kinds are served by the aggregated apiserver, packaged separately. On Talos the agent and resolver bootstrap against KubePrism (localhost:7445), because with no kube-proxy the kubernetes.default ClusterIP is unserved until cozyplane-kpr runs, and kpr needs the agent. The helm-unittest suite pins exactly that platform contract: the KubePrism endpoint, the 00- conflist precedence over a co-installed CNI, and the LOCAL-group-only CRDs. Assisted-by: LLM Signed-off-by: Timofei Larkin <lllamnyp@gmail.com> |
||
|
|
d88322197f |
chore(deps): roll up Renovate updates and raise dependencies to latest stable (#4869)
## What this PR does One PR instead of separate Renovate PRs. Go modules, Dockerfile base images and GitHub Actions move to newer versions that build and pass the tests. Where a newer version is known to break something, it stays behind, and `.github/renovate.json` holds it with the reason in the rule description. The tests come first, in their own commits: - `make go-unit-tests` runs the Go tests under `pkg/` and `cmd/`, except the backport-batch suite, which keeps its own target. The apiserver serializer and fuzz tests, the generated OpenAPI and applyconfiguration suites, the apis packages and the controller, operator and observability-proxy commands did not run in CI before. - The apps API surface that apiserver libraries shape is pinned: server-side apply, content negotiation, Table output on watch, the served OpenAPI v2 and v3 documents, and building the server without etcd. Two answers look wrong and are pinned as they are today: applies from different field managers never conflict (#4857), and protobuf is refused with 406 even when the client offers JSON as a fallback (#5297). - New tests cover the kubeovn webhook patch, the token proxy session cookie and the mount-utils behaviour the kubevirt CSI node service relies on. - `hack/image-smoke.bats` checks the tools the CSI, LINSTOR, multus, Harbor and redis-backup images take from their base images or build stages, and that the kubevirt CSI node plugin and its sidecars need no more than x86-64-v2. Each PR build job runs it against the images it pushed; forks and the unit lane run no container. The tests found two bugs: - The kubeovn webhook dereferenced a nil pointer on an admission review without a request, so the caller got a dropped connection instead of a 400. - The token proxy cookie refresh never fired: securecookie decodes the session times as int64 and the refresh looked for float64, so the `--cookie-refresh=1h` the chart sets did nothing. A refreshed cookie keeps the token's expiry. A session too large to encode now shows an error at sign-in and leaves the current cookie alone on refresh. What moved: - GitHub Actions to their Node 24 majors. The flux action stays on the tag of the Flux CLI it installs. The release job's checkout no longer persists credentials, so its staging branch push uses the App token. - Go 1.27.2 for the toolchain and builders. Builds that reproduce an upstream release keep the Go upstream uses: Harbor, cilium-operator, SeaweedFS and the chainsaw stage of the e2e sandbox. - controller-runtime v0.25.2, gateway-api v1.6.3 on the minor of the installed v1.6.1 CRDs, cel-go v0.30.0, grpc v1.84.0, etcd v3.7.2, cert-manager v1.21.2, kubevirt csi-driver f10ae94 on Kubernetes v0.37.1. - Node 24 for the dashboard console. Held back, each with its reason in the Renovate rule: - cel-go stays below v0.31: the old repository has no tags past v0.30.0, and v0.32 moves to cel.dev/cel-go, which k8s.io/apiserver does not import. - kube-openapi stays on the commit its dependencies require, and structured-merge-diff stays on v6, because k8s.io/apimachinery v0.37 does not compile against v7. - The Flux API modules stay on the Flux v2.8 line the platform installs. - gomodules.xyz/jsonpatch stays on v2, which controller-runtime's admission.Patched takes. - jwx stays on v3: v4 removes jwk.Cache, which the token proxy's JWKS refresh is built on. - kubevirt.io/api and the CDI API stay where upstream csi-driver builds. - The kubevirt CSI driver image stays on AlmaLinux 9, because AlmaLinux 10 builds its amd64 userland for x86-64-v3. - shadowbox stays on node 18, which outline-server declares in its engines. - The e2e sandbox stays on Ubuntu 24.04. 26.04 ships uutils coreutils, whose `date` costs about 4x per call, and the test harness forks it per traced line, which adds about ten minutes to the install phase. - clastix/kubectl stays on v1.32 for the cleanup hooks, within kubectl's one-minor skew. The cert-manager Go module (v1.21.2) is one minor ahead of the installed chart (v1.20.2). The Certificate objects the gateway controller writes serialize the same either way. `api/apps/v1alpha1` now requires Go 1.27.2, which applies to every module that imports the published types. The Linux run with Go 1.27.2 was done before the rebase onto current main, and the rebased head has not been through it yet. There the five modules built, vetted, tested and tidied cleanly, and the repository unit, controller and envtest lane passed. `go test -race` passed in four modules. In the root module it failed only on a pre-existing data race in the workload monitor tests (#5296), which main has too. The image smoke checks run in this PR's CI. ### Screenshots No UI change. ### Downstream repositories `api/apps/v1alpha1` moves to `go 1.27.2`, and cozystack/terraform-provider-cozystack imports it, so that repository is affected but needs no action. Its box stays empty for that reason, and so does the "not affected" one. - [ ] 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: none needed, because its Renovate raises the go directive together with the pin bump and its CI takes Go from `go.mod`; the only effect is that the provider's minimum Go becomes 1.27.2. - [ ] [cozystack/ansible-cozystack](https://github.com/cozystack/ansible-cozystack) - follow-up: - [ ] [cozystack/ccp](https://github.com/cozystack/ccp) - follow-up: - [ ] [cozystack/talm](https://github.com/cozystack/talm) - follow-up: - [ ] [cozystack/cozyhr](https://github.com/cozystack/cozyhr) - follow-up: - [ ] [cozystack/cozy-proxy](https://github.com/cozystack/cozy-proxy) - follow-up: - [ ] [cozystack/cozystack-telemetry-server](https://github.com/cozystack/cozystack-telemetry-server) - follow-up: - [ ] [cozystack/external-apps-example](https://github.com/cozystack/external-apps-example) - follow-up: - [ ] [cozystack/examples](https://github.com/cozystack/examples) - follow-up: - [ ] [cozystack/community](https://github.com/cozystack/community) - follow-up: ### Release note ```release-note chore(deps): move the toolchain and builder images to Go 1.27.2 and raise Go modules, base images and GitHub Actions to newer working releases; the dashboard token proxy now refreshes its session cookie, and the kube-ovn webhook rejects an admission review without a request instead of dropping the connection. ``` |
||
|
|
693ff070e5 |
chore(goldpinger): bump vendored chart to 1.2.0 (#4877)
## What this PR does Update the vendored Goldpinger chart to include upstream Gateway API support for the work tracked in #4788. HTTPRoute and UDP probing remain disabled by default. With the package's current values, the rendered resources differ only in the image tag and version labels. The DaemonSet selector is unchanged. The umbrella chart also declares the vendored dependency so Helm can lint it. ### Screenshots Not applicable. This PR updates the chart and package metadata; it does not change the UI source. ### Downstream repositories - [x] No downstream repository is affected by this change - [ ] [cozystack/website](https://github.com/cozystack/website) - follow-up: - [ ] [cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack) - follow-up: - [ ] [cozystack/ansible-cozystack](https://github.com/cozystack/ansible-cozystack) - follow-up: - [ ] [cozystack/ccp](https://github.com/cozystack/ccp) - follow-up: - [ ] [cozystack/talm](https://github.com/cozystack/talm) - follow-up: - [ ] [cozystack/cozyhr](https://github.com/cozystack/cozyhr) - follow-up: - [ ] [cozystack/cozy-proxy](https://github.com/cozystack/cozy-proxy) - follow-up: - [ ] [cozystack/cozystack-telemetry-server](https://github.com/cozystack/cozystack-telemetry-server) - follow-up: - [ ] [cozystack/external-apps-example](https://github.com/cozystack/external-apps-example) - follow-up: - [ ] [cozystack/examples](https://github.com/cozystack/examples) - follow-up: - [ ] [cozystack/community](https://github.com/cozystack/community) - follow-up: ### Release note ```release-note chore(goldpinger): bump vendored chart to 1.2.0 (goldpinger 3.11.5); new HTTPRoute and UDP probe options are disabled by default ``` |
||
|
|
9813d13dcd |
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.
```
|
||
|
|
fd426c7e4b |
build(monitoring): respin the Alerta image on a patched base (#5334)
Supersedes #5244 and #5333: the same change from an in-tree branch, so CI can build the new image. Includes main merged in and the test fixture fix from #5333. ## What this PR does Alerta 9.1.0 is the latest upstream release, and `alerta/alerta-web:9.1.0` still ships the Debian packages of its build day, the compiler toolchain and `-dev` headers it built wheels with, and Python packages whose fixes landed after the release. The monitoring chart ran that image by tag, without a digest. This builds the Alerta image in-tree from the upstream one: - `images/alerta/Containerfile` starts from `alerta/alerta-web:9.1.0` pinned by its index digest, upgrades the OS packages, purges the build-only packages and lifts the affected Python packages within the ranges the installed packages declare (`pip check` gates the build). `cryptography` stays below 47 because `pyOpenSSL` requires it; `lxml` stays on 5.x. - The result is copied into an empty image so the purged files are really gone, and the upstream image config (env, user, ports, entrypoint, command) is restated exactly; `docker-entrypoint.sh` renders the nginx, uWSGI and Alerta configs from those variables. The image is 752 MB against 1.32 GB upstream; a purge layer on top would have made it 1.78 GB. - `make image` builds it as `alerta:v9.1.0-cozystack.0` and writes the digest into `alerta.image`, like the traces collector. Until then the default is the digest-pinned upstream image. - The Deployment takes the image from `alerta.image` through `cozy-lib.image`, so mirrored-registry installs work for Alerta as they do for Grafana. Trade-off: `apt-get upgrade` takes whatever Debian has at build time, so two builds of one revision can differ. That is what a respin is for; bump `ALERTA_COZYSTACK_REV` to publish a fresh one. Testing (podman, amd64): - With `postgres:17-alpine` and the chart's env, Alertmanager v4 webhooks to `/api/webhooks/prometheus`: firing critical → 201 and the alert open; `event=Heartbeat` → 202 and the heartbeat recorded; resolved → 201 and the alert closed. Admin login 200, UI 200, no ERROR in the logs, and `alerta_telegram`, `alerta_slack`, `alerta_prometheus` import. Upstream 9.1.0 gives the same results with the same script. - `trivy rootfs`, CRITICAL and HIGH: 29/940 → 3/76. The three critical left (sqlite CVE-2025-7458, libxml2 CVE-2026-6653, zlib CVE-2023-45853) and every remaining Debian HIGH have no Debian 12 fix; the remaining Python HIGH are cryptography and lxml, held back as above. - `helm unittest .` (306 tests, including the new `tests/alerta_image_test.yaml`) and `helm template`. - arm64 was not built locally; aarch64 cp313 wheels exist for every upgraded Python package, so the purged toolchain is not needed there. ### Screenshots No UI changes. ### 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: (Trigger map walked against the diff: only packages/system/monitoring — an image build, a values key with no schema, a template line and a test. No apps/extra package, schema, platform value, hack tooling or CRD changes.) ### Release note ```release-note build(monitoring): Alerta now runs a cozystack respin of 9.1.0 on an upgraded Debian base, without the build toolchain and with patched Python dependencies; its image is pinned by digest and follows the cluster images registry. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Updates** * Alerta now runs from a pinned, refreshed container image. * The Alerta image can be configured, and deployments respect the configured image registry. * The default image is replaced with the Cozystack-built image when using the image build workflow. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
a3e60ec372 |
feat(kafka)!: run on Strimzi 1.2.0 and Kafka 4.x (#4900)
<!-- 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 This upgrades the Kafka operator to Strimzi 1.2.0. Kafka 4.3 is the application default, with 4.2 also available. Upgrades must pass through Cozystack v1.7 and finish the ZooKeeper-to-KRaft migration first. The upgrade now stops while any Kafka lacks KRaft evidence. Every Kafka must report a nonempty `kafkaMetadataVersion` and the `KRaft` metadata state. The API conversion deletes that state, so without it a Kafka needs `Ready=True` or the `cozystack.io/kraft-verified` annotation, which migration 61 writes on every Kafka it accepts before it stops the operators. Any other explicit state blocks, and the error gives the reason for each Kafka. On every variant, the platform chart refuses to switch package sources while Strimzi still serves `v1beta2` and a Kafka fails that check. On variants without the migration hook, it also refuses while any Strimzi CRD still stores `v1beta2`, so `/migrations/61` has to run first. Migration 61 checks the same evidence again, including on repeat runs, and blocks unfinished broker-pool drains. A manual change that bypasses the managed package source is outside this check. Existing Kafka 3.x applications move to v4.3. Kafka 4 no longer accepts clients older than Kafka 2.1. Kafka 4 also rejects the topic settings `message.format.version`, `message.downconversion.enable` and `message.timestamp.difference.max.ms`, and a `segment.bytes` below 1 MiB (1048576), which Kafka 3.x accepted down to 14 bytes. A Kafka 4 broker whose log holds such a topic does not start. The chart now refuses to render a topic that sets any of these. The platform upgrade refuses to start while a Kafka application sets one, and migration 61 also checks KafkaTopic resources, so topics created outside the chart are caught too. A topic created through the Kafka admin API without a KafkaTopic is not visible to these checks. Restoring a topic-metadata backup taken on Kafka 3.x skips the three removed settings and raises a smaller `segment.bytes` to 1 MiB, with a warning for each. In-place downgrades are unsupported. The default 10-minute Helm timeout can leave a long broker roll Failed until its retry succeeds. The migration does not run automatically on every platform variant. Only the `isp-*` variants run it automatically. On other variants, run `/migrations/61` from the matching migrations image before upgrading, as the Kafka README describes. This includes clusters that run no Kafka but have the kafka-operator package, from the `paas` bundle or `bundles.enabledPackages`. Their Strimzi CRDs still store `v1beta2` even with no objects. The migration converts Strimzi resources and stored Helm references to `v1`. It stamps platform version 62. Running it manually also skips earlier migrations on a later move to an `isp-*` variant. Before it stops the operators, migration 61 refuses objects that the Strimzi 0.51 conversion tool would reject and names each one, for example a Kafka with `.spec.kafka.resources` or with OAuth, Keycloak or OPA settings. A failed conversion can leave the old operators stopped until the migration succeeds and the operator release upgrades. The failed conversion Job stays for diagnosis, but its ClusterRole, binding and ServiceAccount are removed. A Job that is still running when the wait times out keeps them, because the retry waits for it. Known limitations. Migration 61 converts with the old operator stopped, while Strimzi's conversion guide expects a running operator of 0.49 or later. I stop it because 0.45 keeps writing the Kafka status through `v1beta2`, but I have not checked this on a live cluster. Objects Strimzi created keep `ownerReferences` to `v1beta2` until Strimzi 1.2 reconciles them. Deleting a Kafka before that can leave dependents behind, and the chart's pre-delete hook covers only StrimziPodSets. The conversion image is pulled from quay.io by digest with no values override, so an air-gapped cluster has to mirror it under the same name. The full offline unit run passed on Linux on `1171d63adfafb45be34214fb9a0f565723e255fd`: 2,576 cases, no failures, errors or skipped tests. Later changes were checked on `69c704499fa4` with the Bats tests for migration 61, the migration runner, the Kafka hooks and the Kafka backup scripts (102), the platform Helm suite (310 tests) and the Kafka Helm suite (91 tests). After the rebase onto `main` at `5a5d5cd3d85f`, `a48a2f259947` passes the same Bats tests (115) and the platform and Kafka Helm suites (326 and 103 tests). It also passes the new check against added `documentIndex` selectors. I have not validated this revision on a live cluster. Closes #4365 ### Screenshots <!-- REQUIRED for UI changes: attach screenshots or screen recordings demonstrating the visual impact of your changes. PRs with UI changes without screenshots will not be merged. --> Not a 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. --> - [ ] No downstream repository is affected by this change - [x] [cozystack/website](https://github.com/cozystack/website) - follow-up: https://github.com/cozystack/website/issues/805 - [ ] [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: The Terraform provider does not model the Kafka `version` field. The website issue covers the upgrade notes the `default` variant needs. ### 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 feat(kafka)!: upgrade to Strimzi 1.2.0 and Kafka 4.3 by default, with Kafka 4.2 also available. Platform migration 61 converts Strimzi resources to v1 and moves Kafka 3.x applications to v4.3. Every Kafka must have confirmed KRaft state before the upgrade, including on repeat runs. Upgrade through Cozystack v1.7 first. Kafka 4 drops clients older than Kafka 2.1 and the message.format.version, message.downconversion.enable and message.timestamp.difference.max.ms topic settings, and requires segment.bytes of at least 1 MiB; the chart and the upgrade refuse a topic that breaks either rule, and a topic-metadata backup taken on Kafka 3.x restores without the removed settings and with segment.bytes raised to 1 MiB. In-place downgrades are unsupported. ``` |
||
|
|
045f1a9bbc |
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> |
||
|
|
b7ec3f73a1 |
test(monitoring): keep a non-first-party ref in the Alerta image test
A ghcr.io/cozystack/cozystack ref in a helm-unittest fixture counts as a first-party image ref, so the image-ref enumeration contracts in hack/promote-rewrite-tags_test.bats require its file to be declared. The test only needs some image string to pass through cozy-lib.image, so a placeholder registry keeps it out of the release tooling. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
33d0001991 |
Merge branch 'main' into feat/monitoring-alerta-respin
Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
75df8174df |
build(monitoring): respin the Alerta image on a patched base
Alerta 9.1.0 is the latest upstream release, and alerta/alerta-web:9.1.0 still carries the Debian packages of its build day, the compiler toolchain and -dev headers it built its wheels with, and Python packages whose fixes came out after the release. The monitoring stack ran that image unpinned. A purge in a layer on top of the upstream image would leave the files in the lower layers, so the result is flattened into an empty image and the upstream image config is restated. cryptography stays below 47 because pyOpenSSL requires it, and lxml stays on 5.x. Assisted-by: LLM Signed-off-by: Marian Koreniuk <moriarti@cp.if.ua> Co-authored-by: europrinter <yanshinjuku@gmail.com> |
||
|
|
c49f58c4a4 |
fix(seaweedfs): keep Object Lock working for COSI credentials on SeaweedFS 4.48 (#4893)
## What this PR does
Existing bucket credentials need additional Object Lock actions to work
with SeaweedFS 4.48. Since v0.4.0 (#5284), the upstream COSI driver
grants them to new credentials. It does not grant access again for a
ready BucketAccess, so older identities stay unchanged after the driver
update. The custom COSI driver build and its image repository are no
longer part of this PR.
This PR adds a post-install and post-upgrade hook that grants the
actions implied by each identity's Read and Write permissions. Bucket
restrictions and credentials stay unchanged, and Write does not grant
governance bypass. The `anonymous` identity that public-read buckets
share is skipped on purpose. The driver revokes public read by removing
only `Read:<bucket>`, so added Object Lock reads would stay open to
unsigned requests. The hook runs after the release update and does not
guarantee Object Lock access during a server rollout.
The wrapper chart also declares its local dependency so Helm lint can
check it. The chart remains on 4.45. #4879 is stacked on this PR for the
4.48 upgrade.
The hook's bats suite (22 cases), the chart tests and shellcheck pass
locally on
|
||
|
|
87f160d473 |
fix(vm-disk, kubernetes-nodes)!: refuse golden images whose import keeps failing (#4802)
## What this PR does New clones can wait forever on a golden image whose import keeps failing. CDI v1.66.1 retries ordinary HTTP failures without setting phase `Failed`. The guards now also refuse goldens with at least three importer restarts unless they reached `Succeeded`. kubernetes-nodes and the picker require `Running=False`; vm-disk refuses during running attempts too. Existing vm-disks and already-cloned pools remain exempt. CDI never lowers the restart count, so a healthy import with three early restarts stays refusable until `Succeeded`, including while a recreated importer is still starting. An empty worker-pool StorageClass now resolves to the virtualization default, then the GA Kubernetes default. Beta is a last fallback for the class written explicitly onto a worker disk, not a CDI fallback. The strict same-class policy stays. This can refuse a previously accepted builtin pool on upgrade. The affected pool has an empty StorageClass, no cloned disk yet, and a golden on the Kubernetes default while another class is the virtualization default. StorageClass is immutable: point `osImage.builtin` at a catalog entry on the virtualization default or switch to `osImage.factory`. Already-cloned pools keep their disk's class. A VMDisk's own HTTP import, golden-image health checks and imports that hang without restarting remain outside this change. Closes #4564 Refs #4059 ### Screenshots No UI changes. ### Downstream repositories The platform values change only updates a comment. The application schema change updates the StorageClass description without changing fields, defaults or enums. - [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(vm-disk, kubernetes-nodes)!: refuse new clones of golden images whose import has not succeeded after at least three importer restarts. kubernetes-nodes and the image picker require the importer to be not running; vm-disk refuses during running attempts too. kubernetes-nodes now resolves an empty storageClass to CDI's virtualization default before the Kubernetes default. A builtin pool with an empty storageClass, no cloned disk yet, and a golden on a different class can now be refused. Point it at a catalog entry on the virtualization default or switch to osImage.factory. Already-cloned pools are unaffected. ``` |
||
|
|
638f0ffbe7 |
feat(redis): add affinity configuration (#2665)
<!-- 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 Adds independent Kubernetes affinity configuration for Redis and Sentinel pods through `RedisFailover.spec.redis.affinity` and `spec.sentinel.affinity`. Empty or null rules preserve operator defaults. Configured rules replace default soft pod anti-affinity; include `podAntiAffinity` when replica spreading is required. ### Validation - All 99 chart tests pass with helm-unittest v1.1.2; affected standalone API package compiles. - Package generation with cozyvalues-gen v1.7.0 is repeatable; embedded ApplicationDefinition schema matches the generated values schema. - Twenty-four offline render scenarios cover default/null/configured affinity and TLS on/off; Redis checks also cover independent component rules, single-replica Sentinel behavior, and preservation of upstream cache configuration. - Manifest generation, diff checks, and commit trailer checks pass. Each branch contains one feature commit rebased onto upstream main. - Root `make generate` remains blocked by the pinned code-generator parser rejecting Go 1.27's `math/rand/v2` generic method. Affected API deepcopy generation passes separately with controller-gen v0.16.4; unchanged files deleted by the failed root generator were restored. - cozyhr v1.6.1 is installed and checksum-verified. `make show` with `--plain` still queries Kubernetes discovery, which this environment cannot access; offline Helm rendering passes. ### Screenshots Not applicable; no UI changes. <!-- 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. --> - [ ] No downstream repository is affected by this change - [ ] [cozystack/website](https://github.com/cozystack/website) - follow-up: - [x] [cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack) - follow-up: https://github.com/cozystack/terraform-provider-cozystack/issues/85. Provider implementation is tracked separately from this application change. - [ ] [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 feat(redis): add affinity configuration for Redis and Sentinel pods. ``` |
||
|
|
6efc0a0dc9 |
feat(rabbitmq): add affinity configuration (#2664)
<!-- 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 Adds optional Kubernetes affinity configuration to RabbitMQ pods through `RabbitmqCluster.spec.affinity`. Empty or null affinity keeps existing scheduling behavior. ### Validation - All 106 chart tests pass with helm-unittest v1.1.2; affected standalone API package compiles. - Package generation with cozyvalues-gen v1.7.0 is repeatable; embedded ApplicationDefinition schema matches the generated values schema. - Six offline render scenarios cover default/null/configured affinity and TLS on/off. - Manifest generation, diff checks, and commit trailer checks pass. Each branch contains one feature commit rebased onto upstream main. - Root `make generate` remains blocked by the pinned code-generator parser rejecting Go 1.27's `math/rand/v2` generic method. Affected API deepcopy generation passes separately with controller-gen v0.16.4; unchanged files deleted by the failed root generator were restored. - cozyhr v1.6.1 is installed and checksum-verified. `make show` with `--plain` still queries Kubernetes discovery, which this environment cannot access; offline Helm rendering passes. ### Screenshots Not applicable; no UI changes. <!-- 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. --> - [ ] No downstream repository is affected by this change - [ ] [cozystack/website](https://github.com/cozystack/website) - follow-up: - [x] [cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack) - follow-up: https://github.com/cozystack/terraform-provider-cozystack/issues/84. Provider implementation is tracked separately from this application change. - [ ] [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 feat(rabbitmq): add support for configuring RabbitMQ pod affinity rules. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **New Features** * Added an optional affinity setting to control where RabbitMQ pods are placed, including anti-affinity rules to spread pods across nodes. * Configured affinity rules are applied to RabbitMQ pods. When affinity is empty or unset, no affinity rules are added. * **Documentation** * Updated RabbitMQ configuration guidance to describe the affinity setting, its empty default, and how to use anti-affinity to distribute pods across nodes. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
d99e960c00 |
feat(platform): package address-controller and its MetalLB driver (#3382)
## What this PR does Adds IP addresses as a first-class resource ([cozystack/community#35](https://github.com/cozystack/community/pull/35)) as two optional system packages, off by default and enabled through `bundles.enabledPackages`: - **`cozystack.address-controller`** — the class-agnostic core ([cozystack/address-controller](https://github.com/cozystack/address-controller)): `IPAddressClass` / `IPAddress` / `IPAddressClaim` in `local.sdn.cozystack.io`, the PVC/PV-binding analog. It owns claim–address binding, status and reclaim, and never allocates anything itself. - **`cozystack.metallb-iad`** — the per-class driver for addresses announced by MetalLB ([cozystack/metallb-iad](https://github.com/cozystack/metallb-iad)). A class names an existing `IPAddressPool` with `autoAssign: false` in `cozy-metallb`, which the admin provisions together with its advertisement. The driver holds reservations as placeholder Services in its own namespace, and attaches an address to a Service that names a claim with the `local.sdn.cozystack.io/ip-address-claim` annotation. ### Packaging Both are ordinary wrapper packages under `packages/system/`, sourced from the `cozystack-packages` artifact like every other package. The upstream chart is vendored verbatim under `charts/` by `make update` at a pinned commit, since neither project publishes a chart artifact: the `v0.2.0` release-preparation commits of [cozystack/address-controller#17](https://github.com/cozystack/address-controller/pull/17) and [cozystack/metallb-iad#11](https://github.com/cozystack/metallb-iad/pull/11). Each controller image is pinned by digest to a `main-<sha>` build carrying the same controller code: `address-controller:main-90e65ca`, whose commit differs from #17 only in chart version and docs, and `metallb-iad:main-1faf937`, whose commit differs from #11 only in chart version and the address-controller module pin, a purely additive API change the driver does not use. The pins move to the `v0.2.0` tags and images once both are released. The images live under `ghcr.io/cozystack/<name>`, outside the `ghcr.io/cozystack/cozystack/` repositories the release tooling owns, so promotion and the nightly mirror pass over them. The core installs its v1alpha1 CRDs with `upgradeCRDs: CreateReplace`. ### What the wrappers add - **Tenant access.** The upstream chart is Cozystack-agnostic and grants only the controller itself. `cozy:addresses`, `cozy:addresses:view` and `cozy:addresses:admin` aggregate into `cozy:tenant`, `cozy:tenant:view` and `cozy:tenant:admin` respectively, so a tenant can manage `IPAddressClaim`s in its own namespace, and the grant exists only while the package is installed. The cluster-scoped `IPAddress` and `IPAddressClass` are not granted: `cozy:tenant*` reaches a tenant through a per-namespace RoleBinding, so a rule for either would never be consulted. A tenant reads its address from the claim's `status.addresses[]`. - **The driver's admission policy, turned on for tenant namespaces.** MetalLB honours a pin or pool selector from any writer of a Service: the `metallb.io/` annotations, their `metallb.universe.tf/` predecessors and `spec.loadBalancerIP`. A tenant cluster's cloud provider copies a guest Service's annotations and `loadBalancerIP` onto the Service it creates in the tenant namespace. The upstream `metallb-iad-service-pins` policy reserves all of these, plus the sharing annotation, to the driver's ServiceAccount and the cluster-admin groups. An admission policy binds every principal regardless of RBAC, so the wrapper adds `cozystack-cluster-admin`, the group Cozystack's OIDC administrators authenticate as, to the chart's `system:masters` and `kubeadm:cluster-admins`. The wrapper enables it in `Deny` mode for namespaces carrying `namespace.cozystack.io/host`, which `tenant-root` and every tenant namespace have and nothing in `cozy-*` does. Unchanged values always pass, so the driver's pin on a tenant's own Service does not lock the rest of that Service. - **The driver's MetalLB namespace**, `cozy-metallb` instead of the upstream default `metallb-system`. ### Variant scoping `cozystack.metallb-iad` depends on `cozystack.address-controller`, which is opt-in, and on `cozystack.metallb`, which is absent on `isp-hosted`, on a slim variant that did not opt into it, and wherever `disabledPackages` names it. The driver is emitted from the `common-packages` helper only when the includes of MetalLB and of `cozystack.address-controller` both rendered a Package, so it cannot be enabled where it would sit in `DependenciesNotReady` forever, and it follows either dependency automatically if its rules change. The core carries no MetalLB dependency and remains available everywhere. ### Validation `helm unittest` covers the aggregation labels and rules on the tenant roles and the driver's emission, which requires both MetalLB and the address core. `hack/select-install.sh --validate` passes, and the selective-install fixture is regenerated from `hack/select-install.sh --disabled postgres`. The admission policy is upstream's and carries no render test here. ### Screenshots Not a UI change. ### Downstream repositories - [ ] No downstream repository is affected by this change - [x] [cozystack/website](https://github.com/cozystack/website) - follow-up: [cozystack/website#810](https://github.com/cozystack/website/pull/810) (component cards), [cozystack/website#811](https://github.com/cozystack/website/pull/811) (operator guide) - [ ] [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: The website is the one repository this change reaches: [cozystack/website#810](https://github.com/cozystack/website/pull/810) adds the two new platform components to `guides/platform-stack/_index.md` and `operations/configuration/licenses.md`, and [cozystack/website#811](https://github.com/cozystack/website/pull/811) adds an operator guide under `networking/`. The guide restates both image refs, so a repin here needs the same edit there. ### Release note ```release-note feat(platform): add IP addresses as a first-class resource as two optional system packages, `cozystack.address-controller` (IPAddressClass / IPAddress / IPAddressClaim) and its MetalLB driver `cozystack.metallb-iad`. Tenants can reserve an address with an IPAddressClaim. A LoadBalancer Service a tenant Kubernetes cluster creates can name that claim with the `local.sdn.cozystack.io/ip-address-claim` annotation, or draw one through auto-claim once an admin marks an auto-claim class. An admission policy reserves MetalLB's pool, pin and sharing inputs on tenant Services to the driver. The driver is only emitted where MetalLB and the address core are. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **New Features** * Added address management for requesting and tracking IPv4, IPv6, or dual-stack addresses, with configurable address classes and lifecycle status. * Added the MetalLB IAD driver for address provisioning through MetalLB. It is included only when the required MetalLB and address-management components are enabled. * Added optional admission controls for address claims and protected MetalLB service settings. * Added optional address-controller metrics, monitoring, and alerting resources. * Added tenant access roles for viewing and managing address claims. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
a48a2f2599 |
fix(backups): restore Kafka 3.x topic configs that Kafka 4 rejects
Every Kafka now runs 4.x, and a topic-metadata backup taken on Kafka 3.8 or 3.9 can record message.format.version, message.downconversion.enable or message.timestamp.difference.max.ms, which Kafka 4 removed, or a segment.bytes below 1 MiB, the minimum Kafka 4 raised it to from 14 bytes. A 4.x broker rejects each of them, so the restore stopped at the first one, leaving that topic half-configured and every later topic unrestored, and a rerun failed on the same line. The restore now skips the removed keys and raises a smaller segment.bytes to the minimum, each with a warning, and applies the rest. segment.bytes is read the way Kafka reads it: trimmed, with an optional sign, leading zeros decimal. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
0729a6f691 |
feat(platform): block the platform upgrade while a Kafka lacks KRaft
Only the isp-* variants run the platform migration hook, so on the default variant nothing checked the Kafka clusters before the new kafka-operator chart arrived. helm-controller replaces that chart's CRDs before Helm runs its pre-upgrade hooks, so a guard in the operator chart would come too late. The platform chart now refuses to render the cozystack-packages source while Strimzi still serves v1beta2 and any Kafka lacks KRaft evidence, with the same evidence rule as migration 61. The check stops once only the v1 API is served, so a NotReady tenant Kafka cannot block platform reconciles after the upgrade. Without the migration hook the chart also refuses while any Strimzi CRD still stores v1beta2: the API server would reject the v1-only CRDs of Strimzi 1.2, and the new kafka chart rejects the Kafka 3.x versions that the migration moves. With the hook the check would block the migration that narrows the stored versions in the same upgrade. While v1beta2 is served the chart also refuses while a Kafka application sets a topic config Kafka 4 removed or a segment.bytes below the 1 MiB minimum of Kafka 4. The new kafka chart refuses to render such a topic, which would leave that application on its pre-upgrade spec, and a Kafka 4 broker whose log holds the small segment.bytes does not start. segment.bytes is read the way Kafka reads it: trimmed, with an optional sign, leading zeros decimal. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
4c71273ca8 |
chore(kafka): declare bundled chart dependencies
Helm requires bundled subcharts to be declared for chart validation. Keep their source local so validation uses the vendored versions. The application icon remains supplied by the generated dashboard metadata. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
f293d64e84 |
fix(kafka): delete the release's StrimziPodSets on uninstall
On a cluster upgraded from Strimzi 0.x, deleting a Kafka application leaves its brokers running. kube-controller-manager's garbage collector first saw the StrimziPodSets under v1beta2 and never updates that record, so once v1beta2 is no longer served it retries them forever instead of deleting them, until kube-controller-manager restarts (kubernetes/kubernetes#102641). The pre-delete hook now deletes the release's StrimziPodSets after its node pools, so uninstall no longer depends on garbage collection for the brokers. An absent CRD is not a failure; any other error fails the hook like the pool delete does, because Helm never runs it for the release again. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
a909b733ea |
chore(kafka, kafka-operator): drop the JVM sizing workaround
The workaround passed MaxRAM and ActiveProcessorCount to every Strimzi JVM because the JDK 17 in the 0.45 images could not see the container limits on kernels without CONFIG_MEMCG_V1 (JDK-8347811). The Strimzi 1.2.0 images ship JDK 21.0.12, which carries the fix. On such a kernel, with a 1Gi limit, Strimzi's heap probe in the Kafka image now estimates a 495M maximum heap, where the 0.45.1-rc1 image estimated 13.9G. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
641faa7fde |
build(kafka-operator): vendor Strimzi 1.2.0
Strimzi 0.45 is out of upstream support. Strimzi 1.x serves only the v1 API, so the release now replaces the CRDs on upgrade; helm-controller's default of skipping CRD upgrades would leave the v1beta2-only CRDs from the first install in place. Strimzi 1.x runs no ZooKeeper, so the ZooKeeper alert group goes too. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
3b65cebea3 |
feat(kafka)!: run on the Strimzi v1 API and Kafka 4.x
Strimzi 1.2 serves only the v1 API and runs Kafka 4.2 and 4.3. The node-pool hook no longer drives the ZooKeeper to KRaft migration or the drain that freed the shared "kafka" pool name: Strimzi 1.x has no ZooKeeper support, and the platform migration refuses to upgrade while a ZooKeeper cluster is left. A cluster migrated earlier keeps its "kafka" broker pool. Without the drain the hook takes seconds, so the seven-hour install timeout goes too. Kafka 4 rejects the topic configs it removed and a segment.bytes below 1 MiB, which Kafka 3.x accepted. A KafkaTopic that sets one stays NotReady while the release reports Ready, so the chart refuses to render such a topic. It reads segment.bytes the way Kafka does: trimmed, with an optional sign, leading zeros decimal. BREAKING CHANGE: the Kafka application accepts version v4.3 (default) and v4.2; v3.8 and v3.9 are gone, and the platform migration moves existing applications to v4.3. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
af0db99c71 |
feat(platform): move Strimzi resources to the v1 API before Strimzi 1.x
Strimzi 1.0 removed v1beta2 from its CRDs, and the API server refuses a CRD that drops a version its status still lists as stored. Every stored object has to be rewritten as v1 before the new operator arrives, which needs the CRDs of Strimzi 0.49 to 0.51 that serve both versions and Strimzi's own conversion tool. The 0.45 operator is stopped first: Strimzi supports the conversion only under an operator that knows v1, and 0.45 keeps rewriting the Kafka status through v1beta2. The conversion Job's ClusterRole can patch CRDs and write ConfigMaps in every namespace, so it goes with its binding and ServiceAccount once the Job has finished, successfully or not; a failed Job stays for diagnosis, and a Job still running when the wait times out keeps them, because the retry waits for that Job. Two references to v1beta2 outlive the stored objects. Helm builds the objects of a release before it upgrades or uninstalls it, so every stored revision of every Kafka application is rewritten to v1. And the API server refuses server-side apply to an object whose managedFields still name a version the CRD no longer serves; when helm-controller recovers by wiping them, a field a later chart drops is never removed. Those entries move to v1 as well. A Helm action already running stores the releases it read when it finishes, v1beta2 included, so the version is not stamped while any Kafka release revision is still pending. Strimzi 1.x also runs neither ZooKeeper nor Kafka 3.x. A ZooKeeper cluster, or a shared broker pool still being drained, left by a platform that moved past v1.7 before its ZooKeeper to KRaft migration finished cannot be finished afterwards, so the migration stops instead; Kafka applications on v3.8 or v3.9 move to v4.3. The migration also stops, before it changes anything, while a Kafka application topic or a KafkaTopic sets a config Kafka 4 removed or a segment.bytes below the 1 MiB minimum of Kafka 4: the new kafka chart refuses to render such a topic, and a Kafka 4 broker whose log holds the small segment.bytes does not start. segment.bytes is read the way Kafka reads it: trimmed, with an optional sign, leading zeros decimal. Strimzi's conversion tool refuses some v1beta2 objects outright, and convert-resource stops at the first one, with the operators already stopped. While v1beta2 is served the migration lists every Strimzi kind first and refuses, naming each object and the reason, before it stops anything. The list follows the 0.51.0 tool the conversion Job runs, and a test fails when that image changes. The conversion deletes the Kafka's KRaft metadata state, and KRaft is the state Strimzi never leaves. Before it stops the operators, the migration records an annotation on every Kafka it accepts, so a retry after the conversion still accepts a NotReady Kafka that passed on its KRaft state. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
b6ef231d44 |
docs(kubernetes-nodes): state why a pool must share its golden's class
The worker image guard, its error message and the storageClass docs said CDI cannot clone across StorageClasses and always falls back to a host-assisted copy. CDI falls back only when the two claims have different CSI drivers or volume modes; with one driver it asks that driver for a clone into the other class. The guard stays, the reason it gives is corrected, and the docs name the virtualization default class an empty storageClass now resolves to. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
8dcf950842 |
fix(kubernetes-nodes)!: resolve an empty class to CDI's virtualization default
CDI binds a kubevirt-content DataVolume that names no class on the class annotated storageclass.kubevirt.io/is-default-virt-class before it falls back to the Kubernetes default. The worker image guard resolved an empty class to the Kubernetes default only, so on a cluster carrying both it compared the golden against a class the golden was not on and refused a pool that matched it. CDI's fallback reads only the GA default annotation, so the beta one no longer ties with it: a class carrying only the beta annotation is picked only when no class carries the GA one. CDI then creates no claim at all for a DataVolume naming neither a class nor access modes, so such a pool gets that class only because the chart writes it onto the worker disk. The resolution also refuses a pool that rendered before: one with an empty class that has not cloned a disk yet, whose golden is on the Kubernetes default, on a cluster where another class carries the virtualization default. Its storageClass is immutable, so it has to point osImage.builtin at a catalog entry on the virtualization default or switch to osImage.factory. A pool that already cloned reads its class back from its own disk's claim and keeps rendering. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
263407a73f |
fix(api): leave golden images whose importer keeps failing out of the image options
CDI moves an import to Failed only on a fatal error such as a checksum mismatch, so the picker still offered a golden whose URL is unreachable: its importer restarts with back-off while the DataVolume stays in progress. Drop a golden whose importer restarted at least three times and is not running, the test the kubernetes-nodes chart applies before cloning. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
513d250a68 |
fix(kubernetes-nodes): refuse a golden whose importer keeps failing
The worker image guard refused only a golden in phase Failed, which CDI reaches on a fatal error such as a checksum mismatch. An unreachable URL restarts the importer with back-off while the DataVolume stays in progress, so a pool pinned to such a golden waited forever for its first disk. Refuse an importer that restarted at least three times and is not running, under the same already-cloned exemption as Failed. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
26dc077809 |
fix(vm-disk): refuse cloning a golden whose importer keeps failing
CDI moves an import to Failed only on a fatal error such as a checksum mismatch. An unreachable URL restarts the importer with back-off while the DataVolume stays in progress, so the Failed check let such a golden through and the clone waited forever. Treat an importer that restarted at least three times as failing too, whether or not it is running now. CDI reports every importer attempt as running, including one that is about to fail again, and the chart checks the golden only until the disk exists, so a disk created during an attempt would otherwise pass and wait unnoticed. A healthy import with three early restarts is refused until it succeeds; the release retries the render. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
060686cbc0 |
fix(cozy-lib): render tenant hugepages quota only as requests (#5189)
## What this PR does A tenant with `hugepages-2Mi` or `hugepages-1Gi` in `resourceQuotas` gets both `requests.hugepages-<size>` and `limits.hugepages-<size>` in `tenant-quota`. Kubernetes accepts huge pages in a ResourceQuota only as `hugepages-<size>` or `requests.hugepages-<size>` ([`IsStandardQuotaResourceName`](https://github.com/kubernetes/kubernetes/blob/v1.34.1/pkg/apis/core/helper/helpers.go#L245)), so the apiserver rejects `tenant-quota` and the tenant release fails to install or upgrade. Huge pages are not counted in `limits.memory` either, so today a VM whose memory is backed by huge pages runs outside the tenant quota with no way to bound it. `cozy-lib.resources.flattenResource` now drops the limits side for `hugepages-*`, the same way it already does for `storage`, so the quota carries only `requests.hugepages-<size>`. Both page sizes go through the same rule. `sanitize` is unchanged: a pod spec still needs equal requests and limits for huge pages. `helm unittest .` passes 69 of 69 in `packages/tests/cozy-lib-tests` and 78 of 78 in `packages/apps/tenant`. The new case fails on `main` on both `limits.hugepages-*` keys. Admission reads hugepages usage from `requests.*` after #5184, which matches what this renders. ### Screenshots Not a UI change. ### Downstream repositories Template change in `cozy-lib`, one new test case and one line in the hand-written part of `packages/apps/tenant/README.md`. No values key, schema or default changes. The website tenant reference page is regenerated from that README on release, so no trigger map entry needs a manual follow-up. - [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(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. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Bug Fixes** * Huge-page quotas now apply only to requests, avoiding unsupported limit entries in Kubernetes resource quotas. Quota entries for 2 MiB and 1 GiB huge pages are retained as requests, while corresponding limit entries are omitted. * **Documentation** * Clarified that 2 MiB and 1 GiB huge-page resources are represented as requests in resource quotas, not limits, because Kubernetes does not support huge-page limits quotas. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
0d239fab81 |
Merge branch 'main' into feat/kubernetes-nodes-talos-sysctls
The generated cozyrds file is regenerated from the merged values.yaml. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
977963dda2 |
feat(redis): add affinity configuration
Signed-off-by: kastakhov <16296930+kastakhov@users.noreply.github.com> Assisted-by: LLM |
||
|
|
a0f85886f2 |
feat(rabbitmq): add affinity configuration
Signed-off-by: kastakhov <16296930+kastakhov@users.noreply.github.com> Assisted-by: LLM |
||
|
|
416abfd8e2 |
fix(etcd): scope tenant alerts to their scrape job (#5183)
## What this PR does scopes every tenant etcd alert to its release scrape job. previously each release evaluated every tenant, so one failing peer could produce alerts from unrelated releases. tenant peer RTT is evaluated by the tenant rules, while the remaining global etcd checks stay in place. validation: both affected chart test runs pass, 46 tests in 17 suites. both charts render. an expression-only simulated leader-loss check against existing metrics selected 18 members across six namespaces before scoping and only the three intended members afterwards. thresholds are unchanged. ### 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: no API fields, metric names, package interfaces or documented workarounds change. ### Release note ```release-note fix(etcd): scope tenant etcd alerts to their release and avoid duplicate tenant peer RTT alerts from the global rules ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Bug Fixes** * Etcd alerts now match metrics from the exact etcd scrape job, including slow HTTP requests, reducing the chance of unrelated metrics triggering alerts. * The peer communication latency alert excludes tenant etcd scrape jobs, which are covered by tenant-specific rules. * **Tests** * Added checks to validate etcd alert job matching and tenant-job exclusions. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
d36b6e55f5 |
Merge branch 'main' into fix/tenant-quota-hugepages
Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
65708a81b8 |
fix(seaweedfs): declare the vendored chart dependency
Helm lint rejects the wrapper chart while its bundled seaweedfs chart is undeclared. Reference the local chart without constraining its version so vendoring remains the source of the dependency. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
ca0fcb1c05 |
Merge branch 'main' into fix/etcd-alert-scope-20261102
Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |