Files
cube/apps/cube/k8s/all.yaml
T
Fam Zheng 802d5beae9
deploy articulate / build-and-deploy (push) Successful in 1m27s
deploy cube / build-and-deploy (push) Successful in 1m52s
deploy karaoke / build-and-deploy (push) Successful in 1m20s
deploy music / build-and-deploy (push) Successful in 2m29s
deploy simpleasm / build-and-deploy (push) Successful in 1m38s
deploy werewolf / build-and-deploy (push) Successful in 58s
cube(portal): 加 chatbot + create_issue tool
入口页右下角浮动 chat — 走 mochi 同款 LLM gateway (gemma-4-31b-it),
单步 tool calling 实现 `create_issue` 调 gitea API 建 fam/cube issue。
LLM_API_TOKEN + GITEA_TOKEN 走 ns 内 secret `chat-credentials`
(kubectl 手工创建,不进 git);gateway URL / model / 仓库地址走 env。
8 个 cargo test 覆盖 prompt / tool schema / tool_call 解析 / 错误。
顺手 git rm --cached 之前漏掉的 tsbuildinfo(已 gitignore)。
2026-05-14 16:46:59 +01:00

98 lines
2.2 KiB
YAML

apiVersion: v1
kind: Namespace
metadata:
name: cube-cube
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: cube
namespace: cube-cube
labels:
app: cube
spec:
replicas: 1
selector:
matchLabels:
app: cube
template:
metadata:
labels:
app: cube
spec:
imagePullSecrets:
- name: registry-creds
containers:
- name: cube
# tag 由 CI 通过 `kubectl set image` 替换;初次 apply 由 README 部署 runbook 指定
image: registry.famzheng.me/mochi/cube:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080
name: http
envFrom:
# secret `chat-credentials` (LLM_API_TOKEN + GITEA_TOKEN) 由 kubectl 手工创建,
# 不在 git manifest 里。kubectl apply -f all.yaml 不会动它。
- secretRef:
name: chat-credentials
env:
- name: LLM_GATEWAY
value: "http://3.135.65.204:8848/v1"
- name: LLM_MODEL
value: "gemma-4-31b-it"
- name: GITEA_URL
value: "https://famzheng.me/gitea"
- name: ISSUE_REPO
value: "fam/cube"
readinessProbe:
httpGet:
path: /healthz
port: http
initialDelaySeconds: 1
periodSeconds: 5
livenessProbe:
httpGet:
path: /healthz
port: http
initialDelaySeconds: 5
periodSeconds: 15
resources:
requests:
cpu: 10m
memory: 16Mi
limits:
cpu: 200m
memory: 128Mi
---
apiVersion: v1
kind: Service
metadata:
name: cube
namespace: cube-cube
spec:
selector:
app: cube
ports:
- name: http
port: 80
targetPort: 8080
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: cube
namespace: cube-cube
spec:
ingressClassName: traefik
rules:
- host: cube.famzheng.me
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: cube
port:
number: 80