Skip to content

Commit

Permalink
Update docs (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
hangyan authored Feb 9, 2020
1 parent d52c7b4 commit be889a4
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 5 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ released yet (alpha stage for now), some modifications were made to help impleme
## Features
* HelmRequest and Release CRD, namespace based
* ChartRepo CRD
* Multi cluster support based on [https://github.com/kubernetes/cluster-registry](https://github.com/kubernetes/cluster-registry)
* Multi cluster support based on [cluster-registry](https://github.com/kubernetes/cluster-registry)
* Dependency check for HelmRequest (between HelmRequests)
* `valuesFrom` support: support to ConfigMap or Secret value store
* `kubectl apply` like resource manipulation: no more resource conflict and CRD management issues
Expand Down Expand Up @@ -52,10 +52,12 @@ For the detailed explain and advanced usage, please check the documentation belo
## Documention

* [How captain works](./docs/captain.md)
* [HelmRequest CRD](./docs/helmrequest.md)
* [Release CRD](./docs/release.md)
* [ChartRepo CRD](./docs/chartrepo.md)
* [Chart CRD](./docs/chart.md)
* CRDs explain
* [HelmRequest CRD](./docs/helmrequest.md)
* [Release CRD](./docs/release.md)
* [ChartRepo CRD](./docs/chartrepo.md)
* [Chart CRD](./docs/chart.md)
* [Multi-Cluster Support](./docs/multi-cluster.md)


## SDK
Expand Down
43 changes: 43 additions & 0 deletions docs/multi-cluster.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Multi Cluster

Multi is an optional but import feature for captain.It's based on the [cluster-registry](https://github.com/kubernetes/cluster-registry), which introduce a CRD called `Cluster`. So If you have `Cluster` in you current kubernetes env(where captain deployed to), captain will watch the clusters and sync HelmRequest for them.

## How Captain Discover Clusters
`Captain` have a command line args called `--cluster-namespace`, which specified the namespace captain will look up into to find `Cluster` resources.

## Deploy a HelmRequest to a Remote Cluster
If `.spec.clusterName` is not empty, and it's a valid cluster name, captain will deploy this HelmRequest to the target cluster. For example:

```yaml
apiVersion: app.alauda.io/v1alpha1
kind: HelmRequest
metadata:
name: nginx-ingress
namespace: default
spec:
chart: stable/nginx-ingress
namespace: default
clusterName: "cluster1"
values:
env: prod
```
In the above example, `Captain` will deploy this HelmRequest to `cluster1`. In this scenario, the generated `Release` and resources will exist in `cluster`, but `HelmRequest` exist in current cluster.


## Deploy a HelmRequest to All Clusters
If `.spec.installToAllClusters` is `true`, Captain will deploy the HelmRequest to all the clusters it knows.

```yaml
apiVersion: app.alauda.io/v1alpha1
kind: HelmRequest
metadata:
name: nginx-ingress
namespace: default
spec:
chart: stable/nginx-ingress
namespace: default
installToAllClusters: true
values:
env: prod
```

0 comments on commit be889a4

Please sign in to comment.