本文档介绍如何通过 HELM_OPTIONS 环境变量传递 Helm --set 参数来自定义 Desktop Frontend 的所有配置项。
sealos run desktop-frontend:latest \
-e HELM_OPTIONS="--set desktopConfig.cloudDomain=cloud.example.com --set desktopConfig.layoutTitle=\"My Cloud Platform\""sealos run desktop-frontend:latest \
-e HELM_OPTIONS="--set-string desktopConfig.realNameReward=0"HELM_OPTIONS 在自动配置之后追加,因此显式参数优先级更高:
# HELM_OPTIONS 会覆盖 sealos-config 中的自动配置值
sealos run desktop-frontend:latest \
-e HELM_OPTIONS="--set desktopConfig.cloudDomain=from-helm.com"desktopConfig:
cloudDomain: 'cloud.example.com' # 云域名
cloudPort: '' # 云端口(默认 443)
regionUID: 'region-123' # 区域 UID
certSecretName: 'wildcard-cert' # TLS 证书 Secret 名称desktopConfig:
databaseGlobalCockroachdbURI: 'postgres://user:pass@cockroachdb:26257'
databaseLocalCockroachdbURI: 'postgres://user:pass@cockroachdb-local:26257'
# 正常安装默认执行 Prisma migration;仅前端 smoke 时关闭。
databaseMigration:
enabled: truedesktopConfig:
passwordSalt: 'your-random-salt' # 密码哈希盐
jwtInternal: 'your-jwt-internal-key' # 内部 JWT 密钥
jwtRegional: 'your-jwt-regional-key' # 区域 JWT 密钥
jwtGlobal: 'your-jwt-global-key' # 全局 JWT 密钥desktopConfig:
billingUrl: 'http://account-service.account-system.svc:2333'
billingToken: 'your-billing-token'desktopConfig:
version: 'en' # UI 版本: "cn" 或 "en"
# forcedLanguage 和 currencySymbol 会根据 version 自动配置:
# - version: "cn" → forcedLanguage: "zh", currencySymbol: "shellCoin"
# - version: "en" → forcedLanguage: "en", currencySymbol: "usd"desktopConfig:
gtmId: 'GTM-XXXXXXXX' # GTM IDdesktopConfig:
discordInviteLink: 'https://discord.gg/sealos'desktopConfig:
guideEnabled: false # 启用用户引导
apiEnabled: false # 启用 API 访问
rechargeEnabled: false # 启用充值功能
enterpriseRealNameAuthEnabled: false # 启用企业实名认证
trackingEnabled: false # 启用追踪/统计
realNameAuthEnabled: false # 启用实名认证
licenseCheckEnabled: false # 启用 License 检查
passwordEnabled: true # 启用密码登录desktopConfig:
realNameReward: 0
realNameCallbackUrl: 'https://cloud.example.org/api/account/callback'
cfSiteKey: ''templateUrl, applaunchpadUrl, dbproviderUrl, and objectstorageUrl are generated automatically from cloudDomain.
desktopConfig:
layoutTitle: 'Sealos Cloud' # 平台标题
layoutLogo: '/logo.svg' # Logo 路径
layoutBackgroundImage: '/images/bg-light.svg' # 背景图片
customerServiceURL: '' # 客服 URL
layoutDocsUrl: 'https://sealos.run/docs/Intro/' # 文档 URL
protocol:
enabled: true # 是否显示登录页服务条款和隐私政策提示desktopConfig:
metaTitle: 'Sealos Cloud'
metaDescription: 'Sealos Cloud'
metaKeywords: 'Sealos Cloud'desktopConfig:
githubEnabled: true
githubClientId: 'your-github-client-id'
githubClientSecret: 'your-github-client-secret'
githubProxyAddress: '' # 代理地址(可选)desktopConfig:
wechatEnabled: true
wechatClientId: 'your-wechat-app-id'
wechatClientSecret: 'your-wechat-app-secret'
wechatProxyAddress: '' # 代理地址(可选)desktopConfig:
googleEnabled: true
googleClientId: 'your-google-client-id.apps.googleusercontent.com'
googleClientSecret: 'your-google-client-secret'
googleProxyAddress: '' # 代理地址(可选)desktopConfig:
oauth2Enabled: true
oauth2CallbackUrl: 'https://cloud.example.com/callback'
oauth2ClientId: 'your-oauth2-client-id'
oauth2ClientSecret: 'your-oauth2-client-secret'
oauth2AuthUrl: 'https://oauth2.example.com/oauth2/auth'
oauth2TokenUrl: 'https://oauth2.example.com/oauth2/token'
oauth2UserInfoUrl: 'https://oauth2.example.com/oauth2/userinfo'
oauth2ProxyAddress: '' # 代理地址(可选)desktopConfig:
turnstileEnabled: true
turnstileSiteKey: 'your-turnstile-site-key'
turnstileSecretKey: 'your-turnstile-secret-key'desktopConfig:
aliCaptchaEnabled: true
aliCaptchaEndpoint: 'https://captcha.aliyuncs.com'
aliCaptchaSceneId: 'your-scene-id'
aliCaptchaPrefix: 'your-prefix'
aliCaptchaAccessKeyID: 'your-access-key-id'
aliCaptchaAccessKeySecret: 'your-access-key-secret'desktopConfig:
smsEnabled: true
smsAliEnabled: true
smsAliEndpoint: 'https://dysmsapi.aliyuncs.com'
smsAliTemplateCode: 'SMS_123456789'
smsAliSignName: 'YourSignName'
smsAliAccessKeyID: 'your-access-key-id'
smsAliAccessKeySecret: 'your-access-key-secret'desktopConfig:
emailEnabled: true
emailHost: 'smtp.example.com'
emailPort: 587
emailUser: 'noreply@example.com'
emailPassword: 'your-email-password'
emailLanguage: 'en'desktopConfig:
trackingWebsiteId: 'your-website-id'
trackingHostUrl: 'https://umami.example.com'
trackingScriptUrl: 'https://umami.example.com/script.js'desktopConfig:
realNameOSSAccessKey: 'your-oss-access-key'
realNameOSSAccessKeySecret: 'your-oss-secret-key'
realNameOSSEndpoint: 'oss-cn-hangzhou.aliyuncs.com'
realNameOSSSSL: true
realNameOSSPort: 443
realNameOSSRealNameBucket: 'realname-bucket'
realNameOSSEnterpriseRealNameBucket: 'enterprise-realname-bucket'desktopConfig:
workorderUrl: 'https://workorder.example.com'
cloudVirtualMachineUrl: 'https://cloudvirtualmachine.example.com'desktopConfig:
maxTeamCount: 10 # 最大团队数
maxTeamMemberCount: 100 # 每个团队最大成员数
workspaceInviteExpiresInMinutes: [30, 1440, 10080] # 工作空间邀请链接有效期(分钟)sealos run desktop-frontend:latest \
-e HELM_OPTIONS="--set desktopConfig.cloudDomain=mycloud.com --set desktopConfig.layoutTitle=\"My Cloud Platform\" --set desktopConfig.metaTitle=\"My Cloud Platform\" --set desktopConfig.metaDescription=\"Welcome to My Cloud Platform\""sealos run desktop-frontend:latest \
-e HELM_OPTIONS="--set desktopConfig.githubEnabled=true --set desktopConfig.githubClientId=your-github-id --set desktopConfig.githubClientSecret=your-github-secret --set desktopConfig.googleEnabled=true --set desktopConfig.googleClientId=your-google-id --set desktopConfig.googleClientSecret=your-google-secret"sealos run desktop-frontend:latest \
-e HELM_OPTIONS="--set desktopConfig.smsEnabled=true --set desktopConfig.smsAliEnabled=true --set desktopConfig.smsAliEndpoint=https://dysmsapi.aliyuncs.com --set desktopConfig.smsAliAccessKeyID=your-key-id --set desktopConfig.smsAliAccessKeySecret=your-key-secret --set desktopConfig.emailEnabled=true --set desktopConfig.emailHost=smtp.example.com --set desktopConfig.emailPort=587 --set desktopConfig.emailUser=noreply@example.com --set desktopConfig.emailPassword=your-password"对于生产环境的多个配置,直接通过 HELM_OPTIONS 传递所有 Helm values:
sealos run desktop-frontend:latest \
-e HELM_OPTIONS="
--set desktopConfig.cloudDomain=production.example.com
--set desktopConfig.regionUID=prod-region-001
--set desktopConfig.version=cn
--set desktopConfig.githubEnabled=true
--set desktopConfig.githubClientId=prod-github-id
--set desktopConfig.githubClientSecret=prod-github-secret
--set desktopConfig.smsEnabled=true
--set desktopConfig.smsAliEnabled=true
--set desktopConfig.smsAliAccessKeyID=prod-sms-key-id
--set desktopConfig.smsAliAccessKeySecret=prod-sms-key-secret
--set desktopConfig.emailEnabled=true
--set desktopConfig.emailHost=smtp.production.example.com
--set desktopConfig.emailPort=587
--set desktopConfig.emailUser=noreply@production.example.com
--set desktopConfig.emailPassword=prod-email-password
--set desktopConfig.trackingEnabled=true
--set desktopConfig.trackingWebsiteId=prod-website-id
"提示:
- 所有配置统一通过
HELM_OPTIONS传递 - 对于超长配置,建议创建部署脚本
- 敏感信息: 建议将敏感配置(如密钥、密码)通过环境变量传递,或存储在 Kubernetes Secret 中
- 类型注意: 布尔值使用
true/false,数字不需要引号,字符串建议使用引号 - 嵌套配置: 使用
.分隔嵌套层级,如desktopConfig.githubClientId - 数组索引: 对于数组配置,使用
[]索引,如ingress.hosts[0].host - 字符串包含特殊字符: 使用
--set-string或反斜杠转义引号(如\") - 引号转义: 在
HELM_OPTIONS中,字符串包含引号时需要转义(如--set desktopConfig.layoutTitle=\"My Cloud\") - 配置管理: 对于复杂部署,建议使用脚本或配置管理工具来管理参数
部署后可以查看生成的 ConfigMap 验证配置:
kubectl get configmap sealos-desktop-config -n sealos -o yaml或在 Pod 中查看实际配置:
kubectl exec -n sealos deployment/sealos-desktop -- cat /app/data/config.yaml