diff --git a/cluster/manifests/freeleaps-data-platform/kafka/README.md b/cluster/manifests/freeleaps-data-platform/kafka/README.md deleted file mode 100644 index 931c402b..00000000 --- a/cluster/manifests/freeleaps-data-platform/kafka/README.md +++ /dev/null @@ -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) diff --git a/cluster/manifests/freeleaps-data-platform/kafka/storage-class.yaml b/cluster/manifests/freeleaps-data-platform/kafka/storage-class.yaml deleted file mode 100644 index 0d0170df..00000000 --- a/cluster/manifests/freeleaps-data-platform/kafka/storage-class.yaml +++ /dev/null @@ -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 diff --git a/cluster/manifests/freeleaps-data-platform/kafka/vpa.yaml b/cluster/manifests/freeleaps-data-platform/kafka/vpa.yaml deleted file mode 100644 index ed64fbdb..00000000 --- a/cluster/manifests/freeleaps-data-platform/kafka/vpa.yaml +++ /dev/null @@ -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" \ No newline at end of file diff --git a/cluster/manifests/freeleaps-data-platform/pinot/values.yaml b/cluster/manifests/freeleaps-data-platform/pinot/values.yaml deleted file mode 100644 index ecfc7ded..00000000 --- a/cluster/manifests/freeleaps-data-platform/pinot/values.yaml +++ /dev/null @@ -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 \ No newline at end of file diff --git a/cluster/manifests/freeleaps-data-platform/pinot/vpa.yaml b/cluster/manifests/freeleaps-data-platform/pinot/vpa.yaml deleted file mode 100644 index b03c0669..00000000 --- a/cluster/manifests/freeleaps-data-platform/pinot/vpa.yaml +++ /dev/null @@ -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" \ No newline at end of file diff --git a/cluster/manifests/freeleaps-data-platform/star-rocks/README.md b/cluster/manifests/freeleaps-data-platform/star-rocks/README.md deleted file mode 100644 index 132f0a5f..00000000 --- a/cluster/manifests/freeleaps-data-platform/star-rocks/README.md +++ /dev/null @@ -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 diff --git a/cluster/manifests/freeleaps-data-platform/star-rocks/ha-starrocks-cluster.yaml b/cluster/manifests/freeleaps-data-platform/star-rocks/ha-starrocks-cluster.yaml deleted file mode 100644 index f650c3b6..00000000 --- a/cluster/manifests/freeleaps-data-platform/star-rocks/ha-starrocks-cluster.yaml +++ /dev/null @@ -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" diff --git a/cluster/manifests/freeleaps-data-platform/star-rocks/ha-starrocks-values.yaml b/cluster/manifests/freeleaps-data-platform/star-rocks/ha-starrocks-values.yaml deleted file mode 100644 index c49b6556..00000000 --- a/cluster/manifests/freeleaps-data-platform/star-rocks/ha-starrocks-values.yaml +++ /dev/null @@ -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 diff --git a/cluster/manifests/freeleaps-data-platform/star-rocks/starrocks-configmaps.yaml b/cluster/manifests/freeleaps-data-platform/star-rocks/starrocks-configmaps.yaml deleted file mode 100644 index f6dd5138..00000000 --- a/cluster/manifests/freeleaps-data-platform/star-rocks/starrocks-configmaps.yaml +++ /dev/null @@ -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 diff --git a/cluster/manifests/freeleaps-data-platform/star-rocks/starrocks_cluster.yaml b/cluster/manifests/freeleaps-data-platform/star-rocks/starrocks_cluster.yaml new file mode 100644 index 00000000..44486337 --- /dev/null +++ b/cluster/manifests/freeleaps-data-platform/star-rocks/starrocks_cluster.yaml @@ -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 diff --git a/cluster/manifests/freeleaps-data-platform/star-rocks/values.yaml b/cluster/manifests/freeleaps-data-platform/star-rocks/values.yaml deleted file mode 100644 index 7704c8c4..00000000 --- a/cluster/manifests/freeleaps-data-platform/star-rocks/values.yaml +++ /dev/null @@ -1,1269 +0,0 @@ -# set the nameOverride values for creating the same resources with parent chart. -# In version v1.7.1 or before, there is only one chart called kube-starrocks, and the chart name is the prefix -# of some resources created by the chart. -# In version v1.8.0, the kube-starrocks chart is split into two charts, and to keep backward compatibility, the -# nameOverride is used to set the prefix of the resources created by starrocks chart. -nameOverride: "" - -# This configuration is used to modify the root password during initial deployment. -# After deployment is completed, it won't take effect to modify the password here and to do a `helm upgrade`. -# It also supports providing secret name that contains password, using the password in the secret instead of the plaintext in the values.yaml. -# When both password and passwordSecret are set, only passwordSecret takes effect. -# Note: If you install StarRocks using helm install without setting the initPassword, then for subsequent upgrade deployments, -# you should also not set the initPassword. -# If you install StarRocks using helm install and set the initPassword, please always retain the configuration of initPassword. -initPassword: - enabled: false - # Note: If you are using Argo CD to deploy the StarRocks cluster, you must set isInstall to false after the first installation. - # This is because Argo CD support helm like this: helm template | kubectl apply -f -. If isInstall is true, the - # initPassword job will be executed every time you run the command. - # see https://github.com/argoproj/argo-cd/discussions/7496#discussioncomment-1609267 for more information - isInstall: true - password: "" - # The secret name that contains password, the key of the secret is "password", and you should create it first. - passwordSecret: "" - # The image of the initPassword job, if it is not set, the FE image will be used. - # see https://github.com/StarRocks/starrocks-kubernetes-operator/issues/453 for why we need to set the image. - image: "" - # The annotations for the Job, not including the annotations for the pod. - annotations: {} - # The annotations for the Job's Pod, not including the annotations for the job. - podAnnotations: {} - # resources for init_job pod. - resources: {} - #resources: - # requests: - # cpu: 500m - # memory: 400Mi - # limits: - # cpu: 500m - # memory: 800Mi - -# TimeZone is used to set the environment variable TZ for pod, with Asia/Shanghai as the default. -timeZone: UTC - -# This configuration is used to integrate with external system DataDog. -# You can enable the integration by setting the enabled to true, e.g. datalog.log.enabled=true will enable datadog agent -# to collect the log. -datadog: - log: - enabled: false - # besides the attributes you added, chart will append "source" and "service" attributes to the log config. - # see https://docs.datadoghq.com/containers/kubernetes/log/?tab=operator for more details. - logConfig: '{}' # e.g. '{"app": "starrocks", "tags": ["aa", "bb"]}' - metrics: - enabled: false - profiling: - fe: false # change to 'true' to enable profiling on FE pods; - be: false # change to 'true' to enable profiling on BE pods; - cn: false # change to 'true' to enable profiling on CN pods; - env: "starrocks-default" # the default value for DD_ENV; - configMode: "service" # see https://docs.datadoghq.com/containers/cluster_agent/admission_controller/?tab=operator#configure-apm-and-dogstatsd-communication-mode - -# This configuration is used to integrate with external system Prometheus. -metrics: - serviceMonitor: - # Whether to expose metrics to Prometheus by ServiceMonitor. - # Note: make sure the prometheus operator is installed in your cluster. - # If prometheus is not installed by operator, you can add annotations on k8s service to expose metrics. - # see https://github.com/StarRocks/starrocks-kubernetes-operator/blob/main/doc/integration/integration-prometheus-grafana.md#51-turn-on-the-prometheus-metrics-scrape-by-adding-annotations for more details. - enabled: false - # Prometheus ServiceMonitor labels - labels: {} - # scraper: prometheus-operator - # Prometheus ServiceMonitor interval - interval: 15s - # Whether to enable basic auth - basicAuth: - enabled: false - # The name of the secret that contains the username for basic auth. - # The secret should contain a key named "username". - usernameSecretName: "" - # The key in the secret that contains the username for basic auth. - usernameSecretKey: "" - # The name of the secret that contains the password for basic auth. - # The secret should contain a key named "password". - passwordSecretName: "" - # The key in the secret that contains the password for basic auth. - passwordSecretKey: "" - # Whether to enable request parameters for the ServiceMonitor. - endpointParam: - enabled: false - # the parameters for the ServiceMonitor. - # params: - # with_materialized_view_metrics: - # - "all" - params: {} - -# deploy a starrocks cluster -starrocksCluster: - # the name of starrockscluster cluster, if not set, the value of nameOverride fields will be used. - name: "freeleaps-starrocks" - # the namespace of starrockscluster cluster, if not set, the release namespace will be used. - namespace: "freeleaps-data-platform" - # annotations for starrocks cluster. - annotations: {} - # specify the cn deploy or not. - enabledBe: true - enabledCn: false - # disaster recovery configuration. If you want to enable disaster recovery, you need to set the enabled field to true. - # Note: - # 1. If you are using an existing StarRocks cluster, you need to clean up the meta of the FE component and the data of the CN - # component before enabling disaster recovery. So it is better to use an empty StarRocks cluster to start disaster recovery. - # 2. After disaster recovery, Operator will reboot the cluster as a normal cluster automatically, so if you need more checks by yourself, - # you can - # 1. set the replicas of FE component to 1 - # 2. set enabledBe and enabledCn to be false to disable to deploy BE and CN components. - # 3. generation field is used to run multiple times for disaster recovery. For example, if the last disaster recovery is - # not what you want, you can modify related configurations and increase the generation value to run a new disaster recovery. - disasterRecovery: - # enabled: true - # generation: 1 - # componentValues field is used to define values for all starrocks cluster components, including starrocksFESpec, - # starrocksBeSpec, starrocksCnSpec, not including starrocksFeProxySpec. So that you do not need to modify them in - # their own spec. - # Note: - # 1. the values in their own spec will take precedence over the values in this field. - # 2. the values in their own spec will replace all the values in this field, not merge. - componentValues: - image: - tag: "3.3-latest" - # hostAliases allows adding entries to /etc/hosts inside the containers. - hostAliases: [] - # - ip: "127.0.0.1" - # hostnames: - # - "example.com" - # If runAsNonRoot is true, the container is run as non-root user. - # The userId will be set to 1000, and the groupID will be set to 1000. - # Note: If you have started the container through root, and then FE/BE began to create directories, write files, etc. - # under the mounted directory as root. When you start the container as a non-root user, the container will not - # have permission to access these files. So you'd better set runAsNonRoot to true when you set up the cluster. - # schedulerName allows you to specify which scheduler will be used for your pods. - schedulerName: "" - # serviceAccount for access cloud service. - serviceAccount: "" - # imagePullSecrets allows you to use secrets to pull images for pods. - imagePullSecrets: [] - # - name: "image-pull-secret" - # tolerations for pod scheduling to nodes with taints - # Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ - tolerations: [] - # - key: "key" - # operator: "Equal|Exists" - # value: "value" - # effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)" - # topologySpreadConstraints for scheduling pods across failure-domains. - # Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/ - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # whenUnsatisfiable: DoNotSchedule|ScheduleAnyway - # labelSelector: - # matchLabels: - # foo: bar - # If specified, the pod's nodeSelector,displayName="Map of nodeSelectors to match when scheduling pods on nodes" - # Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector - nodeSelector: {} - # kubernetes.io/arch: amd64 - # kubernetes.io/os: linux - # affinity for pod scheduling. - affinity: {} - # nodeAffinity: - # requiredDuringSchedulingIgnoredDuringExecution: - # nodeSelectorTerms: - # - matchFields: - # - key: metadata.name - # operator: In - # values: - # - target-host-name - # podAntiAffinity: - # requiredDuringSchedulingIgnoredDuringExecution: - # - labelSelector: - # matchExpressions: - # - key: app.kubernetes.io/component - # operator: In - # values: - # - fe - # - be - # - cn - # topologyKey: "kubernetes.io/hostname" - # the pod labels for user select or classify pods. - podLabels: {} - -# spec to deploy fe. -starrocksFESpec: - # number of replicas to deploy for a fe statefulset. - replicas: 1 - image: - # image sliced by "repository:tag" - repository: starrocks/fe-ubuntu - tag: "" - imagePullPolicy: IfNotPresent - # Specify the entrypoint for FE. - # By default, operator will use '/opt/starrocks/fe_entrypoint.sh' as command, and use '$(FE_SERVICE_NAME)' as args in container spec. - # If entrypoint is set, the command will be ["bash", "-c"], and the args will be filename of the entrypoint script. - # A configmap with name $cluster-fe-entrypoint-script will be created, and the script will be mounted to /etc/starrocks/entrypoint.sh - # Pod will be restarted if the entrypoint script is updated. - entrypoint: {} - # script: | - # #! /bin/bash - # echo "do something before start fe" - # exec /opt/starrocks/fe_entrypoint.sh $FE_SERVICE_NAME - # add annotations for fe pods. For example, if you want to config monitor for datadog, you can config the annotations. - annotations: {} - # If runAsNonRoot is true, the container is run as non-root user. - # The userId will be set to 1000, and the groupID will be set to 1000. - # Note: If you have started the container through root, and then FE/BE began to create directories, write files, etc. - # under the mounted directory as root. When you start the container as a non-root user, the container will not - # have permission to access these files. So you'd better set runAsNonRoot to true when you set up the cluster. - runAsNonRoot: false - # Whether this container has a read-only root filesystem. - # Note: The FE/BE/CN container should support read-only root filesystem. The newest version of FE/BE/CN is 3.3.6, and does not support read-only root filesystem. - readOnlyRootFilesystem: false - # add/drop capabilities for FE container. - capabilities: {} - # add: - # - PERFMON - # - SYS_PTRACE - # drop: - # - SYS_ADMIN - # set sysctls for fe pod. - # See https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/ for how to set sysctls. - # Note: The use of unsafe sysctls is at-your-own-risk and can lead to severe problems - sysctls: [] - # - name: net.ipv4.ip_unprivileged_port_start - # value: "2048" - # specify the service name and port config and serviceType - # the service type refer https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types - service: - # the fe service type, only supported ClusterIP, NodePort, LoadBalancer - type: "ClusterIP" - # the loadBalancerIP for static ip config when the type=LoadBalancer and loadbalancerIp is not empty. - loadbalancerIP: "" - # add annotations for external fe service. - annotations: {} - # Add labels for external fe service. The operator may add its own default labels. - labels: {} - # config the service port for fe service. - # To assign a specific port or nodePort to a service, you should specify them by the corresponding name or - # containerPort in the service configuration. If both containerPort and name are specified, containerPort takes precedence. - # For fe, port name can be http, query, rpc, edit-log, and their default container port is 8030, 9030, 9020, 9010. - ports: [] - # e.g. specify a dedicated node port for fe service by containerPort. - # - nodePort: 30030 # The range of valid ports is 30000-32767 - # containerPort: 8030 # The port exported on the container - # specify the source IP ranges for the load balancer when the type=LoadBalancer. - loadBalancerSourceRanges: [] - # - 10.0.0.0/8 - # imagePullSecrets allows you to use secrets to pull images for pods. - imagePullSecrets: [] - # - name: "image-pull-secret" - # serviceAccount for fe access cloud service. - serviceAccount: "" - # If specified, the pod's nodeSelector,displayName="Map of nodeSelectors to match when scheduling pods on nodes" - # Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector - nodeSelector: {} - # kubernetes.io/arch: amd64 - # kubernetes.io/os: linux - # the pod labels for user select or classify pods. - podLabels: {} - # hostAliases allows adding entries to /etc/hosts inside the containers - hostAliases: [] - # - ip: "127.0.0.1" - # hostnames: - # - "example.com" - # schedulerName allows you to specify which scheduler will be used for your pods. - schedulerName: "" - # Additional fe container environment variables. - # See https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/ for how to define environment variables. - # Note: If you use slice to define environment variables, and if there are multiple values files, the values in the last values file will take effect. - # If you use map to define environment variables, the values in the values files will be merged. - # You can only use one of slice and map to define environment variables. - # In order to avoid different type of feEnvVars, we do not define the default value of feEnvVars, e.g. feEnvVars: [] or feEnvVars: {}. - #feEnvVars: - # define environment variables by slice. - # e.g. static environment variable: - # - name: DEMO_GREETING - # value: "Hello from the environment" - # e.g. secret environment variable: - # - name: USERNAME - # valueFrom: - # secretKeyRef: - # name: mysecret - # key: username - # affinity for fe pod scheduling. - # Note: It will affect the scheduling of the init-password job. - affinity: {} - # nodeAffinity: - # requiredDuringSchedulingIgnoredDuringExecution: - # nodeSelectorTerms: - # - matchFields: - # - key: metadata.name - # operator: In - # values: - # - target-host-name - # podAntiAffinity: - # requiredDuringSchedulingIgnoredDuringExecution: - # - labelSelector: - # matchExpressions: - # - key: app.kubernetes.io/component - # operator: In - # values: - # - fe - # topologyKey: "kubernetes.io/hostname" - # Node tolerations for fe pod scheduling to nodes with taints - # Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ - # Note: It will affect the scheduling of the init-password job. - tolerations: [] - # - key: "key" - # operator: "Equal|Exists" - # value: "value" - # effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)" - # topologySpreadConstraints for scheduling pods across failure-domains. - # Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/ - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # whenUnsatisfiable: DoNotSchedule|ScheduleAnyway - # labelSelector: - # matchLabels: - # foo: bar - # resources for fe pod. - resources: - requests: - cpu: 500m - memory: 1Gi - # If you want to remove one resource limit, e.g. cpu, you can set it to cpu: "unlimited". - limits: - cpu: 1000m - memory: 2Gi - # fe storageSpec for persistent metadata. - # Note: Once set, the following fields will not be allowed to be modified. - storageSpec: - # Specifies the name prefix of the volumes to mount. If left unspecified, - # `emptyDir` volumes will be used by default, which are ephemeral and data - # will be lost on pod restart. - # - # For persistent storage, specify a volume name prefix. - # For example, using `fe` as the name prefix would be appropriate. - # Note: If the values of the following mountPaths are not default, you must set the name to fe. - name: "" - # The storageClassName represent the used storageclass name. if not set will use k8s cluster default storageclass. - # You must set name when you set storageClassName. - # Note: Because hostPath field is not supported here, hostPath is not allowed to be set in storageClassName. - storageClassName: "azure-disk-std-lrs" - # the persistent volume size for data. - # fe container stop running if the disk free space which the fe meta directory residents, is less than 5Gi. - storageSize: 10Gi - # If storageMountPath is empty, the storageMountPath will be set to /opt/starrocks/fe/meta. - storageMountPath: "" - # If not set will use the value of the storageClassName field. - logStorageClassName: "azure-disk-std-lrs" - # Setting this parameter can persist log storage, and the mount path is /opt/starrocks/fe/log. - # If you set it to 0Gi, the related PVC will not be created, and the log will not be persisted. - logStorageSize: 5Gi - # If logMountPath is empty, the logMountPath will be set to /opt/starrocks/fe/log. - # If logMountPath is not /opt/starrocks/fe/log, you must add in config the following configuration: - # dump_log_dir = xxx - # sys_log_dir = xxx - # audit_log_dir = xxx - logMountPath: "" - # mount emptyDir volumes if necessary. - # Note: please use storageSpec field for persistent metadata and log. - emptyDirs: [] - # e.g. mount an emptyDir volume to /tmp - # - name: tmp-data - # mountPath: /tmp - # mount hostPath volumes if necessary. - # Note: please use storageSpec field for persistent storage data and log. - hostPaths: [] - # e.g. mount a hostPath volume to /tmp - # - name: tmp-data - # hostPath: - # path: /tmp - # type: Directory - # mountPath: /tmp - # the config for start fe. the base information as follows. - config: | - LOG_DIR = ${STARROCKS_HOME}/log - DATE = "$(date +%Y%m%d-%H%M%S)" - JAVA_OPTS="-Dlog4j2.formatMsgNoLookups=true -Xmx8192m -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 - # A map object for setting the config. When configyaml is set, to non-empty, the configs in configyaml will take - # precedence and values in config field will be discarded. - # Note: When using configyaml, the number needs to be quoted to avoid being converted to scientific notation. - # e.g. brpc_socket_max_unwritten_bytes: "10737418240" - configyaml: {} - # mount secrets if necessary. - # see https://kubernetes.io/docs/concepts/storage/volumes/#using-subpath for more details about subPath. - secrets: [] - # e.g. mount my-secret to /etc/my-secret - # - name: my-secret - # mountPath: /etc/my-secret - # subPath: "" - # mount configmaps if necessary. - # see https://kubernetes.io/docs/concepts/storage/volumes/#using-subpath for more details about subPath. - configMaps: [] - # e.g. mount my-configmap to /etc/my-configmap - # - name: my-configmap - # mountPath: /etc/my-configmap - # subPath: "" - # terminationGracePeriodSeconds defines duration in seconds the FE pod needs to terminate gracefully. - # default value is 120 seconds - terminationGracePeriodSeconds: 120 - - # Please upgrade the CRD with v1.8.7 released version, if you want to use the following configuration. - # including: startupProbeFailureSeconds, livenessProbeFailureSeconds, readinessProbeFailureSeconds - - # StartupProbeFailureSeconds defines the total failure seconds of startup Probe. - # default value is 300 seconds - # You can set it to "0" to disable the probe. - startupProbeFailureSeconds: - # LivenessProbeFailureSeconds defines the total failure seconds of liveness Probe. - # default value is 15 seconds - # You can set it to "0" to disable the probe. - livenessProbeFailureSeconds: - # ReadinessProbeFailureSeconds defines the total failure seconds of readiness Probe. - # default value is 15 seconds - # You can set it to "0" to disable the probe. - readinessProbeFailureSeconds: - # Lifecycle describes actions that the management system should take in response to container lifecycle events. - # By default, Operator will add corresponding preStop hooks for different components. For example, the preStop - # script for the FE Component is /opt/starrocks/fe_prestop.sh, for the BE Component is /opt/starrocks/be_prestop.sh, - # and for the CN Component is /opt/starrocks/cn_prestop.sh. - # You can just set postStart hook. - lifecycle: {} - # postStart: - # exec: - # command: - # - /bin/sh - # - -c - # - echo "Hello, world!" - # Sidecars is an optional list of containers that are run in the same pod as the starrocks component. - # You can use this field to launch helper containers that provide additional functionality to the main container. - # See https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#Container for how to define sidecars. - sidecars: [] - # - name: sidecar-container - # image: busybox - # # If starrocksFESpec.storageSpec.name is fe or not set, you can mount the volume of meta like this. - # command: ['sh', '-c', 'echo "hello from the sidecar container" >/opt/starrocks/fe/meta/sidecar-data.txt && sleep 3600'] - # volumeMounts: - # - mountPath: /opt/starrocks/fe/meta - # name: fe-meta # append -meta to the end of the name of the starrocksFESpec.storageSpec.name - # sidecarsMap is an optional map of containers that are run in the same pod as the starrocks component. - # The reason for using sidecarsMap please refer to https://github.com/StarRocks/starrocks-kubernetes-operator/issues/618 - # sidecarsMap has higher priority than sidecars, and the key of sidecarsMap is the name of the sidecar container. - sidecarsMap: {} - # sidecar-container: - # image: busybox - # # If starrocksFESpec.storageSpec.name is fe or not set, you can mount the volume of meta like this. - # command: ['sh', '-c', 'echo "hello from the sidecar container" >/opt/starrocks/fe/meta/sidecar-data.txt && sleep 3600'] - # volumeMounts: - # - mountPath: /opt/starrocks/fe/meta - # name: fe-meta # append -meta to the end of the name of the starrocksFESpec.storageSpec.name - # initContainers is an optional list of containers that are run in the same pod as the starrocks component. - # You can use this to launch helper containers that run before the main container starts. - # See https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#Container for how to configure a container. - initContainers: [] - # - name: init-container - # image: busybox - # # If starrocksFESpec.storageSpec.name is fe or not set, you can mount the volume of meta like this. - # command: ['sh', '-c', 'echo "hello from the init container" >/opt/starrocks/fe/meta/init-data.txt'] - # volumeMounts: - # - mountPath: /opt/starrocks/fe/meta - # name: fe-meta # append -meta to the end of the name of the starrocksFESpec.storageSpec.name - # Max unavailable pods for the fe component when doing rolling update. - # This field cannot be 0. The default setting is 1. - # Note: Because Operator uses statefulset to manage this component, the maxUnavailable field is in Alpha stage, and it is honored - # only by API servers that are running with the MaxUnavailableStatefulSet feature gate enabled. - # See https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#maximum-unavailable-pods for more details. - maxUnavailablePods: - # Share a single process namespace between all of the containers in a pod. - # When this is set containers will be able to view and signal processes from other containers - # in the same pod, and the first process in each container will not be assigned PID 1. - shareProcessNamespace: - -# spec for compute node, compute node provide compute function. -starrocksCnSpec: - # number of replicas to deploy for CN component. - # - # When autoscaling of the CN statefulset is used the `replicas` field is set to null - # by the operator, and autoscaling is controlled by Horizontal Pod Autoscaling (HPA). - # You should only uncomment and set the `replicas` field if autoscaling is disabled. - # replicas: 1 - image: - # image sliced by "repository:tag" - repository: starrocks/cn-ubuntu - tag: "" - imagePullPolicy: IfNotPresent - # Specify the entrypoint for CN. - # By default, operator will use '/opt/starrocks/cn_entrypoint.sh' as command, and use '$(FE_SERVICE_NAME)' as args in container spec. - # If entrypoint is set, the command will be ["bash", "-c"], and the args will be filename of the entrypoint script. - # A configmap with name $cluster-cn-entrypoint-script will be created, and the script will be mounted to /etc/starrocks/entrypoint.sh - # Pod will be restarted if the entrypoint script is updated. - entrypoint: {} - # script: | - # #! /bin/bash - # echo "do something before start cn" - # exec /opt/starrocks/cn_entrypoint.sh $FE_SERVICE_NAME - # serviceAccount for cn access cloud service. - serviceAccount: "" - # add annotations for cn pods. example, if you want to config monitor for datadog, you can config the annotations. - annotations: {} - # If runAsNonRoot is true, the container is run as non-root user. - # The userId will be set to 1000, and the groupID will be set to 1000. - # Note: If you have started the container through root, and then FE/BE began to create directories, write files, etc. - # under the mounted directory as root. When you start the container as a non-root user, the container will not - # have permission to access these files. So you'd better set runAsNonRoot to true when you set up the cluster. - runAsNonRoot: false - # Whether this container has a read-only root filesystem. - # Note: The FE/BE/CN container should support read-only root filesystem. The newest version of FE/BE/CN is 3.3.6, and does not support read-only root filesystem. - readOnlyRootFilesystem: false - # add/drop capabilities for CN container. - capabilities: {} - # add: - # - PERFMON - # - SYS_PTRACE - # drop: - # - SYS_ADMIN - # set sysctls for cn pod. - # See https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/ for how to set sysctls. - # Note: The use of unsafe sysctls is at-your-own-risk and can lead to severe problems - sysctls: [] - # - name: net.ipv4.ip_unprivileged_port_start - # value: "2048" - # specify the service name and port config and serviceType - # the service type refer https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types - service: - # the cn service type, only supported ClusterIP, NodePort, LoadBalancer - type: "ClusterIP" - # the loadBalancerIP for static ip config when the type=LoadBalancer and loadBalancerIp is not empty. - loadbalancerIP: "" - # add annotations for external cn service. - annotations: {} - # Add labels for external cn service. The operator may add its own default labels. - labels: {} - # config the service port for cn service. - # To assign a specific port or nodePort to a service, you should specify them by the corresponding name or - # containerPort in the service configuration. If both containerPort and name are specified, containerPort takes precedence. - # For cn, port name can be webserver, heartbeat, brpc, thrift, and their default container port is 8040, 9050, 8060, 9060. - ports: [] - # e.g. specify a dedicated node port for cn service by containerPort. - # - nodePort: 30040 # The range of valid ports is 30000-32767 - # containerPort: 8040 # The port on the container to expose - # specify the source IP ranges for the load balancer when the type=LoadBalancer. - loadBalancerSourceRanges: [] - # - 10.0.0.0/8 - # imagePullSecrets allows you to use secrets for pulling images for your pods. - imagePullSecrets: [] - # - name: "image-pull-secret" - # If specified, the pod's nodeSelector,displayName="Map of nodeSelectors to match when scheduling pods on nodes" - # Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector - nodeSelector: {} - # kubernetes.io/arch: amd64 - # kubernetes.io/os: linux - # the pod labels for user select or classify pods. - podLabels: {} - ## hostAliases allows adding entries to /etc/hosts inside the containers - hostAliases: [] - # - ip: "127.0.0.1" - # hostnames: - # - "example.com" - # schedulerName allows you to specify which scheduler will be used for the pod - schedulerName: "" - # Additional cn container environment variables. - # See https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/ for how to define environment variables. - # Note: If you use slice to define environment variables, and if there are multiple values files, the values in the last values file will take effect. - # If you use map to define environment variables, the values in the values files will be merged. - # You can only use one of slice and map to define environment variables. - # In order to avoid different type of cnEnvVars, we do not define the default value of cnEnvVars, e.g. cnEnvVars: [] or cnEnvVars: {}. - # cnEnvVars: - # define environment variables by slice. - # e.g. static environment variable: - # - name: DEMO_GREETING - # value: "Hello from the environment" - # e.g. secret environment variable: - # - name: USERNAME - # valueFrom: - # secretKeyRef: - # name: mysecret - # key: username - # affinity for cn pod scheduling. - affinity: {} - # nodeAffinity: - # requiredDuringSchedulingIgnoredDuringExecution: - # nodeSelectorTerms: - # - matchFields: - # - key: metadata.name - # operator: In - # values: - # - target-host-name - # podAntiAffinity: - # requiredDuringSchedulingIgnoredDuringExecution: - # - labelSelector: - # matchExpressions: - # - key: app.kubernetes.io/component - # operator: In - # values: - # - cn - # topologyKey: "kubernetes.io/hostname" - # Node tolerations for cn pod scheduling to nodes with taints - # Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ - tolerations: [] - # - key: "key" - # operator: "Equal|Exists" - # value: "value" - # effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)" - # topologySpreadConstraints for scheduling pods across failure-domains. - # Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/ - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # whenUnsatisfiable: DoNotSchedule|ScheduleAnyway - # labelSelector: - # matchLabels: - # foo: bar - autoScalingPolicy: {} - # you can select different versions of HPA (Horizontal Pod Autoscaler) based on the Kubernetes version you are - # using to ensure compatibility and adaptability. the default version is v2beta2. - # version: v2beta2 - # maxReplicas: 10 - # minReplicas: 1 - # hpaPolicy: - # metrics: - # - type: Resource - # resource: - # name: memory - # target: - # averageUtilization: 30 - # type: Utilization - # - type: Resource - # resource: - # name: cpu - # target: - # averageUtilization: 30 - # type: Utilization - # behavior: - # scaleUp: - # policies: - # - type: Pods - # value: 1 - # periodSeconds: 10 - # scaleDown: - # selectPolicy: Disabled - # define resources requests and limits for cn pods. - resources: - requests: - cpu: 4 - memory: 8Gi - # If you want to remove one resource limit, e.g. cpu, you can set it to cpu: "unlimited". - limits: - cpu: 8 - memory: 8Gi - # specify storageclass name and request size. - # Note: Once set, the following fields will not be allowed to be modified. - storageSpec: - # Specifies the name prefix of the volumes to mount. If left unspecified, - # `emptyDir` volumes will be used, which are ephemeral, and only for log. - # The logs will be lost on pod restart when using emptyDir volumes. - # - # For persistent storage, specify a volume name prefix. - # For example, using `cn` as the name prefix would be appropriate. - # Note: If the values of the following mountPaths are not default, you must set the name to cn. - name: "" - # The storageClassName represent the used storageclass name. if not set will use k8s cluster default storageclass. - # You must set name when you set storageClassName - # Note: Because hostPath field is not supported here, hostPath is not allowed to be set in storageClassName. - storageClassName: "" - # the storage size of per persistent volume for data. - storageSize: 1Ti - # the number of persistent volumes for data. - # if storageCount == 1 - # the storageMountPath field is used to specify the mount path of the persistent volume. If storageMountPath is empty, - # the storageMountPath will be set to /opt/starrocks/cn/storage. - # If storageMountPath is not /opt/starrocks/cn/storage, you must add in config the following configuration: storage_root_path = xxx. - # if storageCount > 1 - # the storageMountPath field is used to specify the prefix of mount path of the persistent volume. For example, if the - # storageMountPath is /opt/starrocks/cn/storage, the real mount path will be /opt/starrocks/cn/storage0, /opt/starrocks/cn/storage1, ... - # You must add in config the following configuration: storage_root_path = /opt/starrocks/cn/storage0;/opt/starrocks/cn/storage1;... - storageCount: 1 - # see the comment of storageCount for the usage of storageMountPath. - storageMountPath: "" - # If not set will use the value of the storageClassName field. - logStorageClassName: "" - # the storage size of persistent volume for log, and the mount path is /opt/starrocks/cn/log. - # If you set it to 0Gi, the related PVC will not be created, and the log will not be persisted. - logStorageSize: 20Gi - # If logMountPath is empty, the logMountPath will be set to /opt/starrocks/cn/log. - # If logMountPath is not /opt/starrocks/cn/log, you must add in config the following configuration: sys_log_dir = xxx. - logMountPath: "" - # If not set will use the value of the storageClassName field. - spillStorageClassName: "" - # Setting this parameter can persist spill storage, and the mount path is /opt/starrocks/cn/spill. - # If you set it to 0Gi, the related PVC will not be created, and the spill will not be persisted. - # You need to add spill_local_storage_dir=/opt/starrocks/cn/spill in cn.conf. - spillStorageSize: 0Gi - # If spillMountPath is empty, the spillMountPath will be set to /opt/starrocks/cn/spill. - # If spillMountPath is not /opt/starrocks/cn/spill, you must add in config the following configuration: spill_local_storage_dir = xxx. - spillMountPath: "" - # mount emptyDir volumes if necessary. - # Note: please use storageSpec field for persistent storage data and log. - emptyDirs: [] - # e.g. mount an emptyDir volume to /tmp - # - name: tmp-data - # mountPath: /tmp - # mount hostPath volumes if necessary. - # Note: - # 1. please use storageSpec field for persistent storage data and log. - # 2. please use podAntiAffinity to avoid the pods are scheduled on the same node. - # 3. If you use hostPath to mount the volume of cache data, cache will be lost when the pod is restarted. - hostPaths: [] - # e.g. mount a hostPath volume to /tmp - # - name: tmp-data - # hostPath: - # path: /tmp - # type: Directory - # mountPath: /tmp - # the config start for cn, the base information as follows. - # From StarRocks 3.1, the official documentation use: - # 1. be_port instead of thrift_port, but the thrift_port is still supported. - # 2. be_http_port instead of webserver_port, but the webserver_port is still supported. - # In order to avoid the impact of the change on the user's deployment, we still use the old configuration. - config: | - sys_log_level = INFO - # ports for admin, web, heartbeat service - thrift_port = 9060 - webserver_port = 8040 - heartbeat_service_port = 9050 - brpc_port = 8060 - # A map object for setting the config. When configyaml is set, to non-empty, the configs in configyaml will take - # precedence and values in config field will be discarded. - # Note: When using configyaml, the number needs to be quoted to avoid being converted to scientific notation. - # e.g. brpc_socket_max_unwritten_bytes: "10737418240" - configyaml: {} - # mount secrets if necessary. - # see https://kubernetes.io/docs/concepts/storage/volumes/#using-subpath for more details about subPath. - secrets: [] - # e.g. mount my-secret to /etc/my-secret - # - name: my-secret - # mountPath: /etc/my-secret - # subPath: "" - # mount configmaps if necessary. - # see https://kubernetes.io/docs/concepts/storage/volumes/#using-subpath for more details about subPath. - configMaps: [] - # e.g. mount my-configmap to /etc/my-configmap - # - name: my-configmap - # mountPath: /etc/my-configmap - # subPath: "" - # terminationGracePeriodSeconds defines duration in seconds the CN pod needs to terminate gracefully. - # default value is 120 seconds - terminationGracePeriodSeconds: 120 - - # Please upgrade the CRD with v1.8.7 released version, if you want to use the following configuration. - # including: startupProbeFailureSeconds, livenessProbeFailureSeconds, readinessProbeFailureSeconds - - # StartupProbeFailureSeconds defines the total failure seconds of startup Probe. - # default value is 300 seconds - # You can set it to "0" to disable the probe. - startupProbeFailureSeconds: - # LivenessProbeFailureSeconds defines the total failure seconds of liveness Probe. - # default value is 15 seconds - # You can set it to "0" to disable the probe. - livenessProbeFailureSeconds: - # ReadinessProbeFailureSeconds defines the total failure seconds of readiness Probe. - # default value is 15 seconds - # You can set it to "0" to disable the probe. - readinessProbeFailureSeconds: - # Lifecycle describes actions that the management system should take in response to container lifecycle events. - # By default, Operator will add corresponding preStop hooks for different components. For example, the preStop - # script for the FE Component is /opt/starrocks/fe_prestop.sh, for the BE Component is /opt/starrocks/be_prestop.sh, - # and for the CN Component is /opt/starrocks/cn_prestop.sh. - # You can just set postStart hook. - lifecycle: {} - # postStart: - # exec: - # command: - # - /bin/sh - # - -c - # - echo "Hello, world!" - # Sidecars is an optional list of containers that are run in the same pod as the starrocks component. - # You can use this field to launch helper containers that provide additional functionality to the main container. - # See https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#Container for how to configure a container. - sidecars: [] - # - name: sidecar-container - # image: busybox - # # If starrocksCnSpec.storageSpec.name is cn, you can mount the volume of cache data like this. - # # If starrocksCnSpec.storageSpec.name is not set, no default volume will be created, so you can not mount the volume of cache data like this. - # command: ['sh', '-c', 'echo "hello from the sidecar container" >/opt/starrocks/cn/storage/sidecar-data.txt && sleep 3600'] - # volumeMounts: - # - mountPath: /opt/starrocks/cn/storage - # name: cn-data # append -data to the end of the name of the starrocksCnSpec.storageSpec.name - # sidecarsMap is an optional map of containers that are run in the same pod as the starrocks component. - # The reason for using sidecarsMap please refer to https://github.com/StarRocks/starrocks-kubernetes-operator/issues/618 - # sidecarsMap has higher priority than sidecars, and the key of sidecarsMap is the name of the sidecar container. - sidecarsMap: {} - # sidecar-container: - # image: busybox - # # If starrocksCnSpec.storageSpec.name is cn, you can mount the volume of cache data like this. - # # If starrocksCnSpec.storageSpec.name is not set, no default volume will be created, so you can not mount the volume of cache data like this. - # command: ['sh', '-c', 'echo "hello from the sidecar container" >/opt/starrocks/cn/storage/sidecar-data.txt && sleep 3600'] - # volumeMounts: - # - mountPath: /opt/starrocks/cn/storage - # name: cn-data # append -data to the end of the name of the starrocksCnSpec.storageSpec.name - # initContainers is an optional list of containers that are run in the same pod as the starrocks component. - # You can use this to launch helper containers that run before the main container starts. - # See https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#Container for how to configure a container. - initContainers: [] - # - name: init-container - # image: busybox - # # If starrocksCnSpec.storageSpec.name is cn, you can mount the volume of cache data like this. - # # If starrocksCnSpec.storageSpec.name is not set, no default volume will be created, so you can not mount the volume of cache data like this. - # command: ['sh', '-c', 'echo "hello from the init container" >/opt/starrocks/cn/storage/init-data.txt'] - # volumeMounts: - # - mountPath: /opt/starrocks/cn/storage - # name: cn-data # append -data to the end of the name of the starrocksCnSpec.storageSpec.name - # Max unavailable pods for the cn component when doing rolling update. - # This field cannot be 0. The default setting is 1. - # Note: Because Operator uses statefulset to manage this component, the maxUnavailable field is in Alpha stage, and it is honored - # only by API servers that are running with the MaxUnavailableStatefulSet feature gate enabled. - # See https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#maximum-unavailable-pods for more details. - maxUnavailablePods: - # Share a single process namespace between all of the containers in a pod. - # When this is set containers will be able to view and signal processes from other containers - # in the same pod, and the first process in each container will not be assigned PID 1. - shareProcessNamespace: - -# spec for component be, provide storage and compute function. -starrocksBeSpec: - # number of replicas to deploy. - replicas: 1 - image: - # image sliced by "repository:tag" - repository: starrocks/be-ubuntu - tag: "" - imagePullPolicy: IfNotPresent - # Specify the entrypoint for BE. - # By default, operator will use '/opt/starrocks/be_entrypoint.sh' as command, and use '$(FE_SERVICE_NAME)' as args in container spec. - # If entrypoint is set, the command will be ["bash", "-c"], and the args will be filename of the entrypoint script. - # A configmap with name $cluster-be-entrypoint-script will be created, and the script will be mounted to /etc/starrocks/entrypoint.sh - # Pod will be restarted if the entrypoint script is updated. - entrypoint: {} - # script: | - # #! /bin/bash - # echo "do something before start BE" - # exec /opt/starrocks/be_entrypoint.sh $FE_SERVICE_NAME - # serviceAccount for be access cloud service. - serviceAccount: "" - # add annotations for be pods. example, if you want to config monitor for datadog, you can config the annotations. - annotations: {} - # If runAsNonRoot is true, the container is run as non-root user. - # The userId will be set to 1000, and the groupID will be set to 1000. - # Note: If you have started the container through root, and then FE/BE began to create directories, write files, etc. - # under the mounted directory as root. When you start the container as a non-root user, the container will not - # have permission to access these files. So you'd better set runAsNonRoot to true when you set up the cluster. - runAsNonRoot: false - # Whether this container has a read-only root filesystem. - # Note: The FE/BE/CN container should support read-only root filesystem. The newest version of FE/BE/CN is 3.3.6, and does not support read-only root filesystem. - readOnlyRootFilesystem: false - # add/drop capabilities for BE container. - capabilities: {} - # add: - # - PERFMON - # - SYS_PTRACE - # drop: - # - SYS_ADMIN - # set sysctls for be pod. - # See https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/ for how to set sysctls. - # Note: The use of unsafe sysctls is at-your-own-risk and can lead to severe problems - sysctls: [] - # - name: net.ipv4.ip_unprivileged_port_start - # value: "2048" - # specify the service name and port config and serviceType - # the service type refer https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types - service: - # the be service type, only supported ClusterIP, NodePort, LoadBalancer - type: "ClusterIP" - # the loadBalancerIP for static ip config when the type=LoadBalancer and loadbalancerIp is not empty. - loadbalancerIP: "" - # add annotations for external be service. - annotations: {} - # Add labels for external be service. The operator may add its own default labels. - labels: {} - # config the service port for be service. - # To assign a specific port or nodePort to a service, you should specify them by the corresponding name or - # containerPort in the service configuration. If both containerPort and name are specified, containerPort takes precedence. - # For be, port name can be webserver, heartbeat, brpc, be, and their default container port is 8040, 9050, 8060, 9060. - ports: [] - # e.g. specify a dedicated node port for be service by containerPort. - # - nodePort: 30040 # The range of valid ports is 30000-32767 - # containerPort: 8040 # The port on the container to expose - # specify the source IP ranges for the load balancer when the type=LoadBalancer. - loadBalancerSourceRanges: [] - # - 10.0.0.0/8 - # imagePullSecrets allows you to use secrets to pull images for pods. - imagePullSecrets: [] - # - name: "image-pull-secret" - # If specified, the pod's nodeSelector,displayName="Map of nodeSelectors to match when scheduling pods on nodes" - # Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector - nodeSelector: {} - # kubernetes.io/arch: amd64 - # kubernetes.io/os: linux - # the pod labels for user select or classify pods. - podLabels: {} - ## hostAliases allows adding entries to /etc/hosts inside the containers - hostAliases: [] - # - ip: "127.0.0.1" - # hostnames: - # - "example.com" - # schedulerName allows you to specify which scheduler will be used for the pod - schedulerName: "" - # Additional be container environment variables. - # See https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/ for how to define environment variables. - # Note: If you use slice to define environment variables, and if there are multiple values files, the values in the last values file will take effect. - # If you use map to define environment variables, the values in the values files will be merged. - # You can only use one of slice and map to define environment variables. - # In order to avoid different type of beEnvVars, we do not define the default value of beEnvVars, e.g. beEnvVars: [] or beEnvVars: {}. - # beEnvVars: - # define environment variables by slice. - # e.g. static environment variable: - # - name: DEMO_GREETING - # value: "Hello from the environment" - # e.g. secret environment variable: - # - name: USERNAME - # valueFrom: - # secretKeyRef: - # name: mysecret - # key: username - # affinity for fe pod scheduling. - affinity: {} - # nodeAffinity: - # requiredDuringSchedulingIgnoredDuringExecution: - # nodeSelectorTerms: - # - matchFields: - # - key: metadata.name - # operator: In - # values: - # - target-host-name - # podAntiAffinity: - # requiredDuringSchedulingIgnoredDuringExecution: - # - labelSelector: - # matchExpressions: - # - key: app.kubernetes.io/component - # operator: In - # values: - # - be - # topologyKey: "kubernetes.io/hostname" - # Node tolerations for be pod scheduling to nodes with taints - # Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ - tolerations: [] - # - key: "key" - # operator: "Equal|Exists" - # value: "value" - # effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)" - # topologySpreadConstraints for scheduling pods across failure-domains. - # Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/ - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # whenUnsatisfiable: DoNotSchedule|ScheduleAnyway - # labelSelector: - # matchLabels: - # foo: bar - # resources for be pod. - resources: - requests: - cpu: 500m - memory: 1Gi - # If you want to remove one resource limit, e.g. cpu, you can set it to cpu: "unlimited". - limits: - cpu: 1000m - memory: 2Gi - # be storageSpec for persistent storage. - # Note: Once set, the following fields will not be allowed to be modified. - storageSpec: - # Specifies the name prefix of the volumes to mount. If left unspecified, - # `emptyDir` volumes will be used by default, which are ephemeral and data - # will be lost on pod restart. - # - # For persistent storage, specify a volume name prefix. - # For example, using `be` as the name prefix would be appropriate. - # Note: If the values of the following mountPaths are not default, you must set the name to be. - name: "" - # The storageClassName represent the used storageclass name. if not set will use k8s cluster default storageclass. - # You must set name when you set storageClassName - # Note: Because hostPath field is not supported here, hostPath is not allowed to be set in storageClassName. - storageClassName: "azure-disk-std-lrs" - # the storage size of per persistent volume for data. - storageSize: 25Gi - # the number of persistent volumes for data. - # if storageCount == 1 - # the storageMountPath field is used to specify the mount path of the persistent volume. If storageMountPath is empty, - # the storageMountPath will be set to /opt/starrocks/be/storage. - # If storageMountPath /opt/starrocks/be/storage, you must add in config the following configuration: storage_root_path = xxx. - # if storageCount > 1 - # the storageMountPath field is used to specify the prefix of mount path of the persistent volume. For example, if the - # storageMountPath is /opt/starrocks/be/storage, the real mount path will be /opt/starrocks/be/storage0, /opt/starrocks/be/storage1, ... - # You must add in config the following configuration: storage_root_path = /opt/starrocks/be/storage0;/opt/starrocks/be/storage1;... - storageCount: 1 - # see the comment of storageCount for the usage of storageMountPath. - storageMountPath: "" - # If not set will use the value of the storageClassName field. - logStorageClassName: "azure-disk-std-lrs" - # Setting this parameter can persist log storage, and the mount path is /opt/starrocks/be/log. - # If you set it to 0Gi, the related PVC will not be created, and the log will not be persisted. - logStorageSize: 10Gi - # If logMountPath is empty, the logMountPath will be set to /opt/starrocks/be/log. - # If logMountPath is not /opt/starrocks/be/log, you must add in config the following configuration: sys_log_dir = xxx. - logMountPath: "" - # If not set will use the value of the storageClassName field. - spillStorageClassName: "azure-disk-std-lrs" - # Setting this parameter can persist spill storage, and the mount path is /opt/starrocks/be/spill. - # If you set it to 0Gi, the related PVC will not be created, and the spill will not be persisted. - # You need to add spill_local_storage_dir=/opt/starrocks/be/spill in be.conf. - spillStorageSize: 0Gi - # If spillMountPath is empty, the spillMountPath will be set to /opt/starrocks/be/spill. - # If spillMountPath is not /opt/starrocks/be/spill, you must add in config the following configuration: spill_local_storage_dir = xxx. - spillMountPath: "" - # mount emptyDir volumes if necessary. - # Note: please use storageSpec field for persistent storage data and log. - emptyDirs: [] - # e.g. mount an emptyDir volume to /tmp - # - name: tmp-data - # mountPath: /tmp - # mount hostPath volumes if necessary. - # Note: please use storageSpec field for persistent storage data and log. - hostPaths: [] - # e.g. mount a hostPath volume to /tmp - # - name: tmp-data - # hostPath: - # path: /tmp - # type: Directory - # mountPath: /tmp - # the config for start be. the base information as follows. - # From StarRocks 3.1, the official documentation use: - # 1. be_http_port instead of webserver_port, but the webserver_port is still supported. - # In order to avoid the impact of the change on the user's deployment, we still use the old configuration. - config: | - be_port = 9060 - webserver_port = 8040 - heartbeat_service_port = 9050 - brpc_port = 8060 - sys_log_level = INFO - default_rowset_type = beta - # A map object for setting the config. When configyaml is set, to non-empty, the configs in configyaml will take - # precedence and values in config field will be discarded. - # Note: When using configyaml, the number needs to be quoted to avoid being converted to scientific notation. - # e.g. brpc_socket_max_unwritten_bytes: "10737418240" - configyaml: {} - # mount secrets if necessary. - # see https://kubernetes.io/docs/concepts/storage/volumes/#using-subpath for more details about subPath. - secrets: [] - # e.g. mount my-secret to /etc/my-secret - # - name: my-secret - # mountPath: /etc/my-secret - # subPath: "" - # mount configmaps if necessary. - # see https://kubernetes.io/docs/concepts/storage/volumes/#using-subpath for more details about subPath. - configMaps: [] - # e.g. mount my-configmap to /etc/my-configmap - # - name: my-configmap - # mountPath: /etc/my-configmap - # subPath: "" - # terminationGracePeriodSeconds defines duration in seconds the BE pod needs to terminate gracefully. - # default value is 120 seconds - terminationGracePeriodSeconds: 120 - - # Please upgrade the CRD with v1.8.7 released version, if you want to use the following configuration. - # including: startupProbeFailureSeconds, livenessProbeFailureSeconds, readinessProbeFailureSeconds - - # StartupProbeFailureSeconds defines the total failure seconds of startup Probe. - # default value is 300 seconds - # You can set it to "0" to disable the probe. - startupProbeFailureSeconds: - # LivenessProbeFailureSeconds defines the total failure seconds of liveness Probe. - # default value is 15 seconds - # You can set it to "0" to disable the probe. - livenessProbeFailureSeconds: - # ReadinessProbeFailureSeconds defines the total failure seconds of readiness Probe. - # default value is 15 seconds - # You can set it to "0" to disable the probe. - readinessProbeFailureSeconds: - # Lifecycle describes actions that the management system should take in response to container lifecycle events. - # By default, Operator will add corresponding preStop hooks for different components. For example, the preStop - # script for the FE Component is /opt/starrocks/fe_prestop.sh, for the BE Component is /opt/starrocks/be_prestop.sh, - # and for the CN Component is /opt/starrocks/cn_prestop.sh. - # You can just set postStart hook. - lifecycle: {} - # postStart: - # exec: - # command: - # - /bin/sh - # - -c - # - echo "Hello, world!" - # Sidecars is an optional list of containers that are run in the same pod as the starrocks component. - # You can use this field to launch helper containers that provide additional functionality to the main container. - # See https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#Container for how to define sidecars. - sidecars: [] - # - name: sidecar-container - # image: busybox - # # If your starrocksBeSpec.storageSpec.name is be or not set, you can mount the volume of data like this. - # command: ['sh', '-c', 'echo "hello from the sidecar container" >/opt/starrocks/be/storage/sidecar-data.txt && sleep 3600'] - # volumeMounts: - # - mountPath: /opt/starrocks/be/storage - # name: be-data # append -data to the end of the name of the starrocksBeSpec.storageSpec.name - # sidecarsMap is an optional map of containers that are run in the same pod as the starrocks component. - # The reason for using sidecarsMap please refer to https://github.com/StarRocks/starrocks-kubernetes-operator/issues/618 - # sidecarsMap has higher priority than sidecars, and the key of sidecarsMap is the name of the sidecar container. - sidecarsMap: {} - # sidecar-container: - # image: busybox - # # If your starrocksBeSpec.storageSpec.name is be or not set, you can mount the volume of data like this. - # command: ['sh', '-c', 'echo "hello from the sidecar container" >/opt/starrocks/be/storage/sidecar-data.txt && sleep 3600'] - # volumeMounts: - # - mountPath: /opt/starrocks/be/storage - # name: be-data # append -data to the end of the name of the starrocksBeSpec.storageSpec.name - # initContainers is an optional list of containers that are run in the same pod as the starrocks component. - # You can use this to launch helper containers that run before the main container starts. - # See https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#Container for how to configure a container. - initContainers: [] - # - name: init-container - # image: busybox - # # If your starrocksBeSpec.storageSpec.name is be or not set, you can mount the volume of data like this. - # command: ['sh', '-c', 'echo "hello from the init container" >/opt/starrocks/be/storage/init-data.txt'] - # volumeMounts: - # - mountPath: /opt/starrocks/be/storage - # name: be-data # append -data to the end of the name of the starrocksBeSpec.storageSpec.name - # Max unavailable pods for the be component when doing rolling update. - # This field cannot be 0. The default setting is 1. - # Note: Because Operator uses statefulset to manage this component, the maxUnavailable field is in Alpha stage, and it is honored - # only by API servers that are running with the MaxUnavailableStatefulSet feature gate enabled. - # See https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#maximum-unavailable-pods for more details. - maxUnavailablePods: - # Share a single process namespace between all of the containers in a pod. - # When this is set containers will be able to view and signal processes from other containers - # in the same pod, and the first process in each container will not be assigned PID 1. - shareProcessNamespace: - -# create secrets if necessary. -secrets: [] - # e.g. create my-secret - # - name: my-secret - # data: - # key: | - # this is the content of the secret - # when mounted, key will be the name of the file - -# create configmaps if necessary. -configMaps: [] - # e.g. create my-configmap - # - name: my-configmap - # data: - # key: | - # this is the content of the configmap - # when mounted, key will be the name of the file - -# If you needs to deploy other resources, e.g. serviceAccount, you can add them here. -# You can even deploy resources to different namespaces -resources: [] - # - apiVersion: v1 - # kind: ServiceAccount - # metadata: - # name: sa-for-starrocks - # namespace: starrocks - -# specify the fe proxy deploy or not. -starrocksFeProxySpec: - # specify the fe proxy deploy or not. - enabled: false - replicas: 1 - imagePullPolicy: IfNotPresent - # default nginx:1.24.0 - image: - repository: "" - tag: "" - resources: - requests: - cpu: 1 - memory: 2Gi - limits: - cpu: 1 - memory: 2Gi - # set the resolver for nginx server, default kube-dns.kube-system.svc.cluster.local - resolver: "" - service: - # the fe proxy service type, only supported ClusterIP, NodePort, LoadBalancer - # default ClusterIP - type: ClusterIP - # the loadBalancerIP for static ip config when the type=LoadBalancer and loadbalancerIp is not empty. - loadbalancerIP: "" - # add annotations for external fe proxy service. - annotations: {} - # Add labels for external fe proxy service. The operator may add its own default labels. - labels: {} - # config the service port for fe proxy service. - # To assign a specific port or nodePort to a service, you should specify them by the corresponding name or - # containerPort in the service configuration. If both containerPort and name are specified, containerPort takes precedence. - # For fe proxy, port name can be http-port, and its default container port is 8080. - ports: [] - # e.g. specify a dedicated node port for fe proxy service by containerPort. - # - nodePort: 30080 # The range of valid ports is 30000-32767 - # containerPort: 8080 # The port on the container to expose - # specify the source IP ranges for the load balancer when the type=LoadBalancer. - loadBalancerSourceRanges: [] - # - 10.0.0.0/8 - # imagePullSecrets allows you to use secrets for pulling images for your pods. - imagePullSecrets: [] - # - name: "image-pull-secret" - # If specified, the pod's nodeSelector,displayName="Map of nodeSelectors to match when scheduling pods on nodes" - # Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector - nodeSelector: {} - # kubernetes.io/arch: amd64 - # kubernetes.io/os: linux - # affinity for fe proxy pod scheduling. - affinity: {} - # nodeAffinity: - # requiredDuringSchedulingIgnoredDuringExecution: - # nodeSelectorTerms: - # - matchFields: - # - key: metadata.name - # operator: In - # values: - # - target-host-name - # podAntiAffinity: - # requiredDuringSchedulingIgnoredDuringExecution: - # - labelSelector: - # matchExpressions: - # - key: app.kubernetes.io/component - # operator: In - # values: - # - fe-proxy - # topologyKey: "kubernetes.io/hostname" - # Node tolerations for fe proxy pod scheduling to nodes with taints - # Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ - tolerations: [] - # - key: "key" - # operator: "Equal|Exists" - # value: "value" - # effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)" - - # Please upgrade the CRD with v1.8.7 released version, if you want to use the following configuration. - # including: livenessProbeFailureSeconds, readinessProbeFailureSeconds - - # LivenessProbeFailureSeconds defines the total failure seconds of liveness Probe. - # default value is 15 seconds - # You can set it to "0" to disable the probe. - livenessProbeFailureSeconds: - # ReadinessProbeFailureSeconds defines the total failure seconds of readiness Probe. - # default value is 15 seconds - # You can set it to "0" to disable the probe. - readinessProbeFailureSeconds: - # Note: will create emptyDir volume for fe proxy, PVC is not supported. - emptyDirs: [] - # e.g. mount an emptyDir volume to /tmp - # - name: tmp-data - # mountPath: /tmp \ No newline at end of file diff --git a/cluster/manifests/freeleaps-data-platform/star-rocks/vpa.yaml b/cluster/manifests/freeleaps-data-platform/star-rocks/vpa.yaml deleted file mode 100644 index b246f09f..00000000 --- a/cluster/manifests/freeleaps-data-platform/star-rocks/vpa.yaml +++ /dev/null @@ -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" \ No newline at end of file diff --git a/freeleaps/helm-pkg/3rd/rabbitmq/values.prod.yaml b/freeleaps/helm-pkg/3rd/rabbitmq/values.prod.yaml index c89746b0..e6e234bb 100644 --- a/freeleaps/helm-pkg/3rd/rabbitmq/values.prod.yaml +++ b/freeleaps/helm-pkg/3rd/rabbitmq/values.prod.yaml @@ -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 ## diff --git a/freeleaps/helm-pkg/devsvc/values.prod.yaml b/freeleaps/helm-pkg/devsvc/values.prod.yaml index c95c5fd8..3dce6e46 100644 --- a/freeleaps/helm-pkg/devsvc/values.prod.yaml +++ b/freeleaps/helm-pkg/devsvc/values.prod.yaml @@ -18,7 +18,7 @@ devsvc: registry: docker.io repository: null name: devsvc - tag: snapshot-afcc5c6 + tag: snapshot-b06f05e imagePullPolicy: IfNotPresent ports: - name: http