From a3178cfa6ec92d7d3658f71478327bd77aa6e60e Mon Sep 17 00:00:00 2001 From: Caffeine Date: Sun, 13 Sep 2026 06:05:24 +0300 Subject: [PATCH] =?UTF-8?q?fix(helm):=20=D0=BF=D1=80=D0=B0=D0=B2=D0=B0=20?= =?UTF-8?q?=D0=BD=D0=B0=20keystore=20=E2=80=94=20fsGroup=20+=20chmod=20064?= =?UTF-8?q?4=20=D0=B2=20init?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Шлюз в кубе падал с EACCES при записи .gateway-bettors.json: том от local-path принадлежит root, контейнер бежит под node (uid 1000), а seed-файл копировался в режиме 0444. Добавлены securityContext.fsGroup=1000 и chmod 0644 в init-контейнере. Проверено: ставка и закрытие проходят через живой домен (entryPrice/exitPrice — реальные цены из NATS). --- relayer/helm/templates/deployment.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/relayer/helm/templates/deployment.yaml b/relayer/helm/templates/deployment.yaml index 6505a05..d7d9aac 100644 --- a/relayer/helm/templates/deployment.yaml +++ b/relayer/helm/templates/deployment.yaml @@ -14,6 +14,12 @@ spec: labels: {{- include "smart-updown-relayer.selectorLabels" . | nindent 8 }} spec: + # PVC (local-path) создаётся root-владельцем, а контейнер бежит под node (uid 1000). + # fsGroup делает смонтированный volume записываемым для группы node — иначе + # gateway падает с EACCES при записи keystore новых бетторов. + securityContext: + fsGroup: 1000 + fsGroupChangePolicy: OnRootMismatch {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} @@ -25,7 +31,7 @@ spec: command: - sh - -c - - '[ -f /app/data/.gateway-bettors.json ] || cp /seed/.gateway-bettors.json /app/data/.gateway-bettors.json' + - '[ -f /app/data/.gateway-bettors.json ] || cp /seed/.gateway-bettors.json /app/data/.gateway-bettors.json; chmod 0644 /app/data/.gateway-bettors.json' volumeMounts: - name: data mountPath: /app/data