搭建helm私服ChartMuseum

介绍

ChartMuseum是一个用Go(Golang)编写的开源Helm Chart Repository服务器

ChartMuseum是一个用Go(Golang)编写的开源Helm Chart Repository服务器,支持云存储后端,包括Google云存储,Amazon S3,Microsoft Azure Blob存储,阿里云OSS存储,Openstack对象存储和Oracle云基础架构 对象存储。

部署ChartMuseum

1、chart地址:https://github.com/helm/charts/tree/master/stable/chartmuseum

2、编写custom.yaml文件

env:
  open:
    #开启api
    DISABLE_API: false
    ALLOW_OVERWRITE: true
  secret:
    BASIC_AUTH_USER: myuser
    BASIC_AUTH_PASS: mypass
resources:
  limits:
    cpu: 1
    memory: 2Gi
  requests:
    cpu: 80m
    memory: 64Mi
persistence:
  enabled: true
  size: 10Gi
  storageClass: "managed-nfs-storage"

 3、安装

helm   install --name my-chartmuseum -f custom.yaml stable/chartmuseum

 4、安装push插件(https://github.com/chartmuseum/helm-push)

1)在线安装

helm plugin   install https://github.com/chartmuseum/helm-push

 2)离线安装

下载离线包:https://github.com/chartmuseum/helm-push/releases/download/v0.7.1/helm-push_0.7.1_darwin_amd64.tar.gz

新建helm-push目录将离线包解压到这个目录里:

mkdir -p /root/.helm/plugins/helm-push
tar -xf helm-push_0.7.1_darwin_amd64.tar.gz

5、使用

添加仓库

helm repo add chartmuseum http://<NodePort_ip>:<NodePort_port> --username myuser --password mypass

上传chart

helm push mychart/ chartmuseum

 harbor

#安装chartmuseum

curl -L https://github.com/docker/compose/releases/download/1.24.0-rc1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
cd harbor
cp harbor.yml.tmpl harbor.yml
./install.sh --with-chartmuseum
docker-compose down -v
docker-compose up -d

#安装helm push 插件

helm plugin install https://github.com/chartmuseum/helm-push

#添加helm仓库

helm repo add  --username admin --password Harbor12345 harbor http://172.16.11.116/chartrepo/library
helm  repo update

#上传

helm push banggood-chart-1.1.0.tgz  harbor

 

 

 


 

 

posted @ 2019-07-28 12:49  西门运维  阅读(3957)  评论(0编辑  收藏  举报