搭建私有chart仓库

发表于 LINUX 分类,标签:


mkdir -p /data/chartmuseum
cd /data/chartmuseum
mkdir data
chown 1000.1000 data
cat docker-compose.yml
version: "3"
services:
  chartmuseum:
    image: chartmuseum/chartmuseum:latest
    container_name: chartmuseum
    hostname: chartmuseum
    restart: always
    environment:
      DEBUG: "true"
      STORAGE: "local"
      STORAGE_LOCAL_ROOTDIR: "/charts"
      BASIC_AUTH_USER: "admin"
      BASIC_AUTH_PASS: "x123456"
    volumes:
      - "/data/chenhao/chartmuseum/data:/charts"
      - "/etc/hosts:/etc/hosts"
    ports:
      - "8081:8080"



nginx代理

server{
    listen 443 ssl;
    server_name  charts.linuxnb.com;
    ssl_certificate /etc/nginx/sslkey/xxx.pem;
    ssl_certificate_key /etc/nginx/sslkey/xxx.key;
    ssl_session_timeout 5m; 
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers AESGCM:ALL:!DH:!EXPORT:!RC4:+HIGH:!MEDIUM:!LOW:!aNULL:!eNULL;
    ssl_prefer_server_ciphers on; 
    location / { 
        proxy_pass       http://127.0.0.1:8081;                                                                                                                                                                                                              
        proxy_set_header Host      $host;
        proxy_set_header X-Real-IP $remote_addr;
    }   
}


启动nginx,启动chartmuseum,docker-compose up -d,安装完毕


客户端安装,安装对应平台helm,下载解压移动到PATH路径下即可,mv helm /usr/local/bin/ 

下载页面

https://github.com/helm/helm/releases


安装push插件

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


添加仓库

helm repo add chartmuseum https://charts.linuxnb.com --username admin --password x123456


helm create myapp
helm push myapp/  chartmuseum


0 篇评论

发表我的评论