Remove deprecated Kafka and StarRocks configurations, including README, storage classes, and Vertical Pod Autoscaler files. This cleanup prepares for a more streamlined deployment process.
Signed-off-by: zhenyus <zhenyus@mathmast.com>
This commit is contained in:
parent
291388fa0e
commit
d7c072ee6a
@ -1,75 +0,0 @@
|
||||
# Kafka Configuration for Freeleaps Data Platform
|
||||
|
||||
This directory contains the Kafka configuration for the Freeleaps Data Platform.
|
||||
|
||||
## Files
|
||||
|
||||
- `values.yaml` - Original Bitnami Kafka Helm values (legacy)
|
||||
- `vpa.yaml` - Vertical Pod Autoscaler configuration
|
||||
- `strimzi-kafka-cluster.yaml` - Strimzi Kafka Operator cluster configuration
|
||||
- `README.md` - This file
|
||||
|
||||
## Migration from Bitnami to Strimzi
|
||||
|
||||
### Current State
|
||||
- **Existing**: Bitnami Kafka deployment (single node)
|
||||
- **Target**: Strimzi Kafka Operator with HA cluster (3 brokers + 3 ZK nodes)
|
||||
|
||||
### Migration Steps
|
||||
|
||||
1. **Install Strimzi Operator** (already done)
|
||||
```bash
|
||||
helm install strimzi-kafka-operator strimzi/strimzi-kafka-operator \
|
||||
--namespace freeleaps-data-platform
|
||||
```
|
||||
|
||||
2. **Delete existing Kafka deployment**
|
||||
```bash
|
||||
kubectl delete statefulset kafka-controller -n freeleaps-data-platform
|
||||
kubectl delete service kafka kafka-controller-headless -n freeleaps-data-platform
|
||||
kubectl delete configmap kafka-controller-configuration -n freeleaps-data-platform
|
||||
kubectl delete pvc data-kafka-controller-0 -n freeleaps-data-platform
|
||||
```
|
||||
|
||||
3. **Deploy new Strimzi Kafka cluster**
|
||||
```bash
|
||||
kubectl apply -f strimzi-kafka-cluster.yaml
|
||||
```
|
||||
|
||||
### New Cluster Features
|
||||
|
||||
- **High Availability**: 3 Kafka brokers + 3 Zookeeper nodes
|
||||
- **Authentication**: SCRAM-SHA-512
|
||||
- **Storage**: 20Gi per broker, 10Gi per ZK node
|
||||
- **Replication**: 3x replication factor
|
||||
- **Security**: TLS support for internal communication
|
||||
|
||||
### Monitoring
|
||||
|
||||
Check cluster status:
|
||||
```bash
|
||||
kubectl get kafka -n freeleaps-data-platform
|
||||
kubectl get kafkatopic -n freeleaps-data-platform
|
||||
kubectl get kafkauser -n freeleaps-data-platform
|
||||
```
|
||||
|
||||
### Client Configuration
|
||||
|
||||
For applications connecting to the new Kafka cluster, use:
|
||||
- **Bootstrap servers**: `kafka-cluster-kafka-bootstrap.freeleaps-data-platform.svc.freeleaps.cluster:9092`
|
||||
- **Authentication**: SCRAM-SHA-512
|
||||
- **Username**: `freeleaps-user`
|
||||
- **Password**: Generated by Strimzi (check the secret)
|
||||
|
||||
## Storage Requirements
|
||||
|
||||
- **Kafka brokers**: 3 × 20Gi = 60Gi
|
||||
- **Zookeeper**: 3 × 10Gi = 30Gi
|
||||
- **Total**: 90Gi
|
||||
|
||||
## Network Policy
|
||||
|
||||
The cluster includes network policies that allow:
|
||||
- Internal cluster communication
|
||||
- External client access (with proper authentication)
|
||||
- Metrics collection (if enabled)
|
||||
@ -1,14 +0,0 @@
|
||||
apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
metadata:
|
||||
name: kafka-storage-class
|
||||
annotations:
|
||||
storageclass.kubernetes.io/is-default-class: "false"
|
||||
provisioner: kubernetes.io/azure-disk
|
||||
parameters:
|
||||
skuName: StandardSSD_LRS
|
||||
cachingMode: ReadWrite
|
||||
kind: Managed
|
||||
reclaimPolicy: Retain
|
||||
volumeBindingMode: WaitForFirstConsumer
|
||||
allowVolumeExpansion: true
|
||||
@ -1,24 +0,0 @@
|
||||
apiVersion: autoscaling.k8s.io/v1
|
||||
kind: VerticalPodAutoscaler
|
||||
metadata:
|
||||
name: kafka-controller-vpa
|
||||
namespace: freeleaps-data-platform
|
||||
spec:
|
||||
resourcePolicy:
|
||||
containerPolicies:
|
||||
- containerName: '*'
|
||||
controlledResources:
|
||||
- cpu
|
||||
- memory
|
||||
maxAllowed:
|
||||
cpu: 1000m
|
||||
memory: 2048Mi
|
||||
minAllowed:
|
||||
cpu: 200m
|
||||
memory: 512Mi
|
||||
targetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
name: kafka-controller
|
||||
updatePolicy:
|
||||
updateMode: "Auto"
|
||||
@ -1,235 +0,0 @@
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Default values for Pinot.
|
||||
|
||||
image:
|
||||
repository: apachepinot/pinot
|
||||
tag: 1.3.0
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
cluster:
|
||||
name: freeleaps-pinot
|
||||
|
||||
controller:
|
||||
name: controller
|
||||
port: 9000
|
||||
replicaCount: 1
|
||||
|
||||
persistence:
|
||||
enabled: true
|
||||
accessMode: ReadWriteOnce
|
||||
size: 5G
|
||||
mountPath: /var/pinot/controller/data
|
||||
storageClass: "azure-disk-std-lrs"
|
||||
|
||||
data:
|
||||
dir: /var/pinot/controller/data
|
||||
|
||||
|
||||
vip:
|
||||
host: pinot-controller
|
||||
port: 9000
|
||||
|
||||
jvmOpts: "-Xms256M -Xmx1G"
|
||||
|
||||
log4j2ConfFile: /opt/pinot/conf/pinot-controller-log4j2.xml
|
||||
pluginsDir: /opt/pinot/plugins
|
||||
|
||||
service:
|
||||
annotations: {}
|
||||
clusterIP: ""
|
||||
externalIPs: []
|
||||
loadBalancerIP: ""
|
||||
loadBalancerSourceRanges: []
|
||||
type: ClusterIP
|
||||
port: 9000
|
||||
nodePort: ""
|
||||
|
||||
external:
|
||||
enabled: false
|
||||
type: LoadBalancer
|
||||
port: 9000
|
||||
|
||||
resources:
|
||||
requests:
|
||||
cpu: 200m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 1Gi
|
||||
|
||||
nodeSelector: {}
|
||||
|
||||
tolerations: []
|
||||
|
||||
affinity: {}
|
||||
|
||||
podAnnotations: {}
|
||||
|
||||
updateStrategy:
|
||||
type: RollingUpdate
|
||||
|
||||
broker:
|
||||
name: broker
|
||||
|
||||
port: 8099
|
||||
|
||||
replicaCount: 1
|
||||
|
||||
jvmOpts: "-Xms256M -Xmx1G"
|
||||
|
||||
log4j2ConfFile: /opt/pinot/conf/pinot-broker-log4j2.xml
|
||||
pluginsDir: /opt/pinot/plugins
|
||||
|
||||
routingTable:
|
||||
builderClass: random
|
||||
|
||||
service:
|
||||
annotations: {}
|
||||
clusterIP: ""
|
||||
externalIPs: []
|
||||
loadBalancerIP: ""
|
||||
loadBalancerSourceRanges: []
|
||||
type: ClusterIP
|
||||
port: 8099
|
||||
nodePort: ""
|
||||
|
||||
external:
|
||||
enabled: false
|
||||
type: LoadBalancer
|
||||
port: 8099
|
||||
|
||||
resources:
|
||||
requests:
|
||||
cpu: 200m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 1Gi
|
||||
|
||||
nodeSelector: {}
|
||||
|
||||
affinity: {}
|
||||
|
||||
tolerations: []
|
||||
|
||||
podAnnotations: {}
|
||||
|
||||
updateStrategy:
|
||||
type: RollingUpdate
|
||||
|
||||
server:
|
||||
name: server
|
||||
|
||||
ports:
|
||||
netty: 8098
|
||||
admin: 8097
|
||||
|
||||
replicaCount: 1
|
||||
|
||||
dataDir: /var/pinot/server/data/index
|
||||
segmentTarDir: /var/pinot/server/data/segment
|
||||
|
||||
persistence:
|
||||
enabled: true
|
||||
accessMode: ReadWriteOnce
|
||||
size: 5G
|
||||
mountPath: /var/pinot/server/data
|
||||
storageClass: "azure-disk-std-lrs"
|
||||
|
||||
jvmOpts: "-Xms512M -Xmx1G"
|
||||
|
||||
log4j2ConfFile: /opt/pinot/conf/pinot-server-log4j2.xml
|
||||
pluginsDir: /opt/pinot/plugins
|
||||
|
||||
service:
|
||||
annotations: {}
|
||||
clusterIP: ""
|
||||
externalIPs: []
|
||||
loadBalancerIP: ""
|
||||
loadBalancerSourceRanges: []
|
||||
type: ClusterIP
|
||||
port: 8098
|
||||
nodePort: ""
|
||||
|
||||
resources:
|
||||
requests:
|
||||
cpu: 200m
|
||||
memory: 512Mi
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 1Gi
|
||||
|
||||
nodeSelector: {}
|
||||
|
||||
affinity: {}
|
||||
|
||||
tolerations: []
|
||||
|
||||
podAnnotations: {}
|
||||
|
||||
updateStrategy:
|
||||
type: RollingUpdate
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Zookeeper:
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
zookeeper:
|
||||
## If true, install the Zookeeper chart alongside Pinot
|
||||
## ref: https://github.com/kubernetes/charts/tree/master/incubator/zookeeper
|
||||
enabled: false
|
||||
|
||||
## Configure Zookeeper resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
resources: {}
|
||||
|
||||
## Replicas
|
||||
replicaCount: 1
|
||||
|
||||
## Environmental variables to set in Zookeeper
|
||||
env:
|
||||
## The JVM heap size to allocate to Zookeeper
|
||||
ZK_HEAP_SIZE: "256M"
|
||||
|
||||
persistence:
|
||||
enabled: true
|
||||
## The amount of PV storage allocated to each Zookeeper pod in the statefulset
|
||||
# size: "2Gi"
|
||||
|
||||
## Specify a Zookeeper imagePullPolicy
|
||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
image:
|
||||
PullPolicy: "IfNotPresent"
|
||||
|
||||
## If the Zookeeper Chart is disabled a URL and port are required to connect
|
||||
url: "zookeeper-headless.freeleaps-data-platform.svc.freeleaps.cluster"
|
||||
port: 2181
|
||||
|
||||
## Pod scheduling preferences (by default keep pods within a release on separate nodes).
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
## By default we don't set affinity:
|
||||
affinity: {} # Criteria by which pod label-values influence scheduling for zookeeper pods.
|
||||
# podAntiAffinity:
|
||||
# requiredDuringSchedulingIgnoredDuringExecution:
|
||||
# - topologyKey: "kubernetes.io/hostname"
|
||||
# labelSelector:
|
||||
# matchLabels:
|
||||
# release: zookeeper
|
||||
@ -1,87 +0,0 @@
|
||||
apiVersion: autoscaling.k8s.io/v1
|
||||
kind: VerticalPodAutoscaler
|
||||
metadata:
|
||||
name: pinot-controller-vpa
|
||||
namespace: freeleaps-data-platform
|
||||
spec:
|
||||
resourcePolicy:
|
||||
containerPolicies:
|
||||
- containerName: '*'
|
||||
controlledResources:
|
||||
- cpu
|
||||
- memory
|
||||
maxAllowed:
|
||||
cpu: 500m
|
||||
memory: 1Gi
|
||||
targetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
name: pinot-controller
|
||||
updatePolicy:
|
||||
updateMode: "Auto"
|
||||
---
|
||||
apiVersion: autoscaling.k8s.io/v1
|
||||
kind: VerticalPodAutoscaler
|
||||
metadata:
|
||||
name: pinot-broker-vpa
|
||||
namespace: freeleaps-data-platform
|
||||
spec:
|
||||
resourcePolicy:
|
||||
containerPolicies:
|
||||
- containerName: '*'
|
||||
controlledResources:
|
||||
- cpu
|
||||
- memory
|
||||
maxAllowed:
|
||||
cpu: 500m
|
||||
memory: 1.5Gi
|
||||
targetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
name: pinot-broker
|
||||
updatePolicy:
|
||||
updateMode: "Auto"
|
||||
---
|
||||
apiVersion: autoscaling.k8s.io/v1
|
||||
kind: VerticalPodAutoscaler
|
||||
metadata:
|
||||
name: pinot-server-vpa
|
||||
namespace: freeleaps-data-platform
|
||||
spec:
|
||||
resourcePolicy:
|
||||
containerPolicies:
|
||||
- containerName: '*'
|
||||
controlledResources:
|
||||
- cpu
|
||||
- memory
|
||||
maxAllowed:
|
||||
cpu: 500m
|
||||
memory: 1Gi
|
||||
targetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
name: pinot-server
|
||||
updatePolicy:
|
||||
updateMode: "Auto"
|
||||
---
|
||||
apiVersion: autoscaling.k8s.io/v1
|
||||
kind: VerticalPodAutoscaler
|
||||
metadata:
|
||||
name: pinot-minion-stateless-vpa
|
||||
namespace: freeleaps-data-platform
|
||||
spec:
|
||||
resourcePolicy:
|
||||
containerPolicies:
|
||||
- containerName: '*'
|
||||
controlledResources:
|
||||
- cpu
|
||||
- memory
|
||||
maxAllowed:
|
||||
cpu: 500m
|
||||
memory: 1Gi
|
||||
targetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: pinot-minion-stateless
|
||||
updatePolicy:
|
||||
updateMode: "Auto"
|
||||
@ -1,128 +0,0 @@
|
||||
# StarRocks High Availability Cluster Deployment
|
||||
|
||||
## Overview
|
||||
This project uses StarRocks Kubernetes Operator to directly deploy a high availability StarRocks cluster.
|
||||
|
||||
## Component Architecture
|
||||
- **Frontend (FE)**: 3 replicas, responsible for metadata management and query coordination
|
||||
- **Backend (BE)**: 3 replicas, responsible for data storage and computation
|
||||
- **Compute Node (CN)**: 2 replicas, providing elastic computing capabilities
|
||||
|
||||
## File Description
|
||||
|
||||
### 1. ha-starrocks-cluster.yaml
|
||||
Main configuration file for the high availability StarRocks cluster, including:
|
||||
- Replica count and image configuration for FE, BE, CN components
|
||||
- Pod anti-affinity configuration to ensure high availability
|
||||
- Service configuration and environment variables
|
||||
|
||||
### 2. starrocks-configmaps.yaml
|
||||
Configuration files for each component:
|
||||
- **FE Configuration**: Logs, ports, JVM parameters, etc.
|
||||
- **BE Configuration**: Storage, ports, log levels, etc.
|
||||
- **CN Configuration**: Compute node ports and log configuration
|
||||
|
||||
### 3. ha-starrocks-values.yaml
|
||||
Helm values configuration file (for reference)
|
||||
|
||||
### 4. values.yaml
|
||||
Default Helm Chart configuration (for existing clusters)
|
||||
|
||||
### 5. vpa.yaml
|
||||
Vertical Pod Autoscaler configuration
|
||||
|
||||
## Deployment Steps
|
||||
|
||||
### 1. Apply Configuration
|
||||
```bash
|
||||
# First apply ConfigMap configuration
|
||||
kubectl apply -f starrocks-configmaps.yaml
|
||||
|
||||
# Then apply StarRocks cluster configuration
|
||||
kubectl apply -f ha-starrocks-cluster.yaml
|
||||
```
|
||||
|
||||
### 2. Check Deployment Status
|
||||
```bash
|
||||
# Check StarRocks cluster status
|
||||
kubectl get starrockscluster -n freeleaps-data-platform
|
||||
|
||||
# Check Pod status
|
||||
kubectl get pods -n freeleaps-data-platform -l app=starrocks
|
||||
|
||||
# Check service status
|
||||
kubectl get svc -n freeleaps-data-platform -l app=starrocks
|
||||
```
|
||||
|
||||
### 3. View Logs
|
||||
```bash
|
||||
# View FE logs
|
||||
kubectl logs -n freeleaps-data-platform -l app.kubernetes.io/component=fe
|
||||
|
||||
# View BE logs
|
||||
kubectl logs -n freeleaps-data-platform -l app.kubernetes.io/component=be
|
||||
|
||||
# View CN logs
|
||||
kubectl logs -n freeleaps-data-platform -l app.kubernetes.io/component=cn
|
||||
```
|
||||
|
||||
## High Availability Features
|
||||
- **FE High Availability**: 3 FE nodes with automatic failover support
|
||||
- **BE High Availability**: 3 BE nodes with data multi-replica storage
|
||||
- **CN Elasticity**: Support for horizontal scaling and automatic scaling
|
||||
- **Pod Anti-affinity**: Ensures components are distributed across different nodes
|
||||
- **Automatic Failover Recovery**: Operator automatically manages cluster state
|
||||
|
||||
## Network Configuration
|
||||
- **Internal Services**: Use ClusterIP type
|
||||
- **Port Mapping**:
|
||||
- FE: 8030(HTTP), 9010(Edit Log), 9020(RPC), 9030(Query)
|
||||
- BE: 8040(HTTP), 9050(Heartbeat), 8060(BRPC), 9060(BE Port)
|
||||
- CN: 8040(HTTP), 9050(Heartbeat), 8060(BRPC), 9060(Thrift)
|
||||
|
||||
## Storage Configuration
|
||||
- **FE Metadata**: Uses existing storage configuration
|
||||
- **BE Data**: Uses existing storage configuration
|
||||
- **CN Cache**: Uses existing storage configuration
|
||||
- **Data Persistence**: Supports automatic PVC creation and binding
|
||||
|
||||
## Monitoring and Operations
|
||||
- **Health Checks**: Built-in readiness and liveness probes
|
||||
- **Log Collection**: Structured log output
|
||||
- **Resource Monitoring**: Supports Prometheus metrics collection
|
||||
- **Automatic Scaling**: VPA supports vertical resource adjustment
|
||||
- **Operator Management**: Automatic cluster lifecycle management
|
||||
|
||||
## Upgrade and Rollback
|
||||
```bash
|
||||
# Upgrade cluster configuration
|
||||
kubectl apply -f ha-starrocks-cluster.yaml
|
||||
|
||||
# Rollback to previous version
|
||||
kubectl rollout undo deployment/starrocks-operator -n freeleaps-data-platform
|
||||
|
||||
# View cluster status
|
||||
kubectl describe starrockscluster freeleaps-starrocks -n freeleaps-data-platform
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
```bash
|
||||
# Check cluster status
|
||||
kubectl describe starrockscluster freeleaps-starrocks -n freeleaps-data-platform
|
||||
|
||||
# Check Pod events
|
||||
kubectl get events -n freeleaps-data-platform --sort-by='.lastTimestamp'
|
||||
|
||||
# Check Operator logs
|
||||
kubectl logs -n freeleaps-data-platform -l app=starrocks-operator
|
||||
|
||||
# Check storage status
|
||||
kubectl get pvc -n freeleaps-data-platform
|
||||
kubectl get pv
|
||||
```
|
||||
|
||||
## Important Notes
|
||||
1. **Existing Cluster**: This configuration will upgrade the existing `freeleaps-starrocks` cluster
|
||||
2. **Data Safety**: Data will not be lost during the upgrade process
|
||||
3. **Rolling Updates**: Operator will automatically perform rolling updates to ensure service continuity
|
||||
4. **Resource Requirements**: Ensure the cluster has sufficient resources to support the increased replica count
|
||||
@ -1,105 +0,0 @@
|
||||
apiVersion: starrocks.com/v1
|
||||
kind: StarRocksCluster
|
||||
metadata:
|
||||
name: freeleaps-starrocks
|
||||
namespace: freeleaps-data-platform
|
||||
labels:
|
||||
app: starrocks
|
||||
component: analytics
|
||||
cluster-type: ha
|
||||
spec:
|
||||
starRocksFeSpec:
|
||||
replicas: 3
|
||||
image: starrocks/fe-ubuntu:3.3-latest
|
||||
service:
|
||||
type: ClusterIP
|
||||
feEnvVars:
|
||||
- name: TZ
|
||||
value: UTC
|
||||
configMapInfo:
|
||||
configMapName: ha-starrocks-fe-config
|
||||
resolveKey: fe.conf
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- labelSelector:
|
||||
matchExpressions:
|
||||
- key: app.kubernetes.io/component
|
||||
operator: In
|
||||
values:
|
||||
- fe
|
||||
topologyKey: "kubernetes.io/hostname"
|
||||
tolerations:
|
||||
- key: "node-role.kubernetes.io/control-plane"
|
||||
operator: "Exists"
|
||||
effect: "NoSchedule"
|
||||
- key: "node-role.kubernetes.io/devops"
|
||||
operator: "Exists"
|
||||
effect: "NoSchedule"
|
||||
- key: "node-role.kubernetes.io/disk-pressure"
|
||||
operator: "Exists"
|
||||
effect: "NoSchedule"
|
||||
|
||||
starRocksBeSpec:
|
||||
replicas: 3
|
||||
image: starrocks/be-ubuntu:3.3-latest
|
||||
service:
|
||||
type: ClusterIP
|
||||
beEnvVars:
|
||||
- name: TZ
|
||||
value: UTC
|
||||
configMapInfo:
|
||||
configMapName: ha-starrocks-be-config
|
||||
resolveKey: be.conf
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- labelSelector:
|
||||
matchExpressions:
|
||||
- key: app.kubernetes.io/component
|
||||
operator: In
|
||||
values:
|
||||
- be
|
||||
topologyKey: "kubernetes.io/hostname"
|
||||
tolerations:
|
||||
- key: "node-role.kubernetes.io/control-plane"
|
||||
operator: "Exists"
|
||||
effect: "NoSchedule"
|
||||
- key: "node-role.kubernetes.io/devops"
|
||||
operator: "Exists"
|
||||
effect: "NoSchedule"
|
||||
- key: "node-role.kubernetes.io/disk-pressure"
|
||||
operator: "Exists"
|
||||
effect: "NoSchedule"
|
||||
|
||||
starRocksCnSpec:
|
||||
replicas: 2
|
||||
image: starrocks/cn-ubuntu:3.3-latest
|
||||
service:
|
||||
type: ClusterIP
|
||||
cnEnvVars:
|
||||
- name: TZ
|
||||
value: UTC
|
||||
configMapInfo:
|
||||
configMapName: ha-starrocks-cn-config
|
||||
resolveKey: cn.conf
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- labelSelector:
|
||||
matchExpressions:
|
||||
- key: app.kubernetes.io/component
|
||||
operator: In
|
||||
values:
|
||||
- cn
|
||||
topologyKey: "kubernetes.io/hostname"
|
||||
tolerations:
|
||||
- key: "node-role.kubernetes.io/control-plane"
|
||||
operator: "Exists"
|
||||
effect: "NoSchedule"
|
||||
- key: "node-role.kubernetes.io/devops"
|
||||
operator: "Exists"
|
||||
effect: "NoSchedule"
|
||||
- key: "node-role.kubernetes.io/disk-pressure"
|
||||
operator: "Exists"
|
||||
effect: "NoSchedule"
|
||||
@ -1,181 +0,0 @@
|
||||
# 高可用 StarRocks 集群配置
|
||||
# 基于现有的 values.yaml,配置高可用特性
|
||||
|
||||
# 设置时区
|
||||
timeZone: UTC
|
||||
|
||||
# 部署 StarRocks 集群
|
||||
starrocksCluster:
|
||||
# 集群名称
|
||||
name: "freeleaps-starrocks"
|
||||
# 命名空间
|
||||
namespace: "freeleaps-data-platform"
|
||||
# 启用 BE 和 CN 组件
|
||||
enabledBe: true
|
||||
enabledCn: true
|
||||
|
||||
# 全局组件配置
|
||||
componentValues:
|
||||
# 镜像版本
|
||||
image:
|
||||
tag: "3.3-latest"
|
||||
# 时区
|
||||
timeZone: UTC
|
||||
|
||||
# FE 组件配置
|
||||
starrocksFESpec:
|
||||
# 副本数 - 高可用需要至少3个
|
||||
replicas: 3
|
||||
# 镜像
|
||||
image:
|
||||
repository: starrocks/fe-ubuntu
|
||||
tag: "3.3-latest"
|
||||
# 资源配置
|
||||
resources:
|
||||
requests:
|
||||
cpu: 2
|
||||
memory: 4Gi
|
||||
limits:
|
||||
cpu: 4
|
||||
memory: 8Gi
|
||||
# 存储配置
|
||||
storageSpec:
|
||||
name: "fe"
|
||||
storageClassName: "azure-disk-std-ssd-lrs"
|
||||
storageSize: 20Gi
|
||||
logStorageClassName: "azure-disk-std-ssd-lrs"
|
||||
logStorageSize: 10Gi
|
||||
# 服务配置
|
||||
service:
|
||||
type: "ClusterIP"
|
||||
# 环境变量
|
||||
feEnvVars:
|
||||
- name: TZ
|
||||
value: UTC
|
||||
# 配置文件
|
||||
config: |
|
||||
LOG_DIR = ${STARROCKS_HOME}/log
|
||||
DATE = "$(date +%Y%m%d-%H%M%S)"
|
||||
JAVA_OPTS="-Dlog4j2.formatMsgNoLookups=true -Xmx4g -XX:+UseG1GC -Xlog:gc*:${LOG_DIR}/fe.gc.log.$DATE:time"
|
||||
http_port = 8030
|
||||
rpc_port = 9020
|
||||
query_port = 9030
|
||||
edit_log_port = 9010
|
||||
mysql_service_nio_enabled = true
|
||||
sys_log_level = INFO
|
||||
# Pod 反亲和性 - 确保高可用
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- labelSelector:
|
||||
matchExpressions:
|
||||
- key: app.kubernetes.io/component
|
||||
operator: In
|
||||
values:
|
||||
- fe
|
||||
topologyKey: "kubernetes.io/hostname"
|
||||
|
||||
# BE 组件配置
|
||||
starrocksBeSpec:
|
||||
# 副本数 - 高可用需要至少3个
|
||||
replicas: 3
|
||||
# 镜像
|
||||
image:
|
||||
repository: starrocks/be-ubuntu
|
||||
tag: "3.3-latest"
|
||||
# 资源配置
|
||||
resources:
|
||||
requests:
|
||||
cpu: 4
|
||||
memory: 8Gi
|
||||
limits:
|
||||
cpu: 8
|
||||
memory: 16Gi
|
||||
# 存储配置
|
||||
storageSpec:
|
||||
name: "be"
|
||||
storageClassName: "azure-disk-std-ssd-lrs"
|
||||
storageSize: 50Gi
|
||||
logStorageClassName: "azure-disk-std-ssd-lrs"
|
||||
logStorageSize: 20Gi
|
||||
# 服务配置
|
||||
service:
|
||||
type: "ClusterIP"
|
||||
# 环境变量
|
||||
beEnvVars:
|
||||
- name: TZ
|
||||
value: UTC
|
||||
# 配置文件
|
||||
config: |
|
||||
be_port = 9060
|
||||
webserver_port = 8040
|
||||
heartbeat_service_port = 9050
|
||||
brpc_port = 8060
|
||||
sys_log_level = INFO
|
||||
default_rowset_type = beta
|
||||
# Pod 反亲和性 - 确保高可用
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- labelSelector:
|
||||
matchExpressions:
|
||||
- key: app.kubernetes.io/component
|
||||
operator: In
|
||||
values:
|
||||
- be
|
||||
topologyKey: "kubernetes.io/hostname"
|
||||
|
||||
# CN 组件配置
|
||||
starrocksCnSpec:
|
||||
# 副本数 - 弹性计算节点
|
||||
replicas: 2
|
||||
# 镜像
|
||||
image:
|
||||
repository: starrocks/cn-ubuntu
|
||||
tag: "3.3-latest"
|
||||
# 资源配置
|
||||
resources:
|
||||
requests:
|
||||
cpu: 2
|
||||
memory: 4Gi
|
||||
limits:
|
||||
cpu: 4
|
||||
memory: 8Gi
|
||||
# 存储配置
|
||||
storageSpec:
|
||||
name: "cn"
|
||||
storageClassName: "azure-disk-std-ssd-lrs"
|
||||
storageSize: 20Gi
|
||||
logStorageClassName: "azure-disk-std-ssd-lrs"
|
||||
logStorageSize: 10Gi
|
||||
# 服务配置
|
||||
service:
|
||||
type: "ClusterIP"
|
||||
# 环境变量
|
||||
cnEnvVars:
|
||||
- name: TZ
|
||||
value: UTC
|
||||
# 配置文件
|
||||
config: |
|
||||
sys_log_level = INFO
|
||||
thrift_port = 9060
|
||||
webserver_port = 8040
|
||||
heartbeat_service_port = 9050
|
||||
brpc_port = 8060
|
||||
# Pod 反亲和性 - 确保高可用
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- labelSelector:
|
||||
matchExpressions:
|
||||
- key: app.kubernetes.io/component
|
||||
operator: In
|
||||
values:
|
||||
- cn
|
||||
topologyKey: "kubernetes.io/hostname"
|
||||
|
||||
# 监控配置
|
||||
metrics:
|
||||
serviceMonitor:
|
||||
enabled: true
|
||||
interval: 15s
|
||||
@ -1,43 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: ha-starrocks-fe-config
|
||||
namespace: freeleaps-data-platform
|
||||
data:
|
||||
fe.conf: |
|
||||
LOG_DIR = ${STARROCKS_HOME}/log
|
||||
DATE = "$(date +%Y%m%d-%H%M%S)"
|
||||
JAVA_OPTS="-Dlog4j2.formatMsgNoLookups=true -Xmx4g -XX:+UseG1GC -Xlog:gc*:${LOG_DIR}/fe.gc.log.$DATE:time"
|
||||
http_port = 8030
|
||||
rpc_port = 9020
|
||||
query_port = 9030
|
||||
edit_log_port = 9010
|
||||
mysql_service_nio_enabled = true
|
||||
sys_log_level = INFO
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: ha-starrocks-be-config
|
||||
namespace: freeleaps-data-platform
|
||||
data:
|
||||
be.conf: |
|
||||
be_port = 9060
|
||||
webserver_port = 8040
|
||||
heartbeat_service_port = 9050
|
||||
brpc_port = 8060
|
||||
sys_log_level = INFO
|
||||
default_rowset_type = beta
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: ha-starrocks-cn-config
|
||||
namespace: freeleaps-data-platform
|
||||
data:
|
||||
cn.conf: |
|
||||
sys_log_level = INFO
|
||||
thrift_port = 9060
|
||||
webserver_port = 8040
|
||||
heartbeat_service_port = 9050
|
||||
brpc_port = 8060
|
||||
@ -0,0 +1,55 @@
|
||||
# For FE component, it needs to store metadata of StarRocks and FE log.
|
||||
# For BE component, it needs to store data of StarRocks and BE log.
|
||||
# For CN component, it needs to store cache data of StarRocks and CN log.
|
||||
# By default, operator create an emptyDir storage volume for each metadata, data, and log.
|
||||
# This manifest deploys a StarRocks cluster with other persistent storage volume.
|
||||
#
|
||||
# Note: you do not need to create the storage volume in advance.
|
||||
#
|
||||
# If storageClassName is left blank, the default storage class will be used. You can view
|
||||
# available storage classes in the Kubernetes cluster with "kubectl get storageclass".
|
||||
# Note: selecting an appropriate storage class is crucial as it dictates the type of storage volume.
|
||||
# See https://kubernetes.io/docs/concepts/storage/persistent-volumes/ for more information.
|
||||
|
||||
apiVersion: starrocks.com/v1
|
||||
kind: StarRocksCluster
|
||||
metadata:
|
||||
name: freeleaps-starrocks-cluster
|
||||
namespace: freeleaps-data-platform
|
||||
spec:
|
||||
starRocksFeSpec:
|
||||
image: starrocks/fe-ubuntu:latest
|
||||
replicas: 3
|
||||
limits:
|
||||
cpu: "1"
|
||||
memory: 2Gi
|
||||
requests:
|
||||
cpu: "0.5"
|
||||
memory: 1Gi
|
||||
storageVolumes:
|
||||
- name: fe-meta
|
||||
storageClassName: "azure-disk-std-lrs"
|
||||
storageSize: 25Gi # the size of storage volume for metadata
|
||||
mountPath: /opt/starrocks/fe/meta # the path of metadata
|
||||
- name: fe-log
|
||||
storageClassName: "azure-disk-std-lrs"
|
||||
storageSize: 25Gi # the size of storage volume for log
|
||||
mountPath: /opt/starrocks/fe/log # the path of log
|
||||
starRocksBeSpec:
|
||||
image: starrocks/be-ubuntu:latest
|
||||
replicas: 3
|
||||
limits:
|
||||
cpu: "2"
|
||||
memory: 4Gi
|
||||
requests:
|
||||
cpu: "1"
|
||||
memory: 2Gi
|
||||
storageVolumes:
|
||||
- name: be-data
|
||||
storageClassName: "azure-disk-std-lrs"
|
||||
storageSize: 25Gi # the size of storage volume for data
|
||||
mountPath: /opt/starrocks/be/storage # the path of data
|
||||
- name: be-log
|
||||
storageClassName: "azure-disk-std-lrs"
|
||||
storageSize: 25Gi # the size of storage volume for log
|
||||
mountPath: /opt/starrocks/be/log # the path of log
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,43 +0,0 @@
|
||||
apiVersion: autoscaling.k8s.io/v1
|
||||
kind: VerticalPodAutoscaler
|
||||
metadata:
|
||||
name: starrocks-fe-vpa
|
||||
namespace: freeleaps-data-platform
|
||||
spec:
|
||||
resourcePolicy:
|
||||
containerPolicies:
|
||||
- containerName: '*'
|
||||
controlledResources:
|
||||
- cpu
|
||||
- memory
|
||||
maxAllowed:
|
||||
cpu: 500m
|
||||
memory: 2Gi
|
||||
targetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
name: freeleaps-starrocks-fe
|
||||
updatePolicy:
|
||||
updateMode: "Auto"
|
||||
---
|
||||
apiVersion: autoscaling.k8s.io/v1
|
||||
kind: VerticalPodAutoscaler
|
||||
metadata:
|
||||
name: starrocks-be-vpa
|
||||
namespace: freeleaps-data-platform
|
||||
spec:
|
||||
resourcePolicy:
|
||||
containerPolicies:
|
||||
- containerName: '*'
|
||||
controlledResources:
|
||||
- cpu
|
||||
- memory
|
||||
maxAllowed:
|
||||
cpu: 500m
|
||||
memory: 2Gi
|
||||
targetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
name: freeleaps-starrocks-be
|
||||
updatePolicy:
|
||||
updateMode: "Auto"
|
||||
@ -153,7 +153,7 @@ auth:
|
||||
## @param auth.password RabbitMQ application password
|
||||
## ref: https://github.com/bitnami/containers/tree/main/bitnami/rabbitmq#environment-variables
|
||||
##
|
||||
password: ""
|
||||
password: "D3b0HKz71T0OcYF8"
|
||||
## @param auth.securePassword Whether to set the RabbitMQ password securely. This is incompatible with loading external RabbitMQ definitions and 'true' when not setting the auth.password parameter.
|
||||
## ref: https://github.com/bitnami/containers/tree/main/bitnami/rabbitmq#environment-variables
|
||||
##
|
||||
|
||||
Loading…
Reference in New Issue
Block a user