From 5653f275bfe46efe70799e1b425fb36d76d66ee6 Mon Sep 17 00:00:00 2001 From: Nyan404 Date: Fri, 21 Aug 2026 13:49:57 +0300 Subject: [PATCH] ci: provide web password to Belki runtime --- .gitlab-ci.yml | 2 ++ structure_and_data.md | 1 + 2 files changed, 3 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4dec398..25e39b1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -75,6 +75,7 @@ deploy: - test -n "$BELKI_DATABASE_URL" - test -n "$POSTGRES_PASSWORD" - test -n "$BELKI_ADMIN_PASSWORD" + - test -n "$BELKI_WEB_PASSWORD" - mkdir -p "$CI_PROJECT_DIR/.kube" - printf '%s' "$KUBE_CONFIG_B64" | base64 -d > "$CI_PROJECT_DIR/.kube/config" - export KUBECONFIG="$CI_PROJECT_DIR/.kube/config" @@ -89,6 +90,7 @@ deploy: --from-literal=BELKI_DATABASE_URL="$BELKI_DATABASE_URL" \ --from-literal=POSTGRES_PASSWORD="$POSTGRES_PASSWORD" \ --from-literal=BELKI_ADMIN_PASSWORD="$BELKI_ADMIN_PASSWORD" \ + --from-literal=BELKI_WEB_PASSWORD="$BELKI_WEB_PASSWORD" \ --dry-run=client -o yaml | kubectl apply -f - - > sed -E "s#image: reg.nyan404.ru/cwshed-clone/belki:[^[:space:]]+#image: $DOCKER_IMAGE_REPOSITORY:$CI_COMMIT_SHORT_SHA#g" deploy/k8s/production.yaml | kubectl apply -f - diff --git a/structure_and_data.md b/structure_and_data.md index 848e680..8d3f39b 100644 --- a/structure_and_data.md +++ b/structure_and_data.md @@ -17,6 +17,7 @@ - GitLab CI runs the build job. - The job targets GitLab runner tag `fast` and builds through a privileged `docker:29.6.1-dind` service at `DOCKER_HOST=tcp://docker:2375`, with an explicit `alias: docker` and `DOCKER_TLS_CERTDIR=""`. - The `ryzen-runner-dind` service on `root@10.3.1.168` has a valid Runner registration and its helper container can reach `https://git.nyan404.ru/`. On 2026-08-21 its malformed `DOCKER_AUTH_CONFIG` was removed and the pre-change configuration was backed up on the host as `/etc/gitlab-runner/config.toml.bak-20260821-1334`. +- The Belki deploy job verifies and copies `BELKI_WEB_PASSWORD` into `Secret/belki-runtime`; the web Deployment requires that key and cannot start without it. - The job waits for the DinD daemon and runs `docker info` before starting the build. - GitLab Runner retries source checkout up to three times (`GET_SOURCES_ATTEMPTS=3`) to absorb transient connectivity failures before the job script starts. A persistent inability to reach `git.nyan404.ru:443` still requires repair on the selected runner host. - The local image is currently `belki-calculator:test`; the CI target is now `$DOCKER_REGISTRY/belki:latest`.