feat: switch authurl to auth service - #68
Open
Nexisato wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
为上线 swanlab-auth 的可观测能力,identity 鉴权端点由 swanlab-server 迁移至 swanlab-auth:
http://<release>-self-hosted-server:3000/api/identityhttp://<release>-self-hosted-auth:3000/api/auth/identity网关 Traefik 的 identify 插件(
AuthUrl)随本次 chart 变更整体切换,不做版本判定/开关,与新版 auth 镜像绑定发布。改动内容
templates/swanlab-auth/_helpers.tpl:新增swanlab.auth.identifyhelper,基于现有swanlab.auth.fullname/swanlab.auth.port渲染 auth identity 地址。templates/gateway/config.yaml:identify 插件的AuthUrl由swanlab.server.identify切换为swanlab.auth.identify。release 名兼容性已验证:Service 名与
AuthUrl主机名走同一 helper 链(swanlab.fullname→swanlab.auth.fullname),任意 release 名(含fullnameOverride/service.auth.fullnameOverride场景)两者恒等,集群内短域名可直接解析。注意事项
/api/auth/identity的 auth 镜像配套发布(AppVersion 同步 bump)。若存量集群只升 chart 不升镜像,网关鉴权会全部失败,release note 中需明确标注此前置条件。checksum/swanlab-gateway-configmap注解触发网关 Pod 滚动重建(subPath 挂载无法热更新,此为既有设计)。线上 gateway / auth 均为多副本(≥2),滚动过程逐副本替换、先起后杀,单 Pod 重建约 5~15s,对业务基本无感,建议仍提前通知用户。遗留项
swanlab-next的API_VERIFIER_URL(templates/swanlab-next/deployment.yaml)目前仍指向 server 的/api/identity,本次未改动。若 auth 接管 identity 后前端校验也需要切换,待与后端确认后单独处理。