132 lines
5.1 KiB
YAML
132 lines
5.1 KiB
YAML
# Licensed to the Apache Software Foundation (ASF) under one
|
|
# or more contributor license agreements. See the NOTICE file
|
|
# distributed with this work for additional information
|
|
# regarding copyright ownership. The ASF licenses this file
|
|
# to you under the Apache License, Version 2.0 (the
|
|
# "License"); you may not use this file except in compliance
|
|
# with the License. You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing,
|
|
# software distributed under the License is distributed on an
|
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
# KIND, either express or implied. See the License for the
|
|
# specific language governing permissions and limitations
|
|
# under the License.
|
|
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: doris-follower-cluster1
|
|
labels:
|
|
app: doris-follower-cluster1
|
|
spec:
|
|
ports:
|
|
- port: 8030
|
|
name: http-port
|
|
- port: 9020
|
|
name: rpc-port
|
|
- port: 9030
|
|
name: query-port
|
|
- port: 9010
|
|
name: edit-log-port #This name should be fixed. Doris will get the port information through this name
|
|
clusterIP: None
|
|
selector:
|
|
app: doris-follower-cluster1
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
metadata:
|
|
name: doris-follower-cluster1
|
|
labels:
|
|
app: doris-follower-cluster1
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: doris-follower-cluster1
|
|
serviceName: doris-follower-cluster1
|
|
replicas: 3
|
|
template:
|
|
metadata:
|
|
name: doris-follower-cluster1
|
|
labels:
|
|
app: doris-follower-cluster1
|
|
spec:
|
|
containers:
|
|
- name: doris-follower-cluster1
|
|
#Need to change to real mirror information
|
|
image: apache-doris-fe:test
|
|
imagePullPolicy: IfNotPresent
|
|
env:
|
|
#Specify the startup type as k8s to bypass some restrictions of the official image initialization script
|
|
- name: BUILD_TYPE
|
|
value: "k8s"
|
|
#Initialize the fe of three nodes
|
|
- name: FE_INIT_NUMBER
|
|
value: "3"
|
|
#ServiceName of bakend_cn node,(if do not have bakend_cn node,do not configure this environment variable)
|
|
- name: CN_SERVICE
|
|
value: "doris-cn-cluster1"
|
|
#StatefulSetName of bakend_cn node,(if do not have bakend_cn node,do not configure this environment variable)
|
|
- name: CN_STATEFULSET
|
|
value: "doris-cn-cluster1"
|
|
#ServiceName of bakend node,(if do not have bakend node,do not configure this environment variable)
|
|
- name: BE_SERVICE
|
|
value: "doris-be-cluster1"
|
|
#StatefulSetName of bakend node,(if do not have bakend node,do not configure this environment variable)
|
|
- name: BE_STATEFULSET
|
|
value: "doris-be-cluster1"
|
|
#ServiceName of follower node,(if do not have follower node,do not configure this environment variable)
|
|
- name: FE_SERVICE
|
|
value: "doris-follower-cluster1"
|
|
##StatefulSetName of follower node,(if do not have follower node,do not configure this environment variable)
|
|
- name: FE_STATEFULSET
|
|
value: "doris-follower-cluster1"
|
|
ports:
|
|
- containerPort: 8030
|
|
name: http-port
|
|
- containerPort: 9020
|
|
name: rpc-port
|
|
- containerPort: 9030
|
|
name: query-port
|
|
- containerPort: 9010
|
|
name: edit-log-port
|
|
volumeMounts:
|
|
#Mount the configuration file in the way of configmap
|
|
- name: conf
|
|
mountPath: /opt/apache-doris/fe/conf
|
|
#In order to call the api of k8s
|
|
- name: kube
|
|
mountPath: /root/.kube/config
|
|
readOnly: true
|
|
volumes:
|
|
- name: conf
|
|
configMap:
|
|
name: follower-conf
|
|
- name: kube
|
|
hostPath:
|
|
path: /root/.kube/config
|
|
---
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: follower-conf
|
|
data:
|
|
fe.conf: |
|
|
priority_networks = 172.16.0.0/24
|
|
#It can automatically maintain node information by getting the number of replicas of StatefulSet, similar to alter system add/drop back
|
|
enable_deploy_manager = k8s
|
|
#Automatically adjust the IP of the node according to the domain name (for example, after the pod is restarted, the domain name is still doris-be-cluster1-0-doris-be-cluster1.default.svc.cluster.local, but the IP may change from 172.16.0.9 to 172.16.0.10)
|
|
enable_fqdn_mode = true
|
|
LOG_DIR = ${DORIS_HOME}/log
|
|
sys_log_level = INFO
|
|
http_port = 8030
|
|
rpc_port = 9020
|
|
query_port = 9030
|
|
edit_log_port = 9010
|
|
#Doris needs to generate the log4j configuration file according to the fe.yml configuration information, which is written in the same directory as fe.yml by default, but the config we mount is readonly, so specify this configuration to write the log4j file to another location
|
|
custom_config_dir = /opt/apache-doris/
|
|
#when set to false, the backend will not be dropped and remaining in DECOMMISSION state
|
|
drop_backend_after_decommission = false
|