mirror of
https://github.com/imputnet/cobalt.git
synced 2025-06-28 09:28:29 +00:00
add pvc
This commit is contained in:
parent
614f5781b3
commit
fa268392ab
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
13
cobalt-chart/templates/pvc.yaml
Normal file
13
cobalt-chart/templates/pvc.yaml
Normal 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
|
@ -14,6 +14,11 @@ imagePullSecrets: []
|
||||
nameOverride: ""
|
||||
fullnameOverride: ""
|
||||
|
||||
pvc:
|
||||
accessModes: ReadWriteOnce # 或者 ReadWriteMany,依据需求修改
|
||||
storage: 128Mi # 存储容量,依据需求修改
|
||||
storageClassName: ssd # 存储类名称,可以根据需求调整
|
||||
|
||||
|
||||
podAnnotations: {}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user