Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update document on how to use private component repository #62

Merged
merged 1 commit into from
Sep 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions docs/quick-start/core_quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,65 @@ my-minio-0 1/1 Running 0 42h
my-minio-1 1/1 Running 0 42h
my-minio-2 1/1 Running 0 42h
```

## 部署一个私有仓库

1. 在官方仓库中部署chartmuseum

```shell
kubectl apply -f https://raw.githubusercontent.com/kubebb/components/main/examples/chartmuseum/componentplan.yaml
```

2. 添加仓库

```yaml
# repository_chartmuseum.yaml
apiVersion: core.kubebb.k8s.com.cn/v1alpha1
kind: Repository
metadata:
name: chartmuseum
namespace: kubebb-system
spec:
url: http://chartmuseum.kubebb-system.svc.cluster.local:8080
pullStategy:
intervalSeconds: 120
retry: 5
```

创建仓库

```shell
kubectl apply -f repository_chartmuseum.yaml
```

执行结果

```shell
kubectl get repository -nkubebb-system
NAME AGE
chartmuseum 4m41s
kubebb 15h
```

端口暴露

```shell
kubectl port-forward service/chartmuseum 8080:8080 -nkubebb-system
```

上传自定义chart

```shell
helm create mychart
cd mychart
helm package .
curl --data-binary "@mychart-0.1.0.tgz" http://localhost:8080/api/charts
```

从私有仓库中查看

```
kubectl get component -l kubebb.component.repository=chartmuseum -nkubebb-system
NAME AGE
chartmuseum.mychart 4m27s
```