fix(k01): merge secrets.sh into install-k3s.sh and lower operator resource requests
build-and-push-harbor / docker-build-push (push) Waiting to run
build-and-push-harbor / docker-build-push (push) Waiting to run
This commit is contained in:
+8
-13
@@ -10,24 +10,19 @@
|
||||
- center 已部署,`registry.juwan.xhttp.zip` 可推可拉
|
||||
- 已从 Gitea 拉取仓库:`git clone https://git.juwan.xhttp.zip/juwan/juwan-backend.git`
|
||||
- `/root/registry-password` 文件存放 zot admin 密码(`chmod 600`)
|
||||
- `.env` 已按 `.env.example` 填好(zot admin 密码、Brevo SMTP、Garage S3 凭据)
|
||||
|
||||
如果还没 `.env`:先 `cp .env.example .env && nano .env`,再跑 `install-k3s.sh`。
|
||||
|
||||
## k3s server 初始化
|
||||
|
||||
```bash
|
||||
cd /root/juwan-backend/deploy/k01
|
||||
|
||||
# 装 k3s(禁用内置 traefik)+ Helm + 四个 Operator
|
||||
# 装 k3s + Helm + 四个 Operator,并自动调用 secrets.sh 生成全部 k8s Secret
|
||||
bash install-k3s.sh
|
||||
|
||||
# 准备 .env,填 zot Admin 密码 / Brevo SMTP / Garage S3 凭据
|
||||
cp .env.example .env
|
||||
nano .env
|
||||
|
||||
# 应用 namespace + RBAC,生成全部 k8s Secret
|
||||
kubectl apply -f 00-base/
|
||||
bash secrets.sh
|
||||
|
||||
# 应用基础设施(Operator CR)
|
||||
# 应用基础设施层(Operator CR)
|
||||
kubectl apply -f 01-infra/postgres.yaml
|
||||
kubectl apply -f 01-infra/redis.yaml
|
||||
kubectl apply -f 01-infra/mongo.yaml
|
||||
@@ -35,7 +30,7 @@ kubectl apply -f 01-infra/kafka.yaml
|
||||
kubectl apply -f 01-infra/ratelimit.yaml
|
||||
kubectl apply -f 01-infra/envoy.yaml
|
||||
|
||||
# 等 PostgreSQL Cluster 全部 Ready 后再灌 schema
|
||||
# PostgreSQL Cluster 全部 Ready 后写入 schema 与 fixture
|
||||
bash 01-infra/load-schema.sh
|
||||
|
||||
# 启动业务服务
|
||||
@@ -46,7 +41,7 @@ kubectl -n juwan get pods -w
|
||||
|
||||
## 做什么
|
||||
|
||||
四层结构。控制面是 k3s server,跑着 CNPG / Strimzi / Redis / MongoDB 四个 Operator 管理有状态服务。
|
||||
控制面是 k3s server,跑着 CNPG / Strimzi / Redis / MongoDB 四个 Operator 管理有状态服务。
|
||||
|
||||
数据层 11 个 per-domain PostgreSQL Cluster + 12 个 RedisReplication + 1 个 MongoDBCommunity(chat)+ Strimzi KRaft Kafka(1 broker)。
|
||||
|
||||
@@ -54,7 +49,7 @@ kubectl -n juwan get pods -w
|
||||
|
||||
email-api 跟 user-rpc 共用 user-redis 实例,因为注册和重置密码的验证码 key 跨服务读写。
|
||||
|
||||
chat-api 的 WebTransport 走 UDP 8443 hostPort,center Caddy 的 PR 7669 fork 把这路流量终结后反代过来。
|
||||
chat-api 的 WebTransport 走 UDP 8443 hostPort,center Caddy 的 PR 7669 fork 在中心握手后反向代理 WebTransport 连接到 chat-api。
|
||||
|
||||
## 生成的 Secret
|
||||
|
||||
|
||||
Reference in New Issue
Block a user