Monocular 集成harbor helm 倉庫


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

查看效果



搜索

nginx

說明

集成起來還是比較方便的,實際上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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM