chore: remove secret templates — managed by CI/CD
This commit is contained in:
@@ -8,18 +8,18 @@ lpt-infra/
|
||||
│ ├── deployment-lpt-fe.yaml
|
||||
│ ├── deployment-lpt-be.yaml
|
||||
│ ├── deployment-lpt-ai.yaml
|
||||
│ ├── service-lpt-fe.yaml
|
||||
│ ├── service-lpt-be.yaml
|
||||
│ ├── service-lpt-ai.yaml
|
||||
│ ├── configmap.yaml
|
||||
│ ├── lpt-secrets.yaml (template)
|
||||
│ └── regcred-secret.yaml (template)
|
||||
│ └── configmap.yaml
|
||||
├── prod/
|
||||
│ ├── deployment-lpt-fe.yaml
|
||||
│ ├── deployment-lpt-be.yaml
|
||||
│ ├── deployment-lpt-ai.yaml
|
||||
│ ├── service-lpt-fe.yaml
|
||||
│ ├── service-lpt-be.yaml
|
||||
│ ├── service-lpt-ai.yaml
|
||||
│ ├── configmap.yaml
|
||||
│ ├── lpt-secrets.yaml (template)
|
||||
│ └── regcred-secret.yaml (template)
|
||||
│ └── configmap.yaml
|
||||
└── README.md
|
||||
```
|
||||
|
||||
@@ -31,7 +31,7 @@ kubectl create namespace lpt-dev
|
||||
kubectl create namespace lpt-prod
|
||||
```
|
||||
|
||||
### 2. 创建 Secret(模板不包含真实值,需手动创建)
|
||||
### 2. 创建 Secret(仅一次,由 CI/CD 自动管理)
|
||||
```bash
|
||||
# dev
|
||||
kubectl create secret generic lpt-secrets \
|
||||
@@ -60,23 +60,23 @@ kubectl create secret docker-registry regcred \
|
||||
|
||||
### 3. Apply 全部配置
|
||||
```bash
|
||||
# dev
|
||||
kubectl apply -f dev/
|
||||
|
||||
# prod
|
||||
kubectl apply -f prod/
|
||||
```
|
||||
|
||||
## 日常更新(CI/CD)
|
||||
|
||||
CI/CD 流程使用 `kubectl set image` 更新镜像,仓库内 `imagePullSecrets` 已配置,无需额外操作。
|
||||
## 日常更新
|
||||
|
||||
```bash
|
||||
kubectl set image deployment/lpt-fe lpt-fe=192.168.123.199:5000/lpt-fe:<TAG> -n lpt-dev
|
||||
kubectl set image deployment/lpt-be lpt-be=192.168.123.199:5000/lpt-be:<TAG> -n lpt-dev
|
||||
kubectl set image deployment/lpt-ai lpt-ai=192.168.123.199:5000/lpt-ai:<TAG> -n lpt-dev
|
||||
cd ~/lpt-infra
|
||||
git pull
|
||||
kubectl apply -f dev/
|
||||
kubectl apply -f prod/
|
||||
```
|
||||
|
||||
## CI/CD
|
||||
|
||||
各服务仓库的 Gitea Actions 负责 build + push 镜像,并通过 `kubectl set image` 更新 Deployment。`regcred` 由 workflow 自动 create/update,`lpt-secrets` 需手动创建一次后保持不变。
|
||||
|
||||
## 验证
|
||||
```bash
|
||||
kubectl get pods -n lpt-dev
|
||||
|
||||
Reference in New Issue
Block a user