Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 0 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,11 @@ manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and Cust
$(CONTROLLER_GEN) rbac:roleName=manager-doris crd:generateEmbeddedObjectMeta=true webhook paths="./api/doris/..." output:crd:artifacts:config=config/crd/bases
$(CONTROLLER_GEN) rbac:roleName=manager-doris crd:generateEmbeddedObjectMeta=true webhook paths="./api/doris/..." output:crd:artifacts:config=helm-charts/doris-operator/crds
$(CONTROLLER_GEN) rbac:roleName=manager-doris crd:generateEmbeddedObjectMeta=true webhook paths="./api/disaggregated/..." output:crd:artifacts:config=config/crd/bases
#cat config/crd/bases/apps.foundationdb.org_foundationdbclusters.yaml > config/crd/bases/crds.yaml
#cat config/crd/bases/apps.foundationdb.org_foundationdbbackups.yaml >> config/crd/bases/crds.yaml
#cat config/crd/bases/apps.foundationdb.org_foundationdbrestores.yaml >> config/crd/bases/crds.yaml
cp config/crd/bases/doris.selectdb.com_dorisclusters.yaml config/crd/bases/doris.apache.com_dorisclusters.yaml
mv helm-charts/doris-operator/crds/doris.selectdb.com_dorisclusters.yaml helm-charts/doris-operator/crds/doris.apache.com_dorisclusters.yaml
cat config/crd/bases/doris.selectdb.com_dorisclusters.yaml > config/crd/bases/crds.yaml
cat config/crd/bases/disaggregated.cluster.doris.com_dorisdisaggregatedclusters.yaml >> config/crd/bases/crds.yaml


.PHONY: generate
generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./api/doris/..."
Expand Down
4 changes: 1 addition & 3 deletions helm-charts/doris-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
apiVersion: v2
name: doris-operator
description: >
Kubernetes operator for creating, configuring and managing Doris clusters (dcr) and Doris disaggregated clusters
(ddc). It can deploy and manage all components for Doris clusters: meta service, fe, be, cn, compute group, and
broker.
Doris Operator for creating, configuring and managing Doris clusters (dcr) and Doris disaggregated clusters (ddc).

icon: https://charts.selectdb.com/images/doris.jpg

Expand Down
49 changes: 28 additions & 21 deletions helm-charts/doris-operator/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Deploy Doris-Operator by Helm-Chart

[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/doris)](https://artifacthub.io/packages/search?repo=doris)
[![Doris repo](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/doris)](https://github.com/apache/doris)
[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg?color=f5deb3)](https://www.apache.org/licenses/LICENSE-2.0.html)
[![Operator Release](https://img.shields.io/github/v/release/apache/doris-operator?color=00FFFF)](https://github.com/apache/doris-operator/releases)
[![Tags](https://img.shields.io/github/v/tag/apache/doris-operator?label=latest%20tag&color=00FF7F)](https://github.com/apache/doris-operator/tags)
[![docker pull](https://img.shields.io/docker/pulls/apache/doris?color=1E90FF&logo=docker)](https://img.shields.io/docker/pulls/apache/doris)
[![issues](https://img.shields.io/github/issues-search?query=repo%3Aapache%2Fdoris-operator%20is%3Aopen&color=AFEEEE&label=issues)](https://github.com/apache/doris-operator/issues)
[![Go Version](https://img.shields.io/github/go-mod/go-version/apache/doris-operator?color=00FFFF)](https://img.shields.io/github/go-mod/go-version/apache/doris-operator)
[![docs](https://img.shields.io/website?url=https%3A%2F%2Fdoris.apache.org%2Fdocs%2Finstall%2Fdeploy-on-kubernetes%2Finstall-config-cluster&label=docs&color=7FFF00)](https://doris.apache.org/docs/install/deploy-on-kubernetes/install-config-cluster)

Doris-Operator is plugins of Kubernetes controller for providing doris to user. Doris-Operator be build with [Kubebuilder](https://github.com/kubernetes-sigs/kubebuilder). This helm-chart deploy [doris-operator](https://github.com/selectdb/doris-operator) on Kubernetes.
## Install doris-operator
Expand All @@ -9,44 +16,44 @@ Doris-Operator is plugins of Kubernetes controller for providing doris to user.

This helm chart have resources about RBAC , deployment ...etc for doris-operator running.

1. Add the selectdb repository
1. Add the selectdb repository
```Bash
$ helm repo add selectdb https://charts.selectdb.com
helm repo add selectdb https://charts.selectdb.com
```

2. Update the Helm Chart Repo to the latest version
2. Update the Helm Chart Repo to the latest version
```Bash
$ helm repo update selectdb
```

3. Check the Helm Chart Repo is the latest version
3. Check the Helm Chart Repo is the latest version
```Bash
$ helm search repo selectdb
helm search repo selectdb
NAME CHART VERSION APP VERSION DESCRIPTION
selectdb/doris-operator 1.3.1 1.3.1 Doris-operator for doris creat ...
selectdb/doris 1.3.1 2.0.3 Apache Doris is an easy-to-use ...
```

### Install the doris-operator
- Install doris-operator with default config in a namespace named `doris`
```Bash
$ helm install operator selectdb/doris-operator
```
- The repo defines the basic function for running doris-operator, Please use next command to deploy doris-operator, when you have completed customization of [`values.yaml`](./values.yaml)
```Bash
$ helm install -f values.yaml operator selectdb/doris-operator
```
- Install doris-operator in `doris` namespace using the default config:
```Bash
helm install operator selectdb/doris-operator --create-namespace -n doris
```
- Custom the values.yaml, use the follow command to deploy:
```Bash
helm install -f values.yaml operator selectdb/doris-operator --create-namespace -n doris
```

### Validate installation Status
Check the deployment status of Pods through the kubectl get pods command. Observe that the Pod of doris-operator is in the Running state and all containers in the Pod are ready, that means, the deployment is successful.
```Bash
$ kubectl get pod --namespace doris
NAME READY STATUS RESTARTS AGE
doris-operator-866bd449bb-zl5mr 1/1 Running 0 18m
```
```Bash
kubectl get pod --namespace doris
NAME READY STATUS RESTARTS AGE
doris-operator-866bd449bb-zl5mr 1/1 Running 0 18m
```

## Uninstall doris-operator
Please confirm that Doris is not running in Kubernetes, use next command to uninstall `doris-operator`.
Please confirm that Doris is not used in Kubernetes, and the data in doris is not valued, use the follow command to uninstall.
```Bash
$ helm uninstall operator
helm -n doris uninstall operator
```
13 changes: 6 additions & 7 deletions helm-charts/doris-operator/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
{{/*
doris operator pod default resource.
*/}}
{{- define "operator.default.resource" }}
{{- define "operator.default.resources" }}
requests:
cpu: 2
memory: 4Gi
Expand All @@ -46,16 +46,15 @@ doris operator pod default resource.
{{- end }}

{{/*
doris operator webhook open.
cancle webhook set, webhook is deprecated.
*/}}
{{- define "webhook.enable" -}}
{{ default "false" .Values.dorisOperator.enableWebhook }}
{{- end -}}

{{- print "false" }}
{{- end }}

{{/*
doris operator webhook service name.
doris operator service name.
*/}}
{{- define "webhook.serviceName" }}
{{- define "operator.serviceName" }}
{{- print "doris-operator-service" }}
{{- end }}
4 changes: 2 additions & 2 deletions helm-charts/doris-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ spec:
fieldRef:
fieldPath: metadata.name
- name: SERVICE_NAME
value: {{ template "webhook.serviceName" . }}
value: {{ template "operator.serviceName" . }}
livenessProbe:
httpGet:
path: /healthz
Expand All @@ -121,7 +121,7 @@ spec:
# TODO(user): Configure the resources accordingly based on the project requirements.
# More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
resources:
{{- include "operator.default.resource" . | indent 8 }}
{{- include "operator.default.resources" . | indent 8 }}
volumeMounts:
- mountPath: /tmp/k8s-webhook-server/serving-certs
name: cert
Expand Down

This file was deleted.

This file was deleted.

25 changes: 0 additions & 25 deletions helm-charts/doris-operator/templates/webhook-secret.yaml

This file was deleted.

36 changes: 0 additions & 36 deletions helm-charts/doris-operator/templates/webhook-service.yaml

This file was deleted.

Loading