Skip to content

Commit

Permalink
Merge pull request #98 from intelligentfu/helm_action
Browse files Browse the repository at this point in the history
doc an service
  • Loading branch information
intelligentfu authored Jan 22, 2024
2 parents 3e6cd28 + 568fc0a commit ac65570
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 4 deletions.
1 change: 1 addition & 0 deletions README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ kubectl apply -f https://raw.githubusercontent.com/selectdb/doris-operator/maste
```
## 部署 Doris
[部署范例](./doc/examples)中提供了一些使用Kubernetes特性部署 Doris 的范例。
默认的部署样例中,每个 fe 和 be 最少需要8核和16G的内存,且每个服务部署3个实例。 在使用默认部署之前,确保 K8s 集群有足够的资源能够部署成功。
部署使用容器自身存储(重启丢失数据属易失性介质)包含 fe,be 服务的 Doris 集群,命令如下:
```
kubectl apply -f https://raw.githubusercontent.com/selectdb/doris-operator/master/doc/examples/doriscluster-sample.yaml
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ kubectl apply -f https://raw.githubusercontent.com/selectdb/doris-operator/maste
```

## Get Started to Deploy Doris
The [Quick Start Guide](./doc/examples) have some examples to deploy doris on kubernetes. they represent some mode to deploy doris on different situation.
The [Quick Start Guide](./doc/examples) have some examples to deploy doris on kubernetes. they represent some mode to deploy doris on different situation.
Example specify 8 cores and 16GB of memory for every fe or be, and deployed 3 fe and 3 be. Please confirm the K8s cluster have enough resources.
for only deploy fe and be without persistentVolume:
```
kubectl apply -f https://raw.githubusercontent.com/selectdb/doris-operator/master/doc/examples/doriscluster-sample.yaml
Expand Down
Empty file added doc/operation/network.md
Empty file.
2 changes: 2 additions & 0 deletions docker/be/Dockerfile_be_ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ COPY resource/entry_point.sh /usr/local/bin/

COPY resource/init_be.sh /usr/local/bin/

RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

WORKDIR /opt/apache-doris

ENTRYPOINT ["bash","entry_point.sh"]
5 changes: 4 additions & 1 deletion docker/fe/Dockerfile_fe_ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ COPY resource/fe_*.sh /opt/apache-doris/

COPY --from=selectdb/doris-debug-ubuntu:latest /doris-debug /opt/apache-doris/

RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime


WORKDIR /opt/apache-doris

ENTRYPOINT ["/opt/apache-doris/fe/bin/init_fe.sh"]
ENTRYPOINT ["/opt/apache-doris/fe/bin/init_fe.sh"]
2 changes: 1 addition & 1 deletion pkg/common/utils/k8s/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func ApplyService(ctx context.Context, k8sclient client.Client, svc *corev1.Serv
return nil
}

return PatchClientObject(ctx, k8sclient, svc)
return UpdateClientObject(ctx, k8sclient, svc)
}

// ApplyStatefulSet when the object is not exist, create object. if exist and statefulset have been updated, patch the statefulset.
Expand Down
8 changes: 7 additions & 1 deletion pkg/common/utils/resource/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type hashService struct {
ports []corev1.ServicePort
selector map[string]string
//deal with external access load balancer.
//serviceType corev1.ServiceType
serviceType corev1.ServiceType
labels map[string]string
annotations map[string]string
}
Expand Down Expand Up @@ -136,6 +136,11 @@ func constructServiceSpec(exportService *v1.ExportService, svc *corev1.Service,
Selector: selector,
Ports: ports,
}

if exportService != nil && exportService.Type == corev1.ServiceTypeLoadBalancer {
svc.Spec.SessionAffinity = corev1.ServiceAffinityNone
}

setServiceType(exportService, svc)
}

Expand Down Expand Up @@ -323,6 +328,7 @@ func serviceHashObject(svc *corev1.Service) hashService {
namespace: svc.Namespace,
ports: svc.Spec.Ports,
selector: svc.Spec.Selector,
serviceType: svc.Spec.Type,
labels: svc.Labels,
annotations: annos,
}
Expand Down

0 comments on commit ac65570

Please sign in to comment.