6 changed files with 19 additions and 5 deletions
+4
View File
@@ -0,0 +1,4 @@
# 行尾规范:文本文件统一 LF,Windows 批处理保留 CRLF
* text=auto eol=lf
*.bat text eol=crlf
*.cmd text eol=crlf
+5 -1
View File
@@ -34,12 +34,16 @@ jobs:
curl -sLO "https://dl.k8s.io/release/$KUBECTL_VERSION/bin/linux/amd64/kubectl" curl -sLO "https://dl.k8s.io/release/$KUBECTL_VERSION/bin/linux/amd64/kubectl"
chmod +x kubectl chmod +x kubectl
mv kubectl /usr/local/bin/ mv kubectl /usr/local/bin/
echo "${{ secrets.KUBECONFIG_B64 }}" | base64 -d > /tmp/kubeconfig echo "${{ secrets.KUBECONFIG_B64 }}" | tr -d '[:space:]' | base64 -d > /tmp/kubeconfig
chmod 600 /tmp/kubeconfig chmod 600 /tmp/kubeconfig
if [ ! -s /tmp/kubeconfig ]; then if [ ! -s /tmp/kubeconfig ]; then
echo "ERROR: KUBECONFIG_B64 secret 为空,请先在 lpt-infra 仓库配置 Secret" echo "ERROR: KUBECONFIG_B64 secret 为空,请先在 lpt-infra 仓库配置 Secret"
exit 1 exit 1
fi fi
if ! grep -q '^apiVersion:' /tmp/kubeconfig; then
echo "ERROR: KUBECONFIG_B64 解码后不是有效 kubeconfig,请重新生成并配置 Secret"
exit 1
fi
kubectl --kubeconfig=/tmp/kubeconfig config view --minify >/dev/null kubectl --kubeconfig=/tmp/kubeconfig config view --minify >/dev/null
- name: Apply manifests - name: Apply manifests
+2 -2
View File
@@ -5,8 +5,8 @@ metadata:
namespace: lpt-dev namespace: lpt-dev
data: data:
# LPT AI Service # LPT AI Service
LLM_API_URL: https://api.siliconflow.cn/v1/chat/completions LLM_API_URL: https://api.deepseek.com/v1/chat/completions
LLM_MODEL: Qwen/Qwen2.5-32B-Instruct LLM_MODEL: deepseek-flash
LLM_TIMEOUT_MS: "60000" LLM_TIMEOUT_MS: "60000"
LPT_AI-SERVICE_URL: http://lpt-ai:5199 LPT_AI-SERVICE_URL: http://lpt-ai:5199
PORT: "5199" PORT: "5199"
+3
View File
@@ -33,6 +33,9 @@ spec:
key: mysql-root-password key: mysql-root-password
- name: MYSQL_DATABASE - name: MYSQL_DATABASE
value: learning_progress_tracker value: learning_progress_tracker
# 固定时区:业务表按无时区 DATETIME 存储,避免 DB 侧默认时间(NOW/CURRENT_TIMESTAMP)落在 UTC
- name: TZ
value: Asia/Shanghai
resources: resources:
requests: requests:
cpu: 250m cpu: 250m
+2 -2
View File
@@ -5,8 +5,8 @@ metadata:
namespace: lpt-prod namespace: lpt-prod
data: data:
# LPT AI Service # LPT AI Service
LLM_API_URL: https://api.siliconflow.cn/v1/chat/completions LLM_API_URL: https://api.deepseek.com/v1/chat/completions
LLM_MODEL: Qwen/Qwen2.5-32B-Instruct LLM_MODEL: deepseek-flash
LLM_TIMEOUT_MS: "60000" LLM_TIMEOUT_MS: "60000"
LPT_AI-SERVICE_URL: http://lpt-ai:5199 LPT_AI-SERVICE_URL: http://lpt-ai:5199
PORT: "5199" PORT: "5199"
+3
View File
@@ -33,6 +33,9 @@ spec:
key: mysql-root-password key: mysql-root-password
- name: MYSQL_DATABASE - name: MYSQL_DATABASE
value: lpt_prod value: lpt_prod
# 固定时区:业务表按无时区 DATETIME 存储,避免 DB 侧默认时间(NOW/CURRENT_TIMESTAMP)落在 UTC
- name: TZ
value: Asia/Shanghai
resources: resources:
requests: requests:
cpu: 250m cpu: 250m