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 -->
Cozystack
Cozystack is a free and open-source platform and framework for building clouds.
Cozystack is a CNCF Sandbox project that was originally built and sponsored by Ænix.
With Cozystack, you can transform a bunch of servers into an intelligent system with a simple REST API for spawning Kubernetes clusters, Database-as-a-Service, virtual machines, load balancers, HTTP caching services, and other services with ease.
Use Cozystack to build your own cloud or provide a cost-effective development environment.
Use-Cases
-
Using Cozystack to build a public cloud
You can use Cozystack as a backend for a public cloud -
Using Cozystack to build a private cloud
You can use Cozystack as a platform to build a private cloud powered by Infrastructure-as-Code approach -
Using Cozystack to build your own platform
You can install only the Cozystack components you need on an existing Kubernetes cluster
Documentation
The documentation is located on the cozystack.io website.
Read the Getting Started section for a quick start.
If you encounter any difficulties, start with the troubleshooting guide and work your way through the process that we've outlined.
Versioning
Versioning adheres to the Semantic Versioning principles.
A full list of the available releases is available in the GitHub repository's Release section.
Contributions
Contributions are highly appreciated and very welcomed!
In case of bugs, please check if the issue has already been opened by checking the GitHub Issues section. If it isn't, you can open a new one. A detailed report will help us replicate it, assess it, and work on a fix.
You are welcome to take on the fix yourself. Commits are used to generate the changelog, and their author will be referenced in it.
If you have a concrete feature request, open an issue. For a cross-cutting or architectural change, open a design proposal in the community repo. For questions or early ideas, use GitHub Discussions. See CONTRIBUTING.md for the full routing.
Community
You are welcome to join us in #cozystack, on either CNCF Slack (get an invite) or Kubernetes Slack (get an invite), in our Telegram group, and at our community meetings. Add them to your Google Calendar or iCal for convenience.
Project documents
| Document | What it covers |
|---|---|
| Governance | How decisions are made and who makes them |
| Contributor Ladder | How to grow from contributor to maintainer |
| Maintainers | Who maintains the project |
| Code of Conduct | What we expect of each other |
| Security Policy | Reporting a vulnerability, and which releases get fixes |
| Adopters | Who runs Cozystack in production |
| Roadmap | Where the project is going |
License
Cozystack is licensed under Apache 2.0.
The code is provided as-is with no warranties.
Commercial Support
A list of companies providing commercial support for this project can be found on official site.
