v2.1 至 2.2¶
Helm 升级版本¶
请注意,捆绑的 Helm 已从 3.6.0 升级到 3.7+,其中包括以下重大变更:
- 下载图表时不再传递版本库凭据。
从与版本库不同的域下载图表时不再传递版本库凭据。
你仍然可以在
argocd app create
中使用--helm-pass-credentials
选项来强制旧的行为。更多信息请参阅 Helm v3.6.1 发布说明。 - 重写了实验性 OCI 支持。 更多信息请参见 Helm v3.7.0 发布说明。
2.2.12 中移除了对使用 SHA-1 签名散列算法的私有 repo SSH 密钥的支持¶
Argo CD 2.2.12 将其基本镜像从 Ubuntu 21.10 升级到了 Ubuntu 22.04,将 OpenSSH 升级到了 8.9。从 8.8 开始的 OpenSSH 放弃了对 ssh-rsa
SHA-1 密钥签名算法的支持。
签名算法与生成密钥时被引用的算法是_不_相同的。 没有必要更新密钥。
在建立连接时,会与 SSH 服务器协商签名算法。 客户端会提供其可接受的签名算法列表,如果服务器有匹配的算法,连接就会继续。 对于最新的 git Provider 上的大多数 SSH 服务器来说,除了 "ssh-rsa "之外,应该还有其他可接受的算法。
在升级到 Argo CD 2.2.12 之前,请检查使用 SSH 验证的 git Provider 是否支持比 rsa-ssh
更新的算法。
1.确保你的 SSH 版本大于等于 8.9(Argo CD 被引用的版本)。如果不是,请升级后再继续。
shell
ssh -V
```示例输出:OpenSSH_8.9p1 Ubuntu-3, OpenSSL 3.0.2 2022年3月15日```示例输出
2.一旦有了最新版本的 OpenSSH,请按照 [OpenSSH 8.8 发布说明](https://www.openssh.com/txt/release-8.7) 中的指示操作:
> 要检查服务器是否正在使用弱 ssh-rsa 公钥
> 要检查服务器是否使用弱 ssh-rsa 公钥算法进行主机身份验证,请在
> 从 ssh(1) 的允许列表中删除 ssh-rsa 算法:
>
>
shell
> ssh -oHostKeyAlgorithms=-ssh-rsa user@host
> >
> 如果主机密钥验证失败,且没有其他支持的主机密钥
> 如果主机密钥验证失败,且没有其他支持的主机密钥类型,则应升级该主机上的服务器软件。
> 升级。
如果服务器不支持可接受的版本,则会出现类似下面的错误;````
$ ssh -oHostKeyAlgorithms=-ssh-rsa vs-ssh.visualstudio.com
无法与 20.42.134.1 端口 22 协商:未找到匹配的主机密钥类型。他们提供:ssh-rsa
这表明服务器需要更新其支持的密钥签名算法,Argo CD 将无法连接该服务器。
与之连接。
解决方法¶
如果无法更改服务器的密钥签名算法配置,OpenSSH 8.8 发布说明 描述了一种解决方法。
> Incompatibility is more likely when connecting to older SSH
> implementations that have not been upgraded or have not closely tracked
> improvements in the SSH protocol. For these cases, it may be necessary
> to selectively re-enable RSA/SHA1 to allow connection and/or user
> authentication via the HostkeyAlgorithms and PubkeyAcceptedAlgorithms
> options. For example, the following stanza in ~/.ssh/config will enable
> RSA/SHA1 for host and user authentication for a single destination host:
>
> > Host old-host
> HostkeyAlgorithms +ssh-rsa
> PubkeyAcceptedAlgorithms +ssh-rsa
>
>
> We recommend enabling RSA/SHA1 only as a stopgap measure until legacy
> implementations can be upgraded or reconfigured with another key type
> (such as ECDSA or Ed25519).
要将此应用于 Argo CD,可以创建一个包含所需 ssh 配置文件的 ConfigMap,然后将其挂载到 /home/argocd/.ssh/config
。