mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-30 04:06:34 +09:00
9680ed64dfe57fe04d08d88fcf27e623db9aa2c2
8589
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
9680ed64df |
feat(cluster-api)!: update Cluster API to v1.14.4 (#4902)
<!-- 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. - Breaking changes: append `!` after type/scope or add a `BREAKING CHANGE:` footer. - If it is a work in progress, consider creating this PR as a draft. - Ask for opinion and review in the community chats when needed. - Fixes merged to main reach supported release lines through the backport batch automatically. Do not open backport PRs by hand. --> ## What this PR does Updates the Cluster API stack with an automatic intermediate upgrade for existing v1.10 providers. The core chart upgrades them through v1.13.8 before Helm applies the final manifests. The hook fails on API errors, conflicting changes or timeouts. The hook image goes through cozy-lib. The core chart's PackageSource declares that library, otherwise the packaged chart can't render the hook. Fresh installations skip the intermediate providers. Helm keeps the intermediate ConfigMaps, so they stay in the cluster after the next change of the intermediate version, and that bump has to remove them. Each provider now selects exactly one repository. The bridge and final ConfigMaps carry `provider.cluster.x-k8s.io/version` with the full version, including the role suffix, and the core and kubeadm selectors include it. The operator's finalize step hashes every ConfigMap the selector matches and rejects more than one. During an upgrade it also checks the selector of every other installed provider. So the bridge ConfigMaps carry only the version label, and the v1.10 selectors, which have no version, never match them. The hook switches the version and the selector in one guarded patch and selects a bridge by that label alone. It also narrows an existing bridge selector to that label. A provider whose first installation never finished takes the fresh-install path. Kamaji, CAPK, capmox and IPAM keep their existing pins and temporary v1beta1 compatibility. The autoscaler keeps its explicit v1beta1 selection. An infrastructure provider's v1beta1 `failureReason` no longer immediately fails a Machine or triggers remediation. The provider conditions still show the cause. The vendored operator chart gets six local patches, and `make update` reapplies them. The core components get a startup probe patch. The sync-period patch from main stays. I kept the one-minute resync setting until restart recovery is tested. CAPI Bats, the bootstrap and platform Helm suites and the rendering checks pass locally. On envtest against cluster-api-operator v0.30.0, legacy v1.10 core and kubeadm providers go through v1.13.8 to v1.14.4 with these ConfigMaps. With the old bridge labels core stayed on v1.10. I have not run a live upgrade, restart or eviction test on this revision. The [earlier Proxmox report](https://github.com/cozystack/cozystack/pull/4902#pullrequestreview-5510737333) covers the v1.13 candidate only. ### 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 automatically. Check the trigger map in docs/agents/contributing.md against the diff. Keep every checkbox. Tick an affected repository only after linking an existing or newly opened follow-up. Do not claim no downstream impact when it is unknown. --> - [ ] No downstream repository is affected by this change - [x] [cozystack/website](https://github.com/cozystack/website) - follow-up: cozystack/website#751 - [ ] [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 existing website follow-up needs the management-cluster minimum updated to v1.33. No tenant API fields, version enums, installer values or platform variants change. ### Release note ```release-note feat(cluster-api)!: update Cluster API core and kubeadm bootstrap to v1.14.4, cluster-api-operator to v0.30.0 and Talos bootstrap to v0.6.13. Legacy core and kubeadm installations are upgraded through v1.13.8 before the final manifests are applied. The core and kubeadm bootstrap charts reject management Kubernetes older than v1.33. The upgrade is one-way: Cluster and Machine CRDs use v1beta2 storage and downgrades are not supported. The preferred Cluster API version becomes v1beta2. Clients relying on v1beta1 fields must select that version explicitly. The operator no longer serves operator.cluster.x-k8s.io/v1alpha1. The autoscaler stays on the v1beta1 Cluster API. ``` |
||
|
|
5daa04ea6e |
feat(networking): cozyplane eBPF CNI + cozyplane-kpr networking variant (drops Cilium) (#3149)
## What this PR does Adds an **opt-in** `bundles.system.networkingVariant: "cozyplane"` for the `isp-full` (Talos) bundle: it replaces kube-ovn, Cilium and kube-proxy with the [cozyplane](https://github.com/lllamnyp/cozyplane) eBPF CNI, its aggregated `sdn.cozystack.io` API server, and the `cozyplane-kpr` socket-LB kube-proxy replacement. The default `kubeovn-cilium` path renders identically to main; the selector is refused outright on every other bundle variant (slim variants included), where it would half-apply. Components: three wrapper charts around cozyplane's upstream charts — the CNI (`packages/system/cozyplane`), the kube-proxy replacement (`cozyplane-kpr`) and the aggregated apiserver with its etcd-operator-managed, PVC-backed etcd (`cozyplane-apiserver`) — plus the Cilium policy CRDs shipped inert so stock charts install (`cozyplane-cilium-crds`), a `cozystackAPI.serveSDN` toggle in cozystack-api, and the platform wiring. The wiring threads the platform's `networking.podCIDR`/`serviceCIDR` (and `clusterDNS`, the service network's address plus 10 when unset) into the cozyplane component, drops the packages that assume the replaced stack (kubeovn-webhook/-plunger, multus, securitygroup-controller, the virtualprivatecloud app), refuses the default `cilium` gateway class and `networking.encryption.enabled` on the variant, and turns off sdn serving in cozystack-api. Bootstrap ordering: the CNI installs first with the kube API as its only dependency and ships only the LOCAL group's CRDs (`local.sdn.cozystack.io`, underlay IPAM); the tenant kinds (VPC, Port, SecurityGroup, …) have **no CRDs** and are served only by the aggregated apiserver, which installs later behind cert-manager, etcd-operator and storage. Until it lands, `sdn.cozystack.io` is simply not served; there is no takeover. On Talos the agent and kpr bootstrap against KubePrism, since with no kube-proxy the `kubernetes.default` ClusterIP is unserved until kpr itself runs. Each cozyplane package follows the umbrella pattern: the upstream chart is vendored verbatim under `charts/<name>` by `make update` from a ref pinned in the wrapper's Makefile, and everything Cozystack-specific lives in the wrapper — the Talos overlays, the apiserver's etcd storage class and replica count, and two ClusterRoles that carry cozyplane's own tenant roles into the `cozy:tenant` tiers by aggregation, so the list of tenant kinds stays upstream's to maintain. Image pins are the digests upstream pins for that ref, with multi-arch legs verified there. The wrappers carry helm-unittest suites pinning the platform contract, the egress args the platform threads included, and the platform suite covers the variant's package set, the guards and the CIDR threading. The variant is experimental: it has no e2e lane yet and is not for production clusters, which the operator-facing values comment says. **CiliumNetworkPolicy objects apply but are not enforced on this variant** — tenant network isolation on the default network, the Cilium host firewall and the platform components' own Cilium policies (several of them `ingressDeny` rules native NetworkPolicy cannot express) are not in effect, as stated in the values comment, the networking source and the threat model; rebuilding them on what cozyplane does enforce (native NetworkPolicy, its operator-only HostFirewall) is a follow-up. cozystack-api's SecurityGroup (a restricted interface over CiliumNetworkPolicy) is not served on the variant; cozyplane's own SecurityGroup is the first-class tenant instrument for traffic inside and across VPCs. The tenant-facing VPC application lands in #4508, stacked on this PR. ### Screenshots Not a UI change. ### Downstream repositories The trigger map fires for cozystack/website (a new platform variant and new `platform.values` keys); cozystack/website#815 documents both. It arguably fires for terraform-provider-cozystack too (the SecurityGroup spec differs per variant); that box is left unticked so a human decides. - [ ] No downstream repository is affected by this change - [x] [cozystack/website](https://github.com/cozystack/website) - follow-up: cozystack/website#815 - [ ] [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 feat(platform): opt-in networkingVariant "cozyplane" for the Talos bundle — replaces kube-ovn, Cilium and kube-proxy with the cozyplane eBPF CNI, its aggregated sdn.cozystack.io API server and a socket-LB kube-proxy replacement; CiliumNetworkPolicy objects are not enforced on this variant ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **New Features** * Added an opt-in Cozyplane networking variant with cluster DNS configuration, CNI, and service routing. * Added a Cozyplane API service for tenant networking resources, with tenant edit and view permissions. * Added control over whether the existing SDN API is served. * Gateway configurations using an unavailable class are now rejected with guidance. * **Important Limitations** * Cozyplane does not enforce existing Cilium network policies or platform Cilium rules. Tenant traffic isolation may require native NetworkPolicies; some platform rules require operator-managed HostFirewall policies. * Cozyplane networking does not support encryption or the default Cilium Gateway class, and requires pod and service CIDRs. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
319c2c81f7 |
test(migrations): build each migration test image once per file (#5362)
## What this PR does Closes #5299 In `hack/migration-{54,55,57,58,59,61}-*.bats`, every test calls `prep()`, and `prep()` ran `docker build -q -t "$TESTIMG"` for one fixed tag derived from the alpine pin. Under `bats -j N`, the tests in a file run concurrently. On a cold cache, several uncached builds of that tag therefore ran at the same time. The issue traces how a retag on the containerd image store deletes the old image before creating the new one, so a sibling's `docker run` can find the tag missing and fall back to a pull. This PR takes the first fix the issue suggests: - `build_test_image()` holds the existing Dockerfile for each file, unchanged (`jq`, plus `bash` for migration 61). Its exit status is `docker build`'s, so a failed build still fails the caller. - `setup_file()` builds the image once, before any test in the file starts. If docker isn't available it does nothing, so `prep()` still prints its existing "docker is required" message. - `prep()` now runs `docker image inspect "$TESTIMG" || build_test_image`, so it only builds as a fallback when the tag is missing (for example, a run without bats' `setup_file`). Under bats the image already exists, so tests never build concurrently. The issue lists 54, 55, 57, 58 and 59. `migration-61-strimzi-v1-conversion.bats` has the same `prep()` pattern, so it's included. Its separate `cozystack-migration61-test:ubuntu` build stays where it is: only one test builds and uses it. I chose this over `--no-parallelize-within-files` because it keeps these files parallel and doesn't change the Makefile for every other bats file. ### How I checked it - I had no Docker daemon here, so I ran each file with a stub `docker` on `PATH` that logs its calls and treats the tag as present once built: - **On this branch:** one `docker build` per file (two for migration 61, the second being the ubuntu image), with one `image inspect` per `prep()` call. - **On main:** migration 54 ran four builds for its four tests. - `bats --count` parses all six files. - None of these files sources a `.sh` file, so they run only under real bats (`bats-unit-tests`), not the `cozytest.sh` POSIX lane. - Please rely on CI to run them against a real daemon. ### 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: These are repository-internal tests only. ### Release note ```release-note NONE ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Tests** * Improved migration test setup by building the required test image once per test file and reusing it across tests. * Preserved the existing Docker prerequisite checks and fallback behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
cac0bb9b28 |
test(hack): check hook scripts under files/ for --request-timeout (#5360)
## What this PR does Closes #5304 `hack/check-hook-request-timeout.bats` built its candidate list with `grep -rl 'kubectl' packages/*/*/templates/`. A chart that loads its hook script with `.Files.Get "files/<name>.sh"` runs that script with the same in-cluster credentials, but the guard never looked at it. That's how the flag got through in the first revision of #4915. The guard also matched only `--request-timeout=<value>`, while kubectl also accepts `--request-timeout <value>`. Changes: - Candidates now include shell scripts under `packages/*/*/files/`, recognised by a `.sh` suffix or a `sh`/`bash`/`dash` shebang, also through `env` or `env -S`. Other files there (CAPI component manifests, YAML defaults) are left out, as the issue suggests. Files that name `KUBECONFIG` are still skipped. - The pattern now catches the space form as well: `--request-timeout(=["']?[^0[:space:]"']|[[:space:]]+["']?[1-9])`, which also covers quoted values such as `--request-timeout "30s"`. The space form only counts when a non-zero number follows. Several templates have comments like "a non-zero --request-timeout on an in-cluster kubectl call", and a looser pattern would flag them. - The scan is split into small functions. Seven new cases run it on a throwaway tree under `$BATS_TEST_TMPDIR`: - a `files/hook.sh` with `--request-timeout=30s` is reported, which is the case from the issue; - a script without the `.sh` suffix is picked up through its shebang; - `--request-timeout 30s` and `--request-timeout=5` are reported; - quoted `"30s"` and `'30s'` values are reported; - an `#!/usr/bin/env -S bash -e` script is collected, and an `env -S python3` script is not; - `=0`, ` 0s`, prose in a comment, a script that sets `KUBECONFIG`, and a non-script YAML under `files/` are not reported. The existing repository-wide case still passes on main with the wider scope. `cilium/files/ipam-migration.sh` and both seaweedfs hook scripts are now checked, and none of them uses the flag. ### How I checked it `bats hack/check-hook-request-timeout.bats` (bats 1.12.0): 8/8 pass. ### 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: This is a repository-internal test only. ### Release note ```release-note NONE ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Tests** * Expanded automated checks for request-timeout options in chart templates and eligible shell scripts, covering both `--request-timeout=value` and `--request-timeout value` formats, including quoted values. * Added coverage for zero-valued timeouts, prose mentions, files that reference `KUBECONFIG`, and non-shell files. * The check continues to require a minimum number of candidate files and report files with non-zero timeout values. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
dec14c736d |
docs(gateway): stop saying the route-hostname policy admits hostname-less routes (#5352)
## What this PR does Refs #4938 The edge-termination section of `packages/extra/gateway/README.md` said that on a class sharing one edge address the class controller has to keep route hostnames inside the tenant apex, "since the platform's route-hostname policy admits routes that declare no hostnames at all". That stopped being true in 1.7. `packages/system/cozystack-basics/templates/route-hostname-policy.yaml` now requires `spec.hostnames` to be present and non-empty for `HTTPRoute`, `TLSRoute` and `GRPCRoute` in `tenant-*` namespaces (#3475), and it rejects any hostname outside the namespace's `namespace.cozystack.io/host` apex. The policy doesn't depend on the Gateway class. This PR replaces the sentence with one that says so and links to the policy's entry under "Security model". This fixes only the line the issue points at. I didn't audit the rest of the README against the code, so I used `Refs` and not `Closes`. The issue asks for that full review, and it should stay open for it. `make generate` (cozyvalues-gen) only rewrites the parameter table, and this change doesn't touch it. ### Screenshots Not a UI change. ### Downstream repositories I left every box below unticked on purpose. The only downstream copy of this text is the Gateway reference page on cozystack/website. Per `docs/agents/contributing.md`, the release bot regenerates that page from this README on the next stable tag, so I don't think any manual follow-up is needed. A maintainer should confirm that. - [ ] 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 docs(gateway): the Gateway README no longer says the route-hostname policy admits routes without hostnames; since 1.7 it rejects them in tenant namespaces. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Documentation** * Clarified that the route-hostname policy applies to `HTTPRoute`, `TLSRoute`, and `GRPCRoute` resources in `tenant-*` namespaces on creation and update. It rejects routes with no hostnames or hostnames outside their namespace’s apex. Routes stored before the policy is installed are not rejected unless they are subsequently updated. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
02b8a26738 |
fix(securitygroups): reject port ranges and malformed FQDNs on the SecurityGroup path (#5134)
<!-- 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 Fixes #5130. `validatePortRules` sent any non-numeric port to `IsValidPortName`, so `"80-90"` came back as "must contain at least one letter (a-z)". A `first-last` value now gets "port ranges are not supported; list each port as its own entry" on the same field. `PortProtocol` carries a single port and Cilium's `endPort` is not exposed, so the limit itself is unchanged. `validateFQDNs` only checked that a selector was not empty. A malformed `matchName` or `matchPattern` passed, and the backing write then failed on the CiliumNetworkPolicy CRD, which surfaced as an error about a `cilium.io` object. The validator now applies the CRD's own rules for `spec.egress[].toFQDNs[]`, with a field error on the SecurityGroup path: `^([-a-zA-Z0-9_]+[.]?)+$` for `matchName`, `^([-a-zA-Z0-9_*]+[.]?)+$` for `matchPattern`, `maxLength: 255` for both, and the `oneOf` that allows only one of the two per selector. These are copied from the CRD served by Cilium 1.19.5 and match the agent's `FQDNSelector.sanitize`, which also refuses a selector that sets both fields. `TestCreateRejectsInvalidPortOrFQDN` lists each rejected value and checks that the error carries a single cause, on the expected field, with the expected reason. All 13 cases fail on `main`. `TestCreateAcceptsValidPortOrFQDN` lists accepted values (named port `http-8080`, trailing dot, underscore labels, `**.` prefix, infix and lone `*` patterns, 255 characters) and checks they project 1:1. `go test ./pkg/registry/sdn/...` passes. As a cross-check, every FQDN value in both tables was also sent to the CiliumNetworkPolicy CRD of a lab running Cilium 1.19.5, with `kubectl create --dry-run=server`. The CRD rejects exactly the values the validator rejects and accepts exactly the ones it accepts. ### 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 The diff touches `pkg/registry/sdn/securitygroup/validate.go` and its tests only: the SecurityGroup schema does not change, and no package, chart, CRD, `hack/` or convention is touched. Neither the website nor the Terraform provider documents or models SecurityGroup fields. <!-- 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(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. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Bug Fixes** * Security group egress rules now reject port ranges with a clear validation error; list each port separately. * FQDN selectors are checked for supported name or pattern formats, required selector fields, and a maximum length of 255 characters. * Invalid egress settings are rejected without creating a policy, while valid ports and FQDN selectors can be saved. * **Documentation** * Updated guidance to reflect egress port and FQDN validation rules. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
04fb5215a8 |
fix(kubernetes): apply addons.monitoringAgents.valuesOverride (#5375)
<!-- 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 `addons.monitoringAgents.valuesOverride` on a managed Kubernetes cluster is accepted, stored and documented in the schema and README, but the addon's HelmRelease template never reads it. The application stays `Ready` and nothing reaches the agents, so a user who adds a second vmagent remote-write URL or an extra Fluent Bit output to ship a copy of metrics or logs to their own store gets no error and no effect. Every other addon with a `valuesOverride` (coredns, cert-manager, ingress-nginx, vertical-pod-autoscaler, cilium) already merges it. The single commit moves the defaults into a `cozystack.defaultMonitoringAgentsValues` helper and merges `valuesOverride` over them with `mergeOverwrite`, the same pattern as those addons. With no override the rendered HelmRelease is semantically identical to the one on `main`; a new unit test sets an override and fails on the previous template. Note for reviewers: as with the other addons, lists and multi-line strings are replaced rather than appended, so overriding `vmagent.remoteWrite.urls` or `fluent-bit.config.outputs` means restating the default tenant destination to keep it. The `vmagent.remoteWrite.url` vs `.urls` mismatch from #5258 is already fixed by #5024 and is on its way to the release lines in #5311 and #5312; this PR covers the `valuesOverride` gap that #5258 also points out. Refs #5258 ### 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(kubernetes): `addons.monitoringAgents.valuesOverride` is now applied to the monitoring agents of managed Kubernetes clusters; it was previously accepted but ignored. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Bug Fixes** * Monitoring agent overrides now retain default settings while applying custom values. Configured remote-write URLs, cluster and tenant labels, cluster-specific log filters, and log volumes remain intact when outputs are overridden. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
382169be52 |
fix(talos): bump Talos to v1.14.4 (CVE-2026-99999) (#5045)
## What this PR does Bumps the Talos release Cozystack ships for host nodes from v1.14.2 to v1.14.4. Talos v1.14.4 ships Linux 6.18.57, which carries the upstream fix [`6785011f8b16`](https://git.kernel.org/linus/6785011f8b16abf40b1e9d8b2e332232b3e68822) ("ipv4: validate checksum_start before completing checksum") for CVE-2026-99999, known as PwnEscape. v1.14.2 runs Linux 6.18.54 and is affected. A guest controls the `csum_start` field of the `virtio_net_hdr` it hands to the host through TAP or vhost-net. When the host fragments such a packet, `skb_checksum_help()` writes two guest-chosen bytes inside the IPv4 header, and `ip_frag_next()` then copies host memory past the packet into every fragment. The leak has been chained into code execution on the host. No nested virtualization is needed. KubeVirt VMs on Cozystack use the bridge binding, a TAP device with vhost-net and checksum offload on, so root in any guest (a `vm-instance` or a tenant Kubernetes worker) reaches this path on the host node. Changes: - `packages/core/talos/images/talos/profiles/*`: regenerated with `hack/gen-profiles.sh v1.14.4` (installer-base and every system extension digest, amd64 and arm64). - `packages/system/multus/images/multus-cni/Dockerfile`: the `talos-cni-plugins-checked-against` marker moves to v1.14.4. Talos v1.14.4 still pins containernetworking/plugins v1.9.1 in siderolabs/pkgs, the same as `CNI_PLUGINS_VERSION`. - `docs/operations/system-memory-limits.md`: the shipped version it names moves to v1.14.4. No OOM handler file changed between v1.14.2 and v1.14.4, so the quoted defaults still hold. The v1.14.2 to v1.14.4 changes are patch fixes only (network route teardown, DHCP, KubePrism recovery, mount cleanup, etcd 3.7.2), with DRBD 9.3.4 and ZFS 2.4.4 unchanged. No machine-config change is needed on top of the v1.14 requirements that v1.14.2 already brought in. Not covered here: tenant Kubernetes workers default to Talos v1.13.6 (`packages/apps/kubernetes`, `packages/apps/kubernetes-nodes`). The bug is on the host side, so the host bump is what closes the guest escape. No v1.13 release with the fix exists yet (v1.13.11 is on 6.18.54). Tested: `hack/cni-plugins-staging-contract.bats` and `hack/talos-installer-index_test.bats` pass (12/12), run in the `bats/bats:1.13.0` container. No image was built or booted locally. ### Screenshots Not a UI change. ### Downstream repositories The trigger map hits `cozystack/website`: this bumps the version in `packages/core/talos/images/talos/profiles/installer.yaml`, and `data/versions/next.yaml` there pinned `talos: "v1.14.2"`. The follow-up moves it to v1.14.4 and should merge after this PR. No other repository on the map is reached by this diff. - [ ] No downstream repository is affected by this change - [x] [cozystack/website](https://github.com/cozystack/website) - follow-up: https://github.com/cozystack/website/pull/768 - [ ] [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(talos): Bump Talos to v1.14.4 (Linux 6.18.57) to fix CVE-2026-99999 (PwnEscape), a guest-to-host escape through virtio_net_hdr checksum offload that any KubeVirt VM can reach on the host node. Upgrade and reboot host nodes; the fix applies only to the kernel that is running. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Updates** * Updated Talos-based installer, ISO, kernel, metal, and NoCloud images—including ARM64 variants—from v1.14.2 to v1.14.4, with refreshed system extensions and firmware. * Updated the documented Talos version associated with host-node memory-limit defaults to v1.14.4. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
18a9530b87 |
fix(platform): honour a bool false in ingress-enabled and monitoring-enabled (#5354)
## What this PR does `default "true"` treats a bool false as empty, so an unquoted `_cluster.ingress-enabled: false` or `_cluster.monitoring-enabled: false` still rendered `_namespace.ingress: tenant-root` and the monitoring ExternalName redirects. Both gates now check for a missing key first and otherwise require `"true"` or a bool true, so a missing key keeps the old behaviour, every string value keeps its old meaning, and a bool false turns the feature off. #5097 does the same for the seaweedfs flag. helm-unittest 1.1.2, cozystack-basics 83 of 83. Against the templates on main the two new bool-false cases fail. ### 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): an unquoted false in _cluster.ingress-enabled or _cluster.monitoring-enabled now turns off the tenant-root ingress key and the monitoring redirects. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Bug Fixes** * Ingress and monitoring redirects are no longer enabled when their settings are explicitly `false` or empty. When settings are missing, existing default behavior is preserved. * **Tests** * Added coverage for disabling ingress and monitoring redirects with boolean `false`. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
10bd82cc58 |
docs(release): make changelog check B find changed image build files (#4952)
## What this PR does Check B of the changelog pre-publish verification in `docs/release.md` lists changed image build files with `git diff --name-only $PREV..$NEW -- 'images/*/Dockerfile'`. That pathspec never matches anything: there is no `images/` directory at the repository root, since image build files live under `packages/*/*/images/`. The check therefore printed nothing on every release and passed without looking at anything. It also skipped `Containerfile`, which first-party images such as `otelcol-tracing` and the dashboard `console` use. This PR changes the pathspec to `'*Dockerfile' '*Containerfile'`, which matches both file names at any depth. I checked it in a scratch repository: the old pathspec returned no files for a changed Dockerfile and Containerfile, and the new one returned both. Every Dockerfile and Containerfile currently in the repository lives under `packages/*/*/images/`, so the broader pathspec does not pick up files from vendored charts. Closes #4892 ### Screenshots N/A: documentation-only change, no UI impact. ### Downstream repositories - [x] No downstream repository is affected by this change - [ ] [cozystack/website](https://github.com/cozystack/website) - follow-up: - [ ] [cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack) - follow-up: - [ ] [cozystack/ansible-cozystack](https://github.com/cozystack/ansible-cozystack) - follow-up: - [ ] [cozystack/ccp](https://github.com/cozystack/ccp) - follow-up: - [ ] [cozystack/talm](https://github.com/cozystack/talm) - follow-up: - [ ] [cozystack/cozyhr](https://github.com/cozystack/cozyhr) - follow-up: - [ ] [cozystack/cozy-proxy](https://github.com/cozystack/cozy-proxy) - follow-up: - [ ] [cozystack/cozystack-telemetry-server](https://github.com/cozystack/cozystack-telemetry-server) - follow-up: - [ ] [cozystack/external-apps-example](https://github.com/cozystack/external-apps-example) - follow-up: - [ ] [cozystack/examples](https://github.com/cozystack/examples) - follow-up: - [ ] [cozystack/community](https://github.com/cozystack/community) - follow-up: ### Release note ```release-note docs(release): make changelog verification check B find changed image build files by matching Dockerfile and Containerfile at any depth ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Chores** * Pre-publish verification now checks for changes to Dockerfiles and Containerfiles throughout the release range, including files outside image-specific directories. This expands the container build-file changes covered by release checks; previously, verification was limited to Dockerfiles in image directories. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
ff461cc41f |
fix(kubernetes): remove cilium dependency from coredns HelmRelease (#5331)
## What this PR does Closes #5315 Removes `spec.dependsOn` on Cilium from the tenant `coredns` `HelmRelease` (`packages/apps/kubernetes/templates/helmreleases/coredns.yaml`). When Hubble Relay is enabled at tenant cluster creation, `hubble-relay` waits on DNS resolution for `hubble-peer.cozy-cilium.svc.cluster.local` before the Cilium `HelmRelease` becomes Ready. Because CoreDNS previously declared `dependsOn` on Cilium, Flux blocked CoreDNS installation until Cilium was ready, creating a circular deadlock. Allowing both `HelmRelease` resources to reconcile concurrently lets CoreDNS retry (`spec.install.remediation.retries: -1`) until Cilium brings up cluster networking, unblocking CoreDNS and Hubble Relay. ### 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(kubernetes): remove cilium dependency from coredns HelmRelease to prevent a circular startup deadlock when Hubble Relay is enabled ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Updates** * CoreDNS no longer waits for the release-specific Cilium HelmRelease dependency before being managed. Its configured values remain unchanged, and installation and upgrade remediation behavior is covered by automated checks. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
0c44188eb5 |
Merge branch 'main' into mattia/pwnescape-kvm-cozystack-talos-dec626
Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
f5479e7093 |
fix(qdrant): scrape TLS metrics over HTTPS (#5340)
## What this PR does Qdrant with TLS enabled serves metrics over HTTPS, but its ServiceMonitor still uses HTTP. Patch the rendered endpoint to use HTTPS with the issued CA and a certificate SAN. The API key and explicit TLS opt-out are preserved. Validation: 3 regression tests and 110 Helm tests pass; both TLS cases fail without the patch. The full Bats run has 183 failures on this macOS host, all reproduced on unchanged main. The POSIX lane has 4 baseline failures as well. ### 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(qdrant): restore metrics scraping for TLS-enabled instances by using HTTPS and verifying the server certificate against the issued CA. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **New Features** * Qdrant monitoring now uses HTTPS when TLS is enabled, with certificate verification and the configured server name. * Monitoring connections use the release’s TLS certificate authority, while non-TLS setups continue to use HTTP. * External Qdrant monitoring uses HTTPS by default. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
5d96897d73 |
build(kafka-operator): vendor Strimzi 1.3.1 (#5372)
## What this PR does
Moves the Kafka operator from Strimzi 1.2.0 to 1.3.1, the only Strimzi
release rebuilt on an OpenJDK that fixes CVE-2026-114938 ("Java4Shell").
The CVE is an out-of-bounds write in the AVX-512 VBMI Base64 decoder of
OpenJDK 17.0.6 and later. A broker decodes Base64 in SASL/SCRAM before
the client is authenticated, so on an x86-64 node with AVX-512 VBMI a
tenant's cluster can be attacked by anyone who reaches its listeners.
Strimzi [rebuilt 1.3.1 and does not plan to rebuild
1.2.0](https://github.com/strimzi/strimzi-kafka-operator/issues/13394).
| Image | Bundled OpenJDK |
|---|---|
| `quay.io/strimzi/kafka:1.2.0-kafka-4.3.1`,
`quay.io/strimzi/operator:1.2.0` (today) | 21.0.12, affected |
| `quay.io/strimzi/kafka:1.3.1-1-kafka-4.3.1`,
`quay.io/strimzi/operator:1.3.1-1` (this PR) | 21.0.13.1, fixed |
What changes:
- The vendored chart is 1.3.1 as published, with no local patches. It
keeps Kafka 4.2.1 and 4.3.1, the two versions the `kafka` application
offers, so no tenant has to change `version`.
- The images are pinned to the suffixed rebuild tags (`1.3.1-1`, bridge
`1.2.1-1`). Strimzi moved the plain `1.3.1` tags onto the rebuild, so a
node that pulled the first build would keep the affected JDK under an
unchanged tag. All ten images the chart references exist under the
suffixed tags.
- The chart drops Kaniko (Buildah is the only Connect builder) and
grants the operator `serviceaccounts/token` and cert-manager
`certificates`, for two features that are off by default.
- The example backup scripts fall back to the same Kafka image and
follow it.
- A first commit makes the Kafka backup strategies (the platform's
topic-metadata strategy and the topic-data demo strategy) SigV4-sign
their S3 requests themselves with `openssl` and `sha256sum` instead of
`curl --aws-sigv4`. The Strimzi 1.3.1-1 images ship curl
`7.76.1-43.el9`, whose RHEL backport of the S3 payload handling signs
`x-amz-content-sha256` without sending it, so SeaweedFS answered every
backup upload and download with 403; that is what failed
`kafka-2-backup-roundtrip` and `kafka-3-metadata-roundtrip` on the first
run of this PR. The commit comes first because it works with the Strimzi
1.2 curl as well, so each commit is green on its own.
Not verified here: nothing was run on a live cluster. The check that
matters is the Kafka E2E on this PR, an upgrade of running clusters from
1.2.0 included. The signing was run against SeaweedFS 4.45 on a
non-default port inside both `quay.io/strimzi/kafka:1.2.0-kafka-4.3.1`
and `1.3.1-1-kafka-4.3.1` (metadata backup, restore and cleanup; demo
upload and download of a binary tarball), and the bats suites hold the
signature to the one botocore computes for the same request.
Notes for the reviewer:
- Strimzi 1.3 requires Kubernetes 1.32 or newer on the cluster the
operator runs on.
- Upgrading rolls every Kafka cluster once.
- This changes CRDs, so it does not reach the release lines, which are
on Strimzi 0.45.1 anyway. Those are covered by the JVM flag in #5371.
- #5371 stays useful after this merges only for the release lines; on
`main` the two do not conflict.
### Screenshots
N/A — no UI changes.
### Downstream repositories
Walked the trigger map against the diff: the vendored chart under
`packages/system/kafka-operator`, its wrapper values, the Kafka strategy
script in `packages/system/backupstrategy-controller/files`, the Kafka
backup examples and their bats suites. No package added or renamed, no
`values.schema.json` or README of an app, no version enum
(`packages/apps/kafka/files/versions.yaml` is unchanged), no platform
values, no `hack/` tooling or make target.
- [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
build(kafka-operator): update Strimzi to 1.3.1, whose images carry an OpenJDK with the fix for CVE-2026-114938 (Java4Shell). Every Kafka cluster rolls once on upgrade. Strimzi 1.3 requires Kubernetes 1.32 or newer. Kafka backups now sign their S3 requests in the strategy script, so they keep working with the curl the new Kafka images ship.
```
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **New Features**
* Added support for projected service-account-token volumes, additional
volume ownership settings, and bind-mount options across Kafka
components.
* Added cert-manager support for cluster and client certificate
authorities.
* Expanded Kafka version options and added broker health panels to the
monitoring dashboard.
* **Updates**
* Updated Strimzi operator, Kafka, and Kafka Bridge images. Kubernetes
1.32 or newer is now required.
* S3 backup and restore requests now support signed requests to
custom-port endpoints.
* **Removals**
* Removed Kaniko executor configuration and documentation.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
|
||
|
|
d7573c009c |
fix(ingress-nginx): pick up the nginx rebuild with the HTTP/2 CVE fixes (#5377)
## What this PR does Moves the ingress-nginx controller to `v1.11.6-cozystack.1`, the same v1.11.6 controller with its nginx 1.25.5 rebuilt with two HTTP/2 fixes from the nginx 1.30 stable branch: | nginx commit | Fixes | | --- | --- | | [`0c87dd1d`](https://github.com/nginx/nginx/commit/0c87dd1db413e440a4e3ef7ee8acc518509e8809) | CVE-2026-123633, HTTP/2 use-after-free when `worker_connections` run out | | [`b89c4100`](https://github.com/nginx/nginx/commit/b89c4100bf6762a45e4a6463eaf4b70368277c94) | CVE-2026-123007, HTTP/2 flow control window overflow | kubernetes/ingress-nginx is archived and will not publish another 1.11.x. The rebuild lives in the fork: cozystack/ingress-nginx-with-protobuf-exporter#13. It compiles nginx from upstream's own sources, patches and configure line, applies the two commits last, and checks the result against the shipped binary. Checked on the published image (`sha256:1d3f0e01…`, amd64 and arm64): - `nginx -v` reports 1.25.5 with upstream's configure arguments, and `nginx -t` passes on the controller's config; - the nginx binary differs from the one in `registry.k8s.io/ingress-nginx/controller:v1.11.6`; - run as `www-data`, nginx binds port 80 and answers 200 over HTTP/2, so `cap_net_bind_service` survived the rebuild. `helm unittest` passes for the chart. Not run on a live cluster. `nginx -v` still says 1.25.5, so scanners that match on the version will keep flagging it. ### Screenshots N/A, no UI changes. ### Downstream repositories Walked the trigger map against the diff: an image tag and digest in `packages/system/ingress-nginx/values.yaml`. No package, 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): the ingress-nginx controller now runs nginx 1.25.5 rebuilt with the HTTP/2 fixes for CVE-2026-123633 and CVE-2026-123007. nginx still reports version 1.25.5. ``` |
||
|
|
0b53d53c01 |
Merge branch 'main' into fix/qdrant-monitoring-tls
Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
91fd8791c1 |
Merge branch 'main' into fix/cluster-flags-bool-false
Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
65cb73e380 |
fix(lineage-webhook): keep an explicit tenantresource false (#4920)
## What this PR does Lets a chart narrow the lineage webhook's `internal.cozystack.io/tenantresource` verdict without being able to widen it. The webhook computes the verdict from the ApplicationDefinition's `secrets` selectors on first admission and copied it over whatever label the chart rendered, so a Secret the definition still selected was projected through `core.cozystack.io/tenantsecrets` whatever the chart said. A `"false"` rendered on a Secret the webhook admits for the first time (CREATE) is now kept; a rendered `"true"` is still replaced by the computed verdict. A re-admission (UPDATE with `managed-by-cozystack` dropped, which the cacert controller does on a selector change) still gets the definition's verdict, because the `"false"` it carries is the one this webhook wrote earlier. This is rollout step 2 of the accepted [user secrets API proposal](https://github.com/cozystack/community/blob/main/design-proposals/user-secrets-api/README.md): during a kind's conversion the converted chart renders the platform-only `<release>-credentials` Secret with `tenantresource: "false"` while the old definition may still select the name, and the label is what keeps that Secret off the projection in the window. It ships on its own because nothing else depends on it and the conversions do. Behaviour otherwise unchanged: an object with no rendered label gets the definition's verdict as before, and the re-admission short-circuit on `managed-by-cozystack` is untouched. Covered by a handler test: on CREATE, a rendered `false` kept where the selector matches, a rendered `true` overwritten where it does not, and no rendered label taking the verdict; on a re-admission UPDATE, a grant where the selector now matches and a revoke where it no longer does. ### Screenshots No UI change. ### Downstream repositories Walked the trigger map against the diff: two files under `internal/lineagecontrollerwebhook`, no CRD, no package, no chart, no values, no `hack/` change. The ApplicationDefinition's selector semantics gain one exception, but the website's ApplicationDefinition page does not describe the projection verdict at that depth, so there is nothing there to update. - [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(lineage-webhook): a Secret created with `internal.cozystack.io/tenantresource: "false"` keeps that label even where its ApplicationDefinition selects the name, so a chart can take a Secret off the tenantsecrets projection; a rendered `"true"` is still overwritten by the definition's verdict. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Bug Fixes** * On resource creation, an existing `false` tenant-resource label is preserved even when the configured selector matches. Otherwise, the label reflects the selector’s verdict. On updates, the label is set according to the selector. * **Tests** * Added coverage for tenant-resource label behavior on creation and updates, including existing and missing labels. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
6afe23e32b |
chore(keycloak): bump Keycloak server to 26.8.2 (#5374)
## What this PR does
Moves Keycloak from 26.6.3 to 26.8.2, the only upstream image rebuilt on
an OpenJDK that fixes CVE-2026-114938 ("Java4Shell").
The CVE is an out-of-bounds write in the AVX-512 VBMI Base64 decoder of
OpenJDK 17.0.6 and later. Keycloak decodes Base64 on requests that
arrive before authentication, so on an x86-64 node with AVX-512 VBMI an
affected instance can be attacked without credentials. Upstream [rebuilt
26.8.2](https://www.keycloak.org/2026/11/java4shell-vulnerability-cve-2026-114938)
and left 26.6 and 26.7 as they were.
| Image | Bundled OpenJDK |
|---|---|
| `quay.io/keycloak/keycloak:26.6.3` (today) | 21.0.11, affected |
| `quay.io/keycloak/keycloak:26.8.2-3` (this PR) | 21.0.13.1, fixed |
What changes:
- `packages/system/keycloak` pins `26.8.2-3`. The suffix matters:
`26.8.2` moves when upstream rebuilds it, and `26.8.2-1` and `26.8.2-2`
still carry the affected JDK.
- `packages/system/keycloak-configure` runs `kcadm.sh` from the same
image and was still on 26.5.2; it moves along so the admin client
matches the server.
### How it was tested
Upgraded a two-replica 26.6.3 instance in place on a dev stand whose
nodes have AVX-512 VBMI, through the same values the release carries:
- The rolling update finished with the HelmRelease ready. The first new
pod ran the Liquibase update and migrated the `master` realm and the
platform realm through 26.7.0, 26.8.0 and 26.8.2.
- While it ran, the old node (Infinispan 16.0.8) and the new one
(16.0.15) shared one cluster view with no compatibility errors; the
final view has both nodes on 16.0.15.
- `java -version` in the pod reports 21.0.13.1.
- 26.8.2 enforces an audience check on the Admin REST API, which was the
main risk for the two admin clients this platform runs. Both pass: the
keycloak-operator, restarted to force a fresh login, reconciled every
resource and created a new realm group with no error and no 401 in its
log; and the `keycloak-configure` hook Job ran `kcadm.sh` from the new
image, with the same read and write calls repeated by hand afterwards.
- OIDC discovery and JWKS answer 200, and the login page of the platform
realm renders for the dashboard client. Submitting the login form was
not exercised.
`helm unittest` passes for both charts.
Notes for the reviewer:
- The database migration is one-way: after the upgrade, rolling the
image back to 26.6.3 is not supported.
- The upgrading guide says one 26.8.2 change (client registration
policies) does not support a rolling upgrade and asks to stop all nodes
first. This chart rolls the two replicas as before; the mixed phase
lasted under a minute in the test and showed no errors, but a deployment
that relies on dynamic client registration during the upgrade window may
see the difference.
- 26.8 also turns on client secret rotation and the SCIM API by default
and stops granting admin roles through identity-provider mappers unless
`allowAdminRoleMapping` is set. None of it is used by the platform's own
realm configuration.
- Custom login themes that override `social-providers.ftl` may need an
update for the redesigned identity-provider buttons.
- For the release lines, where a two-minor jump is not patch-release
material, #5370 adds the JVM flag instead.
### Screenshots
N/A — no UI changes in this repository. The Keycloak login page itself
changes with the upstream release.
### Downstream repositories
Walked the trigger map against the diff: an image tag in
`packages/system/keycloak/values.yaml` and in
`packages/system/keycloak-configure` (values and the template default).
No package added or renamed, no app `values.schema.json` or README, no
platform values key, no variant.
- [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(keycloak): update Keycloak to 26.8.2, whose image carries an OpenJDK with the fix for CVE-2026-114938 (Java4Shell). The upgrade migrates the Keycloak database and cannot be rolled back to 26.6. Custom login themes that override social-providers.ftl should be checked against the redesigned identity-provider buttons.
```
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **Updates**
* Updated the default Keycloak version to 26.8.2-3 across the main
service and its administrative job. The email-update configuration also
uses this version by default. Existing image overrides remain available,
so deployments that specify a custom image can continue using that
setting.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
|
||
|
|
64cc6d2ff1 |
fix(ingress-nginx): pick up the nginx rebuild with the HTTP/2 CVE fixes
The controller image v1.11.6 ships nginx 1.25.5, and the upstream project is archived, so no 1.11.x with a fixed nginx will come. The cozystack fork now rebuilds that same nginx with the two HTTP/2 commits from the 1.30 stable branch (CVE-2026-123633, CVE-2026-123007), and this moves the controller to that build. Assisted-by: LLM Signed-off-by: Andrei Kvapil <kvapss@gmail.com> |
||
|
|
f0eb8d2971 |
test(platform): drop the CRD package from the fixture
cozystack.cozyplane-cilium-crds is now a dependency of the networking package, so a postgres-only install keeps it. Regenerated with hack/select-install.sh --disabled postgres. Assisted-by: LLM Signed-off-by: Timofei Larkin <lllamnyp@gmail.com> |
||
|
|
bd79f08819 |
build(kafka-operator): vendor Strimzi 1.3.1
The Strimzi 1.2.0 images bundle OpenJDK 21.0.12, which is affected by CVE-2026-114938, an out-of-bounds write in the AVX-512 VBMI Base64 decoder that a broker reaches in SASL/SCRAM before the client is authenticated. Strimzi rebuilt only its 1.3.1 images on OpenJDK 21.0.13.1 and does not plan to rebuild 1.2.0. Vendor the 1.3.1 chart as published. It keeps Kafka 4.2.1 and 4.3.1, the versions the kafka application offers, adds 4.2.2 and 4.3.2, drops Kaniko, and grants the operator serviceaccounts/token and cert-manager Certificates for two features that are off by default. Pin the images to the suffixed rebuild tags. Strimzi moved the 1.3.1 tags onto the rebuild, so a node that pulled the first build keeps running the affected JDK under an unchanged tag; 1.3.1-1 does not move. The example scripts fall back to the same Kafka image and follow it. Strimzi 1.3 requires Kubernetes 1.32 or newer. Assisted-by: LLM Signed-off-by: Andrey Kolkov <androndo@gmail.com> |
||
|
|
35634080f4 |
fix(backups): sign Kafka S3 requests without curl --aws-sigv4
The Kafka topic-metadata strategy and the topic-data demo strategy move
their artifacts to and from S3 with the curl of the Strimzi image they
run in, signed by curl --aws-sigv4. The Strimzi 1.3.1-1 images carry
curl 7.76.1-43.el9, whose RHEL backport of the S3 payload handling
(0044-curl-7.76.1-aws-sigv4-s3-unsigned-payload.patch) adds
x-amz-content-sha256 to the canonical headers and to SignedHeaders but
never sends the header. SeaweedFS rejects every signed request, so both
backup Jobs fail with
curl: (22) The requested URL returned error: 403
The 7.76.1-40.el9 curl of the Strimzi 1.2 images has a different
defect, a signed Host without the non-default port it sends, which the
--connect-to workaround covered.
Sign the request in the script with openssl and sha256sum, both in the
Strimzi image, and leave curl only the transport. Sending the missing
header from the script would not do: for an upload the -43 build signs
UNSIGNED-PAYLOAD and the -40 build the empty-body hash, so no single
value satisfies both, and a curl that is fixed to send the header would
then send it twice. With the Host signed as curl sends it, the
--connect-to workaround goes too.
The bats suites hold the signature to the one botocore 1.35.99
S3SigV4Auth computes for the same request at a fixed time. Against
SeaweedFS 4.45 on a non-default port, the metadata script's backup,
restore and cleanup and the demo strategy's upload and download pass
in both quay.io/strimzi/kafka:1.2.0-kafka-4.3.1 and
1.3.1-1-kafka-4.3.1, a key with a space and non-ASCII bytes included,
and a wrong secret still gets 403.
Assisted-by: LLM
Signed-off-by: Andrey Kolkov <androndo@gmail.com>
|
||
|
|
dc74e04f7b |
fix(kubernetes): apply addons.monitoringAgents.valuesOverride
The monitoringAgents addon has exposed a valuesOverride field since it
was added, and the schema and README document it, but the HelmRelease
template never read it. An override was accepted and stored, the
application stayed Ready, and nothing reached the agents: for example a
second vmagent remote-write URL or an extra Fluent Bit output never
showed up in the tenant cluster. Every other addon with valuesOverride
(coredns, cert-manager, ingress-nginx, VPA, cilium) already merges it.
The defaults move into a cozystack.defaultMonitoringAgentsValues helper
and valuesOverride is merged over them with mergeOverwrite, the pattern
those addons use. Lists and multi-line strings are replaced, not
appended: an override of vmagent.remoteWrite.urls or
fluent-bit.config.outputs has to restate the default destination to
keep it. The helper ends with "{{ end }}" rather than "{{- end }}" so
that the filters block keeps its trailing newline.
With no override, the rendered HelmRelease is semantically identical
to the one before (same values, only toYaml key order). A unit test
sets an override and checks that it replaces urls and outputs while the
defaults it does not touch remain; it fails on the previous template.
Refs: #5258
Fixes:
|
||
|
|
026b015635 |
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.
```
|
||
|
|
f4330867ea |
feat(dashboard): let a login link pick the Keycloak identity provider (#5286)
## What this PR does A login link into the dashboard can now name the Keycloak identity provider, so a user who comes from a portal brokered into Keycloak skips the realm login page: ``` https://dashboard.<host>/oauth2/start?kc_idp_hint=<idp-alias>&rd=/admin/tenants ``` The motivating case is a billing portal registered in the realm as an OIDC identity provider. Its "Open dashboard" button today lands every client on "Sign in to <realm>", where they must pick the portal's provider by hand on every new browser or session. Keycloak skips that page when the auth request carries `kc_idp_hint`. The gatekeeper, however, builds the request from a fixed `--login-url`, and oauth2-proxy's flags forward only `acr_values`, `prompt` and `approval_prompt` from `/oauth2/start`. Putting the hint into `--login-url` would force every dashboard login, administrators included, through that one provider. oauth2-proxy can forward an allowed parameter through `providers[].loginURLParameters`, but only in its alpha configuration. The OIDC gatekeeper therefore now runs from one: - `templates/gatekeeper-config.yaml` (new, OIDC only) holds the provider, upstream, listen address and injected headers. The values are exactly what `oauth2-proxy --convert-config-to-alpha` (v7.12.0) produces for the previous flags, both the in-cluster Keycloak branch and the external-discovery branch. On top of those, `kc_idp_hint` is allowed when it matches `^[A-Za-z0-9._-]+$`. That rule and `clientSecretFile` in place of the inline `clientSecret` are the only hand-written lines; everything else, `scope`, `approval_prompt`, `insecureSkipNonce`, `flushInterval` and `timeout` included, is the converter output unchanged. - `templates/gatekeeper.yaml` keeps the flags the alpha configuration does not own (redirect URL, whitelist domain, email domain, API routes, cookie options, `--skip-provider-button`, `--ssl-insecure-skip-verify`). It mounts the config and the `dashboard-client` secret as files (`clientSecretFile`). A checksum annotation restarts the pod when the config changes. - The token-proxy branch (OIDC disabled) is unchanged. A login without the parameter behaves as before. oauth2-proxy logs a warning on start that the alpha configuration format may change between releases. Tests: - **Chart suite.** The gatekeeper suite loads the config template as well, because the deployment checksums it. The "no branding volume" test now asserts the branding volume is absent, not that the pod has no volumes. The five tests that read Keycloak URLs from the container args are removed: those values now sit in the alpha configuration. `helm unittest .` passes, 23 tests. - **E2E.** After the gatekeeper rolls out with OIDC enabled, the in-tree install suite requests `/oauth2/start` through a port-forward and checks the redirect: `kc_idp_hint=e2e-idp` reaches the `cozy` realm's auth URL, and a value outside the allow pattern (`e2e%26prompt%3Dnone`) is dropped. This covers the realm path and the allow rule that the removed chart tests no longer pin. - **Gatekeeper login (`hack/dashboard-gatekeeper-login.bats`).** Renders the chart for a realm other than `cozy`, starts the auth-proxy image with the rendered args and alpha config, and checks the `/oauth2/start` redirect: on the in-cluster Keycloak branch the hint reaches that realm's auth URL, a value outside the allow pattern is dropped, and a login without it carries none; on the external-discovery branch the gatekeeper discovers that realm from a local Keycloak stub and passes the hint. The image is read from the render, so an oauth2-proxy bump re-checks the alpha configuration. Needs docker, like `hack/etcd-grpc-alerts.bats`. - **Real oauth2-proxy v7.12.0 on the rendered config.** Ran with the rendered args and checked: - `/ping` answers OK; - `/oauth2/start?kc_idp_hint=whmcs` puts `kc_idp_hint=whmcs` into the Keycloak auth URL; - `/oauth2/start` without the parameter, or with a value outside the pattern, does not; - a protected path redirects without it; - `/apis/*` stays 401; - `--ssl-insecure-skip-verify` starts fine alongside `--alpha-config`. - **Live cluster.** Swapped in the rendered gatekeeper with the HelmRelease suspended, then reverted: - a brokered user who was already signed in at the portal went from the hinted link straight to the dashboard; - a plain visit still showed the realm login page; - a hinted visit without a portal session went straight to the portal's own login; - API calls from the console worked, so the `Authorization` header injection is intact. ### Screenshots N/A — no console UI changes. The change removes the Keycloak login page from the hinted flow. ### 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: The diff touches only the dashboard gatekeeper templates and their tests. It adds no value, schema, package or platform component. I walked the trigger map against it, and no entry matches. ### Release note ```release-note feat(dashboard): a dashboard login link can name the Keycloak identity provider with `/oauth2/start?kc_idp_hint=<alias>`, so users coming from a brokered portal skip the realm login page. The OIDC gatekeeper now runs oauth2-proxy from an alpha configuration kept in a ConfigMap; logins without the parameter are unchanged. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **New Features** * OIDC-enabled clusters now use updated dashboard sign-in settings, forwarding identity and token information to the dashboard. * Authentication requests use Keycloak’s internal URL when configured; otherwise, logout uses the public Keycloak URL. * Sign-in requests include the OpenID, email, and profile scopes. * Supported identity-provider hints are preserved in sign-in redirects, while invalid hints are excluded. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
e11ca91d81 |
fix(backups): stop leaking MariaDB dumps of stuck runs and torn-down namespaces (#5344)
## What this PR does Closes #5291. Two paths left a MariaDB dump and its `k8s.mariadb.com/Backup` behind after the dump cleanup from #5233. **A run that never completes.** When the operator Backup stays short of `Complete` past `mariadbDefaultBackupDeadline`, the BackupJob now deletes it (background propagation, so its Job goes too) before it marks itself `Failed`, and says so in the failure message. No Cozystack `Backup` is ever made of such a run, so nothing else deleted it, and while it stood its window had no end: `contestedMariaDBDump` counted it as a possible writer of every later dump of the application, and every later `Backup` was released with `ArtifactNotDeleted`. Deleting the Job also stops a run that is still going from uploading a dump nobody tracks. An operator Backup that is `Complete=True` on a reason the driver does not know has a bounded window and is kept, as before. The decision is made on the operator Backup read from the API server, not the cache. A run the operator has just marked complete or failed goes down the normal path and is not deleted. The delete carries the UID and resourceVersion that were read, so a run that completes between the read and the delete is not deleted either. Past the deadline no new run is created, so a pass that deleted the run and then failed to persist `Failed` does not start another one on retry. A delete the API server keeps refusing shows as `Ready=False/OperatorBackupDeleteFailed` on the BackupJob. The delete also removes the run's pod, so before it the controller copies what held the pod up into the failure message: an unschedulable pod, or a container that is waiting or has failed. The MariaDB driver's other failure exits take the same path: the MariaDB application was deleted, the MariaDB CR never came back, the strategy disappeared past its deadline, the strategy no longer renders, the applicationRef is rejected, or the run could not be created. Past the deadline, the run is taken from the API server listing and `ensureMariaDBBackup` is not called, so a cache that has not seen the run cannot cause a second one to be created. mariadb-operator leaves the run of a MariaDB that went away at `Complete=False` for good, so if the application was later recreated under the same name, that run used to contest every later dump. The deadline is still 30 minutes from `StartedAt`, but a dump that is still running at that point is now stopped instead of being left to finish outside Cozystack. **Namespace teardown.** mariadb-operator puts no finalizer on its `Backup`, so during teardown it is usually gone before the Cozystack `Backup` finalizer runs. When the operator Backup is not found, the cleanup now: - takes bucket, prefix and Secret references from the snapshot in `status.underlyingResources`; - goes on only for a recorded dump (`k8s.mariadb.com/dump-file`) on the platform bucket written with the projected platform Secret, reached with the platform credentials, which do not depend on the namespace; - keeps the dump, with a `Warning ArtifactNotDeleted`, when another operator Backup, finished or not, could have written it (the same `contestedMariaDBDump` check as before); - retries a failed delete through `retryMariaDBCleanup`, which releases the `Backup` once the namespace is terminating. The snapshot and the storage URI now record the storage the run was created with, whatever its kind, rather than the strategy as rendered when the run completed. A strategy edited during a run therefore cannot send the cleanup to the wrong place. The BackupJob looks for its run on the API server rather than in the cache, so a retry after a failed status write never starts a second run. A `Running` BackupJob never starts a run at all, and if its run is gone the job is failed. A `Backup` with no recorded dump, no snapshot, a dump on another bucket or written with the tenant's own Secret, or unreadable platform credentials is released with a `Warning`, as before. A missing operator CRD keeps the old release path. The platform-bucket check that `mariadbCleanupConnection` used is now `mariadbPlatformConnection`, shared by both paths. Its behaviour is unchanged. Not covered: - Operator Backups left behind by BackupJobs that failed before this change are still there, because terminal BackupJobs are not reconciled again. Deleting them by hand releases the dumps they hold. - Deleting a BackupJob that is still running leaves its operator Backup, which has no ownerRef and no finalizer. This was already the case and is not addressed here. - The driver-independent terminal exits in `backupjob_controller.go` (BackupClass resolution, credentials projection) still fail a BackupJob without looking at a MariaDB run. - A run that is stopped at the deadline after it has uploaded its dump leaves that dump untracked. No `Backup` is ever made of such a run. The other fail-safe cases listed in the issue (a `Restore` that never completes, the single `Backup` worker, non-204 DELETE responses, endpoint moves) are not addressed here. Tests: `go test ./internal/backupcontroller/...`. The deadline outcome table now also checks whether the operator Backup was deleted. New cleanup tests cover a missing operator Backup: the dump deleted with the platform credentials, already absent, contested by an unfinished run, a failed delete held for retry, and each case it cannot reach (volume storage, a recorded name that is not a dump, a snapshot of another kind). Deadline tests cover a retry after a failed status write, a cache that trails a completed run or misses a new one, a delete conditional on the run that was read, a refused delete, and the application or MariaDB going away mid-run. ### Screenshots N/A, no UI changes. ### Downstream repositories I checked the trigger map in `docs/agents/contributing.md` against the diff. The diff touches `internal/backupcontroller/mariadbstrategy_*.go` and their tests. It also adds a message helper in `internal/backupcontroller/backupjob_controller.go` and changes comments in `internal/backupcontroller/backup_controller.go` and `packages/system/backupstrategy-controller/templates/rbac.yaml`. No values, schemas, CRDs, RBAC rules, annotations or telemetry change. - [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(backups): MariaDB dumps are no longer left in the bucket when a backup run never completes or when a tenant namespace is deleted. A BackupJob that times out now deletes the operator Backup it gave up on, so that run no longer blocks the deletion of later dumps. A Backup whose operator Backup is already gone now deletes its recorded dump from the platform bucket using the platform credentials. A MariaDB backup run that has not completed 30 minutes after its BackupJob started is now stopped. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Bug Fixes** * MariaDB backup cleanup now removes a recorded dump from the platform bucket when its operator Backup is already gone, while leaving contested or insufficiently verified dumps untouched. * Failed dump deletions are retried, and cleanup reports when a dump is already absent. * Backup jobs are less likely to start duplicate runs during retries, and completed backups retain the storage configuration used by their run. * Failure handling preserves completed runs and includes operator-run completion details when available. * Backup jobs now recheck the operator Backup before failing on a deadline, helping account for runs that completed or failed in the meantime. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
cfb5119c0b |
feat(build): attach a provenance attestation beside the SBOM (#5043)
## What this PR does Follow-up to #4997 (merged as |
||
|
|
65f0943710 |
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> |
||
|
|
0ec0add620 |
chore(keycloak): bump Keycloak server to 26.8.2
quay.io/keycloak/keycloak:26.6.3 bundles OpenJDK 21.0.11, which is affected by CVE-2026-114938, an out-of-bounds write in the AVX-512 VBMI Base64 decoder that Keycloak reaches before authentication. Upstream fixed it by rebuilding the 26.8.2 image on OpenJDK 21.0.13.1 and did not rebuild 26.6 or 26.7. Pin the 26.8.2-3 tag: 26.8.2 moves when upstream rebuilds it, and 26.8.2-1 and 26.8.2-2 still carry the affected JDK. keycloak-configure runs kcadm.sh from the same image and was still on 26.5.2; move it along so the admin client matches the server. Tested by upgrading a two-replica 26.6.3 instance in place: the rolling update migrated the database and both realms to 26.8.2, the old and the new node shared one cluster while it ran, the keycloak-operator reconciled every resource against the new Admin API, and the kcadm.sh hook passed. Assisted-by: LLM Signed-off-by: Andrey Kolkov <androndo@gmail.com> |
||
|
|
6da59b7ed0 |
fix(gateway): give the remedy for an unserved class
A tenant that chose the unserved class itself cannot fix the render by asking the operator to change the platform default: its own choice wins. Tell it to change or clear tenant.spec.gatewayClass instead. Assisted-by: LLM Signed-off-by: Timofei Larkin <lllamnyp@gmail.com> |
||
|
|
7375196b8b |
test(cozystack-api): require core in OpenAPI v2
An empty v2 path set satisfied the check that no sdn path is listed. Assisted-by: LLM Signed-off-by: Timofei Larkin <lllamnyp@gmail.com> |
||
|
|
6fdd37ad81 |
build(cozyplane): keep the chart on a failed update
Stage the download next to its destination so the final step is a rename on the same filesystem, and drop the staging directory when the download fails. The Cilium CRD recipe also fails on an HTTP error now instead of saving the error body as a CRD. Assisted-by: LLM Signed-off-by: Timofei Larkin <lllamnyp@gmail.com> |
||
|
|
0913b8d046 |
fix(platform): reject out-of-range serviceCIDR
The clusterDNS derivation accepted any one-to-three-digit octet and any two-digit prefix, so 10.96.256.0/24 carried into the previous octet and derived 10.97.0.10. Bound each octet to 0-255 and the prefix to 0-32. Assisted-by: LLM Signed-off-by: Timofei Larkin <lllamnyp@gmail.com> |
||
|
|
d5957159d2 |
fix(platform): install Cilium CRDs before cozyplane
Linstor, monitoring-agents and the other packages that embed CiliumNetworkPolicy objects order themselves after cozystack.networking only. On the cozyplane variant nothing ordered the inert CRD package before them, so a fresh install could apply those objects first. Assisted-by: LLM Signed-off-by: Timofei Larkin <lllamnyp@gmail.com> |
||
|
|
7f31011b99 |
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`. ``` |
||
|
|
c98a345aa1 |
docs(api): clarify health check parsing and evaluation (#4495)
## What this PR does Clarifies the lifecycle of HelmRelease CEL health checks. helm-controller parses and validates these expressions and creates a status reader factory before choosing how to wait. The factory constructs the concrete status reader when the selected wait path creates its resource manager. Invalid configuration can therefore stall the HelmRelease with reason InvalidCELExpression even when the release.cozystack.io/helm-install-disable-wait annotation is set or the legacy wait strategy is selected. Once setup succeeds, only helm-controller's poller evaluates expressions: while a Helm action waits under the poller strategy, and for Helm hooks, which are still waited on when the annotation disables wait. Without the annotation, the legacy strategy never evaluates them. With it, hooks are evaluated whatever the strategy, because disabling wait takes precedence. The monitoring template comment now also distinguishes an existing status object without `updateStatus` from a completely absent top-level `status` key. The former evaluates the predicates to false, while the latter can produce an evaluation error and an Unknown result. The poller continues waiting in both cases. The CEL expressions and runtime behavior are unchanged. The generated ApplicationDefinition CRD description was regenerated from the Go field documentation. Fixes #4388 ### Screenshots N/A — 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: ### Release note ```release-note NONE ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Clarified when health-check expressions are validated and evaluated across wait strategies and Helm hooks, including how invalid expressions can affect Helm releases. * Explained how missing status fields affect health-check results and that polling continues until the resource is operational or times out. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
dbc088f862 |
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> |
||
|
|
73df99b77d |
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> |
||
|
|
5c690f96bd |
docs(gateway): stop saying the route-hostname policy admits hostname-less routes
Since 1.7 cozystack-route-hostname-policy requires spec.hostnames to be present and non-empty on HTTPRoute, TLSRoute and GRPCRoute in tenant-* namespaces, so the edge-termination section no longer matches the platform. The website builds its Gateway reference page from this README, so the stale sentence would be published as is. Refs: #4938 Assisted-by: LLM Signed-off-by: Adham Kiwan <adhamkiwan@outlook.com> |
||
|
|
421dc2a0a7 |
test(dashboard): require the exact hint in the e2e redirect check
The case pattern *kc_idp_hint=e2e-idp* also accepted e2e-idp-other and xkc_idp_hint=e2e-idp. Match the parameter as a whole: preceded by &, followed by & or the end of the URL. Assisted-By: LLM Signed-off-by: Andrey Kolkov <androndo@gmail.com> |
||
|
|
887453c008 |
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> |
||
|
|
5fbf7e9a38 |
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> |
||
|
|
589c895d59 |
test(migrations): build each migration test image once per file
Every test in the migration 54, 55, 57, 58, 59 and 61 bats files called prep(), and prep() ran `docker build -t` for one fixed tag. Tests in a file run concurrently under bats -j, so on a cold cache several builds of that tag ran at once. With the containerd image store a retag to a different image deletes the old one before creating the new one, and a sibling's `docker run` that resolved the tag in between found nothing locally and fell back to a pull of an image that does not exist. Build the image in setup_file, before any test of the file starts. prep() keeps a fallback build for a run without setup_file, taken only when the tag is missing. Closes: #5299 Assisted-by: LLM Signed-off-by: Adham Kiwan <adhamkiwan@outlook.com> |
||
|
|
ffb3b6faf3 |
test(hack): check hook scripts under files/ for --request-timeout
The guard against a non-zero --request-timeout on in-cluster kubectl calls only read chart templates. A chart that loads its hook script with .Files.Get runs it with the same in-cluster credentials, so a flag in packages/*/*/files/ went through unchecked; a review, not the guard, caught it in #4915. It also matched only the --request-timeout=<value> form, while kubectl accepts --request-timeout <value> as well. Scan shell scripts under files/ too, recognised by a .sh suffix or a sh/bash shebang, through env or env -S included, and match the space-separated form and quoted values when a non-zero number follows, so prose about the flag in comments stays quiet. The new cases run the scan on a throwaway tree. Closes: #5304 Assisted-by: LLM Signed-off-by: Adham Kiwan <adhamkiwan@outlook.com> |
||
|
|
a314dacb86 |
fix(platform): honour a bool false in ingress-enabled and monitoring-enabled
Helm's default treats a bool false as empty, so an unquoted false in either _cluster flag still rendered _namespace.ingress and the monitoring redirects. Check for a missing key first and require "true" or a bool true otherwise. Assisted-by: LLM Signed-off-by: Yan Bondarenko <202671653+yankawai@users.noreply.github.com> |
||
|
|
c498375ce1 |
feat(cozyplane): bump to the v0.1.2 release
Re-vendor at upstream v0.1.2. The agent now exits with a pointer to the tracking issue on a node without IPv4 or without a default route, instead of coming up unable to serve one, and the controller writes the VIP a VPC knows an attached Service by onto the Service. The wrappers now pin the release images by tag and digest. The vendored chart pins a digest only, which the repo's image tooling does not read inside a vendored chart, so the cozyplane images were never mirrored or promoted; a depth-two values.yaml is where that tooling looks. Assisted-by: LLM Signed-off-by: Timofei Larkin <lllamnyp@gmail.com> |
||
|
|
e6d7671b19 |
fix(platform): keep tenant Gateways off an unserved class on cozyplane
The guard against the bundled cilium GatewayClass on the cozyplane variant compared the raw gateway.className, while apps.yaml trims it and defaults an empty one to cilium before tenants see it, so "" and " cilium " passed and still resolved to a class nothing serves. It also ran only for the platform's gateway flag: a tenant enabling its own Gateway never reached it. The platform guard now compares the resolved class. For the tenant path, the platform lists the classes no controller serves in _cluster.gateway-unserved-classes, cilium on cozyplane, and the gateway chart refuses a resolved class in that list, whether the tenant chose it or inherited the default. Classes the operator makes selectable keep working. Assisted-by: LLM Signed-off-by: Timofei Larkin <lllamnyp@gmail.com> |
||
|
|
d15fb0fc35 |
docs(platform): mark the cozyplane variant experimental
Once merged the variant is one value away, and the values comment is what an operator reads before choosing it, so it now says the variant has no e2e coverage and is not for production. The threat model's note also lists what the variant leaves unenforced beyond tenant isolation: the platform components' own Cilium policies, several of them ingressDeny rules that native NetworkPolicy cannot express. Assisted-by: LLM Signed-off-by: Timofei Larkin <lllamnyp@gmail.com> |
||
|
|
98c21690e6 |
test(platform): list the cozyplane packages in the selective-install fixture
The two PackageSources the variant adds were missing from the fixture hack/select-install.sh generates, which failed the unit-test job and with it every E2E run. Regenerated with hack/select-install.sh --disabled postgres. Assisted-by: LLM Signed-off-by: Timofei Larkin <lllamnyp@gmail.com> |