Skip to content

feat: switch authurl to auth service - #68

Open
Nexisato wants to merge 1 commit into
mainfrom
feat/traefik-configmap
Open

feat: switch authurl to auth service#68
Nexisato wants to merge 1 commit into
mainfrom
feat/traefik-configmap

Conversation

@Nexisato

@Nexisato Nexisato commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

背景

为上线 swanlab-auth 的可观测能力,identity 鉴权端点由 swanlab-server 迁移至 swanlab-auth:

  • 旧:http://<release>-self-hosted-server:3000/api/identity
  • 新:http://<release>-self-hosted-auth:3000/api/auth/identity

网关 Traefik 的 identify 插件(AuthUrl)随本次 chart 变更整体切换,不做版本判定/开关,与新版 auth 镜像绑定发布。

改动内容

  • templates/swanlab-auth/_helpers.tpl:新增 swanlab.auth.identify helper,基于现有 swanlab.auth.fullname / swanlab.auth.port 渲染 auth identity 地址。
  • templates/gateway/config.yaml:identify 插件的 AuthUrlswanlab.server.identify 切换为 swanlab.auth.identify

release 名兼容性已验证:Service 名与 AuthUrl 主机名走同一 helper 链(swanlab.fullnameswanlab.auth.fullname),任意 release 名(含 fullnameOverride / service.auth.fullnameOverride 场景)两者恒等,集群内短域名可直接解析。

注意事项

  1. 强前置依赖:合并本 chart 的版本必须与支持 /api/auth/identity 的 auth 镜像配套发布(AppVersion 同步 bump)。若存量集群只升 chart 不升镜像,网关鉴权会全部失败,release note 中需明确标注此前置条件。
  2. 升级行为:ConfigMap 变更通过 checksum/swanlab-gateway-configmap 注解触发网关 Pod 滚动重建(subPath 挂载无法热更新,此为既有设计)。线上 gateway / auth 均为多副本(≥2),滚动过程逐副本替换、先起后杀,单 Pod 重建约 5~15s,对业务基本无感,建议仍提前通知用户。
  3. 回滚方式:回滚 chart 版本即可,同为秒级滚动更新。

遗留项

  • swanlab-nextAPI_VERIFIER_URLtemplates/swanlab-next/deployment.yaml)目前仍指向 server 的 /api/identity,本次未改动。若 auth 接管 identity 后前端校验也需要切换,待与后端确认后单独处理。

@Nexisato Nexisato self-assigned this Sep 4, 2026
@Nexisato Nexisato added the question Further information is requested label Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

question Further information is requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant