mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-30 04:06:34 +09:00
a069636a4eafafc72b97a7ca60d18e3fcd3398cd
8487
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
a069636a4e |
fix(api): read a null value as absent in a reservation declaration
Helm deletes a key its values set to null, so a chart treats
`resources: {cpu: null}` as if cpu were not set. The evaluator's
defaulting replaced a null only where the schema had a default to put
in its place, so elsewhere the key stayed present: has() reported it,
and an expression reading it failed, for instance with "no such
overload: matches", on a spec the chart renders.
Nulls are dropped after defaulting, so a schema default still fills a
nulled key the way it fills an absent one.
Tested with a nulled key that has no default.
Fixes:
|
||
|
|
6f705fe0e9 |
fix(api): keep exact quantity products the int64 coefficient cannot hold
resource.Quantity.Mul returns false when the product no longer fits an
int64 coefficient, not when it is wrong: it carries on in arbitrary
precision. The evaluator read that as an overflow and failed with
"quantity 20992Mi * 3 overflows" for any fractional binary quantity
above about 8.5Gi, since such a quantity is stored at a scale whose
coefficient leaves int64 long before its value does. Declared sizes
like 20.5Gi are ordinary, so every pool or disk using one could not be
reserved.
Tested with fractional Gi and Ti quantities scaled directly and after a
sum.
Fixes:
|
||
|
|
a9245ec165 |
fix(api): accept the quantities the CEL add and sub return
The Kubernetes CEL quantity library returns a pointer from add and sub,
while quantity() and the evaluator's own mul return a value. The
evaluator matched only the value form, so any declaration that summed
quantities failed with "expression returned kubernetes.Quantity,
expected an int, a double, a string or a quantity", or with "no such
overload" when the sum was then scaled with mul. A kind whose
reservation is a sum of components, such as a control plane, could not
be declared at all.
Both forms are matched by type rather than read through Value(), which
would first materialize any other result, a list included, outside the
expression's cost limit.
Tested with add, sub, add of an int, and mul on either side of a sum.
Fixes:
|
||
|
|
d88322197f |
chore(deps): roll up Renovate updates and raise dependencies to latest stable (#4869)
## What this PR does One PR instead of separate Renovate PRs. Go modules, Dockerfile base images and GitHub Actions move to newer versions that build and pass the tests. Where a newer version is known to break something, it stays behind, and `.github/renovate.json` holds it with the reason in the rule description. The tests come first, in their own commits: - `make go-unit-tests` runs the Go tests under `pkg/` and `cmd/`, except the backport-batch suite, which keeps its own target. The apiserver serializer and fuzz tests, the generated OpenAPI and applyconfiguration suites, the apis packages and the controller, operator and observability-proxy commands did not run in CI before. - The apps API surface that apiserver libraries shape is pinned: server-side apply, content negotiation, Table output on watch, the served OpenAPI v2 and v3 documents, and building the server without etcd. Two answers look wrong and are pinned as they are today: applies from different field managers never conflict (#4857), and protobuf is refused with 406 even when the client offers JSON as a fallback (#5297). - New tests cover the kubeovn webhook patch, the token proxy session cookie and the mount-utils behaviour the kubevirt CSI node service relies on. - `hack/image-smoke.bats` checks the tools the CSI, LINSTOR, multus, Harbor and redis-backup images take from their base images or build stages, and that the kubevirt CSI node plugin and its sidecars need no more than x86-64-v2. Each PR build job runs it against the images it pushed; forks and the unit lane run no container. The tests found two bugs: - The kubeovn webhook dereferenced a nil pointer on an admission review without a request, so the caller got a dropped connection instead of a 400. - The token proxy cookie refresh never fired: securecookie decodes the session times as int64 and the refresh looked for float64, so the `--cookie-refresh=1h` the chart sets did nothing. A refreshed cookie keeps the token's expiry. A session too large to encode now shows an error at sign-in and leaves the current cookie alone on refresh. What moved: - GitHub Actions to their Node 24 majors. The flux action stays on the tag of the Flux CLI it installs. The release job's checkout no longer persists credentials, so its staging branch push uses the App token. - Go 1.27.2 for the toolchain and builders. Builds that reproduce an upstream release keep the Go upstream uses: Harbor, cilium-operator, SeaweedFS and the chainsaw stage of the e2e sandbox. - controller-runtime v0.25.2, gateway-api v1.6.3 on the minor of the installed v1.6.1 CRDs, cel-go v0.30.0, grpc v1.84.0, etcd v3.7.2, cert-manager v1.21.2, kubevirt csi-driver f10ae94 on Kubernetes v0.37.1. - Node 24 for the dashboard console. Held back, each with its reason in the Renovate rule: - cel-go stays below v0.31: the old repository has no tags past v0.30.0, and v0.32 moves to cel.dev/cel-go, which k8s.io/apiserver does not import. - kube-openapi stays on the commit its dependencies require, and structured-merge-diff stays on v6, because k8s.io/apimachinery v0.37 does not compile against v7. - The Flux API modules stay on the Flux v2.8 line the platform installs. - gomodules.xyz/jsonpatch stays on v2, which controller-runtime's admission.Patched takes. - jwx stays on v3: v4 removes jwk.Cache, which the token proxy's JWKS refresh is built on. - kubevirt.io/api and the CDI API stay where upstream csi-driver builds. - The kubevirt CSI driver image stays on AlmaLinux 9, because AlmaLinux 10 builds its amd64 userland for x86-64-v3. - shadowbox stays on node 18, which outline-server declares in its engines. - The e2e sandbox stays on Ubuntu 24.04. 26.04 ships uutils coreutils, whose `date` costs about 4x per call, and the test harness forks it per traced line, which adds about ten minutes to the install phase. - clastix/kubectl stays on v1.32 for the cleanup hooks, within kubectl's one-minor skew. The cert-manager Go module (v1.21.2) is one minor ahead of the installed chart (v1.20.2). The Certificate objects the gateway controller writes serialize the same either way. `api/apps/v1alpha1` now requires Go 1.27.2, which applies to every module that imports the published types. The Linux run with Go 1.27.2 was done before the rebase onto current main, and the rebased head has not been through it yet. There the five modules built, vetted, tested and tidied cleanly, and the repository unit, controller and envtest lane passed. `go test -race` passed in four modules. In the root module it failed only on a pre-existing data race in the workload monitor tests (#5296), which main has too. The image smoke checks run in this PR's CI. ### Screenshots No UI change. ### Downstream repositories `api/apps/v1alpha1` moves to `go 1.27.2`, and cozystack/terraform-provider-cozystack imports it, so that repository is affected but needs no action. Its box stays empty for that reason, and so does the "not affected" one. - [ ] No downstream repository is affected by this change - [ ] [cozystack/website](https://github.com/cozystack/website) - follow-up: - [ ] [cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack) - follow-up: none needed, because its Renovate raises the go directive together with the pin bump and its CI takes Go from `go.mod`; the only effect is that the provider's minimum Go becomes 1.27.2. - [ ] [cozystack/ansible-cozystack](https://github.com/cozystack/ansible-cozystack) - follow-up: - [ ] [cozystack/ccp](https://github.com/cozystack/ccp) - follow-up: - [ ] [cozystack/talm](https://github.com/cozystack/talm) - follow-up: - [ ] [cozystack/cozyhr](https://github.com/cozystack/cozyhr) - follow-up: - [ ] [cozystack/cozy-proxy](https://github.com/cozystack/cozy-proxy) - follow-up: - [ ] [cozystack/cozystack-telemetry-server](https://github.com/cozystack/cozystack-telemetry-server) - follow-up: - [ ] [cozystack/external-apps-example](https://github.com/cozystack/external-apps-example) - follow-up: - [ ] [cozystack/examples](https://github.com/cozystack/examples) - follow-up: - [ ] [cozystack/community](https://github.com/cozystack/community) - follow-up: ### Release note ```release-note chore(deps): move the toolchain and builder images to Go 1.27.2 and raise Go modules, base images and GitHub Actions to newer working releases; the dashboard token proxy now refreshes its session cookie, and the kube-ovn webhook rejects an admission review without a request instead of dropping the connection. ``` |
||
|
|
693ff070e5 |
chore(goldpinger): bump vendored chart to 1.2.0 (#4877)
## What this PR does Update the vendored Goldpinger chart to include upstream Gateway API support for the work tracked in #4788. HTTPRoute and UDP probing remain disabled by default. With the package's current values, the rendered resources differ only in the image tag and version labels. The DaemonSet selector is unchanged. The umbrella chart also declares the vendored dependency so Helm can lint it. ### Screenshots Not applicable. This PR updates the chart and package metadata; it does not change the UI source. ### Downstream repositories - [x] No downstream repository is affected by this change - [ ] [cozystack/website](https://github.com/cozystack/website) - follow-up: - [ ] [cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack) - follow-up: - [ ] [cozystack/ansible-cozystack](https://github.com/cozystack/ansible-cozystack) - follow-up: - [ ] [cozystack/ccp](https://github.com/cozystack/ccp) - follow-up: - [ ] [cozystack/talm](https://github.com/cozystack/talm) - follow-up: - [ ] [cozystack/cozyhr](https://github.com/cozystack/cozyhr) - follow-up: - [ ] [cozystack/cozy-proxy](https://github.com/cozystack/cozy-proxy) - follow-up: - [ ] [cozystack/cozystack-telemetry-server](https://github.com/cozystack/cozystack-telemetry-server) - follow-up: - [ ] [cozystack/external-apps-example](https://github.com/cozystack/external-apps-example) - follow-up: - [ ] [cozystack/examples](https://github.com/cozystack/examples) - follow-up: - [ ] [cozystack/community](https://github.com/cozystack/community) - follow-up: ### Release note ```release-note chore(goldpinger): bump vendored chart to 1.2.0 (goldpinger 3.11.5); new HTTPRoute and UDP probe options are disabled by default ``` |
||
|
|
9813d13dcd |
fix(kamaji): drop kubelet config fields older tenants do not know (#4896)
## What this PR does
Older tenant Kubernetes versions receive kubelet config fields they do
not know. The pinned Kamaji 26.9.4-edge build uses the Kubernetes 1.37
libraries to render `kube-system/kubelet-config`:
| Field | Known since | Rendered for tenants |
| --- | --- | --- |
| `memoryReservationPolicy` | 1.36 | v1.31 to v1.35 |
| `mergeDefaultEvictionSettings` | 1.33 | v1.31 to v1.32 |
| `crashLoopBackOff` | 1.32 | v1.31, as `crashLoopBackOff: {}` |
On a v1.35 tenant, `kubeadm join` logs:
```text
configset.go:176 error unmarshaling configuration schema.GroupVersionKind{Group:"kubelet.config.k8s.io", Version:"v1beta1", Kind:"KubeletConfiguration"}: strict decoding error: unknown field "memoryReservationPolicy"
```
Nodes still join, because kubeadm only logs this and decodes leniently,
dropping the field. Anything that decodes this ConfigMap strictly fails.
The compatibility patch drops these fields when the tenant version
predates them, including fields added by a user JSON patch. Supported
fields are kept. The version checks conservatively treat a pre-release
as older than its minor; early alpha releases can lack that minor's
fields. A running tenant gets the cleaned ConfigMap the next time Kamaji
uploads it.
JSON removals cannot fully replace this on the current build: Kamaji
decodes patched JSON back into a Go struct, restoring a removed
`crashLoopBackOff` as `{}`. The kubernetes chart also does not render
`kubelet.configurationJSONPatches`.
Upstream fixed JSON patch removal in 26.10.4-edge (clastix/kamaji#1347).
With that bump, the chart can render version-dependent removals and
replace this compatibility patch. This PR keeps the fix for 26.9.4-edge.
The regression tests cover field presence for tenants v1.31 to v1.37,
selected pre-releases, user patches, invalid versions, defaults and
`UploadKubeletConfig` with a fake client. The image build runs the tests
of packages touched by its patches.
Tested on Linux:
- Against upstream Kamaji commit
`1c3d84ae94473e94945ad01b2540ec319478bce4`, the new tests fail with the
current main patch in the three compatibility tests. With this patch,
the Go tests in every package touched by the patches pass, and the
Kamaji build succeeds.
- The repository unit lane passes.
I did not run a strict-decoding matrix against each Kubernetes minor for
this version.
### Screenshots
Not a UI change.
### Downstream repositories
- [x] No downstream repository is affected by this change
- [ ] [cozystack/website](https://github.com/cozystack/website) -
follow-up:
- [ ]
[cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack)
- follow-up:
- [ ]
[cozystack/ansible-cozystack](https://github.com/cozystack/ansible-cozystack)
- follow-up:
- [ ] [cozystack/ccp](https://github.com/cozystack/ccp) - follow-up:
- [ ] [cozystack/talm](https://github.com/cozystack/talm) - follow-up:
- [ ] [cozystack/cozyhr](https://github.com/cozystack/cozyhr) -
follow-up:
- [ ] [cozystack/cozy-proxy](https://github.com/cozystack/cozy-proxy) -
follow-up:
- [ ]
[cozystack/cozystack-telemetry-server](https://github.com/cozystack/cozystack-telemetry-server)
- follow-up:
- [ ]
[cozystack/external-apps-example](https://github.com/cozystack/external-apps-example)
- follow-up:
- [ ] [cozystack/examples](https://github.com/cozystack/examples) -
follow-up:
- [ ] [cozystack/community](https://github.com/cozystack/community) -
follow-up:
### Release note
```release-note
fix(kamaji): stop writing kubelet config fields that older tenant Kubernetes versions do not know, such as memoryReservationPolicy on tenants before v1.36, so strict decoders of the kubelet-config ConfigMap no longer fail.
```
|
||
|
|
fd426c7e4b |
build(monitoring): respin the Alerta image on a patched base (#5334)
Supersedes #5244 and #5333: the same change from an in-tree branch, so CI can build the new image. Includes main merged in and the test fixture fix from #5333. ## What this PR does Alerta 9.1.0 is the latest upstream release, and `alerta/alerta-web:9.1.0` still ships the Debian packages of its build day, the compiler toolchain and `-dev` headers it built wheels with, and Python packages whose fixes landed after the release. The monitoring chart ran that image by tag, without a digest. This builds the Alerta image in-tree from the upstream one: - `images/alerta/Containerfile` starts from `alerta/alerta-web:9.1.0` pinned by its index digest, upgrades the OS packages, purges the build-only packages and lifts the affected Python packages within the ranges the installed packages declare (`pip check` gates the build). `cryptography` stays below 47 because `pyOpenSSL` requires it; `lxml` stays on 5.x. - The result is copied into an empty image so the purged files are really gone, and the upstream image config (env, user, ports, entrypoint, command) is restated exactly; `docker-entrypoint.sh` renders the nginx, uWSGI and Alerta configs from those variables. The image is 752 MB against 1.32 GB upstream; a purge layer on top would have made it 1.78 GB. - `make image` builds it as `alerta:v9.1.0-cozystack.0` and writes the digest into `alerta.image`, like the traces collector. Until then the default is the digest-pinned upstream image. - The Deployment takes the image from `alerta.image` through `cozy-lib.image`, so mirrored-registry installs work for Alerta as they do for Grafana. Trade-off: `apt-get upgrade` takes whatever Debian has at build time, so two builds of one revision can differ. That is what a respin is for; bump `ALERTA_COZYSTACK_REV` to publish a fresh one. Testing (podman, amd64): - With `postgres:17-alpine` and the chart's env, Alertmanager v4 webhooks to `/api/webhooks/prometheus`: firing critical → 201 and the alert open; `event=Heartbeat` → 202 and the heartbeat recorded; resolved → 201 and the alert closed. Admin login 200, UI 200, no ERROR in the logs, and `alerta_telegram`, `alerta_slack`, `alerta_prometheus` import. Upstream 9.1.0 gives the same results with the same script. - `trivy rootfs`, CRITICAL and HIGH: 29/940 → 3/76. The three critical left (sqlite CVE-2025-7458, libxml2 CVE-2026-6653, zlib CVE-2023-45853) and every remaining Debian HIGH have no Debian 12 fix; the remaining Python HIGH are cryptography and lxml, held back as above. - `helm unittest .` (306 tests, including the new `tests/alerta_image_test.yaml`) and `helm template`. - arm64 was not built locally; aarch64 cp313 wheels exist for every upgraded Python package, so the purged toolchain is not needed there. ### Screenshots No UI changes. ### Downstream repositories - [x] No downstream repository is affected by this change - [ ] [cozystack/website](https://github.com/cozystack/website) - follow-up: - [ ] [cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack) - follow-up: - [ ] [cozystack/ansible-cozystack](https://github.com/cozystack/ansible-cozystack) - follow-up: - [ ] [cozystack/ccp](https://github.com/cozystack/ccp) - follow-up: - [ ] [cozystack/talm](https://github.com/cozystack/talm) - follow-up: - [ ] [cozystack/cozyhr](https://github.com/cozystack/cozyhr) - follow-up: - [ ] [cozystack/cozy-proxy](https://github.com/cozystack/cozy-proxy) - follow-up: - [ ] [cozystack/cozystack-telemetry-server](https://github.com/cozystack/cozystack-telemetry-server) - follow-up: - [ ] [cozystack/external-apps-example](https://github.com/cozystack/external-apps-example) - follow-up: - [ ] [cozystack/examples](https://github.com/cozystack/examples) - follow-up: - [ ] [cozystack/community](https://github.com/cozystack/community) - follow-up: (Trigger map walked against the diff: only packages/system/monitoring — an image build, a values key with no schema, a template line and a test. No apps/extra package, schema, platform value, hack tooling or CRD changes.) ### Release note ```release-note build(monitoring): Alerta now runs a cozystack respin of 9.1.0 on an upgraded Debian base, without the build toolchain and with patched Python dependencies; its image is pinned by digest and follows the cluster images registry. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Updates** * Alerta now runs from a pinned, refreshed container image. * The Alerta image can be configured, and deployments respect the configured image registry. * The default image is replaced with the Cozystack-built image when using the image build workflow. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
a3e60ec372 |
feat(kafka)!: run on Strimzi 1.2.0 and Kafka 4.x (#4900)
<!-- Thank you for making a contribution! Here are some tips for you: - Use Conventional Commits for the PR title: `type(scope): description` - Types: feat, fix, security (a fix that comes through a security advisory), docs, style, refactor, perf, test, build, ci, chore - Scopes are not an exhaustive list — pick the most specific scope for the change and extend the list when a genuinely new area appears. Examples: - System components: dashboard, platform, operator, cilium, kube-ovn, linstor, fluxcd, cluster-api - Managed apps: postgres, mariadb, redis, kafka, clickhouse, virtual-machine, kubernetes - Development and maintenance: api, hack, tests, ci, docs, maintenance - Breaking changes: append `!` after type/scope (`feat(api)!: ...`) or add a `BREAKING CHANGE:` footer - If it's a work in progress, consider creating this PR as a draft. - Don't hesistate to ask for opinion and review in the community chats, even if it's still a draft. - Fixes merged to `main` reach the release lines the backport batch runs for automatically, so do not open backport PRs by hand: https://github.com/cozystack/cozystack/blob/main/docs/release/backports.md --> ## What this PR does This upgrades the Kafka operator to Strimzi 1.2.0. Kafka 4.3 is the application default, with 4.2 also available. Upgrades must pass through Cozystack v1.7 and finish the ZooKeeper-to-KRaft migration first. The upgrade now stops while any Kafka lacks KRaft evidence. Every Kafka must report a nonempty `kafkaMetadataVersion` and the `KRaft` metadata state. The API conversion deletes that state, so without it a Kafka needs `Ready=True` or the `cozystack.io/kraft-verified` annotation, which migration 61 writes on every Kafka it accepts before it stops the operators. Any other explicit state blocks, and the error gives the reason for each Kafka. On every variant, the platform chart refuses to switch package sources while Strimzi still serves `v1beta2` and a Kafka fails that check. On variants without the migration hook, it also refuses while any Strimzi CRD still stores `v1beta2`, so `/migrations/61` has to run first. Migration 61 checks the same evidence again, including on repeat runs, and blocks unfinished broker-pool drains. A manual change that bypasses the managed package source is outside this check. Existing Kafka 3.x applications move to v4.3. Kafka 4 no longer accepts clients older than Kafka 2.1. Kafka 4 also rejects the topic settings `message.format.version`, `message.downconversion.enable` and `message.timestamp.difference.max.ms`, and a `segment.bytes` below 1 MiB (1048576), which Kafka 3.x accepted down to 14 bytes. A Kafka 4 broker whose log holds such a topic does not start. The chart now refuses to render a topic that sets any of these. The platform upgrade refuses to start while a Kafka application sets one, and migration 61 also checks KafkaTopic resources, so topics created outside the chart are caught too. A topic created through the Kafka admin API without a KafkaTopic is not visible to these checks. Restoring a topic-metadata backup taken on Kafka 3.x skips the three removed settings and raises a smaller `segment.bytes` to 1 MiB, with a warning for each. In-place downgrades are unsupported. The default 10-minute Helm timeout can leave a long broker roll Failed until its retry succeeds. The migration does not run automatically on every platform variant. Only the `isp-*` variants run it automatically. On other variants, run `/migrations/61` from the matching migrations image before upgrading, as the Kafka README describes. This includes clusters that run no Kafka but have the kafka-operator package, from the `paas` bundle or `bundles.enabledPackages`. Their Strimzi CRDs still store `v1beta2` even with no objects. The migration converts Strimzi resources and stored Helm references to `v1`. It stamps platform version 62. Running it manually also skips earlier migrations on a later move to an `isp-*` variant. Before it stops the operators, migration 61 refuses objects that the Strimzi 0.51 conversion tool would reject and names each one, for example a Kafka with `.spec.kafka.resources` or with OAuth, Keycloak or OPA settings. A failed conversion can leave the old operators stopped until the migration succeeds and the operator release upgrades. The failed conversion Job stays for diagnosis, but its ClusterRole, binding and ServiceAccount are removed. A Job that is still running when the wait times out keeps them, because the retry waits for it. Known limitations. Migration 61 converts with the old operator stopped, while Strimzi's conversion guide expects a running operator of 0.49 or later. I stop it because 0.45 keeps writing the Kafka status through `v1beta2`, but I have not checked this on a live cluster. Objects Strimzi created keep `ownerReferences` to `v1beta2` until Strimzi 1.2 reconciles them. Deleting a Kafka before that can leave dependents behind, and the chart's pre-delete hook covers only StrimziPodSets. The conversion image is pulled from quay.io by digest with no values override, so an air-gapped cluster has to mirror it under the same name. The full offline unit run passed on Linux on `1171d63adfafb45be34214fb9a0f565723e255fd`: 2,576 cases, no failures, errors or skipped tests. Later changes were checked on `69c704499fa4` with the Bats tests for migration 61, the migration runner, the Kafka hooks and the Kafka backup scripts (102), the platform Helm suite (310 tests) and the Kafka Helm suite (91 tests). After the rebase onto `main` at `5a5d5cd3d85f`, `a48a2f259947` passes the same Bats tests (115) and the platform and Kafka Helm suites (326 and 103 tests). It also passes the new check against added `documentIndex` selectors. I have not validated this revision on a live cluster. Closes #4365 ### Screenshots <!-- REQUIRED for UI changes: attach screenshots or screen recordings demonstrating the visual impact of your changes. PRs with UI changes without screenshots will not be merged. --> Not a UI change. ### Downstream repositories <!-- Cozystack is upstream for repositories that are NOT kept in sync with it automatically, and nothing in CI compares the two sides, so a change here can break them silently. Which change forces what, and which file to touch, is the trigger map in docs/agents/contributing.md under "Downstream Repositories". Walk it before you tick anything. IF YOU ARE AN AI AGENT OR AN LLM, THIS IS PART OF THE TASK, NOT A FORM TO FILL IN: 1. Walk the trigger map against the actual diff of this PR, file by file. Do not decide from the PR title or from your memory of what you changed. 2. For every repository you tick, open the follow-up PR there and link it on the same line. A ticked box with no link claims work that does not exist, which is worse than an empty box. Search that repository for an open PR or issue covering it first, and link that instead of filing a duplicate. 3. When the follow-up is out of scope, or needs a decision that is not yours to make, open an issue in that repository instead, link that, and say so in the PR body. Do not push a speculative PR into another repository just to fill a line here. 4. Do not tick "No downstream repository is affected" to make the checklist go away. If you are unsure, leave every box empty and say so in the PR body, so a human decides. --> - [ ] No downstream repository is affected by this change - [x] [cozystack/website](https://github.com/cozystack/website) - follow-up: https://github.com/cozystack/website/issues/805 - [ ] [cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack) - follow-up: - [ ] [cozystack/ansible-cozystack](https://github.com/cozystack/ansible-cozystack) - follow-up: - [ ] [cozystack/ccp](https://github.com/cozystack/ccp) - follow-up: - [ ] [cozystack/talm](https://github.com/cozystack/talm) - follow-up: - [ ] [cozystack/cozyhr](https://github.com/cozystack/cozyhr) - follow-up: - [ ] [cozystack/cozy-proxy](https://github.com/cozystack/cozy-proxy) - follow-up: - [ ] [cozystack/cozystack-telemetry-server](https://github.com/cozystack/cozystack-telemetry-server) - follow-up: - [ ] [cozystack/external-apps-example](https://github.com/cozystack/external-apps-example) - follow-up: - [ ] [cozystack/examples](https://github.com/cozystack/examples) - follow-up: - [ ] [cozystack/community](https://github.com/cozystack/community) - follow-up: The Terraform provider does not model the Kafka `version` field. The website issue covers the upgrade notes the `default` variant needs. ### Release note <!-- Write a release note: - Explain what has changed internally and for users. - Start with the same `type(scope):` prefix as in the PR title - Follow the guidelines at https://github.com/kubernetes/community/blob/master/contributors/guide/release-notes.md. --> ```release-note feat(kafka)!: upgrade to Strimzi 1.2.0 and Kafka 4.3 by default, with Kafka 4.2 also available. Platform migration 61 converts Strimzi resources to v1 and moves Kafka 3.x applications to v4.3. Every Kafka must have confirmed KRaft state before the upgrade, including on repeat runs. Upgrade through Cozystack v1.7 first. Kafka 4 drops clients older than Kafka 2.1 and the message.format.version, message.downconversion.enable and message.timestamp.difference.max.ms topic settings, and requires segment.bytes of at least 1 MiB; the chart and the upgrade refuse a topic that breaks either rule, and a topic-metadata backup taken on Kafka 3.x restores without the removed settings and with segment.bytes raised to 1 MiB. In-place downgrades are unsupported. ``` |
||
|
|
15e87fdbea |
fix(seaweedfs): remove identities left behind by deleted BucketAccesses (#4915)
## What this PR does
Removes SeaweedFS identities left behind by deleted BucketAccesses. The
COSI driver up to v0.3.1 revokes only from the legacy `identity.json`,
while SeaweedFS since 4.08 keeps each identity in its own file, so those
files stayed (seaweedfs/seaweedfs-cosi-driver#11). The upstream driver
v0.4.0 from #5284 deletes the file on revoke, so no new files are left.
Files that v0.3.1 already left behind still hold working keys and stay
until something removes them.
A post-install/post-upgrade hook in `seaweedfs-system` removes them. It
lists the identity files before the BucketAccesses, so a file whose
BucketAccess still exists is never taken for a left-over one. The rest
of the rules are in the commit message and at the top of the script.
When it is unsure, it removes nothing, and the errors it handles do not
fail the release.
A filer that other clusters use through Client topology holds identities
whose BucketAccesses this cluster cannot see. The new
`cosi.orphanIdentities` value of the SeaweedFS application decides what
happens there. The default `auto` only reports when `filer.grpcHost` is
set and removes otherwise, and an operator can force `report` or
`delete`.
This builds on #4893, which is now merged.
Tested with bats against a fake `weed shell` and with helm-unittest. A
mutation that swaps the two listings back makes the ordering test fail.
An earlier revision of the script, which also skipped recently changed
files, was tried on a live cluster with SeaweedFS 4.45 and driver
v0.3.1. It only reported in report mode and removed left-over files in
delete mode while live identities kept working. With BucketAccess
listing forbidden, it removed nothing. The current revision has not been
run on a live cluster. No run has checked that the keys of a removed
identity are then rejected.
On
|
||
|
|
045f1a9bbc |
fix(seaweedfs): remove identities left behind by deleted BucketAccesses
Since SeaweedFS 4.08 the S3 gateways move every identity from /etc/iam/identity.json into /etc/iam/identities/<name>.json, and the COSI driver up to v0.3.1 revokes only from identity.json. Every BucketAccess deleted on such a filer left its identity file behind, with its keys still accepted (seaweedfs/seaweedfs-cosi-driver#11). A driver that deletes the file on revoke does nothing for the files already left. A post-install/post-upgrade hook removes a ba-<uid>.json file when no BucketAccess in any namespace names it, by uid or by status.accountID. The uid covers a BucketAccess still being granted, the accountID one restored with its status. The identity directory is listed before the BucketAccesses: a BucketAccess exists before its grant writes a file, so a file seen in the first listing whose BucketAccess still exists is always named by the second. File ages are not used, because grants and gateway migrations rewrite left-over files as well. A failed or empty listing removes nothing. Each removal is logged and recorded as an Event on the HelmRelease. The hook runs before the Object Lock hook, so in delete mode a left-over identity is removed before that hook grants it anything. A filer published for Client-topology clusters holds identities whose BucketAccesses live in those clusters, so cosi.orphanIdentities defaults to auto: report there, delete otherwise. An operator can force either. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
b7ec3f73a1 |
test(monitoring): keep a non-first-party ref in the Alerta image test
A ghcr.io/cozystack/cozystack ref in a helm-unittest fixture counts as a first-party image ref, so the image-ref enumeration contracts in hack/promote-rewrite-tags_test.bats require its file to be declared. The test only needs some image string to pass through cozy-lib.image, so a placeholder registry keeps it out of the release tooling. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
33d0001991 |
Merge branch 'main' into feat/monitoring-alerta-respin
Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
75df8174df |
build(monitoring): respin the Alerta image on a patched base
Alerta 9.1.0 is the latest upstream release, and alerta/alerta-web:9.1.0 still carries the Debian packages of its build day, the compiler toolchain and -dev headers it built its wheels with, and Python packages whose fixes came out after the release. The monitoring stack ran that image unpinned. A purge in a layer on top of the upstream image would leave the files in the lower layers, so the result is flattened into an empty image and the upstream image config is restated. cryptography stays below 47 because pyOpenSSL requires it, and lxml stays on 5.x. Assisted-by: LLM Signed-off-by: Marian Koreniuk <moriarti@cp.if.ua> Co-authored-by: europrinter <yanshinjuku@gmail.com> |
||
|
|
c49f58c4a4 |
fix(seaweedfs): keep Object Lock working for COSI credentials on SeaweedFS 4.48 (#4893)
## What this PR does
Existing bucket credentials need additional Object Lock actions to work
with SeaweedFS 4.48. Since v0.4.0 (#5284), the upstream COSI driver
grants them to new credentials. It does not grant access again for a
ready BucketAccess, so older identities stay unchanged after the driver
update. The custom COSI driver build and its image repository are no
longer part of this PR.
This PR adds a post-install and post-upgrade hook that grants the
actions implied by each identity's Read and Write permissions. Bucket
restrictions and credentials stay unchanged, and Write does not grant
governance bypass. The `anonymous` identity that public-read buckets
share is skipped on purpose. The driver revokes public read by removing
only `Read:<bucket>`, so added Object Lock reads would stay open to
unsigned requests. The hook runs after the release update and does not
guarantee Object Lock access during a server rollout.
The wrapper chart also declares its local dependency so Helm lint can
check it. The chart remains on 4.45. #4879 is stacked on this PR for the
4.48 upgrade.
The hook's bats suite (22 cases), the chart tests and shellcheck pass
locally on
|
||
|
|
87f160d473 |
fix(vm-disk, kubernetes-nodes)!: refuse golden images whose import keeps failing (#4802)
## What this PR does New clones can wait forever on a golden image whose import keeps failing. CDI v1.66.1 retries ordinary HTTP failures without setting phase `Failed`. The guards now also refuse goldens with at least three importer restarts unless they reached `Succeeded`. kubernetes-nodes and the picker require `Running=False`; vm-disk refuses during running attempts too. Existing vm-disks and already-cloned pools remain exempt. CDI never lowers the restart count, so a healthy import with three early restarts stays refusable until `Succeeded`, including while a recreated importer is still starting. An empty worker-pool StorageClass now resolves to the virtualization default, then the GA Kubernetes default. Beta is a last fallback for the class written explicitly onto a worker disk, not a CDI fallback. The strict same-class policy stays. This can refuse a previously accepted builtin pool on upgrade. The affected pool has an empty StorageClass, no cloned disk yet, and a golden on the Kubernetes default while another class is the virtualization default. StorageClass is immutable: point `osImage.builtin` at a catalog entry on the virtualization default or switch to `osImage.factory`. Already-cloned pools keep their disk's class. A VMDisk's own HTTP import, golden-image health checks and imports that hang without restarting remain outside this change. Closes #4564 Refs #4059 ### Screenshots No UI changes. ### Downstream repositories The platform values change only updates a comment. The application schema change updates the StorageClass description without changing fields, defaults or enums. - [x] No downstream repository is affected by this change - [ ] [cozystack/website](https://github.com/cozystack/website) - follow-up: - [ ] [cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack) - follow-up: - [ ] [cozystack/ansible-cozystack](https://github.com/cozystack/ansible-cozystack) - follow-up: - [ ] [cozystack/ccp](https://github.com/cozystack/ccp) - follow-up: - [ ] [cozystack/talm](https://github.com/cozystack/talm) - follow-up: - [ ] [cozystack/cozyhr](https://github.com/cozystack/cozyhr) - follow-up: - [ ] [cozystack/cozy-proxy](https://github.com/cozystack/cozy-proxy) - follow-up: - [ ] [cozystack/cozystack-telemetry-server](https://github.com/cozystack/cozystack-telemetry-server) - follow-up: - [ ] [cozystack/external-apps-example](https://github.com/cozystack/external-apps-example) - follow-up: - [ ] [cozystack/examples](https://github.com/cozystack/examples) - follow-up: - [ ] [cozystack/community](https://github.com/cozystack/community) - follow-up: ### Release note ```release-note fix(vm-disk, kubernetes-nodes)!: refuse new clones of golden images whose import has not succeeded after at least three importer restarts. kubernetes-nodes and the image picker require the importer to be not running; vm-disk refuses during running attempts too. kubernetes-nodes now resolves an empty storageClass to CDI's virtualization default before the Kubernetes default. A builtin pool with an empty storageClass, no cloned disk yet, and a golden on a different class can now be refused. Point it at a catalog entry on the virtualization default or switch to osImage.factory. Already-cloned pools are unaffected. ``` |
||
|
|
638f0ffbe7 |
feat(redis): add affinity configuration (#2665)
<!-- Thank you for making a contribution! Here are some tips for you: - Use Conventional Commits for the PR title: `type(scope): description` - Types: feat, fix, security (a fix that comes through a security advisory), docs, style, refactor, perf, test, build, ci, chore - Scopes are not an exhaustive list — pick the most specific scope for the change and extend the list when a genuinely new area appears. Examples: - System components: dashboard, platform, operator, cilium, kube-ovn, linstor, fluxcd, cluster-api - Managed apps: postgres, mariadb, redis, kafka, clickhouse, virtual-machine, kubernetes - Development and maintenance: api, hack, tests, ci, docs, maintenance - Breaking changes: append `!` after type/scope (`feat(api)!: ...`) or add a `BREAKING CHANGE:` footer - If it's a work in progress, consider creating this PR as a draft. - Don't hesistate to ask for opinion and review in the community chats, even if it's still a draft. - Fixes merged to `main` reach the release lines the backport batch runs for automatically, so do not open backport PRs by hand: https://github.com/cozystack/cozystack/blob/main/docs/release/backports.md --> ## What this PR does Adds independent Kubernetes affinity configuration for Redis and Sentinel pods through `RedisFailover.spec.redis.affinity` and `spec.sentinel.affinity`. Empty or null rules preserve operator defaults. Configured rules replace default soft pod anti-affinity; include `podAntiAffinity` when replica spreading is required. ### Validation - All 99 chart tests pass with helm-unittest v1.1.2; affected standalone API package compiles. - Package generation with cozyvalues-gen v1.7.0 is repeatable; embedded ApplicationDefinition schema matches the generated values schema. - Twenty-four offline render scenarios cover default/null/configured affinity and TLS on/off; Redis checks also cover independent component rules, single-replica Sentinel behavior, and preservation of upstream cache configuration. - Manifest generation, diff checks, and commit trailer checks pass. Each branch contains one feature commit rebased onto upstream main. - Root `make generate` remains blocked by the pinned code-generator parser rejecting Go 1.27's `math/rand/v2` generic method. Affected API deepcopy generation passes separately with controller-gen v0.16.4; unchanged files deleted by the failed root generator were restored. - cozyhr v1.6.1 is installed and checksum-verified. `make show` with `--plain` still queries Kubernetes discovery, which this environment cannot access; offline Helm rendering passes. ### Screenshots Not applicable; no UI changes. <!-- REQUIRED for UI changes: attach screenshots or screen recordings demonstrating the visual impact of your changes. PRs with UI changes without screenshots will not be merged. --> ### Downstream repositories <!-- Cozystack is upstream for repositories that are NOT kept in sync with it automatically, and nothing in CI compares the two sides, so a change here can break them silently. Which change forces what, and which file to touch, is the trigger map in docs/agents/contributing.md under "Downstream Repositories". Walk it before you tick anything. IF YOU ARE AN AI AGENT OR AN LLM, THIS IS PART OF THE TASK, NOT A FORM TO FILL IN: 1. Walk the trigger map against the actual diff of this PR, file by file. Do not decide from the PR title or from your memory of what you changed. 2. For every repository you tick, open the follow-up PR there and link it on the same line. A ticked box with no link claims work that does not exist, which is worse than an empty box. Search that repository for an open PR or issue covering it first, and link that instead of filing a duplicate. 3. When the follow-up is out of scope, or needs a decision that is not yours to make, open an issue in that repository instead, link that, and say so in the PR body. Do not push a speculative PR into another repository just to fill a line here. 4. Do not tick "No downstream repository is affected" to make the checklist go away. If you are unsure, leave every box empty and say so in the PR body, so a human decides. --> - [ ] No downstream repository is affected by this change - [ ] [cozystack/website](https://github.com/cozystack/website) - follow-up: - [x] [cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack) - follow-up: https://github.com/cozystack/terraform-provider-cozystack/issues/85. Provider implementation is tracked separately from this application change. - [ ] [cozystack/ansible-cozystack](https://github.com/cozystack/ansible-cozystack) - follow-up: - [ ] [cozystack/ccp](https://github.com/cozystack/ccp) - follow-up: - [ ] [cozystack/talm](https://github.com/cozystack/talm) - follow-up: - [ ] [cozystack/cozyhr](https://github.com/cozystack/cozyhr) - follow-up: - [ ] [cozystack/cozy-proxy](https://github.com/cozystack/cozy-proxy) - follow-up: - [ ] [cozystack/cozystack-telemetry-server](https://github.com/cozystack/cozystack-telemetry-server) - follow-up: - [ ] [cozystack/external-apps-example](https://github.com/cozystack/external-apps-example) - follow-up: - [ ] [cozystack/examples](https://github.com/cozystack/examples) - follow-up: - [ ] [cozystack/community](https://github.com/cozystack/community) - follow-up: ### Release note <!-- Write a release note: - Explain what has changed internally and for users. - Start with the same `type(scope):` prefix as in the PR title - Follow the guidelines at https://github.com/kubernetes/community/blob/master/contributors/guide/release-notes.md. --> ```release-note feat(redis): add affinity configuration for Redis and Sentinel pods. ``` |
||
|
|
6efc0a0dc9 |
feat(rabbitmq): add affinity configuration (#2664)
<!-- Thank you for making a contribution! Here are some tips for you: - Use Conventional Commits for the PR title: `type(scope): description` - Types: feat, fix, security (a fix that comes through a security advisory), docs, style, refactor, perf, test, build, ci, chore - Scopes are not an exhaustive list — pick the most specific scope for the change and extend the list when a genuinely new area appears. Examples: - System components: dashboard, platform, operator, cilium, kube-ovn, linstor, fluxcd, cluster-api - Managed apps: postgres, mariadb, redis, kafka, clickhouse, virtual-machine, kubernetes - Development and maintenance: api, hack, tests, ci, docs, maintenance - Breaking changes: append `!` after type/scope (`feat(api)!: ...`) or add a `BREAKING CHANGE:` footer - If it's a work in progress, consider creating this PR as a draft. - Don't hesistate to ask for opinion and review in the community chats, even if it's still a draft. - Fixes merged to `main` reach the release lines the backport batch runs for automatically, so do not open backport PRs by hand: https://github.com/cozystack/cozystack/blob/main/docs/release/backports.md --> ## What this PR does Adds optional Kubernetes affinity configuration to RabbitMQ pods through `RabbitmqCluster.spec.affinity`. Empty or null affinity keeps existing scheduling behavior. ### Validation - All 106 chart tests pass with helm-unittest v1.1.2; affected standalone API package compiles. - Package generation with cozyvalues-gen v1.7.0 is repeatable; embedded ApplicationDefinition schema matches the generated values schema. - Six offline render scenarios cover default/null/configured affinity and TLS on/off. - Manifest generation, diff checks, and commit trailer checks pass. Each branch contains one feature commit rebased onto upstream main. - Root `make generate` remains blocked by the pinned code-generator parser rejecting Go 1.27's `math/rand/v2` generic method. Affected API deepcopy generation passes separately with controller-gen v0.16.4; unchanged files deleted by the failed root generator were restored. - cozyhr v1.6.1 is installed and checksum-verified. `make show` with `--plain` still queries Kubernetes discovery, which this environment cannot access; offline Helm rendering passes. ### Screenshots Not applicable; no UI changes. <!-- REQUIRED for UI changes: attach screenshots or screen recordings demonstrating the visual impact of your changes. PRs with UI changes without screenshots will not be merged. --> ### Downstream repositories <!-- Cozystack is upstream for repositories that are NOT kept in sync with it automatically, and nothing in CI compares the two sides, so a change here can break them silently. Which change forces what, and which file to touch, is the trigger map in docs/agents/contributing.md under "Downstream Repositories". Walk it before you tick anything. IF YOU ARE AN AI AGENT OR AN LLM, THIS IS PART OF THE TASK, NOT A FORM TO FILL IN: 1. Walk the trigger map against the actual diff of this PR, file by file. Do not decide from the PR title or from your memory of what you changed. 2. For every repository you tick, open the follow-up PR there and link it on the same line. A ticked box with no link claims work that does not exist, which is worse than an empty box. Search that repository for an open PR or issue covering it first, and link that instead of filing a duplicate. 3. When the follow-up is out of scope, or needs a decision that is not yours to make, open an issue in that repository instead, link that, and say so in the PR body. Do not push a speculative PR into another repository just to fill a line here. 4. Do not tick "No downstream repository is affected" to make the checklist go away. If you are unsure, leave every box empty and say so in the PR body, so a human decides. --> - [ ] No downstream repository is affected by this change - [ ] [cozystack/website](https://github.com/cozystack/website) - follow-up: - [x] [cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack) - follow-up: https://github.com/cozystack/terraform-provider-cozystack/issues/84. Provider implementation is tracked separately from this application change. - [ ] [cozystack/ansible-cozystack](https://github.com/cozystack/ansible-cozystack) - follow-up: - [ ] [cozystack/ccp](https://github.com/cozystack/ccp) - follow-up: - [ ] [cozystack/talm](https://github.com/cozystack/talm) - follow-up: - [ ] [cozystack/cozyhr](https://github.com/cozystack/cozyhr) - follow-up: - [ ] [cozystack/cozy-proxy](https://github.com/cozystack/cozy-proxy) - follow-up: - [ ] [cozystack/cozystack-telemetry-server](https://github.com/cozystack/cozystack-telemetry-server) - follow-up: - [ ] [cozystack/external-apps-example](https://github.com/cozystack/external-apps-example) - follow-up: - [ ] [cozystack/examples](https://github.com/cozystack/examples) - follow-up: - [ ] [cozystack/community](https://github.com/cozystack/community) - follow-up: ### Release note <!-- Write a release note: - Explain what has changed internally and for users. - Start with the same `type(scope):` prefix as in the PR title - Follow the guidelines at https://github.com/kubernetes/community/blob/master/contributors/guide/release-notes.md. --> ```release-note feat(rabbitmq): add support for configuring RabbitMQ pod affinity rules. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **New Features** * Added an optional affinity setting to control where RabbitMQ pods are placed, including anti-affinity rules to spread pods across nodes. * Configured affinity rules are applied to RabbitMQ pods. When affinity is empty or unset, no affinity rules are added. * **Documentation** * Updated RabbitMQ configuration guidance to describe the affinity setting, its empty default, and how to use anti-affinity to distribute pods across nodes. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
d99e960c00 |
feat(platform): package address-controller and its MetalLB driver (#3382)
## What this PR does Adds IP addresses as a first-class resource ([cozystack/community#35](https://github.com/cozystack/community/pull/35)) as two optional system packages, off by default and enabled through `bundles.enabledPackages`: - **`cozystack.address-controller`** — the class-agnostic core ([cozystack/address-controller](https://github.com/cozystack/address-controller)): `IPAddressClass` / `IPAddress` / `IPAddressClaim` in `local.sdn.cozystack.io`, the PVC/PV-binding analog. It owns claim–address binding, status and reclaim, and never allocates anything itself. - **`cozystack.metallb-iad`** — the per-class driver for addresses announced by MetalLB ([cozystack/metallb-iad](https://github.com/cozystack/metallb-iad)). A class names an existing `IPAddressPool` with `autoAssign: false` in `cozy-metallb`, which the admin provisions together with its advertisement. The driver holds reservations as placeholder Services in its own namespace, and attaches an address to a Service that names a claim with the `local.sdn.cozystack.io/ip-address-claim` annotation. ### Packaging Both are ordinary wrapper packages under `packages/system/`, sourced from the `cozystack-packages` artifact like every other package. The upstream chart is vendored verbatim under `charts/` by `make update` at a pinned commit, since neither project publishes a chart artifact: the `v0.2.0` release-preparation commits of [cozystack/address-controller#17](https://github.com/cozystack/address-controller/pull/17) and [cozystack/metallb-iad#11](https://github.com/cozystack/metallb-iad/pull/11). Each controller image is pinned by digest to a `main-<sha>` build carrying the same controller code: `address-controller:main-90e65ca`, whose commit differs from #17 only in chart version and docs, and `metallb-iad:main-1faf937`, whose commit differs from #11 only in chart version and the address-controller module pin, a purely additive API change the driver does not use. The pins move to the `v0.2.0` tags and images once both are released. The images live under `ghcr.io/cozystack/<name>`, outside the `ghcr.io/cozystack/cozystack/` repositories the release tooling owns, so promotion and the nightly mirror pass over them. The core installs its v1alpha1 CRDs with `upgradeCRDs: CreateReplace`. ### What the wrappers add - **Tenant access.** The upstream chart is Cozystack-agnostic and grants only the controller itself. `cozy:addresses`, `cozy:addresses:view` and `cozy:addresses:admin` aggregate into `cozy:tenant`, `cozy:tenant:view` and `cozy:tenant:admin` respectively, so a tenant can manage `IPAddressClaim`s in its own namespace, and the grant exists only while the package is installed. The cluster-scoped `IPAddress` and `IPAddressClass` are not granted: `cozy:tenant*` reaches a tenant through a per-namespace RoleBinding, so a rule for either would never be consulted. A tenant reads its address from the claim's `status.addresses[]`. - **The driver's admission policy, turned on for tenant namespaces.** MetalLB honours a pin or pool selector from any writer of a Service: the `metallb.io/` annotations, their `metallb.universe.tf/` predecessors and `spec.loadBalancerIP`. A tenant cluster's cloud provider copies a guest Service's annotations and `loadBalancerIP` onto the Service it creates in the tenant namespace. The upstream `metallb-iad-service-pins` policy reserves all of these, plus the sharing annotation, to the driver's ServiceAccount and the cluster-admin groups. An admission policy binds every principal regardless of RBAC, so the wrapper adds `cozystack-cluster-admin`, the group Cozystack's OIDC administrators authenticate as, to the chart's `system:masters` and `kubeadm:cluster-admins`. The wrapper enables it in `Deny` mode for namespaces carrying `namespace.cozystack.io/host`, which `tenant-root` and every tenant namespace have and nothing in `cozy-*` does. Unchanged values always pass, so the driver's pin on a tenant's own Service does not lock the rest of that Service. - **The driver's MetalLB namespace**, `cozy-metallb` instead of the upstream default `metallb-system`. ### Variant scoping `cozystack.metallb-iad` depends on `cozystack.address-controller`, which is opt-in, and on `cozystack.metallb`, which is absent on `isp-hosted`, on a slim variant that did not opt into it, and wherever `disabledPackages` names it. The driver is emitted from the `common-packages` helper only when the includes of MetalLB and of `cozystack.address-controller` both rendered a Package, so it cannot be enabled where it would sit in `DependenciesNotReady` forever, and it follows either dependency automatically if its rules change. The core carries no MetalLB dependency and remains available everywhere. ### Validation `helm unittest` covers the aggregation labels and rules on the tenant roles and the driver's emission, which requires both MetalLB and the address core. `hack/select-install.sh --validate` passes, and the selective-install fixture is regenerated from `hack/select-install.sh --disabled postgres`. The admission policy is upstream's and carries no render test here. ### Screenshots Not a UI change. ### Downstream repositories - [ ] No downstream repository is affected by this change - [x] [cozystack/website](https://github.com/cozystack/website) - follow-up: [cozystack/website#810](https://github.com/cozystack/website/pull/810) (component cards), [cozystack/website#811](https://github.com/cozystack/website/pull/811) (operator guide) - [ ] [cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack) - follow-up: - [ ] [cozystack/ansible-cozystack](https://github.com/cozystack/ansible-cozystack) - follow-up: - [ ] [cozystack/ccp](https://github.com/cozystack/ccp) - follow-up: - [ ] [cozystack/talm](https://github.com/cozystack/talm) - follow-up: - [ ] [cozystack/cozyhr](https://github.com/cozystack/cozyhr) - follow-up: - [ ] [cozystack/cozy-proxy](https://github.com/cozystack/cozy-proxy) - follow-up: - [ ] [cozystack/cozystack-telemetry-server](https://github.com/cozystack/cozystack-telemetry-server) - follow-up: - [ ] [cozystack/external-apps-example](https://github.com/cozystack/external-apps-example) - follow-up: - [ ] [cozystack/examples](https://github.com/cozystack/examples) - follow-up: - [ ] [cozystack/community](https://github.com/cozystack/community) - follow-up: The website is the one repository this change reaches: [cozystack/website#810](https://github.com/cozystack/website/pull/810) adds the two new platform components to `guides/platform-stack/_index.md` and `operations/configuration/licenses.md`, and [cozystack/website#811](https://github.com/cozystack/website/pull/811) adds an operator guide under `networking/`. The guide restates both image refs, so a repin here needs the same edit there. ### Release note ```release-note feat(platform): add IP addresses as a first-class resource as two optional system packages, `cozystack.address-controller` (IPAddressClass / IPAddress / IPAddressClaim) and its MetalLB driver `cozystack.metallb-iad`. Tenants can reserve an address with an IPAddressClaim. A LoadBalancer Service a tenant Kubernetes cluster creates can name that claim with the `local.sdn.cozystack.io/ip-address-claim` annotation, or draw one through auto-claim once an admin marks an auto-claim class. An admission policy reserves MetalLB's pool, pin and sharing inputs on tenant Services to the driver. The driver is only emitted where MetalLB and the address core are. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **New Features** * Added address management for requesting and tracking IPv4, IPv6, or dual-stack addresses, with configurable address classes and lifecycle status. * Added the MetalLB IAD driver for address provisioning through MetalLB. It is included only when the required MetalLB and address-management components are enabled. * Added optional admission controls for address claims and protected MetalLB service settings. * Added optional address-controller metrics, monitoring, and alerting resources. * Added tenant access roles for viewing and managing address claims. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
2495ebfaa0 |
fix(postgres): restore from an archive with the access it was written with (#5295)
## What this PR does Stacked on #5221; review that one first. Once it merges this PR retargets to `main`. A CNPG restore took the destination path and endpoint of the source from the Backup artifact, but the credentials Secret, its key names and the endpoint CA from the CNPG strategy as it reads at restore time. Once the strategy pointed at another bucket or endpoint, the restore combined the recorded location with access settings meant for a different one, and recovery failed after an in-place restore had already purged the target Cluster. The destination record that #5221 annotates on the `cnpg.io/Backup` now also carries the key names and the CA, and the artifact copies them into `driverMetadata["cnpg.io/archive-access"]`. The size probe reads them from there too. The restore picks the access as follows: 1. While the strategy still points at the same endpoint and S3 bucket as the artifact, the strategy's access is used, exactly as before. WAL archiving keeps proving that access against the archive, and it carries any credential rotation since the backup, after which the recorded Secret may already be revoked. The prefix inside the bucket is not compared, since access is taken to be granted per bucket. 2. Once the archive has moved, the recorded access is used if its Secret and CA Secret exist and hold non-empty values under the recorded keys. 3. Otherwise the strategy's access is used, as before, with a `RecordedArchiveAccessUnavailable` Warning event on the RestoreJob. Credentials wider than one bucket can still read the old archive with it. An unreadable record fails the RestoreJob, and an error reading a Secret is retried, both before the HelmRelease is suspended and the target is purged. Artifacts written before this change keep working: one that records only the Secret uses it with the strategy's key names and CA once the archive has moved, and one without any record uses the strategy. This narrows the behaviour the issue asks for ("the recorded Secret, key names and CA, falling back to the strategy only for artifacts that carry no record") in two places, points 1 and 3 above, so that rotating credentials for an archive that has not moved, and deleting the old Secret after a move, keep working as they did. One case remains uncovered: a recorded Secret that still exists but whose keys were revoked, after the archive moved, while the strategy's credentials could still read the old bucket. ### Screenshots Not applicable: no UI change. ### Downstream repositories The diff touches only `internal/backupcontroller`: no CRD, values, chart or naming change, so nothing in the trigger map 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 ```release-note fix(postgres): restoring a Postgres backup after its CNPG strategy moved to another bucket or endpoint now reaches the archive with the credentials Secret, key names and CA the backup was written with, as long as those Secrets still exist; otherwise, and for an archive that has not moved, the strategy's current access is used as before. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Bug Fixes** * Restore operations now use the access settings recorded with the backup when the archive destination has changed. * When recorded access settings are unavailable, the controller falls back to the current strategy settings and issues a warning. Invalid access metadata or Secret read errors stop the restore before the target is patched. * **New Features** * Backup records now retain the credential key names and CA reference used to access the archive. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
a48a2f2599 |
fix(backups): restore Kafka 3.x topic configs that Kafka 4 rejects
Every Kafka now runs 4.x, and a topic-metadata backup taken on Kafka 3.8 or 3.9 can record message.format.version, message.downconversion.enable or message.timestamp.difference.max.ms, which Kafka 4 removed, or a segment.bytes below 1 MiB, the minimum Kafka 4 raised it to from 14 bytes. A 4.x broker rejects each of them, so the restore stopped at the first one, leaving that topic half-configured and every later topic unrestored, and a rerun failed on the same line. The restore now skips the removed keys and raises a smaller segment.bytes to the minimum, each with a warning, and applies the rest. segment.bytes is read the way Kafka reads it: trimmed, with an optional sign, leading zeros decimal. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
0729a6f691 |
feat(platform): block the platform upgrade while a Kafka lacks KRaft
Only the isp-* variants run the platform migration hook, so on the default variant nothing checked the Kafka clusters before the new kafka-operator chart arrived. helm-controller replaces that chart's CRDs before Helm runs its pre-upgrade hooks, so a guard in the operator chart would come too late. The platform chart now refuses to render the cozystack-packages source while Strimzi still serves v1beta2 and any Kafka lacks KRaft evidence, with the same evidence rule as migration 61. The check stops once only the v1 API is served, so a NotReady tenant Kafka cannot block platform reconciles after the upgrade. Without the migration hook the chart also refuses while any Strimzi CRD still stores v1beta2: the API server would reject the v1-only CRDs of Strimzi 1.2, and the new kafka chart rejects the Kafka 3.x versions that the migration moves. With the hook the check would block the migration that narrows the stored versions in the same upgrade. While v1beta2 is served the chart also refuses while a Kafka application sets a topic config Kafka 4 removed or a segment.bytes below the 1 MiB minimum of Kafka 4. The new kafka chart refuses to render such a topic, which would leave that application on its pre-upgrade spec, and a Kafka 4 broker whose log holds the small segment.bytes does not start. segment.bytes is read the way Kafka reads it: trimmed, with an optional sign, leading zeros decimal. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
4c71273ca8 |
chore(kafka): declare bundled chart dependencies
Helm requires bundled subcharts to be declared for chart validation. Keep their source local so validation uses the vendored versions. The application icon remains supplied by the generated dashboard metadata. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
f293d64e84 |
fix(kafka): delete the release's StrimziPodSets on uninstall
On a cluster upgraded from Strimzi 0.x, deleting a Kafka application leaves its brokers running. kube-controller-manager's garbage collector first saw the StrimziPodSets under v1beta2 and never updates that record, so once v1beta2 is no longer served it retries them forever instead of deleting them, until kube-controller-manager restarts (kubernetes/kubernetes#102641). The pre-delete hook now deletes the release's StrimziPodSets after its node pools, so uninstall no longer depends on garbage collection for the brokers. An absent CRD is not a failure; any other error fails the hook like the pool delete does, because Helm never runs it for the release again. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
a909b733ea |
chore(kafka, kafka-operator): drop the JVM sizing workaround
The workaround passed MaxRAM and ActiveProcessorCount to every Strimzi JVM because the JDK 17 in the 0.45 images could not see the container limits on kernels without CONFIG_MEMCG_V1 (JDK-8347811). The Strimzi 1.2.0 images ship JDK 21.0.12, which carries the fix. On such a kernel, with a 1Gi limit, Strimzi's heap probe in the Kafka image now estimates a 495M maximum heap, where the 0.45.1-rc1 image estimated 13.9G. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
641faa7fde |
build(kafka-operator): vendor Strimzi 1.2.0
Strimzi 0.45 is out of upstream support. Strimzi 1.x serves only the v1 API, so the release now replaces the CRDs on upgrade; helm-controller's default of skipping CRD upgrades would leave the v1beta2-only CRDs from the first install in place. Strimzi 1.x runs no ZooKeeper, so the ZooKeeper alert group goes too. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
3b65cebea3 |
feat(kafka)!: run on the Strimzi v1 API and Kafka 4.x
Strimzi 1.2 serves only the v1 API and runs Kafka 4.2 and 4.3. The node-pool hook no longer drives the ZooKeeper to KRaft migration or the drain that freed the shared "kafka" pool name: Strimzi 1.x has no ZooKeeper support, and the platform migration refuses to upgrade while a ZooKeeper cluster is left. A cluster migrated earlier keeps its "kafka" broker pool. Without the drain the hook takes seconds, so the seven-hour install timeout goes too. Kafka 4 rejects the topic configs it removed and a segment.bytes below 1 MiB, which Kafka 3.x accepted. A KafkaTopic that sets one stays NotReady while the release reports Ready, so the chart refuses to render such a topic. It reads segment.bytes the way Kafka does: trimmed, with an optional sign, leading zeros decimal. BREAKING CHANGE: the Kafka application accepts version v4.3 (default) and v4.2; v3.8 and v3.9 are gone, and the platform migration moves existing applications to v4.3. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
2cd41b411f |
fix(backups): read the Strimzi Kafka CR through the v1 API
Strimzi 1.x no longer serves kafka.strimzi.io/v1beta2, so the Kafka backup driver's readiness check would fail on every backup and restore. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
af0db99c71 |
feat(platform): move Strimzi resources to the v1 API before Strimzi 1.x
Strimzi 1.0 removed v1beta2 from its CRDs, and the API server refuses a CRD that drops a version its status still lists as stored. Every stored object has to be rewritten as v1 before the new operator arrives, which needs the CRDs of Strimzi 0.49 to 0.51 that serve both versions and Strimzi's own conversion tool. The 0.45 operator is stopped first: Strimzi supports the conversion only under an operator that knows v1, and 0.45 keeps rewriting the Kafka status through v1beta2. The conversion Job's ClusterRole can patch CRDs and write ConfigMaps in every namespace, so it goes with its binding and ServiceAccount once the Job has finished, successfully or not; a failed Job stays for diagnosis, and a Job still running when the wait times out keeps them, because the retry waits for that Job. Two references to v1beta2 outlive the stored objects. Helm builds the objects of a release before it upgrades or uninstalls it, so every stored revision of every Kafka application is rewritten to v1. And the API server refuses server-side apply to an object whose managedFields still name a version the CRD no longer serves; when helm-controller recovers by wiping them, a field a later chart drops is never removed. Those entries move to v1 as well. A Helm action already running stores the releases it read when it finishes, v1beta2 included, so the version is not stamped while any Kafka release revision is still pending. Strimzi 1.x also runs neither ZooKeeper nor Kafka 3.x. A ZooKeeper cluster, or a shared broker pool still being drained, left by a platform that moved past v1.7 before its ZooKeeper to KRaft migration finished cannot be finished afterwards, so the migration stops instead; Kafka applications on v3.8 or v3.9 move to v4.3. The migration also stops, before it changes anything, while a Kafka application topic or a KafkaTopic sets a config Kafka 4 removed or a segment.bytes below the 1 MiB minimum of Kafka 4: the new kafka chart refuses to render such a topic, and a Kafka 4 broker whose log holds the small segment.bytes does not start. segment.bytes is read the way Kafka reads it: trimmed, with an optional sign, leading zeros decimal. Strimzi's conversion tool refuses some v1beta2 objects outright, and convert-resource stops at the first one, with the operators already stopped. While v1beta2 is served the migration lists every Strimzi kind first and refuses, naming each object and the reason, before it stops anything. The list follows the 0.51.0 tool the conversion Job runs, and a test fails when that image changes. The conversion deletes the Kafka's KRaft metadata state, and KRaft is the state Strimzi never leaves. Before it stops the operators, the migration records an annotation on every Kafka it accepts, so a retry after the conversion still accepts a NotReady Kafka that passed on its KRaft state. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
76d68a919f |
test(e2e): pin the importer restarts an unreachable VMDisk reports
The kubernetes-nodes guard and the image option list call an import failing once its importer has restarted three times and is not running, and the vm-disk guard once it has restarted three times, because CDI keeps an unreachable URL in progress instead of moving it to Failed. Assert that CDI reports both on the DataVolume of the unreachable VMDisk, so a CDI change that stops doing so turns this suite red rather than leaving the guards blind. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
b6ef231d44 |
docs(kubernetes-nodes): state why a pool must share its golden's class
The worker image guard, its error message and the storageClass docs said CDI cannot clone across StorageClasses and always falls back to a host-assisted copy. CDI falls back only when the two claims have different CSI drivers or volume modes; with one driver it asks that driver for a clone into the other class. The guard stays, the reason it gives is corrected, and the docs name the virtualization default class an empty storageClass now resolves to. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
8dcf950842 |
fix(kubernetes-nodes)!: resolve an empty class to CDI's virtualization default
CDI binds a kubevirt-content DataVolume that names no class on the class annotated storageclass.kubevirt.io/is-default-virt-class before it falls back to the Kubernetes default. The worker image guard resolved an empty class to the Kubernetes default only, so on a cluster carrying both it compared the golden against a class the golden was not on and refused a pool that matched it. CDI's fallback reads only the GA default annotation, so the beta one no longer ties with it: a class carrying only the beta annotation is picked only when no class carries the GA one. CDI then creates no claim at all for a DataVolume naming neither a class nor access modes, so such a pool gets that class only because the chart writes it onto the worker disk. The resolution also refuses a pool that rendered before: one with an empty class that has not cloned a disk yet, whose golden is on the Kubernetes default, on a cluster where another class carries the virtualization default. Its storageClass is immutable, so it has to point osImage.builtin at a catalog entry on the virtualization default or switch to osImage.factory. A pool that already cloned reads its class back from its own disk's claim and keeps rendering. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
263407a73f |
fix(api): leave golden images whose importer keeps failing out of the image options
CDI moves an import to Failed only on a fatal error such as a checksum mismatch, so the picker still offered a golden whose URL is unreachable: its importer restarts with back-off while the DataVolume stays in progress. Drop a golden whose importer restarted at least three times and is not running, the test the kubernetes-nodes chart applies before cloning. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
513d250a68 |
fix(kubernetes-nodes): refuse a golden whose importer keeps failing
The worker image guard refused only a golden in phase Failed, which CDI reaches on a fatal error such as a checksum mismatch. An unreachable URL restarts the importer with back-off while the DataVolume stays in progress, so a pool pinned to such a golden waited forever for its first disk. Refuse an importer that restarted at least three times and is not running, under the same already-cloned exemption as Failed. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
26dc077809 |
fix(vm-disk): refuse cloning a golden whose importer keeps failing
CDI moves an import to Failed only on a fatal error such as a checksum mismatch. An unreachable URL restarts the importer with back-off while the DataVolume stays in progress, so the Failed check let such a golden through and the clone waited forever. Treat an importer that restarted at least three times as failing too, whether or not it is running now. CDI reports every importer attempt as running, including one that is about to fail again, and the chart checks the golden only until the disk exists, so a disk created during an attempt would otherwise pass and wait unnoticed. A healthy import with three early restarts is refused until it succeeds; the release retries the render. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
060686cbc0 |
fix(cozy-lib): render tenant hugepages quota only as requests (#5189)
## What this PR does A tenant with `hugepages-2Mi` or `hugepages-1Gi` in `resourceQuotas` gets both `requests.hugepages-<size>` and `limits.hugepages-<size>` in `tenant-quota`. Kubernetes accepts huge pages in a ResourceQuota only as `hugepages-<size>` or `requests.hugepages-<size>` ([`IsStandardQuotaResourceName`](https://github.com/kubernetes/kubernetes/blob/v1.34.1/pkg/apis/core/helper/helpers.go#L245)), so the apiserver rejects `tenant-quota` and the tenant release fails to install or upgrade. Huge pages are not counted in `limits.memory` either, so today a VM whose memory is backed by huge pages runs outside the tenant quota with no way to bound it. `cozy-lib.resources.flattenResource` now drops the limits side for `hugepages-*`, the same way it already does for `storage`, so the quota carries only `requests.hugepages-<size>`. Both page sizes go through the same rule. `sanitize` is unchanged: a pod spec still needs equal requests and limits for huge pages. `helm unittest .` passes 69 of 69 in `packages/tests/cozy-lib-tests` and 78 of 78 in `packages/apps/tenant`. The new case fails on `main` on both `limits.hugepages-*` keys. Admission reads hugepages usage from `requests.*` after #5184, which matches what this renders. ### Screenshots Not a UI change. ### Downstream repositories Template change in `cozy-lib`, one new test case and one line in the hand-written part of `packages/apps/tenant/README.md`. No values key, schema or default changes. The website tenant reference page is regenerated from that README on release, so no trigger map entry needs a manual follow-up. - [x] No downstream repository is affected by this change - [ ] [cozystack/website](https://github.com/cozystack/website) - follow-up: - [ ] [cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack) - follow-up: - [ ] [cozystack/ansible-cozystack](https://github.com/cozystack/ansible-cozystack) - follow-up: - [ ] [cozystack/ccp](https://github.com/cozystack/ccp) - follow-up: - [ ] [cozystack/talm](https://github.com/cozystack/talm) - follow-up: - [ ] [cozystack/cozyhr](https://github.com/cozystack/cozyhr) - follow-up: - [ ] [cozystack/cozy-proxy](https://github.com/cozystack/cozy-proxy) - follow-up: - [ ] [cozystack/cozystack-telemetry-server](https://github.com/cozystack/cozystack-telemetry-server) - follow-up: - [ ] [cozystack/external-apps-example](https://github.com/cozystack/external-apps-example) - follow-up: - [ ] [cozystack/examples](https://github.com/cozystack/examples) - follow-up: - [ ] [cozystack/community](https://github.com/cozystack/community) - follow-up: ### Release note ```release-note fix(cozy-lib): a tenant quota with hugepages-2Mi or hugepages-1Gi now renders only requests.hugepages-<size>, so the tenant installs and its huge pages are bounded. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Bug Fixes** * Huge-page quotas now apply only to requests, avoiding unsupported limit entries in Kubernetes resource quotas. Quota entries for 2 MiB and 1 GiB huge pages are retained as requests, while corresponding limit entries are omitted. * **Documentation** * Clarified that 2 MiB and 1 GiB huge-page resources are represented as requests in resource quotas, not limits, because Kubernetes does not support huge-page limits quotas. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
ecca3b2af5 |
feat(kubernetes): configure per-pool Talos sysctls (#5254)
<!-- Thank you for making a contribution! Here are some tips for you: - Use Conventional Commits for the PR title: `type(scope): description` - Types: feat, fix, security (a fix that comes through a security advisory), docs, style, refactor, perf, test, build, ci, chore - Scopes are not an exhaustive list — pick the most specific scope for the change and extend the list when a genuinely new area appears. Examples: - System components: dashboard, platform, operator, cilium, kube-ovn, linstor, fluxcd, cluster-api - Managed apps: postgres, mariadb, redis, kafka, clickhouse, virtual-machine, kubernetes - Development and maintenance: api, hack, tests, ci, docs, maintenance - Breaking changes: append `!` after type/scope (`feat(api)!: ...`) or add a `BREAKING CHANGE:` footer - If it's a work in progress, consider creating this PR as a draft. - Don't hesistate to ask for opinion and review in the community chats, even if it's still a draft. - Fixes merged to `main` reach the release lines the backport batch runs for automatically, so do not open backport PRs by hand: https://github.com/cozystack/cozystack/blob/main/docs/release/backports.md --> ## What this PR does Adds an optional `KubernetesNodes.spec.talos.sysctls` string map, rendered into `machine.sysctls` on that pool's guest workers. This lets operators configure the user namespaces needed by the Talos gVisor extension without adding a dedicated API field for each future sysctl. Replaces the proposal in #4650, following [the suggestion to expose a general sysctl map](https://github.com/cozystack/cozystack/pull/4650#issuecomment-6743092045). This is a new branch from `main`, not a stack on the original PR. The suggestion is not treated as maintainer consensus on the broader API. ```yaml spec: talos: sysctls: user.max_user_namespaces: "11255" ``` - Empty or omitted maps preserve the existing rendered machine configuration and bootstrap hash. A literal `"0"` is an explicit override; remove the entry to restore the Talos default. - The existing content-hashed TalosConfigTemplate mechanism updates the MachineDeployment bootstrap reference when overrides change. No new rollout mechanism is introduced. - Both keys and values are YAML-quoted, then shell-escaped for backslashes, dollars and backticks before entering the unquoted reconcile Job heredoc. Quoting scalars individually also keeps newlines and Unicode line separators from breaking the surrounding YAML or heredoc delimiter. - Both the generated schema and a render-time guard enforce string values. The template guard is tested with schema validation disabled too. - Regenerates the schema, parameter reference, Go API type/deepcopy and ApplicationDefinition. The README table alignment change is generator output. This changes only the selected pool's guest configuration, not the management hosts, control plane or other pools. Supported sysctls and their semantics remain Talos/kernel-dependent; inappropriate settings can weaken guest isolation or prevent boot. Installing the gVisor extension, configuring its RuntimeClass and enforcing workload/network restrictions remain separate steps. ### Validation - `helm unittest packages/apps/kubernetes-nodes`: 40 suites, 245 tests and 12 existing snapshots passed, without updating snapshots. - `bats hack/check-talosconfigtemplate-name-agreement.bats hack/talos-reconcile-heredoc_test.bats`: all 16 tests passed (5 name-agreement and 11 heredoc tests). Covers Job/Role/MachineDeployment name agreement, changed and restored hashes, explicit zero, schema and template type rejection, invalid UTF-8 file inputs, and a literal round-trip through the actual manifest-producing heredoc under Bash and Dash. Hostile keys/values include command substitutions, backticks, variable references, backslashes, quotes, newlines and Unicode separators; no marker command executes, and runtime placeholders still expand. The UTF-8 regression was observed failing before the fix with schema validation disabled; valid Unicode including U+FFFD remains accepted. - `bats hack/bats-no-exit-trap.bats hack/bats-no-negated-assert.bats`: all 32 tests passed. - Package `make generate` with cozyvalues-gen v1.7.0 and root `make generate`: repeat runs are idempotent. Root `make manifests` passed. - `go test ./kubernetesnodes` and `go vet ./kubernetesnodes` in `api/apps/v1alpha1` passed; the generated API package has no test files. No live cluster rollout or gVisor execution was tested for this PR. `make show` could not run because `cozyhr` is unavailable locally; offline chart rendering is exercised by the Helm and BATS tests above. Worker replacement and rollback still need staging validation. This main-branch change is not drop-in support for the release-1.6 nodeGroups API. ### Screenshots Not applicable; no UI changes. <!-- REQUIRED for UI changes: attach screenshots or screen recordings demonstrating the visual impact of your changes. PRs with UI changes without screenshots will not be merged. --> ### Downstream repositories <!-- Cozystack is upstream for repositories that are NOT kept in sync with it automatically, and nothing in CI compares the two sides, so a change here can break them silently. Which change forces what, and which file to touch, is the trigger map in docs/agents/contributing.md under "Downstream Repositories". Walk it before you tick anything. IF YOU ARE AN AI AGENT OR AN LLM, THIS IS PART OF THE TASK, NOT A FORM TO FILL IN: 1. Walk the trigger map against the actual diff of this PR, file by file. Do not decide from the PR title or from your memory of what you changed. 2. For every repository you tick, open the follow-up PR there and link it on the same line. A ticked box with no link claims work that does not exist, which is worse than an empty box. Search that repository for an open PR or issue covering it first, and link that instead of filing a duplicate. 3. When the follow-up is out of scope, or needs a decision that is not yours to make, open an issue in that repository instead, link that, and say so in the PR body. Do not push a speculative PR into another repository just to fill a line here. 4. Do not tick "No downstream repository is affected" to make the checklist go away. If you are unsure, leave every box empty and say so in the PR body, so a human decides. --> - [ ] No downstream repository is affected by this change - [ ] [cozystack/website](https://github.com/cozystack/website) - the existing `K8S_NODES` reference imports this package's generated README at release; no manual docs contract changes. - [x] [cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack) - follow-up: https://github.com/cozystack/terraform-provider-cozystack/issues/72; adapt the existing follow-up to the general `talos.sysctls` map after the upstream API is accepted, rather than implementing the superseded dedicated field. - [ ] [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 other trigger-map entries are unaffected: no management-node prerequisite, package name, controller contract, tooling, image or release convention changes. No downstream implementation or live deployment is included. ### Release note <!-- Write a release note: - Explain what has changed internally and for users. - Start with the same `type(scope):` prefix as in the PR title - Follow the guidelines at https://github.com/kubernetes/community/blob/master/contributors/guide/release-notes.md. --> ```release-note feat(kubernetes): add an optional per-pool KubernetesNodes talos.sysctls string map for Talos worker machine.sysctls overrides, preserving defaults and using the existing bootstrap rollout mechanism. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **New Features** * Added optional string-valued sysctl overrides for worker nodes in a pool. The default is empty and preserves existing behavior. Adding, changing, or removing overrides updates the worker configuration and rolls the pool. * **Bug Fixes** * Invalid sysctl configuration types and invalid UTF-8 values are rejected during validation. * **Documentation** * Documented the setting’s scope, rollout behavior, and compatibility considerations, including that it does not configure gVisor. Clarified HTTPS certificate configuration and when it applies. * **Improvements** * Adjusted installation waiting behavior and timeout for Kubernetes node pools. Updated the ordering of displayed configuration options. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
d205f31017 |
docs(agents): reword the section-banner comment rule (#5336)
## What this PR does Rewords the comment rule in `docs/agents/contributing.md` that rejects "section banners", so it describes the content it objects to instead of a formatting style. The rule exists to reject a comment that only names the code below it and adds nothing, such as a heading over a `ClusterRole` whose `kind` and `name` already say what it is. "Banners a section" reads instead as an objection to decoration, and it gets applied to the shape: ```yaml # == addresses view cluster role == <- rejected as a banner # addresses view cluster role <- passes, though it says exactly as little apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: cozy:addresses:view ``` The reverse also happens: a heading that does orient the reader in a long file can be rejected for its `==`. Precedent in the tree shows how unevenly the rule lands. `packages/system/backup-controller/templates/tenant-clusterroles.yaml` and `packages/system/migration-controller/templates/tenant-clusterroles.yaml` open their roles with `# == … ==` lines, and the rule only ever catches new code. The phrase changes in both places it appears: - **In-code comments** blocker: "banners a section" becomes "merely names the section below it". - **Undisclosed machine authorship** tells: "section banners" becomes "comments that merely name the section below them". What the rules enforce is unchanged. The same comments are still rejected; the wording just points a reviewer at the missing substance rather than at the decoration. ### 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: The trigger map's entries for this file, in cozystack/ccp and cozystack/community, cover the commit convention, which this PR does not touch. Neither repository restates the comment rules. ### Release note ```release-note docs(agents): the comment rule against section banners now names what it rejects, a comment that merely names the section below it, rather than the banner formatting. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Documentation** * Updated review-blocker guidance to clarify that comments merely naming the section below them qualify as blockers, including in the examples. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
0d239fab81 |
Merge branch 'main' into feat/kubernetes-nodes-talos-sysctls
The generated cozyrds file is regenerated from the merged values.yaml. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
977963dda2 |
feat(redis): add affinity configuration
Signed-off-by: kastakhov <16296930+kastakhov@users.noreply.github.com> Assisted-by: LLM |
||
|
|
a0f85886f2 |
feat(rabbitmq): add affinity configuration
Signed-off-by: kastakhov <16296930+kastakhov@users.noreply.github.com> Assisted-by: LLM |
||
|
|
c55c3928cb |
docs(agents): reword the section-banner comment rule
The rule is meant to reject a comment that only names the code below it and adds nothing, such as a heading over a ClusterRole whose kind and name already say what it is. "Banners a section" reads instead as an objection to decoration, so it gets applied to the shape: `# == view role ==` is rejected while `# view role`, which says exactly as little, passes, and a heading that does orient the reader in a long file can be rejected for its `==`. Both places the rule appears, the in-code comments blocker and the list of machine-authorship tells, now describe the content that is wrong rather than its formatting. What the rules enforce is unchanged. Assisted-by: LLM Signed-off-by: Timofei Larkin <lllamnyp@gmail.com> |
||
|
|
416abfd8e2 |
fix(etcd): scope tenant alerts to their scrape job (#5183)
## What this PR does scopes every tenant etcd alert to its release scrape job. previously each release evaluated every tenant, so one failing peer could produce alerts from unrelated releases. tenant peer RTT is evaluated by the tenant rules, while the remaining global etcd checks stay in place. validation: both affected chart test runs pass, 46 tests in 17 suites. both charts render. an expression-only simulated leader-loss check against existing metrics selected 18 members across six namespaces before scoping and only the three intended members afterwards. thresholds are unchanged. ### Screenshots Not a UI change. ### Downstream repositories - [x] No downstream repository is affected by this change - [ ] [cozystack/website](https://github.com/cozystack/website) - follow-up: - [ ] [cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack) - follow-up: - [ ] [cozystack/ansible-cozystack](https://github.com/cozystack/ansible-cozystack) - follow-up: - [ ] [cozystack/ccp](https://github.com/cozystack/ccp) - follow-up: - [ ] [cozystack/talm](https://github.com/cozystack/talm) - follow-up: - [ ] [cozystack/cozyhr](https://github.com/cozystack/cozyhr) - follow-up: - [ ] [cozystack/cozy-proxy](https://github.com/cozystack/cozy-proxy) - follow-up: - [ ] [cozystack/cozystack-telemetry-server](https://github.com/cozystack/cozystack-telemetry-server) - follow-up: - [ ] [cozystack/external-apps-example](https://github.com/cozystack/external-apps-example) - follow-up: - [ ] [cozystack/examples](https://github.com/cozystack/examples) - follow-up: - [ ] [cozystack/community](https://github.com/cozystack/community) - follow-up: no API fields, metric names, package interfaces or documented workarounds change. ### Release note ```release-note fix(etcd): scope tenant etcd alerts to their release and avoid duplicate tenant peer RTT alerts from the global rules ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Bug Fixes** * Etcd alerts now match metrics from the exact etcd scrape job, including slow HTTP requests, reducing the chance of unrelated metrics triggering alerts. * The peer communication latency alert excludes tenant etcd scrape jobs, which are covered by tenant-specific rules. * **Tests** * Added checks to validate etcd alert job matching and tenant-job exclusions. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
4f813fb6b2 |
fix(postgres): hold the WAL archive destination for backups no job tracks (#5294)
## What this PR does Stacked on #5221; review that one first. Once it merges this PR retargets to `main`. After #5221 a Postgres BackupJob writes the shared WAL archive destination only while no other running BackupJob of the application has a `cnpg.io/Backup` in flight. A `cnpg.io/Backup` that no running BackupJob tracks was not counted: one created by hand or by a `ScheduledBackup`, or one whose BackupJob was deleted or had already finished. A BackupJob using another BackupClass could then rewrite the destination while CloudNativePG was running such a Backup, leaving its base backup in one place and the WAL it needs in another, so the backup could not be restored. Such a Backup now holds the destination while CloudNativePG executes it, that is in the `started` and `running` phases (`BackupStatus.IsExecuting` in CloudNativePG 1.30). While a Backup of a Cluster is in one of those phases, CloudNativePG's own `BackupList.CanExecuteBackup` starts no other Backup of that Cluster, so the hold never lasts longer than the queue the operator already imposes and needs no separate deadline. A `pending` Backup does not hold, including one that ran before and was sent back to `pending`: CloudNativePG starts its base backup over against the destination current at that time. These Backups are found by `spec.cluster.name` in the controller's cache, because a Backup created by hand need carry no label. The waiting BackupJob reports `Ready=False` with reason `WaitingForUntrackedBackup` and names the Backup. ### Screenshots Not applicable: no UI change. ### Downstream repositories The diff touches only `internal/backupcontroller`: no CRD, values, chart or naming change, so nothing in the trigger map 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 ```release-note fix(postgres): a Postgres BackupJob no longer rewrites the WAL archive destination while CloudNativePG is running a backup of the same cluster that no BackupJob tracks, such as one created by hand or by a ScheduledBackup; it waits with reason WaitingForUntrackedBackup. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Bug Fixes** * Prevented shared WAL archive destinations from being written while an untracked backup is actively running. * Pending and finalizing backups no longer hold the destination, and the destination becomes available again after the active backup completes. * Improved handling of backup status and retry conditions when multiple backups are in progress. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
c15466fb98 |
feat(monitoring): take an Alertmanager template file for alert emails (#5110)
## What this PR does The email receiver from #3800 sends the default Alertmanager subject and HTML body. The subject strings together every common label of the group, for a stuck DaemonSet it reads like `[FIRING:1] KubeDaemonSetRolloutStuck prod cozy-linstor (kubernetes-apps kube-state-metrics linstor-satellite.node1 http cozy-linstor/linstor-satellite.node1 ...)`, and the body is a table of labels and annotations. #3800 left subject and body templates out of the values on purpose, because Alertmanager parses inline templates only when it sends, so a broken one drops mail with nothing but a log line. `alerta.alerts.email.template` takes the text of an Alertmanager template file instead. The chart stores it in the `alertmanager-email-template` ConfigMap and lists it in `VMAlertmanager.spec.templates`. The operator (v0.68.4) mounts it, adds the path to the configuration `templates` and passes the mount to the config reloader as a watched directory, so Alertmanager parses the file while loading its configuration. A file that does not parse fails that load, and a running Alertmanager keeps the configuration it has. A template that parses but fails on a notification, for example on a missing key, still drops that email, and the field description says so. Defining `email.default.subject` and `email.default.html` in the file replaces the subject and the body of every email, for example to mark the severity or to link to Alerta. The text has to contain a `define` action, a value that is not text fails the render, and `template` counts as a set field for the check that rejects a partial email configuration. We run the same setup by hand on three clusters, a ConfigMap plus `spec.templates` with Alertmanager v0.31.0 and operator v0.68.4, and mail arrives with the custom subject and body for firing and resolved alerts. This PR moves it into the chart, so a platform upgrade does not drop it. Checks run for this change. - `helm unittest` 1.1.2, the version CI pins. `packages/system/monitoring` passes 309 of 309, five of them new, `packages/extra/monitoring` passes 31 of 31. - Each part of the change was taken out in turn, no `spec.templates`, no `define` check, `template` missing from the set fields and the text trimmed, and each time exactly one new case failed. - `make generate` in `packages/extra/monitoring` with cozyvalues-gen v1.7.0 changes the README, the schema and the cozyrd and nothing else, and a second run leaves the tree unchanged. ### Screenshots Not a UI change. ### Downstream repositories Walked the trigger map in `docs/agents/contributing.md` against the diff. It adds one field to `packages/extra/monitoring` and changes a template in `packages/system/monitoring`. The Terraform provider does not model Monitoring. Monitoring is in the website `SERVICES` list, so its reference page is regenerated from the README on the next tag. Nothing under `hack/`, the installer or a CRD 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 feat(monitoring): alerta.alerts.email.template takes the text of an Alertmanager template file for alert emails. Define email.default.subject and email.default.html in it to change the subject and the HTML body of every email. The chart stores the file in the alertmanager-email-template ConfigMap, and Alertmanager loads it with its configuration. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **New Features** * Alertmanager email alerts can use a custom template for the email subject and HTML body. Leave the template empty to retain the default format. * Templates must include a named definition. Invalid templates prevent configuration from loading or the monitoring pod from starting; errors while rendering a notification can prevent that email from being sent. * **Documentation** * Added guidance on configuring email templates and their validation and delivery behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
d36b6e55f5 |
Merge branch 'main' into fix/tenant-quota-hugepages
Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
65708a81b8 |
fix(seaweedfs): declare the vendored chart dependency
Helm lint rejects the wrapper chart while its bundled seaweedfs chart is undeclared. Reference the local chart without constraining its version so vendoring remains the source of the dependency. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
ca0fcb1c05 |
Merge branch 'main' into fix/etcd-alert-scope-20261102
Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
78e21fefcc |
fix(seaweedfs): grant Object Lock actions to existing S3 identities
SeaweedFS 4.48 requires dedicated Object Lock actions, but upgrading the COSI driver does not re-grant access for ready BucketAccesses. Add the actions implied by existing Read and Write grants after install and upgrade, without changing credentials or granting governance bypass. The anonymous identity that public-read buckets share is skipped: the COSI driver revokes public read by removing only Read:<bucket>, so derived Object Lock reads would stay open to unsigned callers. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
1e5e532737 |
Merge branch 'main' into feat/monitoring-email-template
Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> |
||
|
|
9e8a747b0b |
fix(platform): gate the MetalLB driver on its deps
cozystack.metallb-iad hard-depends on cozystack.metallb and on cozystack.address-controller, and a driver Package rendered without both beside it never leaves DependenciesNotReady — the wedge the velero and bucket-application comments in system.yaml already record for default packages, reachable here through an opt-in one. MetalLB is absent in three ways: on isp-hosted, which never calls the common-packages helper; on a slim variant that did not opt into it; and wherever disabledPackages names it. The core is absent unless enabled. Rather than restate those rules for the driver, the driver is gated on each dependency's own include having rendered a Package, so they cannot drift when either's rules change. The class-agnostic core stays in the variant-agnostic body: it carries no MetalLB dependency and is usable with another driver. Assisted-by: LLM Signed-off-by: Timofei Larkin <lllamnyp@gmail.com> |