diff --git a/examples/starrocks/deploy_a_starrocks_cluster_with_cn.yaml b/examples/starrocks/deploy_a_starrocks_cluster_with_cn.yaml index 9bbce533..4387ddd6 100644 --- a/examples/starrocks/deploy_a_starrocks_cluster_with_cn.yaml +++ b/examples/starrocks/deploy_a_starrocks_cluster_with_cn.yaml @@ -28,33 +28,38 @@ spec: memory: 64Gi starRocksCnSpec: image: starrocks/cn-ubuntu:latest - # replicas: 1 # comment out this line if autoScalingPolicy is enabled. limits: cpu: 16 memory: 64Gi requests: cpu: 16 memory: 64Gi - autoScalingPolicy: # comment out this section if replicas is set. - maxReplicas: 10 - minReplicas: 1 + autoScalingPolicy: # Automatic scaling policy of the CN cluster. + maxReplicas: 10 # The maximum number of CNs is set to 10. + minReplicas: 1 # The minimum number of CNs is set to 1. # operator creates an HPA resource based on the following field. # see https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/ for more information. hpaPolicy: - metrics: + metrics: # Resource metrics - type: Resource resource: - name: memory + name: memory # The average memory usage of CNs is specified as a resource metric. target: + # The elastic scaling threshold is 60%. + # When the average memory utilization of CNs exceeds 60%, the number of CNs increases for scale-out. + # When the average memory utilization of CNs is below 60%, the number of CNs decreases for scale-in. averageUtilization: 60 type: Utilization - type: Resource resource: - name: cpu + name: cpu # The average CPU utilization of CNs is specified as a resource metric. target: + # The elastic scaling threshold is 60%. + # When the average CPU utilization of CNs exceeds 60%, the number of CNs increases for scale-out. + # When the average CPU utilization of CNs is below 60%, the number of CNs decreases for scale-in. averageUtilization: 60 type: Utilization - behavior: + behavior: # The scaling behavior is customized according to business scenarios, helping you achieve rapid or slow scaling or disable scaling. scaleUp: policies: - type: Pods diff --git a/examples/starrocks/starrocks-fe-and-be.yaml b/examples/starrocks/starrocks-fe-and-be.yaml new file mode 100644 index 00000000..bbac225f --- /dev/null +++ b/examples/starrocks/starrocks-fe-and-be.yaml @@ -0,0 +1,24 @@ +apiVersion: starrocks.com/v1 +kind: StarRocksCluster +metadata: + name: starrockscluster-sample + namespace: starrocks +spec: + starRocksFeSpec: + image: starrocks/fe-ubuntu:latest + replicas: 3 + requests: + cpu: 4 + memory: 16Gi + limits: + cpu: 4 + memory: 16Gi + starRocksBeSpec: + image: starrocks/be-ubuntu:latest + replicas: 3 + requests: + cpu: 4 + memory: 8Gi + limits: + cpu: 4 + memory: 8Gi