From 63da7e43fcdc714310626a35b64a0f5caf692d46 Mon Sep 17 00:00:00 2001 From: wangkaili Date: Tue, 2 Nov 2021 16:11:38 +0800 Subject: [PATCH] Add Chinese document description --- docs/zh/captain.md | 37 +++++++++++++++++++++++++++++++++++++ docs/zh/install.md | 27 +++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 docs/zh/captain.md create mode 100644 docs/zh/install.md diff --git a/docs/zh/captain.md b/docs/zh/captain.md new file mode 100644 index 0000000..ecb0f3f --- /dev/null +++ b/docs/zh/captain.md @@ -0,0 +1,37 @@ +# captain工作原理 + +Captain是kubernetes的常规控制器,它监听特定的资源(这里指的是HelmRequest),处理它们,并同步它们的状态。除此之外,还有一些与helm相关的自定义组件需要稍加说明 + + + +## Helm Repo + +由于Helm3代码在持续开发中,它还没有完全准备好充当依赖。因此,一些helm功能仍然需要旧的方式。Helm2使用本地文件存储仓库和索引信息。在captian中,情况依然如此。但它可以从`ChartRepo` CRD读取第三方仓库,用户可以使用`kubectl`直接读写,以下是captain启动时自动安装的默认ChartRepo: + + +```yaml +apiVersion: app.alauda.io/v1alpha1 +kind: ChartRepo +metadata: + creationTimestamp: "2019-08-09T08:04:16Z" + generation: 2 + name: stable + namespace: captain + resourceVersion: "7253523" + selfLink: /apis/app.alauda.io/v1alpha1/namespaces/captain/chartrepos/stable + uid: 48515f13-ba7c-11e9-98c3-5254004f2ad2 +spec: + url: https://kubernetes-charts.storage.googleapis.com +status: + phase: Synced +``` +有关ChartRepo的详细信息,请查看 [ChartRepo CRD](./chartrepo.md) + +## Clusters + +Captain基于kubernetes [cluster-registry](https://github.com/kubernetes/cluster-registry) 项目构建了对多集群的支持,这意味着您不仅可以将Helm charts安装到本地集群,还可以将这些charts安装到指定的任何其他集群。除此之外,还有一个可选项,允许您将一个charts安装到所有集群。这在生产环境中非常方便,因为生产环境总是有许多集群,并且需要为所有集群安装一些基本组件。 + + + + + diff --git a/docs/zh/install.md b/docs/zh/install.md new file mode 100644 index 0000000..2346e90 --- /dev/null +++ b/docs/zh/install.md @@ -0,0 +1,27 @@ +# 安装指南 + + +## 安装 + +```bash +kubectl create ns captain-system +kubectl create clusterrolebinding captain --serviceaccount=captain-system:default --clusterrole=cluster-admin +kubectl apply -n captain-system -f https://raw.githubusercontent.com/alauda/captain/master/artifacts/all/deploy.yaml +``` + +### 使用主分支构建镜像 +captain使用github的持续集成服务action为主分支自动生成镜像。如果您想使用最新的镜像,请更新yaml文件,并替换captain镜像为 + +```bash +alaudapublic/captain:latest +``` + + + + +## 卸载 +```bash +kubectl delete -n captain-system -f https://raw.githubusercontent.com/alauda/captain/master/artifacts/all/deploy.yaml +kubectl delete clusterrolebinding captain +kubectl delete ns captain-system +```