Monocular 集成harbor helm 仓库

时间:2022-08-12 23:48:38

harbor 已经支持了helm 仓库(使用chartmuseum),Monocular 是一个不错的helm 仓库可视化工具
测试Monocular集成harbor 私服功能

使用docker-compose 进行安装

环境准备

  • Monocular docker-compose
version: '2'
services:
ui:
tty: true # Enables debugging capabilities when attached to this container.
image: dalongrong/monocular-ui-nginx
ports:
- 80:80
api:
tty: true
image: bitnami/monocular-api:latest
ports:
- "8081:8081"
volumes:
# Config example file
- ./docs/config.example.yaml:/root/monocular/config/monocular.yaml
# Used for loading kubernetes context used on Helm releases integration
# - $HOME/.kube/:/root/.kube
- ./repo:/root/monocular/repo-data
environment:
- ENVIRONMENT=development
mongodb:
image: bitnami/mongodb:3
ports:
- "27017:27017"
redis:
image: redis
ports:
- "6379:6379" api 配置文件:
# This is an example of config file.
# Copy it to `$HOME/monocular/config/monocular.yaml` in order to make the backend pick up the overrides.
repos:
# Official repositories
- name: stable
url: https://aliacs-app-catalog.oss-cn-hangzhou.aliyuncs.com/charts/
source: https://aliacs-app-catalog.oss-cn-hangzhou.aliyuncs.com/charts/
- name: incubator
url: https://aliacs-app-catalog.oss-cn-hangzhou.aliyuncs.com/charts-incubator/
source: https://aliacs-app-catalog.oss-cn-hangzhou.aliyuncs.com/charts-incubator/
- name:jira
url: http://harborhost/chartrepo/jira/
source: http://harborhost/chartrepo/jira/
# Add your own repository
#- name: my-repo-name
# url: my-repository-url
# source: my-repository-source # cors:
# allowed_origins:
# - my-ui-hostname
# allowed_headers:
# - "content-type"
# - "x-xsrf-token" # Enables Helm deployment integration
# https://github.com/helm/monocular/tree/master/deployment/monocular#other-configuration-options
releasesEnabled: true
# Enables port forwarding for tiller Connections
# Useful if you are running the app outside of the k8s cluster during development
tillerPortForward: true useTLS: true
# Specify a different namespace where to locate tiller-deploy
tillerNamespace: kube-system
# Specify a custom host for Tiller
# Configure cache refresh interval in sec
cacheRefreshInterval: 3600
# Configure Redis server
redis:
host: redis:6379
mongodb:
url: mongodb:27017
database: monocular
  • harbor 配置
参考 https://www.cnblogs.com/rongfengliang/p/9649337.html

创建helm 简单demo

  • create
helm create nginx
添加readme文件
README.md
  • 添加readme.md (方便使用者查看,使用mardown 格式即可)

  • 添加harbor helm 私服

备注:需要首先进行项目创建(jira,当前设计的模式为public)
helm repo add --username=admin --password=password jira http://10.16.201.45/chartrepo/jira
  • push helm 到私服
helm push --username=admin --password=password nginx jira

查看效果

Monocular 集成harbor helm 仓库
Monocular 集成harbor helm 仓库
Monocular 集成harbor helm 仓库

搜索

nginx
Monocular 集成harbor helm 仓库
Monocular 集成harbor helm 仓库

说明

集成起来还是比较方便的,实际上harbor 也可以显示helm 包信息,但是和Monocular 集成起来,会更方便

参考资料

https://github.com/goharbor/harbor/releases
https://www.cnblogs.com/rongfengliang/p/9649337.html
https://github.com/helm/chartmuseum
https://github.com/helm/monocular
https://github.com/helm/helm
https://github.com/rongfengliang/helm-nginx-demo