安装 Alauda Build of Argo CD

INFO

从 ACP 4.5 开始,Alauda Build of Argo CD 更名为 Alauda Container Platform GitOps Controller。从 customer portal 下载插件时,请搜索 Alauda Container Platform GitOps Controller。在更名之前发布的插件软件包上传后,平台中仍显示 Alauda Build of Argo CD。

前提条件

  1. 下载与平台架构对应的 Alauda Container Platform GitOps Controller Operator(之前称为 Alauda Build of Argo CD)安装软件包。
  2. 使用 Upload Packages 机制上架安装软件包。

操作步骤

安装到要使用 GitOps 功能的集群。

安装 Alauda Build of Argo CD Operator

  1. 登录,进入管理员页面。
  2. 点击 Marketplace > OperatorHub,进入 OperatorHub 页面。
  3. 找到 Alauda Container Platform GitOps Controller Operator(在更名之前发布的软件包显示为 Alauda Build of Argo CD),点击安装,进入 Install Argo CD 页面。

配置参数:

参数建议配置
Channel默认 channel 为 alpha。
Installation ModeCluster:集群中的所有命名空间共享单个 Operator 实例,用于创建和管理,从而降低资源使用量。
Namespace选择 Recommended Namespace:如果不存在,则自动创建。
Upgrade StrategyAuto:有新版本可用时,OperatorHub 将自动将 Operator 升级到最新版本。
  1. 建议使用系统提供的默认配置;只需点击安装即可完成 Alauda Container Platform GitOps Controller Operator(之前称为 Alauda Build of Argo CD)的安装。

创建 Argo CD 实例

  1. 点击 Marketplace > OperatorHub。

  2. 找到 Alauda Container Platform GitOps Controller Operator(在更名之前发布的软件包显示为 Alauda Build of Argo CD),点击它进入 Argo CD 详细信息页面。

  3. 点击 All Instances。

  4. 点击 Create Instance,选择 Argo CD 实例卡片。

  5. 点击 Create Instance。

INFO

在配置实例参数页面,除非有特定要求,否则请使用默认配置。 注意:如果 global 集群不是高可用集群(例如仅有一个 control 节点),请在创建实例时切换到 YAML 视图,并将 ha.enabled 字段值设置为 false。

  1. 点击 Create。

创建 AppProject 实例

INFO

提示:如果不需要使用平台管理的 Cluster Configuration Management 功能,则无需执行以下步骤。

  1. 找到 Alauda Container Platform GitOps Controller operator(在更名之前发布的软件包显示为 Alauda Build of Argo CD),点击它进入 Alauda Argo CD 详细信息页面。

  2. 点击 All Instances、Create Instance,选择 AppProject 实例卡片。

  3. 切换到 YAML 视图,并将界面上现有的 YAML 内容替换为以下代码。

    apiVersion: argoproj.io/v1alpha1
    kind: AppProject
    metadata:
      name: cpaas-system
      namespace: argocd
    spec:
      clusterResourceWhitelist:
      - group: '*'
        kind: '*'
      destinations:
      - namespace: '*'
        server: '*'
      sourceRepos:
      - '*'
  4. 点击 Create。

完成上述操作步骤后,即表示 Argo CD 已成功安装。立即通过 Argo CD 监控面板创建 Argo CD Application,开始您的 GitOps 之旅。