Crater

配置说明

Crater 平台 Helm Chart 详细配置参数说明,涵盖后端、前端、存储、监控及认证等核心模块。

Type: applicationv0.1.5

Crater 是一个专为 Kubernetes 设计的综合性 AI 开发平台,提供 GPU 资源管理、容器化开发环境和工作流编排功能。本文档详细列出了通过 Helm 部署 Crater 时的所有可配置项。

项目主页: https://github.com/raids-lab/crater

维护者

名称邮箱网址
RAIDS Labhttps://github.com/raids-lab

源码

基础配置 (Global Values)

参数类型默认值描述
hoststring"crater.example.com"平台访问的域名或 IP 地址
protocolstring"http"访问协议类型(httphttps
firstUser.usernamestring"crater-admin"初始管理员用户名
firstUser.passwordstring"Masked@Password"初始管理员密码(请务必修改)
imagePullPolicystring"Always"容器镜像拉取策略
namespaces.createbooltrue是否自动创建命名空间
namespaces.jobstring"crater-workspace"用于运行作业任务的命名空间
namespaces.imagestring"crater-images"用于构建镜像的命名空间
storage.createbooltrue是否自动创建基础持久化存储(PVC)
storage.requeststring"10Gi"存储申请容量
storage.storageClassstring"nfs"存储类名称(需支持 ReadWriteMany)
storage.pvcNamestring"crater-rw-storage"共享 PVC 的名称

监控基础配置 (Monitoring)

参数类型默认值描述
prometheus.enablebooltrue是否启用内置 Prometheus 监控
prometheus.addressstring"http://..."集群内部 Prometheus 服务地址
grafana.enablebooltrue是否启用内置 Grafana 面板
grafana.addressstring"http://..."集群内部 Grafana 服务地址
monitoring.timezonestring"Asia/Shanghai"监控面板显示时区

后端服务配置 (backendConfig)

基础服务项

参数类型默认值描述
backendConfig.portstring":8088"后端 API 服务监听端口
backendConfig.enableLeaderElectionboolfalse是否启用 Leader 选举(用于高可用部署)
backendConfig.modelDownload.imagestring"python:3.11-slim"模型下载作业使用的容器镜像
backendConfig.prometheusAPIstring"http://..."Prometheus API 地址,用于获取监控指标
backendConfig.auth.token.accessTokenSecretstring"..."JWT Access Token 签名密钥
backendConfig.auth.token.refreshTokenSecretstring"..."JWT Refresh Token 签名密钥

数据库连接 (backendConfig.postgres)

参数类型默认值描述
backendConfig.postgres.hoststring"..."数据库服务器地址
backendConfig.postgres.portint5432数据库端口
backendConfig.postgres.dbnamestring"postgres"数据库名称
backendConfig.postgres.userstring"postgres"数据库用户名
backendConfig.postgres.passwordstring"..."数据库密码
backendConfig.postgres.sslmodestring"disable"SSL 模式配置
backendConfig.postgres.TimeZonestring"Asia/Shanghai"数据库连接使用的时区

存储路径绑定 (backendConfig.storage)

参数类型默认值描述
backendConfig.storage.pvc.readWriteManystring"..."绑定的共享存储 PVC 名称
backendConfig.storage.pvc.readOnlyManystringnull可选的只读存储 PVC 名称(用于数据集和模型)
backendConfig.storage.prefix.userstring"users"用户个人空间的存储路径前缀
backendConfig.storage.prefix.accountstring"accounts"队列/账户公共空间的存储路径前缀
backendConfig.storage.prefix.publicstring"public"全局公共数据集的存储路径前缀

基础资源与密钥 (backendConfig.secrets)

参数类型默认值描述
backendConfig.secrets.tlsSecretNamestring"crater-tls-secret"用于 HTTPS 的 TLS 证书 Secret 名称
backendConfig.secrets.tlsForwardSecretNamestring"crater-tls-forward-secret"用于转发的 TLS 证书 Secret 名称
backendConfig.secrets.imagePullSecretNamestring""用于拉取私有镜像的 Secret 名称

认证方式配置 (backendConfig.auth)

参数类型默认值描述
backendConfig.auth.ldap.enableboolfalse是否启用 LDAP 统一身份认证
backendConfig.auth.ldap.aliasstring""LDAP 登录方式的显示名称(别名),建议简短(如 "ACT")
backendConfig.auth.ldap.helpstring""鼠标悬浮在 LDAP 登录方式上时显示的帮助说明
backendConfig.auth.ldap.server.addressstring"..."LDAP 服务器地址
backendConfig.auth.ldap.server.baseDNstring"..."用户搜索的 Base DN
backendConfig.auth.ldap.attributeMapping.usernamestring"uid"用户名对应的 LDAP 属性名
backendConfig.auth.ldap.attributeMapping.displayNamestring"cn"显示名称对应的 LDAP 属性名
backendConfig.auth.ldap.uid.sourcestring"default"UID/GID 获取策略:可选 default, ldap, rid, external (弃用)
backendConfig.auth.ldap.uid.rid.offsetint10000当 source 为 rid 时的 UID/GID 计算偏移量(UID/GID = RID + offset)
backendConfig.auth.ldap.uid.rid.sidAttributestring"objectSid"当 source 为 rid 时,存储用户二进制 SID 的 LDAP 属性名(用于计算 UID)
backendConfig.auth.ldap.uid.rid.pgidAttributestring"primaryGroupID"当 source 为 rid 时,存储主组 RID 的 LDAP 属性名(用于计算 GID)
backendConfig.auth.ldap.uid.ldapAttribute.uidstring""当 source 为 ldap 时的 UID 属性名
backendConfig.auth.ldap.uid.ldapAttribute.gidstring""当 source 为 ldap 时的 GID 属性名
backendConfig.auth.normal.allowRegisterbooltrue是否允许平台本地直接注册
backendConfig.auth.normal.allowLoginbooltrue是否允许使用本地数据库账号登录

镜像仓库集成 (backendConfig.registry)

参数类型默认值描述
backendConfig.registry.enableboolfalse是否启用容器镜像仓库(Harbor)集成
backendConfig.registry.harbor.serverstring"..."Harbor 服务访问地址
backendConfig.registry.harbor.userstring"admin"Harbor 管理员账号
backendConfig.registry.harbor.passwordstring"..."Harbor 管理员密码
backendConfig.registry.buildTools.proxyConfig.httpProxystringnull镜像构建时的 HTTP 代理
backendConfig.registry.buildTools.proxyConfig.httpsProxystringnull镜像构建时的 HTTPS 代理
backendConfig.registry.buildTools.proxyConfig.noProxystringnull不走代理的域名列表(逗号分隔)

邮件服务配置 (backendConfig.smtp)

参数类型默认值描述
backendConfig.smtp.enableboolfalse是否启用邮件通知功能
backendConfig.smtp.hoststring"mail.example.com"SMTP 服务器地址
backendConfig.smtp.portint25SMTP 服务器端口
backendConfig.smtp.userstring"example"SMTP 认证用户名
backendConfig.smtp.passwordstring"..."SMTP 认证密码
backendConfig.smtp.notifystring"example@example.com"系统通知发送者的邮箱地址

镜像构建流水线 (buildkitConfig)

参数类型默认值描述
buildkitConfig.amdConfig.enabledboolfalse是否启用 AMD64 架构构建节点
buildkitConfig.amdConfig.replicasint3构建节点的副本数
buildkitConfig.amdConfig.cache.storageSizestring"400Gi"构建节点的缓存卷大小
buildkitConfig.generalConfig.resources.limits.cpuint16构建节点的最大 CPU 限制
buildkitConfig.generalConfig.resources.limits.memorystring"48Gi"构建节点的最大内存限制

自动任务策略 (cronjobConfig)

参数类型默认值描述
cronjobConfig.jobs.lowGPUUtil.TIME_RANGEstring"90"低利用率检测的时间范围(分钟)
cronjobConfig.jobs.lowGPUUtil.UTILstring"0"触发提醒的利用率阈值
cronjobConfig.jobs.longTime.BATCH_DAYSstring"4"批量作业的最长运行天数
cronjobConfig.jobs.waitingJupyter.JUPYTER_WAIT_MINUTESstring"5"Jupyter 作业处于 Waiting 状态的清理阈值

数据库备份 (dbBackup)

参数类型默认值描述
dbBackup.enabledbooltrue是否启用数据库自动备份
dbBackup.schedulestring"0 2 * * *"备份 Cron 表达式
dbBackup.config.retentionCountint7备份文件的保留天数/个数

监控展示 (frontendConfig / grafanaProxy)

参数类型默认值描述
frontendConfig.versionstring"1.0.0"前端应用版本
grafanaProxy.enableboolfalse是否启用 Grafana 免密代理(用于 Iframe 嵌入)
grafanaProxy.addressstring"..."集群内 Grafana 服务地址
grafanaProxy.tokenstring"..."只读权限的 Grafana API Token

TLS 证书配置 (tls)

参数类型默认值描述
tls.base.createboolfalse是否由 Helm 创建基础证书 Secret
tls.base.certstring""基础证书内容 (Base64)
tls.forward.createboolfalse是否由 Helm 创建转发证书 Secret
tls.forward.certstring""转发证书内容 (Base64)

组件镜像版本 (images)

参数类型默认值描述
images.backend.repositorystring"..."后端服务镜像仓库
images.frontend.repositorystring"..."前端服务镜像仓库
images.storage.repositorystring"..."存储管理服务镜像仓库
images.buildkit.tagstring"v0.23.1"Buildkit 核心镜像标签
Edit on GitHub