286 lines
7.0 KiB
YAML
286 lines
7.0 KiB
YAML
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: doriscluster-helm-be-service
|
|
namespace: doris
|
|
spec:
|
|
clusterIP: 10.1.30.236
|
|
clusterIPs:
|
|
- 10.1.30.236
|
|
internalTrafficPolicy: Cluster
|
|
ipFamilies:
|
|
- IPv4
|
|
ipFamilyPolicy: SingleStack
|
|
ports:
|
|
- name: be-port
|
|
port: 9060
|
|
protocol: TCP
|
|
targetPort: 9060
|
|
- name: webserver-port
|
|
port: 8040
|
|
protocol: TCP
|
|
targetPort: 8040
|
|
- name: heartbeat-port
|
|
port: 9050
|
|
protocol: TCP
|
|
targetPort: 9050
|
|
- name: brpc-port
|
|
port: 8060
|
|
protocol: TCP
|
|
targetPort: 8060
|
|
selector:
|
|
app.doris.ownerreference/name: doriscluster-helm-be
|
|
app.kubernetes.io/component: be
|
|
sessionAffinity: ClientIP
|
|
sessionAffinityConfig:
|
|
clientIP:
|
|
timeoutSeconds: 10800
|
|
type: ClusterIP
|
|
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: doriscluster-helm-be-internal
|
|
namespace: doris
|
|
spec:
|
|
clusterIP: None
|
|
clusterIPs:
|
|
- None
|
|
internalTrafficPolicy: Cluster
|
|
ipFamilies:
|
|
- IPv4
|
|
ipFamilyPolicy: SingleStack
|
|
ports:
|
|
- name: heartbeat-port
|
|
port: 9050
|
|
protocol: TCP
|
|
targetPort: 9050
|
|
publishNotReadyAddresses: true
|
|
selector:
|
|
app.doris.ownerreference/name: doriscluster-helm-be
|
|
app.kubernetes.io/component: be
|
|
sessionAffinity: None
|
|
type: ClusterIP
|
|
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
metadata:
|
|
name: doriscluster-helm-be
|
|
namespace: doris
|
|
spec:
|
|
podManagementPolicy: Parallel
|
|
replicas: 2
|
|
revisionHistoryLimit: 5
|
|
selector:
|
|
matchLabels:
|
|
app.doris.ownerreference/name: doriscluster-helm-be
|
|
app.kubernetes.io/component: be
|
|
serviceName: doriscluster-helm-be-internal
|
|
template:
|
|
metadata:
|
|
creationTimestamp: null
|
|
labels:
|
|
app.doris.cluster: doriscluster-helm
|
|
app.doris.ownerreference/name: doriscluster-helm-be
|
|
app.kubernetes.io/component: be
|
|
name: doriscluster-helm-be
|
|
spec:
|
|
affinity:
|
|
podAntiAffinity:
|
|
preferredDuringSchedulingIgnoredDuringExecution:
|
|
- podAffinityTerm:
|
|
labelSelector:
|
|
matchExpressions:
|
|
- key: app.kubernetes.io/component
|
|
operator: In
|
|
values:
|
|
- be
|
|
topologyKey: kubernetes.io/hostname
|
|
weight: 20
|
|
- podAffinityTerm:
|
|
labelSelector:
|
|
matchLabels:
|
|
kubernetes.io/hostname: fe
|
|
topologyKey: kubernetes.io/hostname
|
|
weight: 80
|
|
containers:
|
|
- args:
|
|
- sysctl -w vm.max_map_count=2000000; swapoff -a;/opt/apache-doris/be_entrypoint.sh
|
|
$(ENV_FE_ADDR);
|
|
command:
|
|
- /bin/sh
|
|
- -c
|
|
- --
|
|
env:
|
|
- name: POD_NAME
|
|
valueFrom:
|
|
fieldRef:
|
|
apiVersion: v1
|
|
fieldPath: metadata.name
|
|
- name: POD_IP
|
|
valueFrom:
|
|
fieldRef:
|
|
apiVersion: v1
|
|
fieldPath: status.podIP
|
|
- name: HOST_IP
|
|
valueFrom:
|
|
fieldRef:
|
|
apiVersion: v1
|
|
fieldPath: status.hostIP
|
|
- name: POD_NAMESPACE
|
|
valueFrom:
|
|
fieldRef:
|
|
apiVersion: v1
|
|
fieldPath: metadata.namespace
|
|
- name: CONFIGMAP_MOUNT_PATH
|
|
value: /etc/doris
|
|
- name: USER
|
|
value: root
|
|
- name: PASSWD
|
|
value: iEEmoo168!
|
|
- name: DORIS_ROOT
|
|
value: /opt/apache-doris
|
|
- name: ENV_FE_ADDR
|
|
value: doriscluster-helm-fe-service
|
|
- name: FE_QUERY_PORT
|
|
value: "9030"
|
|
image: selectdb/doris.be-ubuntu:2.0.3
|
|
imagePullPolicy: IfNotPresent
|
|
lifecycle:
|
|
preStop:
|
|
exec:
|
|
command:
|
|
- /opt/apache-doris/be_prestop.sh
|
|
livenessProbe:
|
|
failureThreshold: 3
|
|
initialDelaySeconds: 80
|
|
periodSeconds: 5
|
|
successThreshold: 1
|
|
tcpSocket:
|
|
port: 9050
|
|
timeoutSeconds: 180
|
|
name: be
|
|
ports:
|
|
- containerPort: 9060
|
|
name: be-port
|
|
protocol: TCP
|
|
- containerPort: 8040
|
|
name: webserver-port
|
|
protocol: TCP
|
|
- containerPort: 9050
|
|
name: heartbeat-port
|
|
protocol: TCP
|
|
- containerPort: 8060
|
|
name: brpc-port
|
|
protocol: TCP
|
|
readinessProbe:
|
|
failureThreshold: 3
|
|
httpGet:
|
|
path: /api/health
|
|
port: 8040
|
|
scheme: HTTP
|
|
periodSeconds: 5
|
|
successThreshold: 1
|
|
timeoutSeconds: 1
|
|
resources:
|
|
limits:
|
|
cpu: "4"
|
|
memory: 4Gi
|
|
requests:
|
|
cpu: "2"
|
|
memory: 4Gi
|
|
securityContext:
|
|
privileged: true
|
|
startupProbe:
|
|
failureThreshold: 60
|
|
periodSeconds: 5
|
|
successThreshold: 1
|
|
tcpSocket:
|
|
port: 9050
|
|
timeoutSeconds: 1
|
|
terminationMessagePath: /dev/termination-log
|
|
terminationMessagePolicy: File
|
|
volumeMounts:
|
|
- mountPath: /etc/podinfo
|
|
name: podinfo
|
|
- mountPath: /opt/apache-doris/be/storage
|
|
name: be-storage
|
|
- mountPath: /opt/apache-doris/be/log
|
|
name: be-log
|
|
dnsPolicy: ClusterFirst
|
|
initContainers:
|
|
- args:
|
|
- -c
|
|
- sysctl -w vm.max_map_count=2000000 && swapoff -a
|
|
command:
|
|
- /bin/sh
|
|
image: selectdb/alpine:latest
|
|
imagePullPolicy: IfNotPresent
|
|
name: default-init
|
|
resources: {}
|
|
securityContext:
|
|
privileged: true
|
|
terminationMessagePath: /dev/termination-log
|
|
terminationMessagePolicy: File
|
|
restartPolicy: Always
|
|
schedulerName: default-scheduler
|
|
securityContext: {}
|
|
terminationGracePeriodSeconds: 30
|
|
volumes:
|
|
- name: be-storage
|
|
persistentVolumeClaim:
|
|
claimName: be-storage
|
|
- name: be-log
|
|
persistentVolumeClaim:
|
|
claimName: be-log
|
|
- downwardAPI:
|
|
defaultMode: 420
|
|
items:
|
|
- fieldRef:
|
|
apiVersion: v1
|
|
fieldPath: metadata.labels
|
|
path: labels
|
|
- fieldRef:
|
|
apiVersion: v1
|
|
fieldPath: metadata.annotations
|
|
path: annotations
|
|
name: podinfo
|
|
updateStrategy:
|
|
rollingUpdate:
|
|
partition: 0
|
|
type: RollingUpdate
|
|
volumeClaimTemplates:
|
|
- apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
creationTimestamp: null
|
|
name: be-storage
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 50Gi
|
|
storageClassName: cfs
|
|
volumeMode: Filesystem
|
|
status:
|
|
phase: Pending
|
|
- apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
creationTimestamp: null
|
|
name: be-log
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 10Gi
|
|
storageClassName: cfs
|
|
volumeMode: Filesystem
|
|
status:
|
|
phase: Pending
|
|
|