You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Summary
Teach `scripts/rolling-update.sh` and the env example about the
SQS-compatible adapter, mirroring how S3 is wired.
Why this matters: admin `/admin/api/v1/sqs/*` endpoints are gated on
`r.sqsServer != nil` in `main.go`, and `r.sqsServer` is constructed only
when `--sqsAddress` is non-empty. The previous rolling-update script had
no path to forward `--sqsAddress` (or any other SQS knob), so even on
builds that include the SQS admin handler the endpoints 404'd at
runtime. This patch threads the new env vars all the way to the
container's command line so `ENABLE_SQS=true` is sufficient to light up
both the public SigV4 endpoint and the admin endpoints.
## Changes
- `scripts/rolling-update.sh`
- New defaults: `ENABLE_SQS=false`, `SQS_PORT=9324`,
`SQS_REGION=us-east-1`, `SQS_CREDENTIALS_FILE=` (empty → open endpoint),
`SQS_FIFO_PARTITION_MAP=` (empty → bypass capability gate's coverage
check), `RAFT_TO_SQS_MAP=` (auto-derived).
- `derive_raft_to_sqs_map()` mirrors `derive_raft_to_s3_map()` and is
invoked when `ENABLE_SQS=true && RAFT_TO_SQS_MAP=""`.
- SSH `bash -s` passthrough block carries the new vars.
- `run_container` builds `sqs_creds_volume` (bind-mount the cred file ro
at the same host path) and `sqs_flags` (`--sqsAddress`, `--sqsRegion`,
`--raftSqsMap`, optional `--sqsCredentialsFile`, optional
`--sqsFifoPartitionMap`); both arrays splice into the existing `docker
run` line next to the S3 ones.
- `_Q` shell-quoting added for the new path-like vars
(`SQS_CREDENTIALS_FILE_Q`, `SQS_FIFO_PARTITION_MAP_Q`,
`RAFT_TO_SQS_MAP_Q`).
- Usage docs updated to describe the new variables and the
admin-endpoint gate.
- `scripts/rolling-update.env.example`
- Adds the new variables under the existing S3 block, with comments
explaining the open-endpoint default and the partition-map opt-in.
## Backward compatibility
`ENABLE_SQS` defaults to `false`. Existing deploy.env files that carry
no SQS knobs produce a `docker run` byte-identical to the prior
behaviour: empty `sqs_creds_volume`, empty `sqs_flags`, no
`--sqsAddress`, no `--raftSqsMap`. No existing rollout changes shape.
## Self-review (5 lenses, abbreviated)
1. **Data loss** — N/A; deploy script only.
2. **Concurrency** — N/A.
3. **Performance** — N/A.
4. **Data consistency** — N/A.
5. **Test coverage** — `bash -n scripts/rolling-update.sh` returns 0.
The script doesn't have a Go test surface; structural mirroring of the
S3 path is the regression baseline.
## Test plan
- [x] `bash -n scripts/rolling-update.sh`
- [ ] Live rollout against the operator's cluster with `ENABLE_SQS=true`
set in `deploy.env`, then `curl -b cookie.jar
https://elastickv.bootjp.dev/admin/api/v1/sqs/queues` should return
`200`. Operator-driven; out of scope for the merge gate.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Optional SQS-compatible adapter integration with configurable region,
port, and credential settings.
* Environment configuration extended to support SQS endpoint mapping and
FIFO partition setup.
* Deployment automation enhanced to derive and inject SQS endpoint
mappings and propagate SQS settings during rolling updates when enabled.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
0 commit comments