Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
143ba29e31 | ||
|
|
27a00ecac7 | ||
|
|
18d34f816f | ||
|
|
9160dd1af7 | ||
|
|
34f2380d8d |
@@ -13,7 +13,7 @@ on:
|
||||
- prod
|
||||
|
||||
env:
|
||||
REPO_URL: http://git.cat-shark.xyz/cat-shark/lpt-infra.git
|
||||
REPO_URL: https://git.cat-shark.xyz/cat-shark/lpt-infra.git
|
||||
KUBECTL_VERSION: v1.36.2
|
||||
|
||||
jobs:
|
||||
|
||||
+16
-2
@@ -5,11 +5,25 @@ metadata:
|
||||
namespace: lpt-dev
|
||||
data:
|
||||
# LPT AI Service
|
||||
LLM_API_URL: https://api.siliconflow.cn/v1/chat/completions
|
||||
LLM_MODEL: Qwen/Qwen2.5-32B-Instruct
|
||||
LLM_API_URL: https://api.deepseek.com/v1/chat/completions
|
||||
LLM_MODEL: deepseek-flash
|
||||
LLM_TIMEOUT_MS: "60000"
|
||||
LPT_AI-SERVICE_URL: http://lpt-ai:5199
|
||||
PORT: "5199"
|
||||
|
||||
# AI 用量统计(计价表按 DeepSeek 官方 PEAK 一列,USD / 1M tokens)
|
||||
# 改价只需改这里并重启 lpt-ai,历史账不受影响:费用在结算时已冻结进数据库。
|
||||
LLM_PRICE_CACHE_HIT_PER_M: "0.006"
|
||||
LLM_PRICE_CACHE_MISS_PER_M: "0.3"
|
||||
LLM_PRICE_OUTPUT_PER_M: "1.2"
|
||||
LLM_PRICE_OFFPEAK_FACTOR: "0.5"
|
||||
LLM_PRICE_PEAK_WINDOWS: "01:00-04:00,06:00-10:00"
|
||||
# 中国法定节假日(UTC 的 yyyy-MM-dd,逗号分隔),按谷时计价;每年需要更新
|
||||
LLM_PRICE_PEAK_HOLIDAYS: ""
|
||||
# lpt-ai 把用量推给 lpt-be;留空表示不上报,只保留 lpt-ai 本地面板(无长期账本)
|
||||
LPT_AI_REPORT_URL: http://lpt-be:8888
|
||||
# 可见「AI 用量统计」入口的用户名白名单(Spring Boot 松绑定到 lpt.ai-usage.admin-usernames)
|
||||
LPT_AI-USAGE_ADMIN-USERNAMES: admin
|
||||
|
||||
# Spring Boot Database
|
||||
SPRING_DATASOURCE_URL: jdbc:mysql://mysql:3306/learning_progress_tracker?allowPublicKeyRetrieval=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8
|
||||
|
||||
@@ -54,6 +54,28 @@ spec:
|
||||
secretKeyRef:
|
||||
name: lpt-secrets
|
||||
key: llm-api-key
|
||||
# 安全-03:入站令牌。optional 表示 secret 里没有这个 key 时 Pod 仍能启动
|
||||
# (此时 /ai/* 与 /admin 不校验令牌),加上 key 即可收紧。
|
||||
- name: LPT_AI_TOKEN
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: lpt-secrets
|
||||
key: lpt-ai-token
|
||||
optional: true
|
||||
# 用量上报(lpt-ai → lpt-be):地址为空时不上报,只保留本地面板
|
||||
- name: LPT_AI_REPORT_URL
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: lpt-config
|
||||
key: LPT_AI_REPORT_URL
|
||||
# 与 lpt-be 的 lpt.ai-usage.report-token 共用一个 secret key;
|
||||
# optional 表示没设也能启动(此时 lpt-be 不校验上报令牌)
|
||||
- name: LPT_AI_REPORT_TOKEN
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: lpt-secrets
|
||||
key: lpt-ai-report-token
|
||||
optional: true
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
|
||||
@@ -48,6 +48,21 @@ spec:
|
||||
configMapKeyRef:
|
||||
name: lpt-config
|
||||
key: LPT_AI-SERVICE_URL
|
||||
# 安全-03:与 lpt-ai 共用的入站令牌;secret 里没有该 key 时不影响启动
|
||||
- name: LPT_AI-SERVICE_TOKEN
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: lpt-secrets
|
||||
key: lpt-ai-token
|
||||
optional: true
|
||||
# 用量上报入站令牌(与 lpt-ai 的 LPT_AI_REPORT_TOKEN 同一个 secret key);
|
||||
# 为空表示不校验。该接口在 /internal/** 下,已排除 Sa-Token 登录校验。
|
||||
- name: LPT_AI-USAGE_REPORT-TOKEN
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: lpt-secrets
|
||||
key: lpt-ai-report-token
|
||||
optional: true
|
||||
resources:
|
||||
requests:
|
||||
cpu: 250m
|
||||
|
||||
+18
-2
@@ -5,11 +5,27 @@ metadata:
|
||||
namespace: lpt-prod
|
||||
data:
|
||||
# LPT AI Service
|
||||
LLM_API_URL: https://api.siliconflow.cn/v1/chat/completions
|
||||
LLM_MODEL: Qwen/Qwen2.5-32B-Instruct
|
||||
LLM_API_URL: https://api.deepseek.com/v1/chat/completions
|
||||
LLM_MODEL: deepseek-flash
|
||||
LLM_TIMEOUT_MS: "60000"
|
||||
LPT_AI-SERVICE_URL: http://lpt-ai:5199
|
||||
PORT: "5199"
|
||||
|
||||
# AI 用量统计(计价表按 DeepSeek 官方 PEAK 一列,USD / 1M tokens)
|
||||
# 改价只需改这里并重启 lpt-ai,历史账不受影响:费用在结算时已冻结进数据库。
|
||||
LLM_PRICE_CACHE_HIT_PER_M: "0.006"
|
||||
LLM_PRICE_CACHE_MISS_PER_M: "0.3"
|
||||
LLM_PRICE_OUTPUT_PER_M: "1.2"
|
||||
LLM_PRICE_OFFPEAK_FACTOR: "0.5"
|
||||
LLM_PRICE_PEAK_WINDOWS: "01:00-04:00,06:00-10:00"
|
||||
# 中国法定节假日(UTC 的 yyyy-MM-dd,逗号分隔),按谷时计价;每年需要更新
|
||||
LLM_PRICE_PEAK_HOLIDAYS: ""
|
||||
# lpt-ai 把用量推给 lpt-be;留空表示不上报,只保留 lpt-ai 本地面板(无长期账本)
|
||||
# 注:prod 的 lpt-ai 仍是 master 冻结版(无用量上报代码),prod 的 lpt-be 也尚无
|
||||
# POST /internal/ai-usage/records;提前配上不会报错,但也不代表已生效。
|
||||
LPT_AI_REPORT_URL: http://lpt-be:8888
|
||||
# 可见「AI 用量统计」入口的用户名白名单(Spring Boot 松绑定到 lpt.ai-usage.admin-usernames)
|
||||
LPT_AI-USAGE_ADMIN-USERNAMES: admin
|
||||
|
||||
# Spring Boot Database
|
||||
SPRING_DATASOURCE_URL: jdbc:mysql://mysql:3306/lpt_prod?allowPublicKeyRetrieval=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8
|
||||
|
||||
@@ -54,6 +54,28 @@ spec:
|
||||
secretKeyRef:
|
||||
name: lpt-secrets
|
||||
key: llm-api-key
|
||||
# 安全-03:入站令牌。optional 表示 secret 里没有这个 key 时 Pod 仍能启动
|
||||
# (此时 /ai/* 与 /admin 不校验令牌),加上 key 即可收紧。
|
||||
- name: LPT_AI_TOKEN
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: lpt-secrets
|
||||
key: lpt-ai-token
|
||||
optional: true
|
||||
# 用量上报(lpt-ai → lpt-be):地址为空时不上报,只保留本地面板
|
||||
- name: LPT_AI_REPORT_URL
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: lpt-config
|
||||
key: LPT_AI_REPORT_URL
|
||||
# 与 lpt-be 的 lpt.ai-usage.report-token 共用一个 secret key;
|
||||
# optional 表示没设也能启动(此时 lpt-be 不校验上报令牌)
|
||||
- name: LPT_AI_REPORT_TOKEN
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: lpt-secrets
|
||||
key: lpt-ai-report-token
|
||||
optional: true
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
|
||||
@@ -48,6 +48,21 @@ spec:
|
||||
configMapKeyRef:
|
||||
name: lpt-config
|
||||
key: LPT_AI-SERVICE_URL
|
||||
# 安全-03:与 lpt-ai 共用的入站令牌;secret 里没有该 key 时不影响启动
|
||||
- name: LPT_AI-SERVICE_TOKEN
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: lpt-secrets
|
||||
key: lpt-ai-token
|
||||
optional: true
|
||||
# 用量上报入站令牌(与 lpt-ai 的 LPT_AI_REPORT_TOKEN 同一个 secret key);
|
||||
# 为空表示不校验。该接口在 /internal/** 下,已排除 Sa-Token 登录校验。
|
||||
- name: LPT_AI-USAGE_REPORT-TOKEN
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: lpt-secrets
|
||||
key: lpt-ai-report-token
|
||||
optional: true
|
||||
resources:
|
||||
requests:
|
||||
cpu: 250m
|
||||
|
||||
Reference in New Issue
Block a user