|
1 | | -### Redis Removal Notice |
| 1 | +### Redis Configuration |
2 | 2 |
|
3 | | -> **Important:** Starting with this version of the EDA operator, Redis is **no longer deployed or supported**. |
4 | | -> EDA now uses [dispatcherd](https://github.com/ansible/dispatcherd), a PostgreSQL `pg_notify`-based task queuing system, which eliminates the need for a separate Redis instance entirely. |
| 3 | +#### Redis Version |
5 | 4 |
|
6 | | -#### Background |
| 5 | +The default Redis version for the version of EDA bundled with the latest version of the eda-server-operator is Redis 6. |
7 | 6 |
|
8 | | -Previous versions of the EDA operator deployed a managed Redis instance (or accepted a user-provided one via `redis.redis_secret`) for task queuing through [RQ (Redis Queue)](https://python-rq.org/). With the introduction of dispatcherd, all task orchestration is now handled natively through PostgreSQL, which EDA already requires for its database. |
| 7 | +#### External Redis Service |
9 | 8 |
|
10 | | -#### What Changed |
| 9 | +EDA can be configured to use an external redis cache by creating a secret which holds the configuration values for the external Redis instance. |
11 | 10 |
|
12 | | -| Before (Redis) | After (Dispatcherd) | |
13 | | -|---------------------------------------------|--------------------------------------------------| |
14 | | -| Managed Redis Deployment provisioned | No Redis resources created | |
15 | | -| `spec.redis` and `spec.redis.redis_secret` | Removed from the CRD; ignored if still present | |
16 | | -| `redis_image` / `redis_image_version` | Removed from the CRD | |
17 | | -| `EDA_MQ_*` environment variables | Removed from all deployment templates | |
18 | | -| RQ-based task queuing (`rqworker`) | Dispatcherd (`aap-eda-manage dispatcherd`) | |
19 | | -| External Redis (BYO) supported | Not supported; use PostgreSQL | |
| 11 | +The secret should be formatted as follows: |
20 | 12 |
|
21 | | -#### Upgrading from a Previous Version |
| 13 | +```yaml |
| 14 | +--- |
| 15 | +apiVersion: v1 |
| 16 | +kind: Secret |
| 17 | +metadata: |
| 18 | + name: <resourcename>-redis-configuration |
| 19 | + namespace: <target namespace> |
| 20 | +stringData: |
| 21 | + host: <external ip or url resolvable by the cluster> |
| 22 | + port: <external port, this usually defaults to 6370> |
| 23 | + redis_tls: <true / false to enable TLS> |
| 24 | + database: <desired database name> |
| 25 | + cluster_endpoint: <optional - see Redis Cluster section> |
| 26 | + username: <username to connect as> |
| 27 | + password: <password to connect with> |
| 28 | + type: unmanaged |
| 29 | +type: Opaque |
| 30 | +``` |
22 | 31 |
|
23 | | -When upgrading from an operator version that included Redis: |
| 32 | +The secret should be specified on the EDA customer resource using the following: |
24 | 33 |
|
25 | | -1. **No data migration is required.** Redis was used only for transient message queuing (with `emptyDir` storage). All durable task state has always been persisted in PostgreSQL. |
| 34 | +```yaml |
| 35 | +--- |
| 36 | +spec: |
| 37 | + ... |
| 38 | + redis: |
| 39 | + redis_secret: <name-of-your-secret> |
| 40 | +``` |
26 | 41 |
|
27 | | -2. **Legacy Redis resources are cleaned up automatically.** The operator will delete any existing Redis Deployment, Service, and managed Secret (`<name>-redis-configuration`) during the upgrade reconciliation. |
| 42 | +#### Redis Cluster |
28 | 43 |
|
29 | | -3. **Remove `redis` from your EDA Custom Resource when convenient.** If your CR spec still contains a `redis` section (e.g. `redis.redis_secret`), the operator will **log a deprecation warning** and ignore the configuration entirely. The upgrade will proceed normally. You should remove the `redis:` block from your CR at your earliest convenience: |
| 44 | +The format of the cluster_endpoint field is: |
30 | 45 |
|
31 | | - ```yaml |
32 | | - # Before (deprecated — ignored by the operator) |
33 | | - spec: |
34 | | - redis: |
35 | | - redis_secret: my-redis-secret |
| 46 | +"<host>:<port>[,<host>:<port>]*" |
36 | 47 |
|
37 | | - # After (recommended) |
38 | | - spec: |
39 | | - # redis section removed — no replacement needed |
40 | | - ``` |
41 | | - |
42 | | -4. **External (BYO) Redis is no longer used.** If you were providing your own Redis via a secret, you can safely decommission that Redis instance once the EDA operator upgrade is complete. No EDA component connects to Redis anymore. |
43 | | - |
44 | | -#### Task Queuing Architecture |
45 | | - |
46 | | -EDA's background task processing is now powered entirely by **dispatcherd**: |
47 | | - |
48 | | -- **Message broker:** PostgreSQL [`pg_notify` / `LISTEN`](https://www.postgresql.org/docs/current/sql-notify.html) channels replace the Redis pub/sub layer. |
49 | | -- **Task workers:** The `aap-eda-manage dispatcherd` management command replaces `aap-eda-manage rqworker`. A backward-compatible `rqworker` wrapper exists in eda-server that forwards to dispatcherd. |
50 | | -- **Scheduler:** Periodic task scheduling is integrated into the dispatcherd workers; the separate scheduler pod has been removed. |
51 | | -- **Health checks:** Dispatcherd exposes worker health checks through the EDA status API endpoint. |
52 | | - |
53 | | -No additional configuration is needed — dispatcherd uses the same PostgreSQL database that EDA already requires, with connection details sourced from `database.database_secret`. |
54 | | - |
55 | | -#### Q&A |
56 | | - |
57 | | -**Q: Can I still use Redis with EDA?** |
58 | | -A: No. The `spec.redis` CRD fields have been removed. If they are still present in your CR (e.g. from a previous version), the operator will ignore them and log a deprecation warning. |
59 | | - |
60 | | -**Q: Do I need to change my PostgreSQL sizing?** |
61 | | -A: In most deployments, no. Dispatcherd's use of `pg_notify` adds negligible overhead. |
| 48 | +This field is required if the external redis service is a cluster. |
0 commit comments