Skip to content

Commit 32ee7af

Browse files
authored
[doc] add artifacthub-repo.yml and update README.md (#177)
* [doc] add artifacthub-repo.yml and update README.md Signed-off-by: yandongxiao <[email protected]>
1 parent 2b05d31 commit 32ee7af

File tree

7 files changed

+133
-65
lines changed

7 files changed

+133
-65
lines changed

README.md

+87-40
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,114 @@
11
# StarRocks-Kubernetes-Operator
2+
23
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
34

45
## Overview
5-
**(under development)**
6-
This operator is developed with [kubebuilder](https://github.com/kubernetes-sigs/kubebuilder), which can deploy StarRocks CRD resources in kubernetes.
76

8-
This Kubernetes Operator is able to deploy StarRocks' Front End (FE), Back End (BE) and Compute Node (CN) components into your kubernetes environment. These components run in FQDN (fully qualified domain name) mode by default.
7+
Using [kubebuilder](https://github.com/kubernetes-sigs/kubebuilder), a framework that enables the deployment of
8+
StarRocks Custom Resource Definition (CRD) resources within a Kubernetes environment.
9+
10+
The Kubernetes Operator provided by StarRocks facilitates the deployment of StarRocks' Front End (FE), Back End (BE),
11+
and Compute Node (CN) components within your Kubernetes environment. By default, these components operate in FQDN (fully
12+
qualified domain name) mode.
913

1014
## Requirements
11-
* kubernetes 1.18+
12-
* golang 1.18+
15+
16+
* kubernetes 1.18+
17+
* golang 1.18+
1318

1419
## Supported Features
20+
1521
* FE decouples with CN and BE. FE is a must-have component, BE and CN can be optionally deployed.
1622
* Support v2 horizontalpodautoscalers for CN cluster.
1723

1824
## (Optional) Build the operator images by yourself
25+
1926
Get the official operator image from [here](https://hub.docker.com/r/starrocks/centos-operator/tags).
2027

2128
### Build starrocks operator docker image
29+
2230
Follow below instructions if you want to build your own image.
2331

24-
```
32+
```console
2533
DOCKER_BUILDKIT=1 docker build -t starrocks-kubernetes-operator/operator:<tag> .
2634
```
35+
2736
E.g.
28-
```bash
37+
38+
```console
2939
DOCKER_BUILDKIT=1 docker build -t starrocks-kubernetes-operator/operator:latest .
3040
```
3141

3242
### Publish starrocks operator docker image
33-
```
43+
44+
```console
3445
docker push ghcr.io/OWNER/starrocks-kubernetes-operator/operator:latest
3546
```
36-
E.g.
37-
Publish image to ghcr
38-
```shell
47+
48+
E.g.
49+
Publish image to ghcr
50+
51+
```console
3952
docker push ghcr.io/dengliu/starrocks-kubernetes-operator/operator:latest
4053
```
4154

4255
## Install Operator in kubernetes
56+
4357
Apply the custom resource definition (CRD) for the Operator:
44-
```shell
58+
59+
```console
4560
kubectl apply -f https://raw.githubusercontent.com/StarRocks/starrocks-kubernetes-operator/main/deploy/starrocks.com_starrocksclusters.yaml
4661
```
47-
Apply the Operator manifest. By default, the Operator is configured to install in the starrocks namespace.
48-
To use the Operator in a custom namespace, download the [Operator manifest](https://raw.githubusercontent.com/StarRocks/starrocks-kubernetes-operator/main/deploy/operator.yaml) and edit all instances of namespace: starrocks to specify your custom namespace.
49-
Then apply this version of the manifest to the cluster with kubectl apply -f {local-file-path} instead of using the command below.
50-
```shell
62+
63+
Apply the Operator manifest. By default, the Operator is configured to install in the starrocks namespace.
64+
To use the Operator in a custom namespace, download
65+
the [Operator manifest](https://raw.githubusercontent.com/StarRocks/starrocks-kubernetes-operator/main/deploy/operator.yaml)
66+
and edit all instances of namespace: starrocks to specify your custom namespace.
67+
Then apply this version of the manifest to the cluster with kubectl apply -f {local-file-path} instead of using the
68+
command below.
69+
70+
```console
5171
kubectl apply -f https://raw.githubusercontent.com/StarRocks/starrocks-kubernetes-operator/main/deploy/operator.yaml
5272
```
5373

5474
## Deploy StarRocks
75+
5576
You need to prepare a separate yaml file to deploy the StarRocks FE, BE and CN components.
5677
The starrocks cluster CRD fields explains in [api.md](./doc/api.md).
5778
The [examples](./examples/starrocks) directory contains some simple example for reference.
5879

59-
You can use any of the template yaml file as a starting point. You can further add more configurations into the template yaml file following this deployment documentation.
80+
You can use any of the template yaml file as a starting point. You can further add more configurations into the template
81+
yaml file following this deployment documentation.
6082

6183
### Configure the StarRocks' components images
84+
6285
Official FE/CN/BE components images can be found from [dockerhub](https://hub.docker.com/u/starrocks):
6386

6487
You can specify the image name in the yaml file.
6588
For example, the below configuration uses the `starrocks/fe-ubuntu:2.5.4` image for FE.
89+
6690
```yaml
6791
starRocksFeSpec:
6892
image: starrocks/fe-ubuntu:2.5.4
6993
```
7094
7195
### (Optional) Using ConfigMap to configure your StarRocks cluster
7296
73-
The official images contains default application configuration file, however, they can be overritten by configuring kubernetes configmap deployment crd.
97+
The official images contains default application configuration file, however, they can be overritten by configuring
98+
kubernetes configmap deployment crd.
7499
75100
You can generate the configmap from an StarRocks configuration file.
76-
Below is an example of creating a Kubernetes configmap `fe-config-map` from the `fe.conf` configuration file. You can do the same with BE and CN.
77-
```shell
101+
Below is an example of creating a Kubernetes configmap `fe-config-map` from the `fe.conf` configuration file. You can do
102+
the same with BE and CN.
103+
104+
```console
78105
# create fe-config-map from starrocks/fe/conf/fe.conf file
79106
kubectl create configmap fe-config-map --from-file=starrocks/fe/conf/fe.conf
80107
```
108+
81109
Once the configmap is created, you can reference the configmap in the yaml file.
82110
For example:
111+
83112
```yaml
84113
# fe use configmap example
85114
starRocksFeSpec:
@@ -91,64 +120,82 @@ starRocksCnSpec:
91120
configMapInfo:
92121
configMapName: cn-config-map
93122
resolveKey: cn.conf
94-
# be use configmap example
123+
# be use configmap example
95124
starRocksBeSpec:
96125
configMapInfo:
97126
configMapName: be-config-map
98127
resolveKey: be.conf
99128
```
129+
100130
### (Optional) Configuring storage volume
101-
External storage can be used to store FE meta and BE data for persistence. `storageVolumes` can be specified in corresponding component spec to enable external storage volumes auto provisioning. Note that the specific `storageClassName` should be available in kubernetes cluster before enabling this storageVolume feature.
102131

103-
If `StorageVolume` info is not specified in CRD spec, the operator will use emptydir mode to store FE meta and BE data.
132+
External storage can be used to store FE meta and BE data for persistence. `storageVolumes` can be specified in
133+
corresponding component spec to enable external storage volumes auto provisioning. Note that the
134+
specific `storageClassName` should be available in kubernetes cluster before enabling this storageVolume feature.
135+
136+
If `StorageVolume` info is not specified in CRD spec, the operator will use emptydir mode to store FE meta and BE data.
104137

105138
**FE storage example**
139+
106140
```yaml
107141
starRocksFeSpec:
108142
storageVolumes:
109-
- name: fe-meta
110-
storageClassName: meta-storage
111-
storageSize: 10Gi
112-
mountPath: /opt/starrocks/fe/meta # overwrite the default meta path
143+
- name: fe-meta
144+
storageClassName: meta-storage
145+
storageSize: 10Gi
146+
mountPath: /opt/starrocks/fe/meta # overwrite the default meta path
113147
```
148+
114149
**BE storage example**
150+
115151
```yaml
116152
starRocksBeSpec:
117153
storageVolumes:
118-
- name: be-data
119-
storageClassName: data-storage
120-
storageSize: 1Ti
121-
mountPath: /opt/starrocks/be/storage # overwrite the default data path
154+
- name: be-data
155+
storageClassName: data-storage
156+
storageSize: 1Ti
157+
mountPath: /opt/starrocks/be/storage # overwrite the default data path
122158
```
123159

124160
### Deploy the StarRocks cluster
125-
For demonstration purpose, we use the [starrocks-fe-and-be.yaml](./examples/starrocks/starrocks-fe-and-be.yaml) example template to start a 3 FE and 3 BE StarRocks cluster.
126161

127-
```bash
162+
For demonstration purpose, we use the [starrocks-fe-and-be.yaml](./examples/starrocks/starrocks-fe-and-be.yaml) example
163+
template to start a 3 FE and 3 BE StarRocks cluster.
164+
165+
```console
128166
kubectl apply -f starrocks-fe-and-be.yaml
129167
```
130168

131169
### Connect to the deployed StarRocks Cluster
132170

133-
After deploying the StarRocks cluster, you can use `kubectl get svc -n <namespace>` to find the IP to connect to. For example if the namespace that starrocks is deployed into is `starrocks`, you can:
134-
```bash
171+
After deploying the StarRocks cluster, you can use `kubectl get svc -n <namespace>` to find the IP to connect to. For
172+
example if the namespace that starrocks is deployed into is `starrocks`, you can:
173+
174+
```console
135175
kubectl get svc -n starrocks
136176
```
177+
137178
`<your-StarRocksCluster-name>-fe-service`'s clusterIP is the IP to use to connect to StarRocks FE.
138179
139180
## Stop the StarRocks cluster
140181
141182
Delete the custom resource:
142-
```shell
183+
184+
```console
143185
kubectl delete -f starrocks-fe-and-be.yaml
144186
```
145187
146188
Remove the Operator:
147-
```shell
189+
190+
```console
148191
kubectl delete -f https://raw.githubusercontent.com/StarRocks/starrocks-kubernetes-operator/main/deploy/operator.yaml
149192
```
150193
151-
## Others
194+
## Others
195+
152196
### helm
153-
StarRocks have supported helm use.
154-
[helm chart](https://artifacthub.io/packages/helm/kube-starrocks/kube-starrocks). [github repo](https://github.com/StarRocks/helm-charts)
197+
198+
StarRocks has embraced Helm for its deployment needs. You can find the Helm chart for StarRocks
199+
at [artifacthub](https://artifacthub.io/packages/helm/kube-starrocks/kube-starrocks).
200+
Additionally, this GitHub repository also containing the Helm chart can be accessed
201+
at [kube-starrocks](https://github.com/StarRocks/starrocks-kubernetes-operator/tree/main/helm-charts/charts/kube-starrocks).

artifacthub-repo.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Artifact Hub repository metadata file
2+
#
3+
# Some settings like the verified publisher flag or the ignored packages won't
4+
# be applied until the next time the repository is processed. Please keep in
5+
# mind that the repository won't be processed if it has not changed since the
6+
# last time it was processed. Depending on the repository kind, this is checked
7+
# in a different way. For Helm http based repositories, we consider it has
8+
# changed if the `index.yaml` file changes. For git based repositories, it does
9+
# when the hash of the last commit in the branch you set up changes. This does
10+
# NOT apply to ownership claim operations, which are processed immediately.
11+
#
12+
repositoryID: 5483bdbd-05c3-49f6-88c8-b32492b7e6f1

deploy/operator.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ spec:
240240
- /sroperator
241241
args:
242242
- --leader-elect
243-
image: starrocks/operator:latest
243+
image: starrocks/operator:v1.7.0
244244
name: sroperator
245245
securityContext:
246246
allowPrivilegeEscalation: false

helm-charts/README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# StarRocks Kubernetes Helm Charts
2-
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Release Charts](https://img.shields.io/badge/Release-helmcharts-green.svg)](https://github.com/StarRocks/helm-charts/releases)
32

4-
This functionality is in beta and is subject to change. The code is provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features.
3+
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Release Charts](https://img.shields.io/badge/Release-helmcharts-green.svg)](https://github.com/StarRocks/starrocks-kubernetes-operator/releases)
54

65
## Usage
76

@@ -11,20 +10,21 @@ Please refer to Helm's [documentation](https://helm.sh/docs/) to get started.
1110
Once Helm is set up properly, add the repo as follows:
1211

1312
```console
14-
helm repo add starrocks-community https://starrocks.github.io/helm-charts
13+
helm repo add starrocks-community https://starrocks.github.io/starrocks-kubernetes-operator
1514
```
1615

1716
You can then run `helm search repo kube-starrocks` to see the charts.
1817

1918
## Contributing
2019

21-
The source code of all [StarRocks](https://www.starrocks.io/) community [Helm](https://helm.sh) charts can be found on Github: <https://github.com/StarRocks/helm-charts/>
20+
You can find the source code for all the community Helm charts of StarRocks at the following Github
21+
repository: https://github.com/StarRocks/starrocks-kubernetes-operator/. StarRocks itself can be explored
22+
at https://www.starrocks.io/.
2223

2324
## License
2425

25-
<!-- Keep full URL links to repo files because this README syncs from main to gh-pages. -->
26-
[Apache 2.0 License](https://github.com/StarRocks/helm-charts/blob/main/LICENSE).
26+
[Apache 2.0 License](https://github.com/StarRocks/starrocks-kubernetes-operator/blob/main/LICENSE).
2727

2828
## Helm charts build status
2929

30-
[![Release Charts](https://img.shields.io/github/Download-StarRocks-helmcharts.svg)](https://github.com/StarRocks/helm-charts/releases)
30+
[![Release Charts](https://img.shields.io/badge/Release-helmcharts-green.svg)](https://github.com/StarRocks/starrocks-kubernetes-operator/releases)
+19-13
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,32 @@
11
# kube-starrocks
2-
Install the kube-starrocks, a collectionof Kubernetes manifests to provide easy to operate end-to-end Kubernetes cluster deploy starrocks cluster use [starrocks Operator](https://github.com/StarRocks/starrocks-kubernetes-operator).
2+
3+
Install the kube-starrocks, a collection of Kubernetes manifests to provide easy to operate end-to-end Kubernetes
4+
cluster deploy starrocks cluster use [starrocks Operator](https://github.com/StarRocks/starrocks-kubernetes-operator).
35

46
## Prerequisites
5-
- Kbuernetes 1.18.3+
7+
8+
- Kubernetes 1.18.3+
69
- Helm 3+
710

811
## Get Helm Repository Info
12+
913
```console
10-
helm repo add starrocks-community https://starrocks.github.io/helm-charts
14+
helm repo add starrocks-community https://starrocks.github.io/starrocks-kubernetes-operator
1115
helm repo update
1216
```
17+
1318
_See [`helm repo`](https://helm.sh/docs/helm/helm_repo/) for command documentation._
1419

1520
## Install Helm Chart
1621

1722
1. view the package names in repo.
18-
```console
19-
helm search repo starrocks-community
20-
```
23+
```console
24+
helm search repo starrocks-community
25+
```
2126
2. install specify package.
22-
```console
23-
helm install [RELEASE_NAME] starrocks-community/[PACKAGE_NAME]
24-
```
27+
```
28+
helm install [RELEASE_NAME] starrocks-community/[PACKAGE_NAME]
29+
```
2530

2631
_See [configuration](#configuration) below._
2732

@@ -38,12 +43,13 @@ _See [helm uninstall](https://helm.sh/docs/helm/helm_uninstall/) for command doc
3843
CRDs created by this chart are not removed by default and should be manually cleaned up:
3944

4045
```console
41-
kubectl delete crd starrocksclusters.starrocks.com
46+
kubectl delete crd starrocksclusters.starrocks.com
4247
```
4348

4449
## Configuration
4550

46-
See [Customizing the Chart Before Installing](https://helm.sh/docs/intro/using_helm/#customizing-the-chart-before-installing). To see all configurable options with detailed comments:
51+
See [Customizing the Chart Before Installing](https://helm.sh/docs/intro/using_helm/#customizing-the-chart-before-installing).
52+
To see all configurable options with detailed comments:
4753

4854
```console
4955
helm show values starrocks-community/kube-starrocks
@@ -53,5 +59,5 @@ helm show values starrocks-community/kube-starrocks
5359

5460
You can see our documentation at StarRocks website for more in-depth installation and instructions for production:
5561

56-
- [Englist](https://docs.starrocks.io/en-us/latest/introduction/StarRocks_intro)
57-
- [简体中文](https://docs.starrocks.io/zh-cn/latest/introduction/StarRocks_intro)
62+
- [English](https://docs.starrocks.io/en-us/latest/introduction/StarRocks_intro)
63+
- [简体中文](https://docs.starrocks.io/zh-cn/latest/introduction/StarRocks_intro)

helm-charts/charts/kube-starrocks/values.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ starrocksOperator:
2828
image:
2929
# image sliced by "repository:tag"
3030
repository: starrocks/operator
31-
tag: latest
31+
tag: v1.7.0
3232
imagePullPolicy: Always
3333
replicaCount: 1
3434
resources:
@@ -249,6 +249,9 @@ starrocksCnSpec:
249249
# value: "value"
250250
# effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)"
251251
autoScalingPolicy: {}
252+
# you can select different versions of HPA (Horizontal Pod Autoscaler) based on the Kubernetes version you are
253+
# using to ensure compatibility and adaptability. the default version is v2beta2.
254+
# version: v2beta2
252255
# maxReplicas: 10
253256
# minReplicas: 1
254257
# hpaPolicy:

0 commit comments

Comments
 (0)