从 IstioOperator 迁移

{default_version.


%20%20%20%E7%99%E7%97%90%E7%99%9%E8%E%E7%9F%B1%20%20%20%E4%E2%E7%9B%21%20%20%E2B%E2%E7%97%20%20%23%24%23%20%E7%E7%E7%97%23%23%21%21%21%21%20%23%2023 及{3}B2B{3} V3" "%1" "%20%1" "%20%1" "%21%20%10 吗%20%20%10808083223%23%23 中为什么%2B2 解释 {/2}

代管式控制平面不直接支持使用 IstioOperator 进行自定义。从 Cloud Service Mesh 迁移到代管式控制平面需要从 IstioOperator 手动转换。此工具可自动执行该过程,有助于减少麻烦。

关于迁移工具

迁移工具以非破坏性方式评估提供的 IstioOperator 文件,以执行以下操作:

  • 检查是否存在兼容性问题。
  • 将兼容的 IstioOperator 配置转换为代管式控制平面支持的配置,并将新配置输出到文件中。
  • 输出有关与代管式控制平面所需的默认值冲突的配置值的警告。
  • 建议如何使用生成的文件。

此工具不会检查集群数据或配置,也不会更改集群配置。您必须单独应用所有生成的文件。

在使用迁移工具之前,请先查看代管式控制平面支持的功能的相关限制,以验证代管式控制平面是否支持您安装 Cloud Service Mesh。

使用迁移工具

迁移工具可作为 asmcli 脚本的一部分提供。您必须下载该脚本才能使用此工具。

  1. 运行迁移工具:

    asmcli experimental mcp-migrate-check -f path/to/istiooperator.yaml
    
  2. 请注意该工具列出的文件输出,尤其是 asm/*meshconfig.yamlasm/gateways*

  3. 检查配置警告。

  4. 查看输出并执行迁移所需的操作。

不受支持的 MeshConfig 字段

MeshConfig 上的以下字段会被代管式控制平面替换。

  • trustDomain
  • trustDomainAliases
  • configSources
  • defaultConfig.proxyMetadata - 这些特定字段会被替换。您可以添加新字段:
    • XDS_ROOT_CA
    • CA_ROOT_CA
    • OUTPUT_CERTS
    • XDS_AUTH_PROVIDER
    • PROXY_CONFIG_XDS_AGENT
  • defaultConfig.meshId
  • defaultConfig.discoveryAddress

输出示例

$ asmcli experimental mcp-migrate-check -f some-iop.yaml
asmcli: Downloading ASM..
Generating equivalent configuration for Anthos Service Mesh managed control plane...

Migrating MeshConfig settings...
✔ Wrote MeshConfig to asm-generated-configs/meshconfig.yaml.

Migrating gateway deployments...

Checking configuration compatibility...
! Found unsupported configurations:
    Components.Base: not configurable in managed control plane
    Components.Pilot: not configurable in managed control plane
    Hub=gcr.io/gke-release/asm: not configurable in managed control plane
    Tag=1.10.4-asm.6: not configurable in managed control plane

Actions required to migrate:
! Found potentially unsupported configurations; review warnings above before proceeding
- Found custom mesh configuration settings. To apply these settings to ASM managed
    control plane, run: `kubectl apply -f 'asm-generated-configs/meshconfig.yaml'`

TIP: steps recommending `kubectl apply` to be run should be integrated into your
  CI/CD pipeline, if applicable.

后续步骤