Harbor存储的chart包
harbor
Harbor 是一个开源的容器镜像仓库,用于存储和管理 Docker 镜像和其他容器镜像。 * 容器镜像仓库、存储和管理 Docker 镜像和其他容器镜像 * 有什么特点:支持多种镜像格式、易于使用、安全性和访问控制
项目地址:https://gitcode.com/gh_mirrors/ha/harbor
免费下载资源
·
Harbor在v1.6版本开始支持Helm Chart仓库功能,这样就可以利用 harbor 同时管理镜像和 helm charts 了,无需另外部署一套Helm Chart系统。在harbor中,chart仓库由chartmuseum以插件的方式提供,可以自己选择安装或者不安装。
ChartMuseum:提供了API管理非OCI规范的Helm Chart。在安装了ChartMuseum组件后,当用户使用“helm”命令向Harbor推送或拉取Chart时,Harbor的Core组件会首先收到请求,在校验后将请求转发给ChartMuseum进行Chart文件的读写。
1.修改配置文件
在absolute_url参使用ChartMuseum组件时,客户端获取到的Chart的index.yaml中包含的URL是否为绝对路径。在不配置该项时,ChartMuseum组件会返回相对路径,默认为disabled
[root@k8s-master2 harbor]# vi harbor.yml
chart:
# Change the value of absolute_url to enabled can enable absolute url in chart
absolute_url: enabled absolute_url配置由disable更成enabled
停止Harbor服务
[root@k8s-master2 harbor]# docker-compose stop
Stopping nginx ... done
Stopping harbor-jobservice ... done
Stopping harbor-core ... done
Stopping registry ... done
Stopping registryctl ... done
Stopping redis ... done
Stopping harbor-portal ... done
Stopping harbor-db ... done
Stopping harbor-log ... done
执行./prepare将新的配置注入到各个组件中。
[root@k8s-master2 harbor]# ./prepare
prepare base dir is set to /opt/harbor
WARNING:root:WARNING: HTTP protocol is insecure. Harbor will deprecate http protocol in the future. Please make sure to upgrade to https
Clearing the configuration file: /config/portal/nginx.conf
Clearing the configuration file: /config/log/logrotate.conf
Clearing the configuration file: /config/log/rsyslog_docker.conf
Clearing the configuration file: /config/nginx/nginx.conf
Clearing the configuration file: /config/core/env
Clearing the configuration file: /config/core/app.conf
Clearing the configuration file: /config/registry/passwd
Clearing the configuration file: /config/registry/config.yml
Clearing the configuration file: /config/registry/root.crt
Clearing the configuration file: /config/registryctl/env
Clearing the configuration file: /config/registryctl/config.yml
Clearing the configuration file: /config/db/env
Clearing the configuration file: /config/jobservice/env
Clearing the configuration file: /config/jobservice/config.yml
Generated configuration file: /config/portal/nginx.conf
Generated configuration file: /config/log/logrotate.conf
Generated configuration file: /config/log/rsyslog_docker.conf
Generated configuration file: /config/nginx/nginx.conf
Generated configuration file: /config/core/env
Generated configuration file: /config/core/app.conf
Generated configuration file: /config/registry/config.yml
Generated configuration file: /config/registryctl/env
Generated configuration file: /config/registryctl/config.yml
Generated configuration file: /config/db/env
Generated configuration file: /config/jobservice/env
Generated configuration file: /config/jobservice/config.yml
loaded secret from file: /data/secret/keys/secretkey
Generated configuration file: /compose_location/docker-compose.yml
Clean up the input dir
安装chartmuseum
在执行install.sh安装时,通过–with-chartmuseum参数安装chart插件,安装完后会自动启动Harbor
root@k8s-master2 harbor]# ./install.sh --with-trivy --with-chartmuseum
[Step 0]: checking if docker is installed ...
Note: docker version: 20.10.24
[Step 1]: checking docker-compose is installed ...
Note: docker-compose version: 1.22.0
[Step 2]: loading Harbor images ...
Loaded image: goharbor/harbor-portal:v2.3.4
Loaded image: goharbor/nginx-photon:v2.3.4
Loaded image: goharbor/notary-server-photon:v2.3.4
Loaded image: goharbor/trivy-adapter-photon:v2.3.4
Loaded image: goharbor/harbor-core:v2.3.4
Loaded image: goharbor/harbor-db:v2.3.4
Loaded image: goharbor/harbor-jobservice:v2.3.4
Loaded image: goharbor/registry-photon:v2.3.4
Loaded image: goharbor/prepare:v2.3.4
Loaded image: goharbor/harbor-registryctl:v2.3.4
Loaded image: goharbor/harbor-exporter:v2.3.4
Loaded image: goharbor/notary-signer-photon:v2.3.4
Loaded image: goharbor/harbor-log:v2.3.4
Loaded image: goharbor/redis-photon:v2.3.4
Loaded image: goharbor/chartmuseum-photon:v2.3.4
[Step 3]: preparing environment ...
[Step 4]: preparing harbor configs ...
prepare base dir is set to /opt/harbor
Clearing the configuration file: /config/portal/nginx.conf
Clearing the configuration file: /config/log/logrotate.conf
Clearing the configuration file: /config/log/rsyslog_docker.conf
Clearing the configuration file: /config/nginx/nginx.conf
Clearing the configuration file: /config/core/env
Clearing the configuration file: /config/core/app.conf
Clearing the configuration file: /config/registry/passwd
Clearing the configuration file: /config/registry/config.yml
Clearing the configuration file: /config/registryctl/env
Clearing the configuration file: /config/registryctl/config.yml
Clearing the configuration file: /config/db/env
Clearing the configuration file: /config/jobservice/env
Clearing the configuration file: /config/jobservice/config.yml
Error happened in config validation...
ERROR:root:Error: the protocol must be https when Harbor is deployed with Notary
#查看启动的服务
[root@k8s-master2 harbor]# docker-compose ps
Name Command State Ports
---------------------------------------------------------------------------------------------------------------------
chartmuseum ./docker-entrypoint.sh Up (health: starting)
harbor-core /harbor/entrypoint.sh Up (health: starting)
harbor-db /docker-entrypoint.sh 96 13 Up (health: starting)
harbor-jobservice /harbor/entrypoint.sh Up (health: starting)
harbor-log /bin/sh -c /usr/local/bin/ ... Up (health: starting) 127.0.0.1:1514->10514/tcp
harbor-portal nginx -g daemon off; Up (health: starting)
nginx nginx -g daemon off; Up (health: starting) 0.0.0.0:5000->8080/tcp,:::5000->8080/tcp
redis redis-server /etc/redis.conf Up (health: starting)
registry /home/harbor/entrypoint.sh Up (health: starting)
registryctl /home/harbor/start.sh Up (health: starting)
trivy-adapter /home/scanner/entrypoint.sh Up (health: starting)
验证是否安装了chartmuseum组件
登录Harbor UI管理界面:【项目】>【library】> 【Helm Charts】
GitHub 加速计划 / ha / harbor
10
3
下载
Harbor 是一个开源的容器镜像仓库,用于存储和管理 Docker 镜像和其他容器镜像。 * 容器镜像仓库、存储和管理 Docker 镜像和其他容器镜像 * 有什么特点:支持多种镜像格式、易于使用、安全性和访问控制
最近提交(Master分支:4 个月前 )
a6688903
* fix overlay in replication execution details page
Signed-off-by: bupd <bupdprasanth@gmail.com>
* fix time overflow in turkish and some languages
* minor fix in displaying time
Signed-off-by: bupd <bupdprasanth@gmail.com>
---------
Signed-off-by: bupd <bupdprasanth@gmail.com> 6 小时前
9231fd2b
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.30.0 to 0.33.0.
- [Commits](https://github.com/golang/net/compare/v0.30.0...v0.33.0)
---
updated-dependencies:
- dependency-name: golang.org/x/net
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: miner <yminer@vmware.com> 7 小时前
更多推荐
已为社区贡献1条内容
所有评论(0)