Remove retired sarex-contour and yc-k8s-test configurations
This commit is contained in:
parent
0aafb8a1ea
commit
c89aaab9eb
10
CLAUDE.md
10
CLAUDE.md
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
| Путь | Что |
|
| Путь | Что |
|
||||||
|---|---|
|
|---|---|
|
||||||
| `clusters/` | 17 точек входа Flux + шаблон `contour` — **источник истины «что где раскатано»** |
|
| `clusters/` | Точки входа Flux + шаблон `contour` — **источник истины «что где раскатано»** |
|
||||||
| `infrastructure/` | 44 платформенных компонента |
|
| `infrastructure/` | 44 платформенных компонента |
|
||||||
| `apps/` | 39 прикладных сервисов |
|
| `apps/` | 39 прикладных сервисов |
|
||||||
| `docs/apps/` | 34 mermaid-диаграммы по сервисам + `README.md` с доменной группировкой |
|
| `docs/apps/` | 34 mermaid-диаграммы по сервисам + `README.md` с доменной группировкой |
|
||||||
@ -40,12 +40,12 @@
|
|||||||
|
|
||||||
**Кластер.** `clusters/<cluster>/kustomization.yaml` — плоский список `../../apps/<app>/<cluster>`. Инфраструктура подключается двумя разными способами:
|
**Кластер.** `clusters/<cluster>/kustomization.yaml` — плоский список `../../apps/<app>/<cluster>`. Инфраструктура подключается двумя разными способами:
|
||||||
|
|
||||||
- `d8-ugmk-prod`, `sarex-contour`, `ugok`, `uralkal`, `vad` — прямо в корневом kustomization как `../../infrastructure/<comp>/<c>`;
|
- `d8-ugmk-prod`, `ugok`, `uralkal`, `vad` — прямо в корневом kustomization как `../../infrastructure/<comp>/<c>`;
|
||||||
- `brusnika-prod`, `brusnika-stage`, `vk-infra`, `vk-prod` — через `clusters/<c>/infrastructure/kustomization.yaml`, который ссылается на оверлеи `../../../infrastructure/<comp>/<c>` (`base` + патч HelmRelease + сопутствующие манифесты компонента);
|
- `brusnika-prod`, `brusnika-stage`, `vk-infra`, `vk-prod` — через `clusters/<c>/infrastructure/kustomization.yaml`, который ссылается на оверлеи `../../../infrastructure/<comp>/<c>` (`base` + патч HelmRelease + сопутствующие манифесты компонента);
|
||||||
- `wb`, `yc-cps-prod`, `yc-infra-prod`, `yc-k8s-test-02` — через `clusters/<c>/infrastructure/kustomization.yaml`, который ссылается на `../../../infrastructure/<comp>` (резолвится в `base`), а различия лежат в `clusters/<c>/infrastructure/patches/*.yaml`;
|
- `wb`, `yc-cps-prod`, `yc-infra-prod`, `yc-k8s-test-02` — через `clusters/<c>/infrastructure/kustomization.yaml`, который ссылается на `../../../infrastructure/<comp>` (резолвится в `base`), а различия лежат в `clusters/<c>/infrastructure/patches/*.yaml`;
|
||||||
- `stand` — послойно: `layers.yaml` объявляет Flux-`Kustomization` `00-vault → 10-mesh → 20-data → 30-platform → 40-routing` (каталоги `clusters/stand/<NN>-<layer>/`). Слои ссылаются на оверлеи `infrastructure/<comp>/contour-template`, а значения контура (`${STORAGE_CLASS}`, `${HOST_*}`, `${GATEWAY_REPLICAS}`) Flux подставляет через `postBuild.substituteFrom` из ConfigMap `contour-vars`.
|
- `stand` — послойно: `layers.yaml` объявляет Flux-`Kustomization` `00-vault → 10-mesh → 20-data → 30-platform → 40-routing` (каталоги `clusters/stand/<NN>-<layer>/`). Слои ссылаются на оверлеи `infrastructure/<comp>/contour-template`, а значения контура (`${STORAGE_CLASS}`, `${HOST_*}`, `${GATEWAY_REPLICAS}`) Flux подставляет через `postBuild.substituteFrom` из ConfigMap `contour-vars`.
|
||||||
|
|
||||||
Кластеры с приложениями: `asterus`, `brusnika-prod`, `brusnika-stage`, `d8-ugmk-prod`, `sarex-contour`, `ugok`, `uralkal`, `vad`, `wb`, `yc-ecp`, `yc-k8s-test`. Только инфраструктура: `stand`, `vk-infra`, `vk-prod`, `yc-cps-prod`, `yc-infra-prod`, `yc-k8s-test-02`. Шаблон: `contour`.
|
Кластеры с приложениями: `asterus`, `brusnika-prod`, `brusnika-stage`, `d8-ugmk-prod`, `ugok`, `uralkal`, `vad`, `wb`, `yc-ecp`. Только инфраструктура: `stand`, `vk-infra`, `vk-prod`, `yc-cps-prod`, `yc-infra-prod`, `yc-k8s-test-02`. Шаблон: `contour`.
|
||||||
|
|
||||||
**Приложение.** `apps/<app>/base/` — по одному `.yaml` на процесс (`backend.yaml`, `celery.yaml`, `frontend.yaml`) плюс `namespace.yaml`; оверлеи в `apps/<app>/<cluster>/`. Namespace = имя приложения. Рядом с манифестами лежит документация: `CONFIGURATION.md` (все env-переменные и откуда берутся), `ENDPOINTS.md` (исходящие HTTP-вызовы), `openapi.yaml` (входящий контракт), `.env.example`. Если процессов несколько — файлы с префиксом процесса: `api.ENDPOINTS.md`, `pdm.CONFIGURATION.md`, `frontend.CONFIGURATION.md`.
|
**Приложение.** `apps/<app>/base/` — по одному `.yaml` на процесс (`backend.yaml`, `celery.yaml`, `frontend.yaml`) плюс `namespace.yaml`; оверлеи в `apps/<app>/<cluster>/`. Namespace = имя приложения. Рядом с манифестами лежит документация: `CONFIGURATION.md` (все env-переменные и откуда берутся), `ENDPOINTS.md` (исходящие HTTP-вызовы), `openapi.yaml` (входящий контракт), `.env.example`. Если процессов несколько — файлы с префиксом процесса: `api.ENDPOINTS.md`, `pdm.CONFIGURATION.md`, `frontend.CONFIGURATION.md`.
|
||||||
|
|
||||||
@ -73,7 +73,7 @@
|
|||||||
## Ловушки
|
## Ловушки
|
||||||
|
|
||||||
- **`dsinv/`** — оверлей есть у 25 приложений, но `clusters/dsinv/` не существует. Это материализованный снимок живого контура WB, а не источник деплоя. Развёрнутым не считать.
|
- **`dsinv/`** — оверлей есть у 25 приложений, но `clusters/dsinv/` не существует. Это материализованный снимок живого контура WB, а не источник деплоя. Развёрнутым не считать.
|
||||||
- **Две несовместимые конвенции оверлеев** (`IAC-CATALOG.md` §5.3.4). `d8-ugmk-prod`, `yc-k8s-test`, `vad`, `uralkal`, `sarex-contour`, `dsinv` наследуют `base` и патчат его. `brusnika-prod`, `brusnika-stage`, `yc-ecp`, `asterus` — полные копии HelmRelease, которые молча дрейфуют от base. Правка `base` на них не влияет. **`wb` (4 из 27) и `ugok` (9 из 33) смешанные** — проверяйте `resources:` конкретного оверлея; в `ugok` причина обычно указана комментарием в его `kustomization.yaml`.
|
- **Две несовместимые конвенции оверлеев** (`IAC-CATALOG.md` §5.3.4). `d8-ugmk-prod`, `vad`, `uralkal`, `dsinv` наследуют `base` и патчат его. `brusnika-prod`, `brusnika-stage`, `yc-ecp`, `asterus` — полные копии HelmRelease, которые молча дрейфуют от base. Правка `base` на них не влияет. **`wb` (4 из 27) и `ugok` (9 из 33) смешанные** — проверяйте `resources:` конкретного оверлея; в `ugok` причина обычно указана комментарием в его `kustomization.yaml`.
|
||||||
- **`asterus` подключён почти пустым**: оверлеи есть у 26 приложений, но в `clusters/asterus/kustomization.yaml` активен только `auth-flow`, остальные закомментированы. Инфраструктуры в кластере нет.
|
- **`asterus` подключён почти пустым**: оверлеи есть у 26 приложений, но в `clusters/asterus/kustomization.yaml` активен только `auth-flow`, остальные закомментированы. Инфраструктуры в кластере нет.
|
||||||
- **Слайс публикуется для каждого `clusters/*/kustomization.yaml`** — в том числе для тестовых и инфраструктурных кластеров. Новая папка в `clusters/` с этим файлом автоматически станет слайсом на следующем теге. У `contour` такого файла нет, поэтому для него слайс не собирается.
|
- **Слайс публикуется для каждого `clusters/*/kustomization.yaml`** — в том числе для тестовых и инфраструктурных кластеров. Новая папка в `clusters/` с этим файлом автоматически станет слайсом на следующем теге. У `contour` такого файла нет, поэтому для него слайс не собирается.
|
||||||
- **`IAC-CATALOG.md` — снимок на 05.08.2026** и по составу приложений на контур уже расходится с реальностью (там у `wb` ноль приложений, фактически 26 оверлеев). Всегда сверяться с `clusters/*/kustomization.yaml`.
|
- **`IAC-CATALOG.md` — снимок на 05.08.2026** и по составу приложений на контур уже расходится с реальностью (там у `wb` ноль приложений, фактически 26 оверлеев). Всегда сверяться с `clusters/*/kustomization.yaml`.
|
||||||
@ -82,7 +82,7 @@
|
|||||||
- **Path-роутинг лежит в `infrastructure/istio-config/<c>/` у большинства контуров, но не у WB.** В `clusters/wb/infrastructure/patches/istio-config.yaml` через Istio публикуются только платформенные UI (Gitea, Grafana, OpenObserve, Superset, Vault, GoAlert), а прикладной трафик разводится вне репозитория. В Brusnika схема смешанная: часть путей идёт напрямую в сервисы, остальное — одним правилом в `yet-another-nginx-service.global-ingress`.
|
- **Path-роутинг лежит в `infrastructure/istio-config/<c>/` у большинства контуров, но не у WB.** В `clusters/wb/infrastructure/patches/istio-config.yaml` через Istio публикуются только платформенные UI (Gitea, Grafana, OpenObserve, Superset, Vault, GoAlert), а прикладной трафик разводится вне репозитория. В Brusnika схема смешанная: часть путей идёт напрямую в сервисы, остальное — одним правилом в `yet-another-nginx-service.global-ingress`.
|
||||||
- **`vk-prod` маршрутизирует в namespace с суффиксом `-prod`** (`eav-prod`, `pm-prod`, `inspections-prod`), а приложений из `apps/` в этом кластере нет: сервисы раскатываются не этим репозиторием.
|
- **`vk-prod` маршрутизирует в namespace с суффиксом `-prod`** (`eav-prod`, `pm-prod`, `inspections-prod`), а приложений из `apps/` в этом кластере нет: сервисы раскатываются не этим репозиторием.
|
||||||
- **Имена namespace расходятся между источниками**: `inventory.yaml` и `vk-prod` используют суффикс (`flows-prod`), `apps/` — голое имя (`flows`).
|
- **Имена namespace расходятся между источниками**: `inventory.yaml` и `vk-prod` используют суффикс (`flows-prod`), `apps/` — голое имя (`flows`).
|
||||||
- **66 оверлеев приложений не подключены ни к одному кластеру**: 25 — `dsinv`, 25 — закомментированные в `asterus`, остальные 16 — мёртвый код (в основном `brusnika-prod`, плюс `bi`/`iam` в `wb` и `yc-k8s-test`).
|
- Некоторые оверлеи приложений не подключены к кластерам: например, `dsinv`, закомментированные приложения `asterus` и отдельные оверлеи других контуров. Наличие оверлея само по себе не означает развёртывание.
|
||||||
- **Нет диаграмм** в `docs/apps/` для `ams-sync`, `auth-flow`, `bi`, `iam`, `premises`.
|
- **Нет диаграмм** в `docs/apps/` для `ams-sync`, `auth-flow`, `bi`, `iam`, `premises`.
|
||||||
- **Чистые фронтенды без бэкенда в этом репозитории**: `auth-flow`, `control-interface`, `cross-section`, `document-link`, `prescriptions`, `projects`, `remarks`, `reviews`, `stamp-verification`. Бэкенд `projects` живёт в `planning/projects-backend`.
|
- **Чистые фронтенды без бэкенда в этом репозитории**: `auth-flow`, `control-interface`, `cross-section`, `document-link`, `prescriptions`, `projects`, `remarks`, `reviews`, `stamp-verification`. Бэкенд `projects` живёт в `planning/projects-backend`.
|
||||||
- Самые центральные сервисы по числу входящих ссылок: `documentations` (~85), `processing` / `workflow` (~76), `django` (~53), `eav` (~47), `resources` (~44), `bim` (~39), `flows` (~38). Менять их конфигурацию — дороже всего.
|
- Самые центральные сервисы по числу входящих ссылок: `documentations` (~85), `processing` / `workflow` (~76), `django` (~53), `eav` (~47), `resources` (~44), `bim` (~39), `flows` (~38). Менять их конфигурацию — дороже всего.
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
- Источники: GitLab-группа `infra` (209 проектов, включая подгруппы) + содержимое `infra/iac`.
|
- Источники: GitLab-группа `infra` (209 проектов, включая подгруппы) + содержимое `infra/iac`.
|
||||||
- Дата среза: **2026-08-05**.
|
- Дата среза: **2026-08-05**.
|
||||||
|
- Обновление 2026-11-25: контуры `sarex-contour` и `yc-k8s-test` выведены из эксплуатации, их конфигурации удалены. Упоминания ниже относятся к историческому срезу; `yc-k8s-test-02` сохранён.
|
||||||
- Все ссылки — на `https://gitlab.sarex.io`.
|
- Все ссылки — на `https://gitlab.sarex.io`.
|
||||||
|
|
||||||
Пометки достоверности:
|
Пометки достоверности:
|
||||||
|
|||||||
@ -1,4 +0,0 @@
|
|||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
- postgresql.yaml
|
|
||||||
patches: []
|
|
||||||
# - path: replicas.yaml
|
|
||||||
# target:
|
|
||||||
# kind: HelmRelease
|
|
||||||
# name: attachments
|
|
||||||
@ -1,122 +0,0 @@
|
|||||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: postgresql
|
|
||||||
namespace: attachments
|
|
||||||
spec:
|
|
||||||
interval: 5m
|
|
||||||
timeout: 2h
|
|
||||||
chart:
|
|
||||||
spec:
|
|
||||||
chart: postgresql-contour
|
|
||||||
version: "13.0.15"
|
|
||||||
sourceRef:
|
|
||||||
kind: HelmRepository
|
|
||||||
name: yc-oci-charts
|
|
||||||
namespace: flux-system
|
|
||||||
|
|
||||||
install:
|
|
||||||
timeout: 2h
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
|
|
||||||
upgrade:
|
|
||||||
timeout: 2h
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
|
|
||||||
values:
|
|
||||||
global:
|
|
||||||
security:
|
|
||||||
allowInsecureImages: true
|
|
||||||
defaultStorageClass: local-path
|
|
||||||
postgresql:
|
|
||||||
auth:
|
|
||||||
username: ""
|
|
||||||
database: ""
|
|
||||||
secretKeys:
|
|
||||||
userPasswordKey: "postgres-password"
|
|
||||||
auth:
|
|
||||||
username: ""
|
|
||||||
database: ""
|
|
||||||
secretKeys:
|
|
||||||
userPasswordKey: "postgres-password"
|
|
||||||
image:
|
|
||||||
registry: cr.yandex/crp3ccidau046kdj8g9q
|
|
||||||
repository: contour/postgresql
|
|
||||||
tag: 13.0.15
|
|
||||||
pullPolicy: Always
|
|
||||||
metrics:
|
|
||||||
enabled: false
|
|
||||||
prometheusRule:
|
|
||||||
enabled: false
|
|
||||||
primary:
|
|
||||||
containerSecurityContext:
|
|
||||||
readOnlyRootFilesystem: false
|
|
||||||
persistence:
|
|
||||||
storageClass: local-path
|
|
||||||
size: 20Gi
|
|
||||||
customLivenessProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 30
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
customReadinessProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 5
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
customStartupProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 30
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: 50m
|
|
||||||
memory: 128Mi
|
|
||||||
nodeSelector:
|
|
||||||
dedicated: db
|
|
||||||
tolerations:
|
|
||||||
- key: dedicated
|
|
||||||
operator: Equal
|
|
||||||
value: db
|
|
||||||
effect: NoSchedule
|
|
||||||
contour:
|
|
||||||
enabled: true
|
|
||||||
adminUser: "postgres"
|
|
||||||
sharedPreloadLibraries: ""
|
|
||||||
vault:
|
|
||||||
enabled: true
|
|
||||||
role: postgresql
|
|
||||||
authPath: auth/kubernetes
|
|
||||||
secretPath: secrets/data/postgresql/admin
|
|
||||||
secretKey: postgres-password
|
|
||||||
usersSecretPath: secrets/data/postgresql/users
|
|
||||||
databases:
|
|
||||||
- name: attachments_db
|
|
||||||
user: attachments
|
|
||||||
passwordKey: attachments
|
|
||||||
extensions: []
|
|
||||||
restoreFromDump: true
|
|
||||||
dumpKey: "sanitized_dumps_multi/attachments/288/attachments_company288_20260626T202844Z.tar.gz"
|
|
||||||
s3-proxy:
|
|
||||||
endpointUrl: "s3-proxy-service.postgresql.svc.cluster.local"
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: attachments
|
|
||||||
namespace: attachments
|
|
||||||
spec:
|
|
||||||
values:
|
|
||||||
services:
|
|
||||||
attachments:
|
|
||||||
deployment:
|
|
||||||
replicaCount:
|
|
||||||
_default: 2
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
patches: []
|
|
||||||
# - path: replicas.yaml
|
|
||||||
# target:
|
|
||||||
# kind: HelmRelease
|
|
||||||
# name: frontend
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: frontend
|
|
||||||
namespace: auth-flow
|
|
||||||
spec:
|
|
||||||
values:
|
|
||||||
services:
|
|
||||||
frontend:
|
|
||||||
deployment:
|
|
||||||
replicaCount:
|
|
||||||
_default: 1
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
@ -154,7 +154,7 @@ Slave-2 кластер — те же поля с суффиксом `_3`:
|
|||||||
- `base/backend-deployment.yaml` — Deployment `backend` в namespace `bim`, образ `bim-api`, `containerPort: 8000`, `API_ADDRESS=0.0.0.0:8000`, health-проба `GET /ping`.
|
- `base/backend-deployment.yaml` — Deployment `backend` в namespace `bim`, образ `bim-api`, `containerPort: 8000`, `API_ADDRESS=0.0.0.0:8000`, health-проба `GET /ping`.
|
||||||
- Секреты PostgreSQL инъектируются **из Vault** (аннотации `vault.hashicorp.com/*`, роль `bim`, путь `secrets/data/postgresql/apps/bim`) в файл `/vault/secrets/bim-postgresql`, который экспортируется в окружение перед запуском (`set -a; . /vault/secrets/bim-postgresql; set +a; exec ./httpserver`). Шаблон Vault задаёт `POSTGRES_ADDRESS[_2../_4]`, `POSTGRES_PORT*`, `POSTGRES_DB*` (все указывают на `postgresql.bim.svc.cluster.local:5432`, БД `bim_db`) и `POSTGRES_USER*`/`POSTGRES_PASSWORD*` из Vault.
|
- Секреты PostgreSQL инъектируются **из Vault** (аннотации `vault.hashicorp.com/*`, роль `bim`, путь `secrets/data/postgresql/apps/bim`) в файл `/vault/secrets/bim-postgresql`, который экспортируется в окружение перед запуском (`set -a; . /vault/secrets/bim-postgresql; set +a; exec ./httpserver`). Шаблон Vault задаёт `POSTGRES_ADDRESS[_2../_4]`, `POSTGRES_PORT*`, `POSTGRES_DB*` (все указывают на `postgresql.bim.svc.cluster.local:5432`, БД `bim_db`) и `POSTGRES_USER*`/`POSTGRES_PASSWORD*` из Vault.
|
||||||
- Прочие env заданы прямо в манифесте: `LAST_MASTER_BIM`, `LAST_MASTER_BIM_V3`, `LAST_SLAVE_1_BIM`, `POSTGRES_POOL_SIZE`, `DB_CERT_PATH_2/3/4`, `DJANGO_HOST` (`http://backend.django.svc.cluster.local:8000`), `ENABLE_SQL_QUERY=0`, `ENABLE_SSL=0`.
|
- Прочие env заданы прямо в манифесте: `LAST_MASTER_BIM`, `LAST_MASTER_BIM_V3`, `LAST_SLAVE_1_BIM`, `POSTGRES_POOL_SIZE`, `DB_CERT_PATH_2/3/4`, `DJANGO_HOST` (`http://backend.django.svc.cluster.local:8000`), `ENABLE_SQL_QUERY=0`, `ENABLE_SSL=0`.
|
||||||
- Оверлеи `brusnika-prod`, `brusnika-stage`, `yc-k8s-test` патчат base (реплики, образ, postgresql).
|
- Оверлеи `brusnika-prod`, `brusnika-stage` патчат base (реплики, образ, postgresql).
|
||||||
|
|
||||||
## Переменные в CI (`.gitlab-ci.yml`)
|
## Переменные в CI (`.gitlab-ci.yml`)
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +0,0 @@
|
|||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
- postgresql.yaml
|
|
||||||
patches:
|
|
||||||
- path: replicas.yaml
|
|
||||||
target:
|
|
||||||
kind: HelmRelease
|
|
||||||
name: backend
|
|
||||||
@ -1,126 +0,0 @@
|
|||||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: postgresql
|
|
||||||
namespace: bim
|
|
||||||
spec:
|
|
||||||
interval: 5m
|
|
||||||
timeout: 2h
|
|
||||||
chart:
|
|
||||||
spec:
|
|
||||||
chart: postgresql-contour
|
|
||||||
version: "13.0.15"
|
|
||||||
sourceRef:
|
|
||||||
kind: HelmRepository
|
|
||||||
name: yc-oci-charts
|
|
||||||
namespace: flux-system
|
|
||||||
|
|
||||||
install:
|
|
||||||
timeout: 2h
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
|
|
||||||
upgrade:
|
|
||||||
timeout: 2h
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
strategy: uninstall
|
|
||||||
|
|
||||||
values:
|
|
||||||
global:
|
|
||||||
security:
|
|
||||||
allowInsecureImages: true
|
|
||||||
defaultStorageClass: local-path
|
|
||||||
postgresql:
|
|
||||||
auth:
|
|
||||||
username: ""
|
|
||||||
database: ""
|
|
||||||
secretKeys:
|
|
||||||
userPasswordKey: "postgres-password"
|
|
||||||
auth:
|
|
||||||
username: ""
|
|
||||||
database: ""
|
|
||||||
secretKeys:
|
|
||||||
userPasswordKey: "postgres-password"
|
|
||||||
image:
|
|
||||||
registry: cr.yandex/crp3ccidau046kdj8g9q
|
|
||||||
repository: contour/postgresql
|
|
||||||
tag: 13.0.15
|
|
||||||
pullPolicy: Always
|
|
||||||
metrics:
|
|
||||||
enabled: false
|
|
||||||
prometheusRule:
|
|
||||||
enabled: false
|
|
||||||
primary:
|
|
||||||
containerSecurityContext:
|
|
||||||
readOnlyRootFilesystem: false
|
|
||||||
persistence:
|
|
||||||
storageClass: local-path
|
|
||||||
size: 20Gi
|
|
||||||
customLivenessProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 30
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
customReadinessProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 5
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
customStartupProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 30
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: 50m
|
|
||||||
memory: 128Mi
|
|
||||||
nodeSelector:
|
|
||||||
dedicated: db
|
|
||||||
tolerations:
|
|
||||||
- key: dedicated
|
|
||||||
operator: Equal
|
|
||||||
value: db
|
|
||||||
effect: NoSchedule
|
|
||||||
contour:
|
|
||||||
enabled: true
|
|
||||||
adminUser: "postgres"
|
|
||||||
sharedPreloadLibraries: ""
|
|
||||||
vault:
|
|
||||||
enabled: true
|
|
||||||
role: postgresql
|
|
||||||
authPath: auth/kubernetes
|
|
||||||
secretPath: secrets/data/postgresql/admin
|
|
||||||
secretKey: postgres-password
|
|
||||||
usersSecretPath: secrets/data/postgresql/users
|
|
||||||
databases:
|
|
||||||
- name: bim_db
|
|
||||||
user: bim
|
|
||||||
passwordKey: bim
|
|
||||||
extensions:
|
|
||||||
- ltree
|
|
||||||
- timescaledb
|
|
||||||
- uuid-ossp
|
|
||||||
- pg_partman
|
|
||||||
restoreFromDump: false
|
|
||||||
s3-proxy:
|
|
||||||
endpointUrl: "s3-proxy-service.postgresql.svc.cluster.local"
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: backend
|
|
||||||
namespace: bim
|
|
||||||
spec:
|
|
||||||
values:
|
|
||||||
services:
|
|
||||||
backend:
|
|
||||||
deployment:
|
|
||||||
replicaCount:
|
|
||||||
_default: 1
|
|
||||||
@ -202,7 +202,7 @@
|
|||||||
|
|
||||||
В `iac/apps/cde` секреты доставляются не через `secretEnvs` чарта, а через **Vault Agent Injector**: аннотации подов монтируют секрет `secrets/data/vault/apps/cde` в файл `/vault/secrets/cde-env`, который экспортируется перед запуском (`source /vault/secrets/cde-env`, затем `exec /http` или `/worker`). Дополнительно контейнерам задаётся `S3_IS_CONTOUR=true` (примечание: в коде используется переменная `IS_CONTOUR`).
|
В `iac/apps/cde` секреты доставляются не через `secretEnvs` чарта, а через **Vault Agent Injector**: аннотации подов монтируют секрет `secrets/data/vault/apps/cde` в файл `/vault/secrets/cde-env`, который экспортируется перед запуском (`source /vault/secrets/cde-env`, затем `exec /http` или `/worker`). Дополнительно контейнерам задаётся `S3_IS_CONTOUR=true` (примечание: в коде используется переменная `IS_CONTOUR`).
|
||||||
|
|
||||||
Оверлеи: `base` (общие манифесты), `brusnika-stage`, `brusnika-prod`, `yc-k8s-test`.
|
Оверлеи: `base` (общие манифесты), `brusnika-stage`, `brusnika-prod`.
|
||||||
|
|
||||||
## Замечания и потенциальные проблемы
|
## Замечания и потенциальные проблемы
|
||||||
|
|
||||||
|
|||||||
@ -1,10 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
patches: []
|
|
||||||
# - path: replicas.yaml
|
|
||||||
# target:
|
|
||||||
# kind: Deployment
|
|
||||||
# name: frontend
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: backend
|
|
||||||
namespace: cde
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
- postgresql.yaml
|
|
||||||
patches: []
|
|
||||||
@ -1,124 +0,0 @@
|
|||||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: postgresql
|
|
||||||
namespace: checklists
|
|
||||||
spec:
|
|
||||||
interval: 5m
|
|
||||||
timeout: 2h
|
|
||||||
chart:
|
|
||||||
spec:
|
|
||||||
chart: postgresql-contour
|
|
||||||
version: "13.0.15"
|
|
||||||
sourceRef:
|
|
||||||
kind: HelmRepository
|
|
||||||
name: yc-oci-charts
|
|
||||||
namespace: flux-system
|
|
||||||
|
|
||||||
install:
|
|
||||||
timeout: 2h
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
|
|
||||||
upgrade:
|
|
||||||
timeout: 2h
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
|
|
||||||
values:
|
|
||||||
global:
|
|
||||||
security:
|
|
||||||
allowInsecureImages: true
|
|
||||||
defaultStorageClass: local-path
|
|
||||||
postgresql:
|
|
||||||
auth:
|
|
||||||
username: ""
|
|
||||||
database: ""
|
|
||||||
secretKeys:
|
|
||||||
userPasswordKey: "postgres-password"
|
|
||||||
auth:
|
|
||||||
username: ""
|
|
||||||
database: ""
|
|
||||||
secretKeys:
|
|
||||||
userPasswordKey: "postgres-password"
|
|
||||||
image:
|
|
||||||
registry: cr.yandex/crp3ccidau046kdj8g9q
|
|
||||||
repository: contour/postgresql
|
|
||||||
tag: 13.0.15
|
|
||||||
pullPolicy: Always
|
|
||||||
metrics:
|
|
||||||
enabled: false
|
|
||||||
prometheusRule:
|
|
||||||
enabled: false
|
|
||||||
primary:
|
|
||||||
containerSecurityContext:
|
|
||||||
readOnlyRootFilesystem: false
|
|
||||||
persistence:
|
|
||||||
storageClass: local-path
|
|
||||||
size: 20Gi
|
|
||||||
customLivenessProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 30
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
customReadinessProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 5
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
customStartupProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 30
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: 50m
|
|
||||||
memory: 128Mi
|
|
||||||
nodeSelector:
|
|
||||||
dedicated: db
|
|
||||||
tolerations:
|
|
||||||
- key: dedicated
|
|
||||||
operator: Equal
|
|
||||||
value: db
|
|
||||||
effect: NoSchedule
|
|
||||||
contour:
|
|
||||||
enabled: true
|
|
||||||
adminUser: "postgres"
|
|
||||||
sharedPreloadLibraries: ""
|
|
||||||
vault:
|
|
||||||
enabled: true
|
|
||||||
role: postgresql
|
|
||||||
authPath: auth/kubernetes
|
|
||||||
secretPath: secrets/data/postgresql/admin
|
|
||||||
secretKey: postgres-password
|
|
||||||
usersSecretPath: secrets/data/postgresql/users
|
|
||||||
databases:
|
|
||||||
- name: checklists_db
|
|
||||||
user: checklists
|
|
||||||
passwordKey: checklists
|
|
||||||
extensions:
|
|
||||||
- pg_stat_statements
|
|
||||||
- uuid-ossp
|
|
||||||
restoreFromDump: true
|
|
||||||
dumpKey: "sanitized_dumps_multi/checklists/288/checklists_company288_20260626T202844Z.tar.gz"
|
|
||||||
s3-proxy:
|
|
||||||
endpointUrl: "s3-proxy-service.postgresql.svc.cluster.local"
|
|
||||||
@ -117,7 +117,7 @@
|
|||||||
|
|
||||||
## Развёртывание через Kustomize (этот репозиторий, `apps/comparisons`)
|
## Развёртывание через Kustomize (этот репозиторий, `apps/comparisons`)
|
||||||
|
|
||||||
Структура: `base` (общие манифесты) и оверлеи `brusnika-stage`, `brusnika-prod`, `yc-k8s-test`. Секреты БД и публичный JWT-ключ подтягиваются из **HashiCorp Vault** (аннотации `vault.hashicorp.com/*` в `base/backend-deployment.yaml`), а не из k8s-секретов.
|
Структура: `base` (общие манифесты) и оверлеи `brusnika-stage`, `brusnika-prod`. Секреты БД и публичный JWT-ключ подтягиваются из **HashiCorp Vault** (аннотации `vault.hashicorp.com/*` в `base/backend-deployment.yaml`), а не из k8s-секретов.
|
||||||
|
|
||||||
> **Важно: расхождение схем переменных.** Манифест `base/backend-deployment.yaml` использует другой (более новый) набор имён переменных, чем Go-код из `comparisons-backend` (`config/config.go`): напр. `HTTP_PORT`, `LOGGER_LOG_LEVEL`, `DATABASE_NAME`, `DOCUMENTATIONS_INTERNAL_HOST`, `DOCUMENTATIONS_EXTERNAL_HOST`, `WORKFLOWS_HOST`, `WORKFLOWS_DJANGO_HOST`, `WORKFLOWS_BIMV2_INTERNAL_HOST`, `WORKSPACES_HOST`, `EAV_HOST`, `APP_NAME`, `AUTH_PUBLIC_KEY`, `WORKFLOWS_CONFIG_FILEPATH` и др., а также `/ping` в health-проверках и образ `comparisons_backend_prod`. Такой схемы нет в Go-репозитории. Перед использованием этих файлов стоит убедиться, какой именно образ бэкенда деплоится оверлеем: если это Go-сервис из `comparisons-backend`, набор env нужно привести к именам из таблиц выше.
|
> **Важно: расхождение схем переменных.** Манифест `base/backend-deployment.yaml` использует другой (более новый) набор имён переменных, чем Go-код из `comparisons-backend` (`config/config.go`): напр. `HTTP_PORT`, `LOGGER_LOG_LEVEL`, `DATABASE_NAME`, `DOCUMENTATIONS_INTERNAL_HOST`, `DOCUMENTATIONS_EXTERNAL_HOST`, `WORKFLOWS_HOST`, `WORKFLOWS_DJANGO_HOST`, `WORKFLOWS_BIMV2_INTERNAL_HOST`, `WORKSPACES_HOST`, `EAV_HOST`, `APP_NAME`, `AUTH_PUBLIC_KEY`, `WORKFLOWS_CONFIG_FILEPATH` и др., а также `/ping` в health-проверках и образ `comparisons_backend_prod`. Такой схемы нет в Go-репозитории. Перед использованием этих файлов стоит убедиться, какой именно образ бэкенда деплоится оверлеем: если это Go-сервис из `comparisons-backend`, набор env нужно привести к именам из таблиц выше.
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +0,0 @@
|
|||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
- postgresql.yaml
|
|
||||||
patches:
|
|
||||||
- path: replicas.yaml
|
|
||||||
target:
|
|
||||||
kind: HelmRelease
|
|
||||||
name: backend
|
|
||||||
@ -1,122 +0,0 @@
|
|||||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: postgresql
|
|
||||||
namespace: comparisons
|
|
||||||
spec:
|
|
||||||
interval: 5m
|
|
||||||
timeout: 2h
|
|
||||||
chart:
|
|
||||||
spec:
|
|
||||||
chart: postgresql-contour
|
|
||||||
version: "13.0.15"
|
|
||||||
sourceRef:
|
|
||||||
kind: HelmRepository
|
|
||||||
name: yc-oci-charts
|
|
||||||
namespace: flux-system
|
|
||||||
|
|
||||||
install:
|
|
||||||
timeout: 2h
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
|
|
||||||
upgrade:
|
|
||||||
timeout: 2h
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
|
|
||||||
values:
|
|
||||||
global:
|
|
||||||
security:
|
|
||||||
allowInsecureImages: true
|
|
||||||
defaultStorageClass: local-path
|
|
||||||
postgresql:
|
|
||||||
auth:
|
|
||||||
username: ""
|
|
||||||
database: ""
|
|
||||||
secretKeys:
|
|
||||||
userPasswordKey: "postgres-password"
|
|
||||||
auth:
|
|
||||||
username: ""
|
|
||||||
database: ""
|
|
||||||
secretKeys:
|
|
||||||
userPasswordKey: "postgres-password"
|
|
||||||
image:
|
|
||||||
registry: cr.yandex/crp3ccidau046kdj8g9q
|
|
||||||
repository: contour/postgresql
|
|
||||||
tag: 13.0.15
|
|
||||||
pullPolicy: Always
|
|
||||||
metrics:
|
|
||||||
enabled: false
|
|
||||||
prometheusRule:
|
|
||||||
enabled: false
|
|
||||||
primary:
|
|
||||||
containerSecurityContext:
|
|
||||||
readOnlyRootFilesystem: false
|
|
||||||
persistence:
|
|
||||||
storageClass: local-path
|
|
||||||
size: 20Gi
|
|
||||||
customLivenessProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 30
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
customReadinessProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 5
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
customStartupProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 30
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: 50m
|
|
||||||
memory: 128Mi
|
|
||||||
nodeSelector:
|
|
||||||
dedicated: db
|
|
||||||
tolerations:
|
|
||||||
- key: dedicated
|
|
||||||
operator: Equal
|
|
||||||
value: db
|
|
||||||
effect: NoSchedule
|
|
||||||
contour:
|
|
||||||
enabled: true
|
|
||||||
adminUser: "postgres"
|
|
||||||
sharedPreloadLibraries: ""
|
|
||||||
vault:
|
|
||||||
enabled: true
|
|
||||||
role: postgresql
|
|
||||||
authPath: auth/kubernetes
|
|
||||||
secretPath: secrets/data/postgresql/admin
|
|
||||||
secretKey: postgres-password
|
|
||||||
usersSecretPath: secrets/data/postgresql/users
|
|
||||||
databases:
|
|
||||||
- name: comparisons_db
|
|
||||||
user: comparisons
|
|
||||||
passwordKey: comparisons
|
|
||||||
extensions: []
|
|
||||||
restoreFromDump: true
|
|
||||||
dumpKey: "sanitized_dumps_multi/comparisons/288/comparisons_company288_20260626T202844Z.tar.gz"
|
|
||||||
s3-proxy:
|
|
||||||
endpointUrl: "s3-proxy-service.postgresql.svc.cluster.local"
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: backend
|
|
||||||
namespace: comparisons
|
|
||||||
spec:
|
|
||||||
values:
|
|
||||||
services:
|
|
||||||
backend:
|
|
||||||
deployment:
|
|
||||||
replicaCount:
|
|
||||||
_default: 1
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
- postgresql.yaml
|
|
||||||
patches: []
|
|
||||||
# - path: replicas.yaml
|
|
||||||
# target:
|
|
||||||
# kind: Deployment
|
|
||||||
# name: backend
|
|
||||||
@ -1,126 +0,0 @@
|
|||||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: postgresql
|
|
||||||
namespace: contracts
|
|
||||||
spec:
|
|
||||||
interval: 5m
|
|
||||||
timeout: 2h
|
|
||||||
chart:
|
|
||||||
spec:
|
|
||||||
chart: postgresql-contour
|
|
||||||
version: "13.0.15"
|
|
||||||
sourceRef:
|
|
||||||
kind: HelmRepository
|
|
||||||
name: yc-oci-charts
|
|
||||||
namespace: flux-system
|
|
||||||
|
|
||||||
install:
|
|
||||||
timeout: 2h
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
|
|
||||||
upgrade:
|
|
||||||
timeout: 2h
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
|
|
||||||
values:
|
|
||||||
global:
|
|
||||||
security:
|
|
||||||
allowInsecureImages: true
|
|
||||||
defaultStorageClass: local-path
|
|
||||||
postgresql:
|
|
||||||
auth:
|
|
||||||
username: ""
|
|
||||||
database: ""
|
|
||||||
secretKeys:
|
|
||||||
userPasswordKey: "postgres-password"
|
|
||||||
auth:
|
|
||||||
username: ""
|
|
||||||
database: ""
|
|
||||||
secretKeys:
|
|
||||||
userPasswordKey: "postgres-password"
|
|
||||||
image:
|
|
||||||
registry: cr.yandex/crp3ccidau046kdj8g9q
|
|
||||||
repository: contour/postgresql
|
|
||||||
tag: 13.0.15
|
|
||||||
pullPolicy: Always
|
|
||||||
metrics:
|
|
||||||
enabled: false
|
|
||||||
prometheusRule:
|
|
||||||
enabled: false
|
|
||||||
primary:
|
|
||||||
containerSecurityContext:
|
|
||||||
readOnlyRootFilesystem: false
|
|
||||||
persistence:
|
|
||||||
storageClass: local-path
|
|
||||||
size: 20Gi
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: 50m
|
|
||||||
memory: 128Mi
|
|
||||||
customLivenessProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 30
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
customReadinessProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 5
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
customStartupProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 30
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
nodeSelector:
|
|
||||||
dedicated: db
|
|
||||||
tolerations:
|
|
||||||
- key: dedicated
|
|
||||||
operator: Equal
|
|
||||||
value: db
|
|
||||||
effect: NoSchedule
|
|
||||||
contour:
|
|
||||||
enabled: true
|
|
||||||
adminUser: "postgres"
|
|
||||||
sharedPreloadLibraries: ""
|
|
||||||
vault:
|
|
||||||
enabled: true
|
|
||||||
role: postgresql
|
|
||||||
authPath: auth/kubernetes
|
|
||||||
secretPath: secrets/data/postgresql/admin
|
|
||||||
secretKey: postgres-password
|
|
||||||
usersSecretPath: secrets/data/postgresql/users
|
|
||||||
databases:
|
|
||||||
- name: contracts_db
|
|
||||||
user: contracts
|
|
||||||
passwordKey: contracts
|
|
||||||
extensions:
|
|
||||||
- btree_gist
|
|
||||||
- ltree
|
|
||||||
- pg_stat_statements
|
|
||||||
- uuid-ossp
|
|
||||||
restoreFromDump: true
|
|
||||||
dumpKey: "sanitized_dumps_multi/contracts/288/contracts_company288_20260626T202844Z.tar.gz"
|
|
||||||
s3-proxy:
|
|
||||||
endpointUrl: "s3-proxy-service.postgresql.svc.cluster.local"
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: backend
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
namespace: control-interface
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
- namespace.yaml
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Namespace
|
|
||||||
metadata:
|
|
||||||
name: control-interface
|
|
||||||
labels:
|
|
||||||
istio-injection: enabled
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
namespace: django
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
patches:
|
|
||||||
- path: replicas.yaml
|
|
||||||
target:
|
|
||||||
kind: HelmRelease
|
|
||||||
name: srx-admin
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: srx-admin
|
|
||||||
namespace: django
|
|
||||||
spec:
|
|
||||||
values:
|
|
||||||
services:
|
|
||||||
frontend:
|
|
||||||
deployment:
|
|
||||||
replicaCount:
|
|
||||||
_default: 1
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
patches:
|
|
||||||
- path: replicas.yaml
|
|
||||||
target:
|
|
||||||
kind: HelmRelease
|
|
||||||
name: cross-section-static
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: cross-section-static
|
|
||||||
namespace: cross-section
|
|
||||||
spec:
|
|
||||||
values:
|
|
||||||
services:
|
|
||||||
frontend:
|
|
||||||
deployment:
|
|
||||||
replicaCount:
|
|
||||||
_default: 1
|
|
||||||
@ -288,7 +288,7 @@ Module Federation) конфигурируется отдельно на этап
|
|||||||
## Конфигурация в кластере (Kubernetes)
|
## Конфигурация в кластере (Kubernetes)
|
||||||
|
|
||||||
Манифесты приложения — в этом же каталоге (`base/`, оверлеи `brusnika-stage`,
|
Манифесты приложения — в этом же каталоге (`base/`, оверлеи `brusnika-stage`,
|
||||||
`brusnika-prod`, `yc-k8s-test`). Секреты монтируются через **Vault Agent Injector**
|
`brusnika-prod`). Секреты монтируются через **Vault Agent Injector**
|
||||||
(аннотации `vault.hashicorp.com/*` на Deployment `backend` и `celery`). Файлы
|
(аннотации `vault.hashicorp.com/*` на Deployment `backend` и `celery`). Файлы
|
||||||
секретов в контейнере и их содержимое:
|
секретов в контейнере и их содержимое:
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +0,0 @@
|
|||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
patches:
|
|
||||||
- path: nginx-configmap.yaml
|
|
||||||
target:
|
|
||||||
kind: ConfigMap
|
|
||||||
name: nginx-configmap
|
|
||||||
@ -1,160 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: ConfigMap
|
|
||||||
metadata:
|
|
||||||
name: nginx-configmap
|
|
||||||
namespace: django
|
|
||||||
data:
|
|
||||||
nginx.conf: |
|
|
||||||
worker_processes auto;
|
|
||||||
|
|
||||||
pid /var/run/nginx.pid;
|
|
||||||
|
|
||||||
events {
|
|
||||||
use epoll;
|
|
||||||
worker_connections 1024;
|
|
||||||
}
|
|
||||||
|
|
||||||
http {
|
|
||||||
|
|
||||||
# Basic Settings
|
|
||||||
large_client_header_buffers 8 128k;
|
|
||||||
sendfile on;
|
|
||||||
tcp_nopush on;
|
|
||||||
tcp_nodelay on;
|
|
||||||
keepalive_timeout 300;
|
|
||||||
types_hash_max_size 2048;
|
|
||||||
client_max_body_size 5000M;
|
|
||||||
client_header_buffer_size 5M;
|
|
||||||
include /etc/nginx/mime.types;
|
|
||||||
default_type application/octet-stream;
|
|
||||||
|
|
||||||
# Logging Settings
|
|
||||||
access_log /var/log/nginx/access.log;
|
|
||||||
error_log /var/log/nginx/error.log;
|
|
||||||
|
|
||||||
# GZIP Settings
|
|
||||||
gzip on;
|
|
||||||
gzip_vary on;
|
|
||||||
gzip_proxied any;
|
|
||||||
gzip_comp_level 6;
|
|
||||||
gzip_buffers 16 8k;
|
|
||||||
gzip_http_version 1.1;
|
|
||||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
|
||||||
|
|
||||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
|
||||||
'$status $body_bytes_sent "$http_referer" '
|
|
||||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
|
||||||
|
|
||||||
server {
|
|
||||||
listen 80;
|
|
||||||
listen [::]:80;
|
|
||||||
root /opt/react_client/;
|
|
||||||
|
|
||||||
add_header 'Access-Control-Allow-Origin' '*' always;
|
|
||||||
add_header 'Access-Control-Allow-Methods' '*' always;
|
|
||||||
add_header 'Access-Control-Allow-Headers' '*' always;
|
|
||||||
|
|
||||||
location = /static/index.bundle.js {
|
|
||||||
add_header Cache-Control 'no-store no-cache, must-revalidate, proxy-revalidate, max-age=0';
|
|
||||||
if_modified_since off;
|
|
||||||
expires off;
|
|
||||||
}
|
|
||||||
|
|
||||||
# location ~^/api/pm/ {
|
|
||||||
# proxy_http_version 1.1;
|
|
||||||
# proxy_set_header Connection "";
|
|
||||||
# proxy_set_header Host $host;
|
|
||||||
# proxy_pass http://backend-svc.pm.svc.cluster.local:8000;
|
|
||||||
# }
|
|
||||||
|
|
||||||
# location ~^/api/v1/documents/ {
|
|
||||||
# proxy_http_version 1.1;
|
|
||||||
# proxy_set_header Host $host;
|
|
||||||
# proxy_pass http://backend-filestream-svc.documentations.svc.cluster.local:80;
|
|
||||||
# }
|
|
||||||
|
|
||||||
location ~^/(api|admin)/ {
|
|
||||||
proxy_http_version 1.1;
|
|
||||||
proxy_set_header Connection "";
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_pass http://backend-svc.django.svc.cluster.local:80;
|
|
||||||
}
|
|
||||||
|
|
||||||
location = /static/pdf-runtime/assets/mupdf-wasm.wasm {
|
|
||||||
alias /opt/react_client/static/pdf-runtime/assets/mupdf-wasm.wasm;
|
|
||||||
add_header Content-Type application/wasm always;
|
|
||||||
add_header Cache-Control "public, max-age=31536000, immutable" always;
|
|
||||||
add_header Access-Control-Allow-Origin "*" always;
|
|
||||||
add_header Access-Control-Allow-Methods "GET, OPTIONS" always;
|
|
||||||
add_header Access-Control-Allow-Headers "DNT,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization" always;
|
|
||||||
}
|
|
||||||
|
|
||||||
location = /workspaces-v2/worker/static/viewer-pdf/mupdf-wasm.js {
|
|
||||||
alias /opt/react_client/static/viewer-pdf/mupdf-wasm.js;
|
|
||||||
add_header Content-Type application/javascript always;
|
|
||||||
add_header Cache-Control "public, max-age=31536000, immutable" always;
|
|
||||||
add_header Access-Control-Allow-Origin "*" always;
|
|
||||||
add_header Access-Control-Allow-Methods "GET, OPTIONS" always;
|
|
||||||
add_header Access-Control-Allow-Headers "DNT,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization" always;
|
|
||||||
}
|
|
||||||
|
|
||||||
location = /workspaces-v2/worker/mupdf.worker-3.3.9.js {
|
|
||||||
alias /opt/react_client/static/pdf-runtime/mupdf.worker-3.3.9.js;
|
|
||||||
add_header Content-Type application/javascript always;
|
|
||||||
add_header Cache-Control "public, max-age=31536000, immutable" always;
|
|
||||||
add_header Access-Control-Allow-Origin "*" always;
|
|
||||||
add_header Access-Control-Allow-Methods "GET, OPTIONS" always;
|
|
||||||
add_header Access-Control-Allow-Headers "DNT,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization" always;
|
|
||||||
}
|
|
||||||
|
|
||||||
location = /workspaces-v2/worker/static/viewer-pdf/mupdf.js {
|
|
||||||
alias /opt/react_client/static/viewer-pdf/mupdf.js;
|
|
||||||
add_header Content-Type application/javascript always;
|
|
||||||
add_header Cache-Control "public, max-age=31536000, immutable" always;
|
|
||||||
add_header Access-Control-Allow-Origin "*" always;
|
|
||||||
add_header Access-Control-Allow-Methods "GET, OPTIONS" always;
|
|
||||||
add_header Access-Control-Allow-Headers "DNT,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization" always;
|
|
||||||
}
|
|
||||||
|
|
||||||
location = /workspaces-v2/worker/static/viewer-pdf/mupdf-wasm.wasm {
|
|
||||||
add_header Content-Type application/wasm always;
|
|
||||||
alias /opt/react_client/static/viewer-pdf/mupdf-wasm.wasm;
|
|
||||||
}
|
|
||||||
|
|
||||||
location ~^/workspaces-v2/(.+).js {
|
|
||||||
proxy_http_version 1.1;
|
|
||||||
proxy_set_header Connection "";
|
|
||||||
rewrite /workspaces-v2/(.+) /$1 break;
|
|
||||||
proxy_pass http://frontend-svc.workspaces.svc.cluster.local:80;
|
|
||||||
}
|
|
||||||
|
|
||||||
location ~^/workspaces-v2/(.+)\.wasm$ {
|
|
||||||
proxy_http_version 1.1;
|
|
||||||
proxy_set_header Connection "";
|
|
||||||
rewrite ^/workspaces-v2/(.+) /$1 break;
|
|
||||||
proxy_pass http://frontend-svc.workspaces.svc.cluster.local:80;
|
|
||||||
}
|
|
||||||
|
|
||||||
location @index {
|
|
||||||
add_header Cache-Control 'no-cache, must-revalidate, proxy-revalidate, max-age=0';
|
|
||||||
if_modified_since off;
|
|
||||||
expires off;
|
|
||||||
try_files /static/index.html =404;
|
|
||||||
}
|
|
||||||
|
|
||||||
# location ~^/workflows/(.+).js {
|
|
||||||
# proxy_http_version 1.1;
|
|
||||||
# proxy_set_header Connection "";
|
|
||||||
# rewrite /workflows/(.+) /$1 break;
|
|
||||||
# proxy_pass http://frontend-svc.processing.svc.cluster.local:80;
|
|
||||||
# }
|
|
||||||
|
|
||||||
location /service-worker.js {
|
|
||||||
try_files /static/$uri @index;
|
|
||||||
}
|
|
||||||
|
|
||||||
location / {
|
|
||||||
try_files $uri @index;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
- postgresql.yaml
|
|
||||||
patches: []
|
|
||||||
@ -1,124 +0,0 @@
|
|||||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: postgresql
|
|
||||||
namespace: django
|
|
||||||
spec:
|
|
||||||
interval: 5m
|
|
||||||
timeout: 2h
|
|
||||||
chart:
|
|
||||||
spec:
|
|
||||||
chart: postgresql-contour
|
|
||||||
version: "13.0.15"
|
|
||||||
sourceRef:
|
|
||||||
kind: HelmRepository
|
|
||||||
name: yc-oci-charts
|
|
||||||
namespace: flux-system
|
|
||||||
|
|
||||||
install:
|
|
||||||
timeout: 2h
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
|
|
||||||
upgrade:
|
|
||||||
timeout: 2h
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
|
|
||||||
values:
|
|
||||||
global:
|
|
||||||
security:
|
|
||||||
allowInsecureImages: true
|
|
||||||
defaultStorageClass: local-path
|
|
||||||
postgresql:
|
|
||||||
auth:
|
|
||||||
username: ""
|
|
||||||
database: ""
|
|
||||||
secretKeys:
|
|
||||||
userPasswordKey: "postgres-password"
|
|
||||||
auth:
|
|
||||||
username: ""
|
|
||||||
database: ""
|
|
||||||
secretKeys:
|
|
||||||
userPasswordKey: "postgres-password"
|
|
||||||
image:
|
|
||||||
registry: cr.yandex/crp3ccidau046kdj8g9q
|
|
||||||
repository: contour/postgresql
|
|
||||||
tag: 13.0.15
|
|
||||||
pullPolicy: Always
|
|
||||||
metrics:
|
|
||||||
enabled: false
|
|
||||||
prometheusRule:
|
|
||||||
enabled: false
|
|
||||||
primary:
|
|
||||||
containerSecurityContext:
|
|
||||||
readOnlyRootFilesystem: false
|
|
||||||
persistence:
|
|
||||||
storageClass: local-path
|
|
||||||
size: 20Gi
|
|
||||||
customLivenessProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 30
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
customReadinessProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 5
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
customStartupProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 30
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: 50m
|
|
||||||
memory: 128Mi
|
|
||||||
nodeSelector:
|
|
||||||
dedicated: db
|
|
||||||
tolerations:
|
|
||||||
- key: dedicated
|
|
||||||
operator: Equal
|
|
||||||
value: db
|
|
||||||
effect: NoSchedule
|
|
||||||
contour:
|
|
||||||
enabled: true
|
|
||||||
adminUser: "postgres"
|
|
||||||
sharedPreloadLibraries: ""
|
|
||||||
vault:
|
|
||||||
enabled: true
|
|
||||||
role: postgresql
|
|
||||||
authPath: auth/kubernetes
|
|
||||||
secretPath: secrets/data/postgresql/admin
|
|
||||||
secretKey: postgres-password
|
|
||||||
usersSecretPath: secrets/data/postgresql/users
|
|
||||||
databases:
|
|
||||||
- name: sarex_db
|
|
||||||
user: sarex
|
|
||||||
passwordKey: sarex
|
|
||||||
extensions:
|
|
||||||
- ltree
|
|
||||||
- pg_stat_statements
|
|
||||||
restoreFromDump: true
|
|
||||||
dumpKey: "sanitized_dumps_multi/sarex_db/288/sarex_db_company288_20260626T202844Z.tar.gz"
|
|
||||||
s3-proxy:
|
|
||||||
endpointUrl: "s3-proxy-service.postgresql.svc.cluster.local"
|
|
||||||
@ -63,7 +63,6 @@
|
|||||||
| `base` | kustomize (`Deployment` + `Service` + `Namespace`) | namespace `document-link` c `istio-injection: enabled`; `Deployment/frontend` |
|
| `base` | kustomize (`Deployment` + `Service` + `Namespace`) | namespace `document-link` c `istio-injection: enabled`; `Deployment/frontend` |
|
||||||
| `brusnika-stage` | FluxCD `HelmRelease` → `universal-chart` `0.1.7` | `replicaCount`: stage `1`; probes выключены |
|
| `brusnika-stage` | FluxCD `HelmRelease` → `universal-chart` `0.1.7` | `replicaCount`: stage `1`; probes выключены |
|
||||||
| `brusnika-prod` | FluxCD `HelmRelease` → `universal-chart` `0.1.7` | `replicaCount`: preprod/production `3`; probes выключены |
|
| `brusnika-prod` | FluxCD `HelmRelease` → `universal-chart` `0.1.7` | `replicaCount`: preprod/production `3`; probes выключены |
|
||||||
| `yc-k8s-test` | kustomize (`../base`) | тестовый контур |
|
|
||||||
|
|
||||||
Порты сервиса: в `universal-chart` — `service.port 8080` → `targetPort 3000` (`portName: http`); в `base/service.yaml` — `port 80` → `targetPort 80`.
|
Порты сервиса: в `universal-chart` — `service.port 8080` → `targetPort 3000` (`portName: http`); в `base/service.yaml` — `port 80` → `targetPort 80`.
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +0,0 @@
|
|||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
patches: []
|
|
||||||
# - path: replicas.yaml
|
|
||||||
# target:
|
|
||||||
# kind: Deployment
|
|
||||||
# name: frontend
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: frontend
|
|
||||||
namespace: document-link
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
- postgresql.yaml
|
|
||||||
patches: []
|
|
||||||
@ -1,126 +0,0 @@
|
|||||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: postgresql
|
|
||||||
namespace: documentations
|
|
||||||
spec:
|
|
||||||
interval: 5m
|
|
||||||
timeout: 2h
|
|
||||||
chart:
|
|
||||||
spec:
|
|
||||||
chart: postgresql-contour
|
|
||||||
version: "13.0.15"
|
|
||||||
sourceRef:
|
|
||||||
kind: HelmRepository
|
|
||||||
name: yc-oci-charts
|
|
||||||
namespace: flux-system
|
|
||||||
|
|
||||||
install:
|
|
||||||
timeout: 2h
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
|
|
||||||
upgrade:
|
|
||||||
timeout: 2h
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
|
|
||||||
values:
|
|
||||||
global:
|
|
||||||
security:
|
|
||||||
allowInsecureImages: true
|
|
||||||
defaultStorageClass: local-path
|
|
||||||
postgresql:
|
|
||||||
auth:
|
|
||||||
username: ""
|
|
||||||
database: ""
|
|
||||||
secretKeys:
|
|
||||||
userPasswordKey: "postgres-password"
|
|
||||||
auth:
|
|
||||||
username: ""
|
|
||||||
database: ""
|
|
||||||
secretKeys:
|
|
||||||
userPasswordKey: "postgres-password"
|
|
||||||
image:
|
|
||||||
registry: cr.yandex/crp3ccidau046kdj8g9q
|
|
||||||
repository: contour/postgresql
|
|
||||||
tag: 13.0.15
|
|
||||||
pullPolicy: Always
|
|
||||||
metrics:
|
|
||||||
enabled: false
|
|
||||||
prometheusRule:
|
|
||||||
enabled: false
|
|
||||||
primary:
|
|
||||||
containerSecurityContext:
|
|
||||||
readOnlyRootFilesystem: false
|
|
||||||
persistence:
|
|
||||||
storageClass: local-path
|
|
||||||
size: 20Gi
|
|
||||||
customLivenessProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 30
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
customReadinessProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 5
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
customStartupProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 30
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: 50m
|
|
||||||
memory: 128Mi
|
|
||||||
nodeSelector:
|
|
||||||
dedicated: db
|
|
||||||
tolerations:
|
|
||||||
- key: dedicated
|
|
||||||
operator: Equal
|
|
||||||
value: db
|
|
||||||
effect: NoSchedule
|
|
||||||
contour:
|
|
||||||
enabled: true
|
|
||||||
adminUser: "postgres"
|
|
||||||
sharedPreloadLibraries: ""
|
|
||||||
vault:
|
|
||||||
enabled: true
|
|
||||||
role: postgresql
|
|
||||||
authPath: auth/kubernetes
|
|
||||||
secretPath: secrets/data/postgresql/admin
|
|
||||||
secretKey: postgres-password
|
|
||||||
usersSecretPath: secrets/data/postgresql/users
|
|
||||||
databases:
|
|
||||||
- name: documentations_db
|
|
||||||
user: documentations
|
|
||||||
passwordKey: documentations
|
|
||||||
extensions:
|
|
||||||
- ltree
|
|
||||||
- pg_stat_statements
|
|
||||||
- timescaledb
|
|
||||||
- uuid-ossp
|
|
||||||
restoreFromDump: true
|
|
||||||
dumpKey: "sanitized_dumps_multi/documentations/288/documentations_company288_20260626T202844Z.tar.gz"
|
|
||||||
s3-proxy:
|
|
||||||
endpointUrl: "s3-proxy-service.postgresql.svc.cluster.local"
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
- postgresql.yaml
|
|
||||||
patches:
|
|
||||||
- path: replicas.yaml
|
|
||||||
target:
|
|
||||||
kind: HelmRelease
|
|
||||||
name: backend
|
|
||||||
@ -1,124 +0,0 @@
|
|||||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: postgresql
|
|
||||||
namespace: drawings
|
|
||||||
spec:
|
|
||||||
interval: 5m
|
|
||||||
timeout: 2h
|
|
||||||
chart:
|
|
||||||
spec:
|
|
||||||
chart: postgresql-contour
|
|
||||||
version: "13.0.15"
|
|
||||||
sourceRef:
|
|
||||||
kind: HelmRepository
|
|
||||||
name: yc-oci-charts
|
|
||||||
namespace: flux-system
|
|
||||||
|
|
||||||
install:
|
|
||||||
timeout: 2h
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
|
|
||||||
upgrade:
|
|
||||||
timeout: 2h
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
|
|
||||||
values:
|
|
||||||
global:
|
|
||||||
security:
|
|
||||||
allowInsecureImages: true
|
|
||||||
defaultStorageClass: local-path
|
|
||||||
postgresql:
|
|
||||||
auth:
|
|
||||||
username: ""
|
|
||||||
database: ""
|
|
||||||
secretKeys:
|
|
||||||
userPasswordKey: "postgres-password"
|
|
||||||
auth:
|
|
||||||
username: ""
|
|
||||||
database: ""
|
|
||||||
secretKeys:
|
|
||||||
userPasswordKey: "postgres-password"
|
|
||||||
image:
|
|
||||||
registry: cr.yandex/crp3ccidau046kdj8g9q
|
|
||||||
repository: contour/postgresql
|
|
||||||
tag: 13.0.15
|
|
||||||
pullPolicy: Always
|
|
||||||
metrics:
|
|
||||||
enabled: false
|
|
||||||
prometheusRule:
|
|
||||||
enabled: false
|
|
||||||
primary:
|
|
||||||
containerSecurityContext:
|
|
||||||
readOnlyRootFilesystem: false
|
|
||||||
persistence:
|
|
||||||
storageClass: local-path
|
|
||||||
size: 20Gi
|
|
||||||
customLivenessProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 30
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
customReadinessProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 5
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
customStartupProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 30
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: 50m
|
|
||||||
memory: 128Mi
|
|
||||||
nodeSelector:
|
|
||||||
dedicated: db
|
|
||||||
tolerations:
|
|
||||||
- key: dedicated
|
|
||||||
operator: Equal
|
|
||||||
value: db
|
|
||||||
effect: NoSchedule
|
|
||||||
contour:
|
|
||||||
enabled: true
|
|
||||||
adminUser: "postgres"
|
|
||||||
sharedPreloadLibraries: ""
|
|
||||||
vault:
|
|
||||||
enabled: true
|
|
||||||
role: postgresql
|
|
||||||
authPath: auth/kubernetes
|
|
||||||
secretPath: secrets/data/postgresql/admin
|
|
||||||
secretKey: postgres-password
|
|
||||||
usersSecretPath: secrets/data/postgresql/users
|
|
||||||
databases:
|
|
||||||
- name: drawings_db
|
|
||||||
user: drawings
|
|
||||||
passwordKey: drawings
|
|
||||||
extensions:
|
|
||||||
- pg_stat_statements
|
|
||||||
- uuid-ossp
|
|
||||||
restoreFromDump: true
|
|
||||||
dumpKey: "sanitized_dumps_multi/drawings/288/drawings_company288_20260626T202844Z.tar.gz"
|
|
||||||
s3-proxy:
|
|
||||||
endpointUrl: "s3-proxy-service.postgresql.svc.cluster.local"
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: backend
|
|
||||||
namespace: drawings
|
|
||||||
spec:
|
|
||||||
values:
|
|
||||||
services:
|
|
||||||
backend:
|
|
||||||
deployment:
|
|
||||||
replicaCount:
|
|
||||||
_default: 1
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
- postgresql.yaml
|
|
||||||
patches:
|
|
||||||
- path: replicas.yaml
|
|
||||||
target:
|
|
||||||
kind: HelmRelease
|
|
||||||
name: backend
|
|
||||||
@ -1,127 +0,0 @@
|
|||||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: postgresql
|
|
||||||
namespace: eav
|
|
||||||
spec:
|
|
||||||
interval: 5m
|
|
||||||
timeout: 2h
|
|
||||||
chart:
|
|
||||||
spec:
|
|
||||||
chart: postgresql-contour
|
|
||||||
version: "13.0.15"
|
|
||||||
sourceRef:
|
|
||||||
kind: HelmRepository
|
|
||||||
name: yc-oci-charts
|
|
||||||
namespace: flux-system
|
|
||||||
|
|
||||||
install:
|
|
||||||
timeout: 2h
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
|
|
||||||
upgrade:
|
|
||||||
timeout: 2h
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
|
|
||||||
values:
|
|
||||||
global:
|
|
||||||
security:
|
|
||||||
allowInsecureImages: true
|
|
||||||
defaultStorageClass: local-path
|
|
||||||
postgresql:
|
|
||||||
auth:
|
|
||||||
username: ""
|
|
||||||
database: ""
|
|
||||||
secretKeys:
|
|
||||||
userPasswordKey: "postgres-password"
|
|
||||||
auth:
|
|
||||||
username: ""
|
|
||||||
database: ""
|
|
||||||
secretKeys:
|
|
||||||
userPasswordKey: "postgres-password"
|
|
||||||
image:
|
|
||||||
registry: cr.yandex/crp3ccidau046kdj8g9q
|
|
||||||
repository: contour/postgresql
|
|
||||||
tag: 13.0.15
|
|
||||||
pullPolicy: Always
|
|
||||||
metrics:
|
|
||||||
enabled: false
|
|
||||||
prometheusRule:
|
|
||||||
enabled: false
|
|
||||||
primary:
|
|
||||||
containerSecurityContext:
|
|
||||||
readOnlyRootFilesystem: false
|
|
||||||
persistence:
|
|
||||||
storageClass: local-path
|
|
||||||
size: 20Gi
|
|
||||||
customLivenessProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 30
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
customReadinessProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 5
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
customStartupProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 30
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: 50m
|
|
||||||
memory: 128Mi
|
|
||||||
nodeSelector:
|
|
||||||
dedicated: db
|
|
||||||
tolerations:
|
|
||||||
- key: dedicated
|
|
||||||
operator: Equal
|
|
||||||
value: db
|
|
||||||
effect: NoSchedule
|
|
||||||
contour:
|
|
||||||
enabled: true
|
|
||||||
adminUser: "postgres"
|
|
||||||
sharedPreloadLibraries: ""
|
|
||||||
vault:
|
|
||||||
enabled: true
|
|
||||||
role: postgresql
|
|
||||||
authPath: auth/kubernetes
|
|
||||||
secretPath: secrets/data/postgresql/admin
|
|
||||||
secretKey: postgres-password
|
|
||||||
usersSecretPath: secrets/data/postgresql/users
|
|
||||||
databases:
|
|
||||||
- name: eav_db
|
|
||||||
user: eav
|
|
||||||
passwordKey: eav
|
|
||||||
extensions:
|
|
||||||
- ltree
|
|
||||||
- pg_stat_statements
|
|
||||||
- postgis
|
|
||||||
- timescaledb
|
|
||||||
- uuid-ossp
|
|
||||||
restoreFromDump: true
|
|
||||||
dumpKey: "sanitized_dumps_multi/eav/288/eav_company288_20260626T202844Z.tar.gz"
|
|
||||||
s3-proxy:
|
|
||||||
endpointUrl: "s3-proxy-service.postgresql.svc.cluster.local"
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: backend
|
|
||||||
namespace: eav
|
|
||||||
spec:
|
|
||||||
values:
|
|
||||||
services:
|
|
||||||
backend:
|
|
||||||
deployment:
|
|
||||||
replicaCount:
|
|
||||||
_default: 1
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
patches: []
|
|
||||||
# - path: replicas.yaml
|
|
||||||
# target:
|
|
||||||
# kind: Deployment
|
|
||||||
# name: frontend
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: backend
|
|
||||||
namespace: faas
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
@ -245,7 +245,7 @@
|
|||||||
|
|
||||||
## Переменные из kustomize-манифестов (`iac/apps/flows`)
|
## Переменные из kustomize-манифестов (`iac/apps/flows`)
|
||||||
|
|
||||||
Инфраструктурный репозиторий разворачивает те же образы через kustomize (`base` + оверлеи `brusnika-stage`, `brusnika-prod`, `yc-k8s-test`). Секреты инжектируются агентом **HashiCorp Vault** (аннотации `vault.hashicorp.com/agent-inject-*`) и подгружаются в окружение из файлов `/vault/secrets/*` перед запуском `entrypoint.sh`:
|
Инфраструктурный репозиторий разворачивает те же образы через kustomize (`base` + оверлеи `brusnika-stage`, `brusnika-prod`). Секреты инжектируются агентом **HashiCorp Vault** (аннотации `vault.hashicorp.com/agent-inject-*`) и подгружаются в окружение из файлов `/vault/secrets/*` перед запуском `entrypoint.sh`:
|
||||||
|
|
||||||
| Секрет Vault | Переменные |
|
| Секрет Vault | Переменные |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
|
|||||||
@ -1,4 +0,0 @@
|
|||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
- postgresql.yaml
|
|
||||||
patches: []
|
|
||||||
@ -1,123 +0,0 @@
|
|||||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: postgresql
|
|
||||||
namespace: flows
|
|
||||||
spec:
|
|
||||||
interval: 5m
|
|
||||||
timeout: 2h
|
|
||||||
chart:
|
|
||||||
spec:
|
|
||||||
chart: postgresql-contour
|
|
||||||
version: "13.0.15"
|
|
||||||
sourceRef:
|
|
||||||
kind: HelmRepository
|
|
||||||
name: yc-oci-charts
|
|
||||||
namespace: flux-system
|
|
||||||
|
|
||||||
install:
|
|
||||||
timeout: 2h
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
|
|
||||||
upgrade:
|
|
||||||
timeout: 2h
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
|
|
||||||
values:
|
|
||||||
global:
|
|
||||||
security:
|
|
||||||
allowInsecureImages: true
|
|
||||||
defaultStorageClass: local-path
|
|
||||||
postgresql:
|
|
||||||
auth:
|
|
||||||
username: ""
|
|
||||||
database: ""
|
|
||||||
secretKeys:
|
|
||||||
userPasswordKey: "postgres-password"
|
|
||||||
auth:
|
|
||||||
username: ""
|
|
||||||
database: ""
|
|
||||||
secretKeys:
|
|
||||||
userPasswordKey: "postgres-password"
|
|
||||||
image:
|
|
||||||
registry: cr.yandex/crp3ccidau046kdj8g9q
|
|
||||||
repository: contour/postgresql
|
|
||||||
tag: 13.0.15
|
|
||||||
pullPolicy: Always
|
|
||||||
metrics:
|
|
||||||
enabled: false
|
|
||||||
prometheusRule:
|
|
||||||
enabled: false
|
|
||||||
primary:
|
|
||||||
containerSecurityContext:
|
|
||||||
readOnlyRootFilesystem: false
|
|
||||||
persistence:
|
|
||||||
storageClass: local-path
|
|
||||||
size: 20Gi
|
|
||||||
customLivenessProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 30
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
customReadinessProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 5
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
customStartupProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 30
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: 50m
|
|
||||||
memory: 128Mi
|
|
||||||
nodeSelector:
|
|
||||||
dedicated: db
|
|
||||||
tolerations:
|
|
||||||
- key: dedicated
|
|
||||||
operator: Equal
|
|
||||||
value: db
|
|
||||||
effect: NoSchedule
|
|
||||||
contour:
|
|
||||||
enabled: true
|
|
||||||
adminUser: "postgres"
|
|
||||||
sharedPreloadLibraries: ""
|
|
||||||
vault:
|
|
||||||
enabled: true
|
|
||||||
role: postgresql
|
|
||||||
authPath: auth/kubernetes
|
|
||||||
secretPath: secrets/data/postgresql/admin
|
|
||||||
secretKey: postgres-password
|
|
||||||
usersSecretPath: secrets/data/postgresql/users
|
|
||||||
databases:
|
|
||||||
- name: flows_db
|
|
||||||
user: flows
|
|
||||||
passwordKey: flow
|
|
||||||
extensions:
|
|
||||||
- pg_stat_statements
|
|
||||||
restoreFromDump: true
|
|
||||||
dumpKey: "sanitized_dumps_multi/restored_flow_db/288/restored_flow_db_company288_20260626T202844Z.tar.gz"
|
|
||||||
s3-proxy:
|
|
||||||
endpointUrl: "s3-proxy-service.postgresql.svc.cluster.local"
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
patches: []
|
|
||||||
# - path: replicas.yaml
|
|
||||||
# target:
|
|
||||||
# kind: Deployment
|
|
||||||
# name: frontend
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: iam
|
|
||||||
namespace: iam
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
- postgresql.yaml
|
|
||||||
patches: []
|
|
||||||
@ -1,127 +0,0 @@
|
|||||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: postgresql
|
|
||||||
namespace: inspections
|
|
||||||
spec:
|
|
||||||
interval: 5m
|
|
||||||
timeout: 2h
|
|
||||||
chart:
|
|
||||||
spec:
|
|
||||||
chart: postgresql-contour
|
|
||||||
version: "13.0.15"
|
|
||||||
sourceRef:
|
|
||||||
kind: HelmRepository
|
|
||||||
name: yc-oci-charts
|
|
||||||
namespace: flux-system
|
|
||||||
|
|
||||||
install:
|
|
||||||
timeout: 2h
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
|
|
||||||
upgrade:
|
|
||||||
timeout: 2h
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
|
|
||||||
values:
|
|
||||||
global:
|
|
||||||
security:
|
|
||||||
allowInsecureImages: true
|
|
||||||
defaultStorageClass: local-path
|
|
||||||
postgresql:
|
|
||||||
auth:
|
|
||||||
username: ""
|
|
||||||
database: ""
|
|
||||||
secretKeys:
|
|
||||||
userPasswordKey: "postgres-password"
|
|
||||||
auth:
|
|
||||||
username: ""
|
|
||||||
database: ""
|
|
||||||
secretKeys:
|
|
||||||
userPasswordKey: "postgres-password"
|
|
||||||
image:
|
|
||||||
registry: cr.yandex/crp3ccidau046kdj8g9q
|
|
||||||
repository: contour/postgresql
|
|
||||||
tag: 13.0.15
|
|
||||||
pullPolicy: Always
|
|
||||||
metrics:
|
|
||||||
enabled: false
|
|
||||||
prometheusRule:
|
|
||||||
enabled: false
|
|
||||||
primary:
|
|
||||||
containerSecurityContext:
|
|
||||||
readOnlyRootFilesystem: false
|
|
||||||
persistence:
|
|
||||||
storageClass: local-path
|
|
||||||
size: 20Gi
|
|
||||||
customLivenessProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 30
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
customReadinessProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 5
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
customStartupProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 30
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: 50m
|
|
||||||
memory: 128Mi
|
|
||||||
nodeSelector:
|
|
||||||
dedicated: db
|
|
||||||
tolerations:
|
|
||||||
- key: dedicated
|
|
||||||
operator: Equal
|
|
||||||
value: db
|
|
||||||
effect: NoSchedule
|
|
||||||
contour:
|
|
||||||
enabled: true
|
|
||||||
adminUser: "postgres"
|
|
||||||
sharedPreloadLibraries: ""
|
|
||||||
vault:
|
|
||||||
enabled: true
|
|
||||||
role: postgresql
|
|
||||||
authPath: auth/kubernetes
|
|
||||||
secretPath: secrets/data/postgresql/admin
|
|
||||||
secretKey: postgres-password
|
|
||||||
usersSecretPath: secrets/data/postgresql/users
|
|
||||||
databases:
|
|
||||||
- name: inspections_db
|
|
||||||
user: inspections
|
|
||||||
passwordKey: inspections
|
|
||||||
extensions:
|
|
||||||
- ltree
|
|
||||||
- pg_stat_statements
|
|
||||||
- postgis
|
|
||||||
- timescaledb
|
|
||||||
- uuid-ossp
|
|
||||||
restoreFromDump: true
|
|
||||||
dumpKey: "sanitized_dumps_multi/inspections/288/inspections_company288_20260626T202844Z.tar.gz"
|
|
||||||
s3-proxy:
|
|
||||||
endpointUrl: "s3-proxy-service.postgresql.svc.cluster.local"
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
- postgresql.yaml
|
|
||||||
patches: []
|
|
||||||
@ -1,128 +0,0 @@
|
|||||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: postgresql
|
|
||||||
namespace: issues
|
|
||||||
spec:
|
|
||||||
interval: 5m
|
|
||||||
timeout: 2h
|
|
||||||
chart:
|
|
||||||
spec:
|
|
||||||
chart: postgresql-contour
|
|
||||||
version: "13.0.15"
|
|
||||||
sourceRef:
|
|
||||||
kind: HelmRepository
|
|
||||||
name: yc-oci-charts
|
|
||||||
namespace: flux-system
|
|
||||||
|
|
||||||
install:
|
|
||||||
timeout: 2h
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
|
|
||||||
upgrade:
|
|
||||||
timeout: 2h
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
|
|
||||||
values:
|
|
||||||
global:
|
|
||||||
security:
|
|
||||||
allowInsecureImages: true
|
|
||||||
defaultStorageClass: local-path
|
|
||||||
postgresql:
|
|
||||||
auth:
|
|
||||||
username: ""
|
|
||||||
database: ""
|
|
||||||
secretKeys:
|
|
||||||
userPasswordKey: "postgres-password"
|
|
||||||
auth:
|
|
||||||
username: ""
|
|
||||||
database: ""
|
|
||||||
secretKeys:
|
|
||||||
userPasswordKey: "postgres-password"
|
|
||||||
image:
|
|
||||||
registry: cr.yandex/crp3ccidau046kdj8g9q
|
|
||||||
repository: contour/postgresql
|
|
||||||
tag: 13.0.15
|
|
||||||
pullPolicy: Always
|
|
||||||
metrics:
|
|
||||||
enabled: false
|
|
||||||
prometheusRule:
|
|
||||||
enabled: false
|
|
||||||
primary:
|
|
||||||
containerSecurityContext:
|
|
||||||
readOnlyRootFilesystem: false
|
|
||||||
persistence:
|
|
||||||
storageClass: local-path
|
|
||||||
size: 20Gi
|
|
||||||
customLivenessProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 30
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
customReadinessProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 5
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
customStartupProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 30
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: 50m
|
|
||||||
memory: 128Mi
|
|
||||||
nodeSelector:
|
|
||||||
dedicated: db
|
|
||||||
tolerations:
|
|
||||||
- key: dedicated
|
|
||||||
operator: Equal
|
|
||||||
value: db
|
|
||||||
effect: NoSchedule
|
|
||||||
contour:
|
|
||||||
enabled: true
|
|
||||||
adminUser: "postgres"
|
|
||||||
sharedPreloadLibraries: ""
|
|
||||||
vault:
|
|
||||||
enabled: true
|
|
||||||
role: postgresql
|
|
||||||
authPath: auth/kubernetes
|
|
||||||
secretPath: secrets/data/postgresql/admin
|
|
||||||
secretKey: postgres-password
|
|
||||||
usersSecretPath: secrets/data/postgresql/users
|
|
||||||
databases:
|
|
||||||
- name: issues_db
|
|
||||||
user: issues
|
|
||||||
passwordKey: issues
|
|
||||||
extensions:
|
|
||||||
- ltree
|
|
||||||
- pg_stat_statements
|
|
||||||
- postgis
|
|
||||||
- timescaledb
|
|
||||||
- uuid-ossp
|
|
||||||
- pg_trgm
|
|
||||||
restoreFromDump: true
|
|
||||||
dumpKey: "sanitized_dumps_multi/issues/288/issues_company288_20260626T202844Z.tar.gz"
|
|
||||||
s3-proxy:
|
|
||||||
endpointUrl: "s3-proxy-service.postgresql.svc.cluster.local"
|
|
||||||
@ -133,7 +133,6 @@ GitOps-деплой через Kustomize + Flux, namespace `mapper`. Здесь
|
|||||||
| Путь | Назначение |
|
| Путь | Назначение |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| `base/` | Базовый Kustomize (`namespace`, `serviceaccount` `mapper-vault`, `deployment`, `service`) |
|
| `base/` | Базовый Kustomize (`namespace`, `serviceaccount` `mapper-vault`, `deployment`, `service`) |
|
||||||
| `yc-k8s-test/` | Overlay поверх `base` (патч `replicas: 1`) |
|
|
||||||
| `brusnika-stage/` | Flux `HelmRelease` (universal-chart), хосты `test.sarex.brusnika.tech`, `imagePullSecrets: dockerhub` |
|
| `brusnika-stage/` | Flux `HelmRelease` (universal-chart), хосты `test.sarex.brusnika.tech`, `imagePullSecrets: dockerhub` |
|
||||||
| `brusnika-prod/` | Flux `HelmRelease` (universal-chart), хосты `cde.brusnika.ru`, `imagePullSecrets: regcred` |
|
| `brusnika-prod/` | Flux `HelmRelease` (universal-chart), хосты `cde.brusnika.ru`, `imagePullSecrets: regcred` |
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +0,0 @@
|
|||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
patches:
|
|
||||||
- path: replicas.yaml
|
|
||||||
target:
|
|
||||||
kind: HelmRelease
|
|
||||||
name: backend
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: backend
|
|
||||||
namespace: mapper
|
|
||||||
spec:
|
|
||||||
values:
|
|
||||||
services:
|
|
||||||
backend:
|
|
||||||
deployment:
|
|
||||||
replicaCount:
|
|
||||||
_default: 1
|
|
||||||
@ -16,7 +16,7 @@
|
|||||||
| --- | --- |
|
| --- | --- |
|
||||||
| Локально (docker-compose) | `docker-compose.yaml` — образ `measurements`, проброс порта `8000:8000`, инлайн `environment: S3_JSON_SETTINGS`. Сервис запускается `entrypoint.sh` (gunicorn, 4 воркера, uvicorn worker, таймаут 240) |
|
| Локально (docker-compose) | `docker-compose.yaml` — образ `measurements`, проброс порта `8000:8000`, инлайн `environment: S3_JSON_SETTINGS`. Сервис запускается `entrypoint.sh` (gunicorn, 4 воркера, uvicorn worker, таймаут 240) |
|
||||||
| Kubernetes — собственный Helm-чарт репозитория | `.helm/values.yaml` (universal-chart, dependency `oci://…/charts`): блок `envs` (обычные значения) и `secretEnvs` (значения из k8s-секретов). Per-env значения через ключи `_default`/`stage`/`preprod`/`production` |
|
| Kubernetes — собственный Helm-чарт репозитория | `.helm/values.yaml` (universal-chart, dependency `oci://…/charts`): блок `envs` (обычные значения) и `secretEnvs` (значения из k8s-секретов). Per-env значения через ключи `_default`/`stage`/`preprod`/`production` |
|
||||||
| Kubernetes — этот infra-репозиторий (`iac/apps/measurements`) | `base/` — kustomize-манифесты с инъекцией секрета S3 через **HashiCorp Vault** (annotations `vault.hashicorp.com/*`), обычные переменные заданы инлайн в `env:`. Оверлеи: `yc-k8s-test` (base + патч реплик), `brusnika-stage`/`brusnika-prod` (Flux `HelmRelease` на `universal-chart`, блок `secretEnvs`) |
|
| Kubernetes — этот infra-репозиторий (`iac/apps/measurements`) | `base/` — kustomize-манифесты с инъекцией секрета S3 через **HashiCorp Vault** (annotations `vault.hashicorp.com/*`), обычные переменные заданы инлайн в `env:`. Оверлеи: `brusnika-stage`/`brusnika-prod` (Flux `HelmRelease` на `universal-chart`, блок `secretEnvs`) |
|
||||||
| CI/CD (GitLab) | `.gitlab-ci.yml` подключает шаблоны `generic/common-ci` (`universal-pipeline.yaml`, ref `apps-business`); в `workflow.rules` задаются переменные пайплайна (`STAND`, `NAMESPACE`, `RELEASE_NAME`, `CHART_NAME`, `CHART_VERSION`, `K8S_HUSTLER_BRANCH`, `HELM_SET_ARGS`, `SERVICE_NAME`, `DOCKERFILE_PATH`) |
|
| CI/CD (GitLab) | `.gitlab-ci.yml` подключает шаблоны `generic/common-ci` (`universal-pipeline.yaml`, ref `apps-business`); в `workflow.rules` задаются переменные пайплайна (`STAND`, `NAMESPACE`, `RELEASE_NAME`, `CHART_NAME`, `CHART_VERSION`, `K8S_HUSTLER_BRANCH`, `HELM_SET_ARGS`, `SERVICE_NAME`, `DOCKERFILE_PATH`) |
|
||||||
|
|
||||||
**Миграции БД.** Отсутствуют. Сервис не хранит собственное состояние в реляционной БД (`psycopg2` присутствует в зависимостях, но код измерений работает с растрами из S3). Шага миграций в `entrypoint.sh` нет.
|
**Миграции БД.** Отсутствуют. Сервис не хранит собственное состояние в реляционной БД (`psycopg2` присутствует в зависимостях, но код измерений работает с растрами из S3). Шага миграций в `entrypoint.sh` нет.
|
||||||
@ -125,7 +125,6 @@
|
|||||||
|
|
||||||
### Оверлеи
|
### Оверлеи
|
||||||
|
|
||||||
- **`yc-k8s-test`** — `../base` + патч `replicas.yaml` (реплики Deployment `measurements` = 1).
|
|
||||||
- **`brusnika-stage`** / **`brusnika-prod`** — Flux `HelmRelease` `measurements` на `universal-chart` `0.1.7` (source `yc-oci-charts`). Секрет `S3_JSON_SETTINGS` берётся из k8s-секрета `s3-json-settings` (`secretEnvs`). `replicaCount`: `stage 1`, `preprod 3`, `production 3`; `imagePullSecrets: regcred`; `labels.monitoring: prometheus`; сервис `measurements-service` (ClusterIP, `8000`).
|
- **`brusnika-stage`** / **`brusnika-prod`** — Flux `HelmRelease` `measurements` на `universal-chart` `0.1.7` (source `yc-oci-charts`). Секрет `S3_JSON_SETTINGS` берётся из k8s-секрета `s3-json-settings` (`secretEnvs`). `replicaCount`: `stage 1`, `preprod 3`, `production 3`; `imagePullSecrets: regcred`; `labels.monitoring: prometheus`; сервис `measurements-service` (ClusterIP, `8000`).
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
@ -1,4 +0,0 @@
|
|||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
patches:
|
|
||||||
- path: replicas.yaml
|
|
||||||
target:
|
|
||||||
kind: HelmRelease
|
|
||||||
name: measurements
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: measurements
|
|
||||||
namespace: measurements
|
|
||||||
spec:
|
|
||||||
values:
|
|
||||||
services:
|
|
||||||
backend:
|
|
||||||
deployment:
|
|
||||||
replicaCount:
|
|
||||||
_default: 1
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
patches: []
|
|
||||||
# - path: replicas.yaml
|
|
||||||
# target:
|
|
||||||
# kind: Deployment
|
|
||||||
# name: frontend
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: message-hub
|
|
||||||
namespace: message-hub
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
- postgresql.yaml
|
|
||||||
patches: []
|
|
||||||
# - path: replicas.yaml
|
|
||||||
# target:
|
|
||||||
# kind: Deployment
|
|
||||||
# name: backend
|
|
||||||
@ -1,123 +0,0 @@
|
|||||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: postgresql
|
|
||||||
namespace: notes
|
|
||||||
spec:
|
|
||||||
interval: 5m
|
|
||||||
timeout: 2h
|
|
||||||
chart:
|
|
||||||
spec:
|
|
||||||
chart: postgresql-contour
|
|
||||||
version: "13.0.15"
|
|
||||||
sourceRef:
|
|
||||||
kind: HelmRepository
|
|
||||||
name: yc-oci-charts
|
|
||||||
namespace: flux-system
|
|
||||||
|
|
||||||
install:
|
|
||||||
timeout: 2h
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
|
|
||||||
upgrade:
|
|
||||||
timeout: 2h
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
|
|
||||||
values:
|
|
||||||
global:
|
|
||||||
security:
|
|
||||||
allowInsecureImages: true
|
|
||||||
defaultStorageClass: local-path
|
|
||||||
postgresql:
|
|
||||||
auth:
|
|
||||||
username: ""
|
|
||||||
database: ""
|
|
||||||
secretKeys:
|
|
||||||
userPasswordKey: "postgres-password"
|
|
||||||
auth:
|
|
||||||
username: ""
|
|
||||||
database: ""
|
|
||||||
secretKeys:
|
|
||||||
userPasswordKey: "postgres-password"
|
|
||||||
image:
|
|
||||||
registry: cr.yandex/crp3ccidau046kdj8g9q
|
|
||||||
repository: contour/postgresql
|
|
||||||
tag: 13.0.15
|
|
||||||
pullPolicy: Always
|
|
||||||
metrics:
|
|
||||||
enabled: false
|
|
||||||
prometheusRule:
|
|
||||||
enabled: false
|
|
||||||
primary:
|
|
||||||
containerSecurityContext:
|
|
||||||
readOnlyRootFilesystem: false
|
|
||||||
persistence:
|
|
||||||
storageClass: local-path
|
|
||||||
size: 20Gi
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: 50m
|
|
||||||
memory: 128Mi
|
|
||||||
customLivenessProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 30
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
customReadinessProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 5
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
customStartupProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 30
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
nodeSelector:
|
|
||||||
dedicated: db
|
|
||||||
tolerations:
|
|
||||||
- key: dedicated
|
|
||||||
operator: Equal
|
|
||||||
value: db
|
|
||||||
effect: NoSchedule
|
|
||||||
contour:
|
|
||||||
enabled: true
|
|
||||||
adminUser: "postgres"
|
|
||||||
sharedPreloadLibraries: ""
|
|
||||||
vault:
|
|
||||||
enabled: true
|
|
||||||
role: postgresql
|
|
||||||
authPath: auth/kubernetes
|
|
||||||
secretPath: secrets/data/postgresql/admin
|
|
||||||
secretKey: postgres-password
|
|
||||||
usersSecretPath: secrets/data/postgresql/users
|
|
||||||
databases:
|
|
||||||
- name: notes_db
|
|
||||||
user: notes
|
|
||||||
passwordKey: notes
|
|
||||||
extensions:
|
|
||||||
- pg_stat_statements
|
|
||||||
restoreFromDump: true
|
|
||||||
dumpKey: "sanitized_dumps_multi/notes/288/notes_company288_20260626T202844Z.tar.gz"
|
|
||||||
s3-proxy:
|
|
||||||
endpointUrl: "s3-proxy-service.postgresql.svc.cluster.local"
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: backend
|
|
||||||
namespace: notes
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
- postgresql.yaml
|
|
||||||
- redis-deployment.yaml
|
|
||||||
- redis-service.yaml
|
|
||||||
patches: []
|
|
||||||
@ -1,124 +0,0 @@
|
|||||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: postgresql
|
|
||||||
namespace: pm
|
|
||||||
spec:
|
|
||||||
interval: 5m
|
|
||||||
timeout: 2h
|
|
||||||
chart:
|
|
||||||
spec:
|
|
||||||
chart: postgresql-contour
|
|
||||||
version: "13.0.15"
|
|
||||||
sourceRef:
|
|
||||||
kind: HelmRepository
|
|
||||||
name: yc-oci-charts
|
|
||||||
namespace: flux-system
|
|
||||||
|
|
||||||
install:
|
|
||||||
timeout: 2h
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
|
|
||||||
upgrade:
|
|
||||||
timeout: 2h
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
|
|
||||||
values:
|
|
||||||
global:
|
|
||||||
security:
|
|
||||||
allowInsecureImages: true
|
|
||||||
defaultStorageClass: local-path
|
|
||||||
postgresql:
|
|
||||||
auth:
|
|
||||||
username: ""
|
|
||||||
database: ""
|
|
||||||
secretKeys:
|
|
||||||
userPasswordKey: "postgres-password"
|
|
||||||
auth:
|
|
||||||
username: ""
|
|
||||||
database: ""
|
|
||||||
secretKeys:
|
|
||||||
userPasswordKey: "postgres-password"
|
|
||||||
image:
|
|
||||||
registry: cr.yandex/crp3ccidau046kdj8g9q
|
|
||||||
repository: contour/postgresql
|
|
||||||
tag: 13.0.15
|
|
||||||
pullPolicy: Always
|
|
||||||
metrics:
|
|
||||||
enabled: false
|
|
||||||
prometheusRule:
|
|
||||||
enabled: false
|
|
||||||
primary:
|
|
||||||
containerSecurityContext:
|
|
||||||
readOnlyRootFilesystem: false
|
|
||||||
persistence:
|
|
||||||
storageClass: local-path
|
|
||||||
size: 20Gi
|
|
||||||
customLivenessProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 30
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
customReadinessProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 5
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
customStartupProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 30
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: 50m
|
|
||||||
memory: 128Mi
|
|
||||||
nodeSelector:
|
|
||||||
dedicated: db
|
|
||||||
tolerations:
|
|
||||||
- key: dedicated
|
|
||||||
operator: Equal
|
|
||||||
value: db
|
|
||||||
effect: NoSchedule
|
|
||||||
contour:
|
|
||||||
enabled: true
|
|
||||||
adminUser: "postgres"
|
|
||||||
sharedPreloadLibraries: ""
|
|
||||||
vault:
|
|
||||||
enabled: true
|
|
||||||
role: postgresql
|
|
||||||
authPath: auth/kubernetes
|
|
||||||
secretPath: secrets/data/postgresql/admin
|
|
||||||
secretKey: postgres-password
|
|
||||||
usersSecretPath: secrets/data/postgresql/users
|
|
||||||
databases:
|
|
||||||
- name: pm_db
|
|
||||||
user: pm
|
|
||||||
passwordKey: pm
|
|
||||||
extensions:
|
|
||||||
- ltree
|
|
||||||
- pg_stat_statements
|
|
||||||
restoreFromDump: true
|
|
||||||
dumpKey: "sanitized_dumps_multi/pm_db/288/pm_db_company288_20260626T202844Z.tar.gz"
|
|
||||||
s3-proxy:
|
|
||||||
endpointUrl: "s3-proxy-service.postgresql.svc.cluster.local"
|
|
||||||
@ -1,27 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: redis
|
|
||||||
namespace: pm
|
|
||||||
labels:
|
|
||||||
app: redis
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: redis
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: redis
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: redis
|
|
||||||
image: cr.yandex/crp3ccidau046kdj8g9q/redis:latest
|
|
||||||
imagePullPolicy: Always
|
|
||||||
ports:
|
|
||||||
- containerPort: 6379
|
|
||||||
protocol: TCP
|
|
||||||
imagePullSecrets:
|
|
||||||
- name: regcred
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: redis
|
|
||||||
namespace: pm
|
|
||||||
spec:
|
|
||||||
selector:
|
|
||||||
app: redis
|
|
||||||
ports:
|
|
||||||
- port: 6379
|
|
||||||
targetPort: 6379
|
|
||||||
protocol: TCP
|
|
||||||
@ -108,7 +108,6 @@ nginx (`nginx/nginx.conf`) раздаёт статику из `/dist`, отда
|
|||||||
| `base/deployment.yaml` | Deployment `frontend`, образ `cr.yandex/.../prescriptions-frontend:production_...`, порт `80`, `requests` `cpu 25m`/`memory 100Mi`, `imagePullSecrets: regcred` |
|
| `base/deployment.yaml` | Deployment `frontend`, образ `cr.yandex/.../prescriptions-frontend:production_...`, порт `80`, `requests` `cpu 25m`/`memory 100Mi`, `imagePullSecrets: regcred` |
|
||||||
| `base/service.yaml` | Service `frontend-service`, `ClusterIP`, порт `80` |
|
| `base/service.yaml` | Service `frontend-service`, `ClusterIP`, порт `80` |
|
||||||
| `base/kustomization.yaml` | Сборка base (namespace + deployment + service) |
|
| `base/kustomization.yaml` | Сборка base (namespace + deployment + service) |
|
||||||
| `yc-k8s-test/` | Оверлей поверх `../base` (патч `replicas.yaml` закомментирован) |
|
|
||||||
| `brusnika-prod/`, `brusnika-stage/` | Оверлеи (см. замечание ниже) |
|
| `brusnika-prod/`, `brusnika-stage/` | Оверлеи (см. замечание ниже) |
|
||||||
|
|
||||||
## Замечания и потенциальные проблемы
|
## Замечания и потенциальные проблемы
|
||||||
|
|||||||
@ -1,4 +0,0 @@
|
|||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
patches: []
|
|
||||||
# - path: replicas.yaml
|
|
||||||
# target:
|
|
||||||
# kind: Deployment
|
|
||||||
# name: frontend
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: frontend
|
|
||||||
namespace: remarks
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
- postgresql.yaml
|
|
||||||
patches: []
|
|
||||||
@ -1,123 +0,0 @@
|
|||||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: postgresql
|
|
||||||
namespace: processing
|
|
||||||
spec:
|
|
||||||
interval: 5m
|
|
||||||
timeout: 2h
|
|
||||||
chart:
|
|
||||||
spec:
|
|
||||||
chart: postgresql-contour
|
|
||||||
version: "13.0.15"
|
|
||||||
sourceRef:
|
|
||||||
kind: HelmRepository
|
|
||||||
name: yc-oci-charts
|
|
||||||
namespace: flux-system
|
|
||||||
|
|
||||||
install:
|
|
||||||
timeout: 2h
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
|
|
||||||
upgrade:
|
|
||||||
timeout: 2h
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
|
|
||||||
values:
|
|
||||||
global:
|
|
||||||
security:
|
|
||||||
allowInsecureImages: true
|
|
||||||
defaultStorageClass: local-path
|
|
||||||
postgresql:
|
|
||||||
auth:
|
|
||||||
username: ""
|
|
||||||
database: ""
|
|
||||||
secretKeys:
|
|
||||||
userPasswordKey: "postgres-password"
|
|
||||||
auth:
|
|
||||||
username: ""
|
|
||||||
database: ""
|
|
||||||
secretKeys:
|
|
||||||
userPasswordKey: "postgres-password"
|
|
||||||
image:
|
|
||||||
registry: cr.yandex/crp3ccidau046kdj8g9q
|
|
||||||
repository: contour/postgresql
|
|
||||||
tag: 13.0.15
|
|
||||||
pullPolicy: Always
|
|
||||||
metrics:
|
|
||||||
enabled: false
|
|
||||||
prometheusRule:
|
|
||||||
enabled: false
|
|
||||||
primary:
|
|
||||||
containerSecurityContext:
|
|
||||||
readOnlyRootFilesystem: false
|
|
||||||
persistence:
|
|
||||||
storageClass: local-path
|
|
||||||
size: 20Gi
|
|
||||||
customLivenessProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 30
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
customReadinessProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 5
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
customStartupProbe:
|
|
||||||
exec:
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- exec pg_isready -U "postgres" -d postgres -h 127.0.0.1 -p 5432
|
|
||||||
initialDelaySeconds: 30
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 6
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: 50m
|
|
||||||
memory: 128Mi
|
|
||||||
nodeSelector:
|
|
||||||
dedicated: db
|
|
||||||
tolerations:
|
|
||||||
- key: dedicated
|
|
||||||
operator: Equal
|
|
||||||
value: db
|
|
||||||
effect: NoSchedule
|
|
||||||
contour:
|
|
||||||
enabled: true
|
|
||||||
adminUser: "postgres"
|
|
||||||
sharedPreloadLibraries: ""
|
|
||||||
vault:
|
|
||||||
enabled: true
|
|
||||||
role: postgresql
|
|
||||||
authPath: auth/kubernetes
|
|
||||||
secretPath: secrets/data/postgresql/admin
|
|
||||||
secretKey: postgres-password
|
|
||||||
usersSecretPath: secrets/data/postgresql/users
|
|
||||||
databases:
|
|
||||||
- name: workflow_db
|
|
||||||
user: workflow
|
|
||||||
passwordKey: workflow
|
|
||||||
extensions:
|
|
||||||
- uuid-ossp
|
|
||||||
restoreFromDump: true
|
|
||||||
dumpKey: "sanitized_dumps_multi/processing/288/processing_company288_20260626T202844Z.tar.gz"
|
|
||||||
s3-proxy:
|
|
||||||
endpointUrl: "s3-proxy-service.postgresql.svc.cluster.local"
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
patches: []
|
|
||||||
# - path: replicas.yaml
|
|
||||||
# target:
|
|
||||||
# kind: Deployment
|
|
||||||
# name: projects-frontend-static
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: projects-frontend-static
|
|
||||||
namespace: projects
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ../base
|
|
||||||
patches: []
|
|
||||||
# - path: replicas.yaml
|
|
||||||
# target:
|
|
||||||
# kind: HelmRelease
|
|
||||||
# name: frontend
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user