higress icon indicating copy to clipboard operation
higress copied to clipboard

hgctl install/upgrade 子命令优化

Open 2456868764 opened this issue 1 year ago • 0 comments

Why do you need it?

  1. 通过 higress upgrade 升级时不用再指定 profile参数,可以复用 install 时候指定的参数, 方便用户快速升级higress
  2. 通过helm安装higress后,可以通过higress upgrade 平滑来处理升级安装

How could it be?

  • [x] 在安装阶段完成后,把安装过程配置参数复制一份到 ~/.hgctl/profiles/install.yaml , 升级从 ~/.hgctl/profiles/install.yaml 读取profile配置

  • [x] 如果helm 安装有 values.yaml 参数文件,可以手动传入values.yaml 文件 ,支持 -f 参数

     ```
     hgctl install/upgrade --set profile=k8s -f values.yaml
     ```
    
  • [x] 安装完成后profile 保存位置调整 : 如果在k8s下安装, 保存在 k8s configmap 下, 本地docker安装还是保存在 ~/.hgctl/profiles/目录下, 当升级时候(hgctl upgrade ) 聚合列出本地 ~/.hgctl/profiles 和 k8s configmap 所有profile,如果有多个 profiles 让用户选择升级哪个profiles。

  • [ ] 升级时通过 helm 命令 读取到 helm release 信息,自动转换成 profile, 参数支持 --from-helm

      ```
      hgctl upgrade --from-helm
      ```
    

Other related information

#229

2456868764 avatar Oct 07 '23 01:10 2456868764