This commit is contained in:
celebrateyang 2024-10-14 11:09:51 +08:00
parent 614f5781b3
commit fa268392ab
4 changed files with 31 additions and 3 deletions

View File

@ -19,7 +19,7 @@ FROM base AS api
WORKDIR /app
# 安装 curl
RUN apt-get update && apt-get install -y curl unzip
RUN apt-get update && apt-get install -y curl unzip vim
COPY --from=build /prod/api /app
COPY --from=build /app/.git /app/.git

View File

@ -71,9 +71,19 @@ const cloneInnertube = async (customFetch) => {
const cookie = getCookie('youtube_oauth');
const oauthData = transformSessionData(cookie);
if (!session.logged_in && oauthData) {
await session.oauth.init(oauthData);
const tokensMod = {
...oauthData, // 复制 oauthData 中的所有属性
client: {
client_id: oauthData.client_id,
client_secret: oauthData.client_secret
}
};
delete tokensMod.client_id;
delete tokensMod.client_secret;
await session.oauth.init(tokensMod);
session.logged_in = true;
}

View File

@ -0,0 +1,13 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ .Release.Name }}-pvc # 使用 Helm 释放的名称,确保唯一性
labels:
app: {{ .Release.Name }} # 为 PVC 打上标签,便于管理
spec:
accessModes:
- {{ .Values.pvc.accessModes }} # 动态指定访问模式,例如 ReadWriteOnce 或 ReadWriteMany
resources:
requests:
storage: {{ .Values.pvc.storage }} # 动态指定存储大小,例如 2Gi
storageClassName: {{ .Values.pvc.storageClassName }} # 动态指定存储类,例如 ssd 或 nfs

View File

@ -14,6 +14,11 @@ imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
pvc:
accessModes: ReadWriteOnce # 或者 ReadWriteMany依据需求修改
storage: 128Mi # 存储容量,依据需求修改
storageClassName: ssd # 存储类名称,可以根据需求调整
podAnnotations: {}