feat: separate PostgreSQL roles and Valkey ACL per service

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-19 14:10:09 +03:00
co-authored by Claude Opus 5.5
parent c5b03e6efa
commit d5eaeb3183
44 changed files with 4013 additions and 129 deletions
+19 -1
View File
@@ -60,6 +60,10 @@ services:
configs:
- source: valkey_conf
target: /usr/local/etc/valkey/valkey.conf
# скрипт старта с файлом ACL (change storage-roles): entrypoint sh его
# читает, исполняемый бит не нужен
- source: valkey_start
target: /opt/valkey/start.sh
secrets: !override
- source: ca.crt
uid: "999"
@@ -117,7 +121,19 @@ services:
- source: config_toml
target: /app/config.toml
# клиентам хранилищ — только CA стенда, владелец app (UID 10001); так же
# у cleaner, relay и worker (алиас YAML с тегом !override не разрешён)
# у postgres-bootstrap, cleaner, relay и worker (алиас YAML с тегом
# !override не разрешён)
secrets: !override
- source: ca.crt
uid: "10001"
gid: "10001"
mode: 0444
# bootstrap ролей PostgreSQL (change storage-roles): образ прогона
postgres-bootstrap:
image: *ci-image
volumes: !reset []
configs: *config-toml
secrets: !override
- source: ca.crt
uid: "10001"
@@ -257,6 +273,8 @@ configs:
environment: CI_CONFIG_TOML
valkey_conf:
environment: CI_VALKEY_CONF
valkey_start:
environment: CI_VALKEY_START
s3_bootstrap:
environment: CI_S3_BOOTSTRAP
rabbitmq_conf:
+3 -1
View File
@@ -16,8 +16,10 @@ CI_HAPROXY_OPENSSL_CNF="$(cat infra/haproxy/openssl.cnf)$nl"
CI_RABBITMQ_CONF="$(cat infra/rabbitmq/rabbitmq.conf)$nl"
# pg_hba.conf стенда (change storage-tls): по сети — только TLS
CI_POSTGRES_HBA="$(cat infra/postgres/pg_hba.conf)$nl"
# скрипт старта Valkey с файлом ACL (change storage-roles)
CI_VALKEY_START="$(cat infra/valkey/start.sh)$nl"
export CI_CONFIG_TOML CI_VALKEY_CONF CI_S3_BOOTSTRAP CI_HAPROXY_CFG \
CI_HAPROXY_OPENSSL_CNF CI_RABBITMQ_CONF CI_POSTGRES_HBA
CI_HAPROXY_OPENSSL_CNF CI_RABBITMQ_CONF CI_POSTGRES_HBA CI_VALKEY_START
# наблюдаемость (design change otel-telemetry, решение 20)
CI_OTEL_COLLECTOR="$(cat infra/otel/collector.yaml)$nl"
CI_PROMETHEUS_YML="$(cat infra/otel/prometheus/prometheus.yml)$nl"