Compare commits

..

No commits in common. "cf819c1ad27aabab315bad6b136b2391f1fafa1a" and "eb6612a7ea9f8bf4f64e0cb2d02083a74babd7ba" have entirely different histories.

4 changed files with 10 additions and 37 deletions

View File

@ -49,7 +49,7 @@ jobs:
echo "TARGET=$TARGET REF=$REF NAMESPACE=$NAMESPACE"
GITEA_HTTP="https://git.bcdship.com"
GITEA_HTTP="https://git.ideship.com"
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)"
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 |
|------|------|-----------|-----------|
| `master` | prod(134) | `prod` | `https://bcdship.com` |
| `test` | test(13) | `test` | `https://test.bcdship.com` |
| `master` | prod(134) | `prod` | `https://ideship.com` |
| `test` | test(13) | `test` | `https://test.ideship.com` |
`test` 分支里中间件地址应为 `*.test.svc.cluster.local`;`master` 为 `*.prod.svc.cluster.local`。
@ -41,25 +41,7 @@ kubectl --kubeconfig=/etc/rancher/k3s/k3s-test.yaml -n test \
--dry-run=client -o yaml | kubectl apply -f -
```
### 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(可选)**:
### 2. (可选)Consul ACL Token
```bash
kubectl -n prod create secret generic consul-acl \
@ -100,7 +82,6 @@ export KUBECONFIG=/etc/rancher/k3s/k3s.yaml NAMESPACE=prod
# test(内网 NodePort consul-ci;安全组仅 runner→13:30850)
export KUBECONFIG=/etc/rancher/k3s/k3s-test.yaml NAMESPACE=test
export CONSUL_HTTP_ADDR=http://172.16.16.13:30850
# 本机不在 VPC:http://119.91.43.60:30850(须安全组放行办公网→30850)
./scripts/sync-to-consul.sh
```

View File

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

View File

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