确保 OpenSandbox values 立即生效 #100

Merged
panxiao81 merged 1 commits from fix/opensandbox-values-watch into main 2026-09-18 17:52:51 +00:00
5 changed files with 20 additions and 0 deletions
Showing only changes of commit 4c823f8181 - Show all commits
+7
View File
@@ -93,6 +93,13 @@ ansible-playbook site.yml
ansible-playbook k3s.yml
```
只 reconcile Flux controllers 与 root sync manifest(不触碰 LXC、PostgreSQL 或
K3s lifecycle):
```bash
ansible-playbook flux.yml
```
K3s 外部 datastore URI 由运行时 `SANDBOX_K3S_DB_PASSWORD` 生成,密码在 URI 中
进行 URL 编码,最终仅持久化于节点 root 可读的 `/etc/rancher/k3s/config.yaml`
(mode `0600`)。首节点生成的 K3s join token 仅在同一次 Ansible run 内传给第二节点;
@@ -0,0 +1,6 @@
---
- name: Reconcile Flux controllers and root sync
hosts: sandbox1
gather_facts: false
roles:
- sandbox_flux
@@ -13,6 +13,9 @@ homelab 集群的 ESO Pod、ServiceAccount 或 Kubernetes auth backend。
值未输出或落盘;
- sandbox ESO operator、`ClusterSecretStore/openbao` 与 OpenSandbox `ExternalSecret`
由 Flux 管理;
- 线上 `ClusterSecretStore/openbao` 为 `Valid/Ready`,`ExternalSecret/opensandbox-api-key`
为 `SecretSynced/Ready`;
- OpenSandbox 已切换到 API key:无 key 请求返回 `401`,正确 key 请求返回 `200`;
- homelab runner 对同一 key 的投影不在本目录,留给 runner 项目管理。
OpenBao 的 `auth/kubernetes-sandbox`、对应 role、policy、sandbox API 地址与公开 CA
+2
View File
@@ -27,6 +27,8 @@ runner 项目后续声明,本目录不预制。
仓库与 Helm values 均不保存 API key。OpenSandbox 不支持更丰富的原生 workload
authentication;runner 后续读取同一 Bao 路径并在请求头中使用 API key。
`opensandbox-values` 带 Flux watch label,values 变化会立即触发 Helm reconcile,不依赖
30 分钟的 HelmRelease interval。
## 验收
+2
View File
@@ -4,6 +4,8 @@ kind: ConfigMap
metadata:
name: opensandbox-values
namespace: opensandbox-system
labels:
reconcile.fluxcd.io/watch: Enabled
data:
values.yaml: |
opensandbox-controller: