更新 Alauda Service Mesh
部署 service mesh 所采用的策略会影响您更新 mesh 的方式。
目录
了解版本控制了解 Service Mesh 和 Istio 版本升级路径了解 Operator 更新和 channel关于 Operator 更新过程关于 Istio 更新过程关于 Istio control plane 更新策略了解版本控制
Alauda Service Mesh 遵循 Semantic Versioning 进行所有产品 release。Semantic Versioning 使用 X.Y.Z 格式的三段式版本号来说明每个 release 中变更的性质。
- X(Major version):表示重大更新,可能包含不兼容变更,例如架构调整、API 变更或 schema 修改。
- Y(Minor version):在保持向后兼容的同时,引入新功能和增强功能。
- Z(Patch version 或 z-stream release):提供关键 bug 修复和安全更新,例如 Common Vulnerabilities and Exposures (CVE) 修复。Patch version 不包含新功能。
了解 Service Mesh 和 Istio 版本
Alauda Service Mesh Operator 为升级提供额外的 Istio release,但每个 Operator version 仅支持可用的最新 Istio version。请参阅“Release Notes”,以确定每个 Operator release 支持的 Istio version。
升级路径
下表包含 sidecar 模式下 mesh 的完整升级路径。升级时,您需要依次升级 Operator version,并先将 Istio control plane 更新到每个步骤对应的 Istio version,然后再继续下一步。
每个 Operator version 也会捆绑上一步骤的 Istio version,因此 control plane 无需跳过任何步骤:升级 Operator 后,mesh 会继续运行原有的 Istio version,然后您再将 Istio resource 更新为新步骤对应的 Istio version。
在上述版本号中,.z 表示该 minor release 可用的最新 patch version。
执行升级时,您应始终使用最新的 patch version,以确保获得最新的安全更新和 bug 修复。
每个 release 的最新 patch version 可在 Release Notes 中找到。
了解 Operator 更新和 channel
Operator Lifecycle Manager (OLM) 通过使用 channel 来组织和分发更新,从而管理 Operator 及其关联的服务。Channel 是对相关更新进行分组的一种方式。
为了确保您的 Alauda Service Mesh 始终获得最新的安全补丁、bug 修复和软件更新,请使 Alauda Service Mesh Operator 保持最新。升级过程取决于配置的 channel 和审批策略。
OLM 为 Alauda Service Mesh Operator 提供以下 channel:
- Stable channel:跟踪 Alauda Service Mesh v2 Operator 的最新 version 以及最新支持的 Istio version。此 channel 支持在新的 Operator version 和相应的 Istio 更新发布后立即升级。使用
stablechannel,及时获取最新功能、bug 修复和安全更新。 - Versioned channel:将更新限制在特定 minor version 内的 patch-level release。例如,
stable-2.0提供对最新2.0.14patch version 的访问。当新的 patch release 可用时,您可以将 Operator 升级到更新的 patch version。要迁移到更新的 minor release,您必须手动切换到其他 channel。您可以使用 versioned channel 在应用 patch 更新的同时保持一致的 minor version。
关于 Operator 更新过程
Operator Lifecycle Manager (OLM) 将生成更新请求,cluster administrator 必须批准该请求,才能将 Operator 更新到最新 version。
Operator 更新过程不会自动更新 Istio control plane,除非 Istio resource version 设置为 alias(例如 vX.Y-latest),并且 updateStrategy 设置为 InPlace。
当 Operator 中有新 version 可用时,这会触发 control plane 更新。默认情况下,Operator 不会更新 Istio control plane,除非使用新 version 更新 Istio resource。
关于 Istio 更新过程
更新 Alauda Service Mesh v2 Operator 后,将 Istio control plane 更新到最新的受支持 version。Istio resource 配置决定如何执行 control plane 升级,包括哪些步骤需要手动操作,以及哪些步骤会自动处理。
Istio resource 配置包含以下与升级过程相关的字段:
-
spec.version指定要安装的 Istio version。使用
vX.Y.Z格式,其中X.Y.Z是所需的 Istio release。 例如,将该字段设置为v1.30.4可安装 Istio1.30.4。 或者,将值设置为vX.Y-latest等 alias,以自动安装指定 minor release 的最新受支持 patch version。 -
spec.updateStrategy定义更新 Istio control plane 的策略。可用的更新策略为
InPlace和RevisionBased。
关于 Istio control plane 更新策略
更新策略会影响执行更新过程的方式。spec.updateStrategy 字段位于 Istio resource 配置中,用于确定 Alauda Service Mesh v2 Operator 如何更新 Istio control plane。当 Operator 检测到 spec.version 字段发生变化,或发现配置了 vX.Y-latest alias 的新 minor release 时,它会启动升级操作。对于每个 mesh,您可以选择以下两种策略之一:
InPlaceRevisionBased
InPlace 是更新 Alauda Service Mesh 的默认策略。