Compare commits

..

3 Commits

Author SHA1 Message Date
cf819c1ad2 chore: point config sync workflow at git.bcdship.com
All checks were successful
Sync Consul Config / sync (push) Successful in 4s
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-12-01 17:36:16 +08:00
fdf7dda847 chore: switch domains ideship.com to bcdship.com
Update CorsOrigins, API/front/git/cos public URLs for test env.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-12-01 17:36:03 +08:00
8b79642f48 feat: integration event configs 2026-10-10 16:12:47 +08:00
4 changed files with 37 additions and 10 deletions

View File

@ -49,7 +49,7 @@ jobs:
echo "TARGET=$TARGET REF=$REF NAMESPACE=$NAMESPACE" echo "TARGET=$TARGET REF=$REF NAMESPACE=$NAMESPACE"
GITEA_HTTP="https://git.ideship.com" GITEA_HTTP="https://git.bcdship.com"
WORK="/data/ci-build/config-${TARGET}" WORK="/data/ci-build/config-${TARGET}"
GITEA_USER="$(kubectl --kubeconfig=/etc/rancher/k3s/k3s.yaml -n prod get secret kaniko-git -o jsonpath='{.data.GITEA_USER}' | base64 -d)" GITEA_USER="$(kubectl --kubeconfig=/etc/rancher/k3s/k3s.yaml -n prod get secret kaniko-git -o jsonpath='{.data.GITEA_USER}' | base64 -d)"
GIT_TOKEN="$(kubectl --kubeconfig=/etc/rancher/k3s/k3s.yaml -n prod get secret kaniko-git -o jsonpath='{.data.GIT_TOKEN}' | base64 -d)" GIT_TOKEN="$(kubectl --kubeconfig=/etc/rancher/k3s/k3s.yaml -n prod get secret kaniko-git -o jsonpath='{.data.GIT_TOKEN}' | base64 -d)"

View File

@ -8,8 +8,8 @@ Gitea 仓保存 `idwms/*.json` → CI 用 K8s Secret 渲染密码 → `PUT` 到
| 分支 | 集群 | Namespace | 前端 CORS | | 分支 | 集群 | Namespace | 前端 CORS |
|------|------|-----------|-----------| |------|------|-----------|-----------|
| `master` | prod(134) | `prod` | `https://ideship.com` | | `master` | prod(134) | `prod` | `https://bcdship.com` |
| `test` | test(13) | `test` | `https://test.ideship.com` | | `test` | test(13) | `test` | `https://test.bcdship.com` |
`test` 分支里中间件地址应为 `*.test.svc.cluster.local`;`master` 为 `*.prod.svc.cluster.local`。 `test` 分支里中间件地址应为 `*.test.svc.cluster.local`;`master` 为 `*.prod.svc.cluster.local`。
@ -41,7 +41,25 @@ kubectl --kubeconfig=/etc/rancher/k3s/k3s-test.yaml -n test \
--dry-run=client -o yaml | kubectl apply -f - --dry-run=client -o yaml | kubectl apply -f -
``` ```
### 2. (可选)Consul ACL Token ### 2. Consul ACL Token
**test(推荐一键)**:在测试机或 42(`KUBECONFIG=k3s-test.yaml`)执行:
```bash
cd /data/k3s-test # 或本仓库同步路径
./scripts/28-consul-enable-acl.sh
# 写入 ns=test secret/consul-acl:
# CONSUL_MGMT_TOKEN / CONSUL_HTTP_TOKEN(写 KV) / CONSUL_APP_TOKEN(API 读)
```
API 已挂 `Consul__Token` ← `CONSUL_APP_TOKEN`。本地:
```bash
export CONSUL_HTTP_ADDR=http://119.91.43.60:30850
export CONSUL_HTTP_TOKEN=$(kubectl -n test get secret consul-acl -o jsonpath='{.data.CONSUL_HTTP_TOKEN}' | base64 -d)
```
**prod(可选)**:
```bash ```bash
kubectl -n prod create secret generic consul-acl \ kubectl -n prod create secret generic consul-acl \
@ -82,6 +100,7 @@ export KUBECONFIG=/etc/rancher/k3s/k3s.yaml NAMESPACE=prod
# test(内网 NodePort consul-ci;安全组仅 runner→13:30850) # test(内网 NodePort consul-ci;安全组仅 runner→13:30850)
export KUBECONFIG=/etc/rancher/k3s/k3s-test.yaml NAMESPACE=test export KUBECONFIG=/etc/rancher/k3s/k3s-test.yaml NAMESPACE=test
export CONSUL_HTTP_ADDR=http://172.16.16.13:30850 export CONSUL_HTTP_ADDR=http://172.16.16.13:30850
# 本机不在 VPC:http://119.91.43.60:30850(须安全组放行办公网→30850)
./scripts/sync-to-consul.sh ./scripts/sync-to-consul.sh
``` ```

View File

@ -43,7 +43,7 @@
"Secret": "${WECHAT_MP_SECRET}", "Secret": "${WECHAT_MP_SECRET}",
"Token": "${WECHAT_MP_TOKEN}", "Token": "${WECHAT_MP_TOKEN}",
"EncodingAesKey": "", "EncodingAesKey": "",
"OAuthRedirectBase": "https://test.ideship.com" "OAuthRedirectBase": "https://test.bcdship.com"
} }
}, },
"ObjectStorage": { "ObjectStorage": {
@ -52,17 +52,17 @@
"Oms": { "Oms": {
"TrackService": { "TrackService": {
"Enabled": true, "Enabled": true,
"BaseUrl": "https://api.test.ideship.com/track", "BaseUrl": "https://api.test.bcdship.com/track",
"AppKey": "${OMS_TRACK_APP_KEY}", "AppKey": "${OMS_TRACK_APP_KEY}",
"AppSecret": "${OMS_TRACK_APP_SECRET}", "AppSecret": "${OMS_TRACK_APP_SECRET}",
"TimeoutSeconds": 30 "TimeoutSeconds": 30
}, },
"Itfx": { "Itfx": {
"BaseUrl": "https://api.test.ideship.com/itfx", "BaseUrl": "https://api.test.bcdship.com/itfx",
"TimeoutSeconds": 30 "TimeoutSeconds": 30
}, },
"PlatformShop": { "PlatformShop": {
"FrontendBaseUrl": "https://test.ideship.com", "FrontendBaseUrl": "https://test.bcdship.com",
"Lazada": { "Lazada": {
"AppKey": "${LAZADA_APP_KEY}", "AppKey": "${LAZADA_APP_KEY}",
"AppSecret": "${LAZADA_APP_SECRET}", "AppSecret": "${LAZADA_APP_SECRET}",

View File

@ -1,7 +1,7 @@
{ {
"App": { "App": {
"CorsOrigins": [ "CorsOrigins": [
"https://test.ideship.com" "https://test.bcdship.com"
] ]
}, },
"Serilog": { "Serilog": {
@ -68,10 +68,18 @@
"SecretKey": "${COS_SECRET_KEY}", "SecretKey": "${COS_SECRET_KEY}",
"Region": "ap-guangzhou", "Region": "ap-guangzhou",
"Bucket": "test-1308574410", "Bucket": "test-1308574410",
"BaseUrl": "https://cos.ideship.com", "BaseUrl": "https://cos.bcdship.com",
"UseHttps": true, "UseHttps": true,
"SignUrls": true, "SignUrls": true,
"DurationSecond": 600 "DurationSecond": 600
} }
},
"IntegrationEventLog": {
"OutboxPublisher": {
"StartupDelay": "00:00:05",
"ScanInterval": "00:00:10",
"BatchSize": 100,
"MaxDegreeOfParallelism": 8
}
} }
} }