AliyunPipelineConfig 提供了 enableUpgradeOverride 字段来支持从 AliyunLogConfig 的平滑升级迁移。关键步骤和注意事项:
配置迁移:
在 AliyunPipelineConfig 的 spec 中设置 enableUpgradeOverride: true(默认为 false),即可用于升级替换原有的 AliyunLogConfig 配置。
结构映射:
旧版 AliyunLogConfig 中平铺在 spec 中的各类参数,在 AliyunPipelineConfig 中需要按 SLS 资源类型重新组织:
project:目标 Project 名称和连接信息logstores:Logstore 创建参数列表machineGroups:机器组关联列表config:采集配置(inputs/processors/flushers)
参数命名变更:
- AliyunLogConfig 中的参数命名不统一(如
lifeCycle对应 API 的ttl),AliyunPipelineConfig 与 SLS API 完全一致,迁移时需注意参数名映射。
采集配置格式:
- AliyunLogConfig 使用旧版 LogtailConfig 格式。
- AliyunPipelineConfig 使用新版 LogtailPipelineConfig 格式,需要将采集配置转换为 inputs/processors/flushers 的 Pipeline 结构。
两种 CRD 可以并存,建议新配置使用 AliyunPipelineConfig,旧配置逐步迁移。