From 3ae0257c460c96debebc7bce52fa7935d1551199 Mon Sep 17 00:00:00 2001 From: Nyan404 Date: Thu, 24 Sep 2026 00:56:35 +0300 Subject: [PATCH] ops: route Belki S3 through HAProxy --- MEMORY.md | 4 ++++ deploy/k8s/secret.example.yaml | 2 +- project_mind_map.md | 2 +- structure_and_data.md | 3 ++- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/MEMORY.md b/MEMORY.md index 6aa8a6e..58cef60 100644 --- a/MEMORY.md +++ b/MEMORY.md @@ -79,6 +79,10 @@ The final gateway Dockerfile must copy `nginx.conf` into the release image, not `app/belki/image_host.py` now uses private distributed MinIO rather than `nyan.nyan404.ru`. The five internal S3 endpoints are tried in order for each operation; uploads are stored under an unguessable 128-bit object ID and public URLs resolve only through `https://cat.nyan404.ru/api/images/`. Keep the MinIO bucket private. `belki-image-store` is a standalone out-of-band Secret with only `GetObject`/`PutObject` plus required `GetBucketLocation` for `belki-images`; never merge it into CI-recreated `belki-runtime` or commit credentials. Existing legacy img.nyan404.ru URLs remain stored as historical links and cannot be recovered by this change. +# 2026-09-24: Belki S3 HAProxy front door + +`belki-image-store` now points to the in-cluster HAProxy Service `10.43.30.146:9000` (`minio-haproxy` in namespace `minio-proxy`) instead of listing the five MinIO node addresses. The live Secret was updated out-of-band and both Belki deployments were restarted; credentials remain out of the repository. + # 2026-09-21: admin inspection score breakdown Inspection results persist the base score for the number of inspections and each resource's calculated contribution in addition to the total. `/admin` displays these details in a dedicated `Баллы` column without changing the VK/public report text; legacy rows fall back to the stored total. diff --git a/deploy/k8s/secret.example.yaml b/deploy/k8s/secret.example.yaml index 3955d62..44bd135 100644 --- a/deploy/k8s/secret.example.yaml +++ b/deploy/k8s/secret.example.yaml @@ -20,7 +20,7 @@ metadata: namespace: belki type: Opaque stringData: - BELKI_S3_ENDPOINTS: 10.18.0.50:9000,10.18.0.51:9000,10.18.0.52:9000,10.18.0.53:9000,10.18.0.55:9000 + BELKI_S3_ENDPOINTS: 10.43.30.146:9000 BELKI_S3_ACCESS_KEY: replace-out-of-band BELKI_S3_SECRET_KEY: replace-out-of-band BELKI_S3_BUCKET: belki-images diff --git a/project_mind_map.md b/project_mind_map.md index 49f9a39..3f27fce 100644 --- a/project_mind_map.md +++ b/project_mind_map.md @@ -68,7 +68,7 @@ mindmap SQLite local fallback Private MinIO image storage belki-images bucket - five internal S3 endpoints + HAProxy front door 10.43.30.146:9000 bucket-scoped GetObject PutObject GetBucketLocation account public proxy /api/images/id Integrations diff --git a/structure_and_data.md b/structure_and_data.md index 2d252f6..0e38912 100644 --- a/structure_and_data.md +++ b/structure_and_data.md @@ -20,7 +20,8 @@ - [`CONTRIBUTING.md`](./CONTRIBUTING.md): contribution and verification rules. ## Runtime / Deployment -- 2026-09-08: report screenshots and VK attachment mirrors use private distributed MinIO through the `minio==7.2.20` SDK. `belki-image-store` is a separate, out-of-band Kubernetes Secret containing the five internal endpoints, a bucket-scoped `GetObject`/`PutObject` account plus required `GetBucketLocation`, and `belki-images`; it is deliberately separate from CI-managed `belki-runtime` so normal deploys cannot remove it. `belki-web` and `belki-bot` return/retain `https://cat.nyan404.ru/api/images/<128-bit-random-id>.` while `Handler` proxies reads from MinIO. MinIO has no public exposure. +- 2026-09-08: report screenshots and VK attachment mirrors use private distributed MinIO through the `minio==7.2.20` SDK. `belki-image-store` is a separate, out-of-band Kubernetes Secret containing the internal S3 endpoint, a bucket-scoped `GetObject`/`PutObject` account plus required `GetBucketLocation`, and `belki-images`; it is deliberately separate from CI-managed `belki-runtime` so normal deploys cannot remove it. `belki-web` and `belki-bot` return/retain `https://cat.nyan404.ru/api/images/<128-bit-random-id>.` while `Handler` proxies reads from MinIO. MinIO has no public exposure. +- 2026-09-24: switched the live Belki S3 endpoint from the five direct MinIO nodes to the in-cluster HAProxy front door `10.43.30.146:9000` (`minio-haproxy` in namespace `minio-proxy`). The cluster Secret was updated out-of-band and `belki-web`/`belki-bot` were restarted; the repository example mirrors this endpoint. HAProxy remains responsible for balancing the healthy MinIO nodes. - `Dockerfile.base` is rebuilt and pushed with the immutable `py312-` tag before the final Belki image; `Dockerfile` accepts that base through `BELKI_BASE_IMAGE`, leaving only application sources in the final layer. - GitLab CI runs the build job. - Production container architecture is explicitly `linux/amd64`: CI sets `DOCKER_DEFAULT_PLATFORM` and passes `--platform linux/amd64`, Dockerfiles pin the platform, and Kubernetes workloads select nodes labeled `kubernetes.io/arch: amd64`. The former private Python base tag was arm64-only and is no longer used by the application image.