BEACO-216: add internal Grafana entry #282

Merged
multica-merger merged 1 commit from agent/gitops/beaco-216-grafana-internal into main 2026-10-27 16:15:30 +00:00
Collaborator

Grafana 内网入口:2026-10-27 rebase 准备合入

已按用户要求对齐真实 main、重新签名并推送原分支;未 approve/merge、未部署、未创建凭据或运行态权限。

  • head:b6ca9f7ff0ec2793b2aefdb7e0af276304e5510c
  • base/main:0982dcf5f6c9f52be57326e9b3d7562e55609862
  • 无冲突 rebase,range-diff 为等价,7 个原变更文件逐字节未变;净增量仍 7 文件、+1558/-5。签名 Forgejo verified=true,直接 parent 是该 main,当前可 fast-forward。
  • #279 已合入并包含在本基线中。旧 4d911df 及更早 head 的 CI/批准绑定撤回。

保留的实现范围

Grafana 12.4.3/单副本,3 容器合计 requests120m/192Mi、limits600m/640Mi;emptyDir,无新增 PVC。grafana.rbac.create=false,仅 monitoring ConfigMap get/list/watch Role/RoleBinding,无 Secret 或 cluster-wide 读取;两个 sidecar RESOURCE=configmap、NAMESPACE=monitoring。

grafana.beaco.works 仅挂 envoy-internal HTTPS,backend kube-prometheus-stack-grafana:80;无 external parent/公网 DNS/Tunnel 改动。Authentik OIDC、匿名关闭、默认 Viewer;Agent 继续既有 Prometheus Service proxy。预渲染 16 面板删除 __inputs、替换导入占位符并绑定 datasource UID DS_PROMETHEUS。emptyDir 重建丢本地 SQLite 用户偏好/UI 修改/annotation/API key 等状态,声明面板与 datasource 可重建。

验证与 CI

复用原完整规则/查询证据,本次 chart/Kustomize、scoped RBAC、预算、OIDC 引用、route 与 provisioned dashboard 静态交互检查通过;diff --check 通过,工具 nixpkgs 未变。

新 head 的六项代码检查及其实际 job 均 success:push docs4439/Nix4440/secrets4441,PR docs4442/Nix4443/secrets4444(global6570–6575)。policy/merge-gate pending。

上线前置仍需闭环

本轮只读元数据检查 monitoring/grafana-oidc 仍 NotFound,grafana slug 的公开 OIDC discovery 返回 HTTP404。没有读取 Secret 值或 Authentik 管理数据库,不能扩展为所有 provider 都不存在,但仍没有经核实可用的 application/provider 与安全引用。

必须由既有 Authentik 管理员/SOPS 路径建立并核实 grafana OIDC client,redirect 为 https://grafana.beaco.works/login/generic_oauth;Secret 键 GF_AUTH_GENERIC_OAUTH_CLIENT_ID、GF_AUTH_GENERIC_OAUTH_CLIENT_SECRET。缺 Secret 不回退匿名或放宽权限,会使 Grafana 不就绪,并可能使同一个 prometheus-stack HelmRelease 升级失败。代码已准备好不等于生产前置齐全,当前不请求立即执行部署型合并。

获批后的验收与回滚

确认 Deployment/HTTPRoute Ready、无 Grafana ClusterRole/PVC;LAN/VPN 手机路径的 DNS/TLS 实测,匿名拒绝、Authentik Viewer 登录、16 面板/三节点当前指标与 datasource 正常。蜂窝无 VPN 不保证可达。

失败通过新分支准备完整 revert PR,按新准确 SHA CI/人工门禁恢复 main,Flux 清理 Grafana/route/ConfigMap/新增 Role;不能以本地 revert 代替生产回滚。保留 Prometheus/AM 和20Gi+2Gi PVC,由管理员禁用新增 OIDC client。

通知仍独立:Matrix 房间/受众待选,后续 n8n 接收 workflow/credential 导入需一次单副本 Recreate 维护窗口。本轮不执行通知或 collector 故障演练。

Refs: BEACO-216

## Grafana 内网入口:2026-10-27 rebase 准备合入 已按用户要求对齐真实 main、重新签名并推送原分支;未 approve/merge、未部署、未创建凭据或运行态权限。 - head:`b6ca9f7ff0ec2793b2aefdb7e0af276304e5510c` - base/main:`0982dcf5f6c9f52be57326e9b3d7562e55609862` - 无冲突 rebase,range-diff 为等价,7 个原变更文件逐字节未变;净增量仍 7 文件、+1558/-5。签名 Forgejo verified=true,直接 parent 是该 main,当前可 fast-forward。 - #279 已合入并包含在本基线中。旧 4d911df 及更早 head 的 CI/批准绑定撤回。 ## 保留的实现范围 Grafana 12.4.3/单副本,3 容器合计 requests120m/192Mi、limits600m/640Mi;emptyDir,无新增 PVC。grafana.rbac.create=false,仅 monitoring ConfigMap get/list/watch Role/RoleBinding,无 Secret 或 cluster-wide 读取;两个 sidecar RESOURCE=configmap、NAMESPACE=monitoring。 grafana.beaco.works 仅挂 envoy-internal HTTPS,backend kube-prometheus-stack-grafana:80;无 external parent/公网 DNS/Tunnel 改动。Authentik OIDC、匿名关闭、默认 Viewer;Agent 继续既有 Prometheus Service proxy。预渲染 16 面板删除 __inputs、替换导入占位符并绑定 datasource UID DS_PROMETHEUS。emptyDir 重建丢本地 SQLite 用户偏好/UI 修改/annotation/API key 等状态,声明面板与 datasource 可重建。 ## 验证与 CI 复用原完整规则/查询证据,本次 chart/Kustomize、scoped RBAC、预算、OIDC 引用、route 与 provisioned dashboard 静态交互检查通过;diff --check 通过,工具 nixpkgs 未变。 新 head 的六项代码检查及其实际 job 均 success:push docs4439/Nix4440/secrets4441,PR docs4442/Nix4443/secrets4444(global6570–6575)。policy/merge-gate pending。 ## 上线前置仍需闭环 本轮只读元数据检查 `monitoring/grafana-oidc` 仍 NotFound,grafana slug 的公开 OIDC discovery 返回 HTTP404。没有读取 Secret 值或 Authentik 管理数据库,不能扩展为所有 provider 都不存在,但仍没有经核实可用的 application/provider 与安全引用。 必须由既有 Authentik 管理员/SOPS 路径建立并核实 grafana OIDC client,redirect 为 https://grafana.beaco.works/login/generic_oauth;Secret 键 GF_AUTH_GENERIC_OAUTH_CLIENT_ID、GF_AUTH_GENERIC_OAUTH_CLIENT_SECRET。缺 Secret 不回退匿名或放宽权限,会使 Grafana 不就绪,并可能使同一个 prometheus-stack HelmRelease 升级失败。代码已准备好不等于生产前置齐全,当前不请求立即执行部署型合并。 ## 获批后的验收与回滚 确认 Deployment/HTTPRoute Ready、无 Grafana ClusterRole/PVC;LAN/VPN 手机路径的 DNS/TLS 实测,匿名拒绝、Authentik Viewer 登录、16 面板/三节点当前指标与 datasource 正常。蜂窝无 VPN 不保证可达。 失败通过新分支准备完整 revert PR,按新准确 SHA CI/人工门禁恢复 main,Flux 清理 Grafana/route/ConfigMap/新增 Role;不能以本地 revert 代替生产回滚。保留 Prometheus/AM 和20Gi+2Gi PVC,由管理员禁用新增 OIDC client。 通知仍独立:Matrix 房间/受众待选,后续 n8n 接收 workflow/credential 导入需一次单副本 Recreate 维护窗口。本轮不执行通知或 collector 故障演练。 Refs: BEACO-216
feat(monitoring): add internal Grafana entry
Some checks are pending
Check Docs i18n / check-docs-i18n (push) Successful in 9s
Check Secrets / check-secrets (push) Successful in 12s
Check Docs i18n / check-docs-i18n (pull_request) Successful in 8s
Check Secrets / check-secrets (pull_request) Successful in 9s
Nix Validation / nix-evaluation (push) Successful in 1m27s
Nix Validation / nix-evaluation (pull_request) Successful in 1m18s
policy/merge-gate Waiting for /approve on this exact commit targeting main
b06b6c5248
Enable the reviewed Grafana subchart with a single replica, no PVC, Authentik OIDC Viewer, anonymous access disabled, and an explicit monitoring/grafana-oidc Secret contract. Restrict the dashboard/datasource sidecars to monitoring ConfigMaps with a namespace-local Role, provision a datasource-bound dashboard copy, and expose Grafana only through the internal Gateway.

Co-authored-by: multica-agent <github@multica.ai>
multica-gitops force-pushed agent/gitops/beaco-216-grafana-internal from b06b6c5248
Some checks are pending
Check Docs i18n / check-docs-i18n (push) Successful in 9s
Check Secrets / check-secrets (push) Successful in 12s
Check Docs i18n / check-docs-i18n (pull_request) Successful in 8s
Check Secrets / check-secrets (pull_request) Successful in 9s
Nix Validation / nix-evaluation (push) Successful in 1m27s
Nix Validation / nix-evaluation (pull_request) Successful in 1m18s
policy/merge-gate Waiting for /approve on this exact commit targeting main
to d13d35ec11
Some checks are pending
Check Docs i18n / check-docs-i18n (push) Successful in 6s
Check Docs i18n / check-docs-i18n (pull_request) Successful in 6s
Check Secrets / check-secrets (push) Successful in 10s
Check Secrets / check-secrets (pull_request) Successful in 11s
Nix Validation / nix-evaluation (push) Successful in 56s
Nix Validation / nix-evaluation (pull_request) Successful in 54s
policy/merge-gate Waiting for /approve on this exact commit targeting main
2026-10-26 16:24:22 +00:00
Compare
multica-gitops force-pushed agent/gitops/beaco-216-grafana-internal from d13d35ec11
Some checks are pending
Check Docs i18n / check-docs-i18n (push) Successful in 6s
Check Docs i18n / check-docs-i18n (pull_request) Successful in 6s
Check Secrets / check-secrets (push) Successful in 10s
Check Secrets / check-secrets (pull_request) Successful in 11s
Nix Validation / nix-evaluation (push) Successful in 56s
Nix Validation / nix-evaluation (pull_request) Successful in 54s
policy/merge-gate Waiting for /approve on this exact commit targeting main
to 4d911df402
Some checks are pending
Check Docs i18n / check-docs-i18n (push) Successful in 6s
Check Docs i18n / check-docs-i18n (pull_request) Successful in 6s
Check Secrets / check-secrets (push) Successful in 14s
Check Secrets / check-secrets (pull_request) Successful in 10s
Nix Validation / nix-evaluation (push) Successful in 59s
Nix Validation / nix-evaluation (pull_request) Successful in 55s
policy/merge-gate Waiting for /approve on this exact commit targeting main
2026-10-26 16:33:14 +00:00
Compare
multica-gitops force-pushed agent/gitops/beaco-216-grafana-internal from 4d911df402
Some checks are pending
Check Docs i18n / check-docs-i18n (push) Successful in 6s
Check Docs i18n / check-docs-i18n (pull_request) Successful in 6s
Check Secrets / check-secrets (push) Successful in 14s
Check Secrets / check-secrets (pull_request) Successful in 10s
Nix Validation / nix-evaluation (push) Successful in 59s
Nix Validation / nix-evaluation (pull_request) Successful in 55s
policy/merge-gate Waiting for /approve on this exact commit targeting main
to b6ca9f7ff0
Some checks failed
Check Docs i18n / check-docs-i18n (pull_request) Successful in 12s
Check Secrets / check-secrets (pull_request) Successful in 9s
Nix Validation / nix-evaluation (pull_request) Successful in 55s
policy/merge-gate Approved for main by beacon1096 for this exact commit
Check Docs i18n / check-docs-i18n (push) Successful in 4s
Build NixOS Systems and Push Closures / warm-cache-arm (push) Successful in 9s
Check Secrets / check-secrets (push) Successful in 11s
Build NixOS Systems and Push Closures / build-arm-systems (nixosConfigurations.ms-r1.config.system.build.toplevel, ms-r1) (push) Successful in 29s
Nix Validation / nix-evaluation (push) Successful in 44s
Build NixOS Systems and Push Closures / build-darwin-systems (darwinConfigurations.beacon-mac-mini-m4.system, beacon-mac-mini-m4) (push) Successful in 8s
Build NixOS Systems and Push Closures / warm-cache (push) Failing after 51m53s
Build NixOS Systems and Push Closures / build-systems (nixosConfigurations.m920x.config.system.build.toplevel, m920x) (push) Has been skipped
Build NixOS Systems and Push Closures / build-systems (nixosConfigurations.microserver-gen10plus.config.system.build.toplevel, microserver-gen10plus) (push) Has been skipped
Build NixOS Systems and Push Closures / build-systems (nixosConfigurations.msi-claw.config.system.build.toplevel, msi-claw) (push) Has been skipped
Build NixOS Systems and Push Closures / build-systems (nixosConfigurations.surface-pro-8.config.system.build.toplevel, surface-pro-8) (push) Has been skipped
Build NixOS Systems and Push Closures / build-systems (nixosConfigurations.thinkbook-plus-hybrid.config.system.build.toplevel, thinkbook-plus-hybrid) (push) Has been skipped
Build NixOS Systems and Push Closures / build-installer-iso (push) Has been skipped
Build NixOS Systems and Push Closures / build-and-push-coding-agent-oci (push) Has been skipped
Build NixOS Systems and Push Closures / build-and-push-multica-backend-oci (push) Has been skipped
Build NixOS Systems and Push Closures / build-and-push-coder-server-oci (push) Has been skipped
Build NixOS Systems and Push Closures / build-and-push-nix-collector-oci (push) Has been skipped
Build NixOS Systems and Push Closures / update-prod-branch (push) Has been skipped
2026-10-27 13:01:35 +00:00
Compare
Owner

/approve b6ca9f7ff0

/approve b6ca9f7ff0ec2793b2aefdb7e0af276304e5510c
multica-merger deleted branch agent/gitops/beaco-216-grafana-internal 2026-10-27 16:15:30 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
infrastructure/infra!282
No description provided.