首页 > 其他 > 详细

Helm Harbor

时间:2020-07-20 14:23:12      阅读:92      评论:0      收藏:0      [点我收藏+]

 

chartmuseum支持多租户的实现,它通过一个index-cache.yaml索引文件来维护租户上传记录,类似docker镜像中的manifest文件概念。

--depth=0:
    Path: "/index.yaml"
    Repo: ""
--depth=1:
    Path: "/myrepo/index.yaml"
    Repo: "myrepo"
--depth=2:
    Path: "/myorg/myrepo/index.yaml"
    Repo: "myorg/myrepo"
--depth=3:
    Path: "/myorg/myteam/myrepo/index.yaml"
    Repo: "myorg/myteam/myrepo"

对于harbor来说,在harbor中项目名称是全局唯一,因此harbor集成helm的时候depth设置为1即可。index.yaml记录了当前repo中上传的chart清单, chartmuseum在请求index相关接口时会维护清单内容是否与系统中真实文件列表的一致性,下面这个index-cache.yaml文件表示当前repo下有两个 charts分别为etcd、postgresql。

apiVersion: v1
entries:
  etcd:
  - appVersion: 3.3.11
    created: "2019-03-13T09:58:43.260050243Z"
    description: etcd is a distributed key value store that provides a reliable way
      to store data across a cluster of machines
    digest: b98c70e5a384a3b5619c978fe3f6d9d386fcb09dea3b831a9802d7323ccff2b2
    engine: gotpl
    home: https://coreos.com/etcd/
    icon: https://bitnami.com/assets/stacks/etcd/img/etcd-stack-110x117.png
    keywords:
    - etcd
    - cluster
    - database
    - cache
    - key-value
    maintainers:
    - email: containers@bitnami.com
      name: Bitnami
    name: etcd
    sources:
    - https://github.com/bitnami/bitnami-docker-etcd
    urls:
    - charts/etcd-1.4.3.tgz
    version: 1.4.3
  postgresql:
  - appVersion: 9.6.2
    created: "2019-03-13T09:50:52.162006382Z"
    description: Object-relational database management system (ORDBMS) with an emphasis
      on extensibility and on standards-compliance.
    digest: bf9f5b811037706b1a928a94f6d1fa40cf73b2e3149660810dee929554bde3de
    engine: gotpl
    home: https://www.postgresql.org/
    icon: https://www.postgresql.org/media/img/about/press/elephant.png
    keywords:
    - postgresql
    - postgres
    - database
    - sql
    name: postgresql
    sources:
    - https://github.com/kubernetes/charts
    - https://github.com/docker-library/postgres
    urls:
    - charts/postgresql-0.19.0.tgz
    version: 0.19.0
generated: "2019-03-13T09:58:43Z"

chartmuseum对外提供的http api也就10个,支持BasicAuth、BeareAuth等鉴权认证方式以及https安全协议。

  • GET /,欢迎页
  • GET /health , 健康检查
  • GET /:repo/index.yaml,获取index.yaml文件
  • GET /:repo/charts/:filename,获取指定的chart包,比如/kingfsen1026/charts/etcd-1.4.3.tgz
  • GET /api/:repo/charts 获取repo下所有的charts包基本描述信息
  • GET /api/:repo/charts/:name,获取repo下指定名字的chart包基本描述信息
  • GET /api/:repo/charts/:name/:version,获取repo下指定名字和版本的chart包基本描述信息
  • POST /api/:repo/charts,上传charts包
  • POST /api/:repo/prov,上传chart包对应的prov文件
  • DELETE /api/:repo/charts/:name/:version,删除repo下指定名字和版本的chart包

chartmuseum中有两个重要的参数就是AllowOverwrite、AllowForceOverwrite,会出现多次更新charts包的时候,务必将这两个参数设置为true。

 

https://youendless.com/post/helm_harbor/

Helm Harbor

原文:https://www.cnblogs.com/good2study/p/13344504.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!