Open hongqn opened 2 years ago
我将会追加以下改动:
registry_endpoint_use_https
, 增加 registry_api_endpoint
, 直接允许定制 registry api 的访问入口. 说到底, image tag 所用的 host, 并不一定是 registry api 的地址, 比方阿里云/腾讯云这种.调用 aws cli 来获取 token 的流程, 看上去不适合开放给团队使用. 应该有某种固定 token 的办法吧? 否则所有用户都得本地配置好 aws cli.
最好的情况应该是类似现有的流程, 大伙本地加个环境变量 token 就够了.
从 mr 看来, aws ecr 和原生 registry 还是有一定区别的, 虽然区别非常小, 但增加的配置项都没啥通用性. 比如这个 registry_token_fetch_cmd
.
我认为应该单独实现 ecr.py, 然后里边直接继承 Registry
. 这样既能复用代码, 也能名正言顺地写死 ecr 的定制代码.
ECR 的主要区别在于:
Basic
而非 Bearer
n
参数过大会报错
Bearer
还是Basic
)增加这些定制功能后,可以通过配置让集群支持 AWS ECR 作为 regisry.