Skip to content

Instantly share code, notes, and snippets.

@Samrose-Ahmed
Last active June 23, 2024 03:27
Show Gist options
  • Save Samrose-Ahmed/25cc8e1c578cc9e8b02c4597bb378838 to your computer and use it in GitHub Desktop.
Save Samrose-Ahmed/25cc8e1c578cc9e8b02c4597bb378838 to your computer and use it in GitHub Desktop.
operator:
global:
rbac:
create: true
serviceAccount:
name: "starrocks"
# Optional annotations to add to serviceaccount manifest
annotations: {}
# Optional labels to add to serviceaccount manifest
labels: {}
# TimeZone is used to set the environment variable TZ for pod, with Asia/Shanghai as the default.
timeZone: America/Los_Angeles
# 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 operator chart.
nameOverride: "kube-starrocks"
starrocksOperator:
# If enabled, the operator releated resources will be created, including the operator deployment, service account,
# clusterrole, clusterrolebinding, and service account.
enabled: true
# annotations for starrocks operator.
annotations: {}
namespaceOverride: ""
image:
# image sliced by "repository:tag"
repository: starrocks/operator
tag: v1.9.6
imagePullPolicy: Always
replicaCount: 1
resources:
limits:
cpu: 500m
memory: 800Mi
requests:
cpu: 500m
memory: 400Mi
# By default, the operator will only set runAsNonRoot to true, allowPrivilegeEscalation to false, readOnlyRootFilesystem to true.
# You can customize the securityContext for operator pod, e.g. drop capabilities, seccompProfile, etc.
securityContext:
runAsNonRoot: true
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
tolerations: []
env: []
# setting log related parameter
log:
- --zap-time-encoding=iso8601
- --zap-encoder=console
# if you want open debug log, open this option
# - --zap-log-level 4
starrocks:
# 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: "kube-starrocks"
# 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
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: {}
# TimeZone is used to set the environment variable TZ for pod, with Asia/Shanghai as the default.
timeZone: America/Los_Angeles
# 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
# deploy a starrocks cluster
starrocksCluster:
# the name of starrockscluster cluster, if not set, the value of nameOverride fields will be used.
name: ""
# the namespace of starrockscluster cluster, if not set, the release namespace will be used.
namespace: ""
# annotations for starrocks cluster.
annotations: {}
# specify the cn deploy or not.
enabledBe: false
enabledCn: true
# 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.2-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.
runAsNonRoot: false
# schedulerName allows you to specify which scheduler will be used for your pods.
schedulerName: ""
# serviceAccount for access cloud service.
serviceAccount: ""
# 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
# 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:
type: NodePort
ports:
- containerPort: 9030
name: query
nodePort: 30002
port: 9030
# serviceAccount for fe access cloud service.
serviceAccount: ""
# 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:
- name: LOG_CONSOLE
value: "1"
# resources for fe pod.
resources:
requests:
cpu: 500m
memory: 500Mi
# If you want to remove one resource limit, e.g. cpu, you can it to cpu: "unlimited".
limits:
cpu: 1
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.
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
storageClassName: ""
# the persistent volume size, default 10Gi.
# 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: ""
# 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
# 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
# config for shared-data mode
run_mode = shared_data
cloud_native_meta_port = 6090
# For example, testbucket/subpath
aws_s3_path = mtnteststar111/starrocks
# For example, us-west-2
aws_s3_region = us-west-2
# credentials for S3 object read/write
aws_s3_access_key = ***
aws_s3_secret_key = ***
# For example, https://s3.us-west-2.amazonaws.com
aws_s3_endpoint = https://s3.us-west-2.amazonaws.com
aws_s3_use_aws_sdk_default_behavior = true
# Whether volume can be created from conf. If it is enabled, a builtin storage volume may be created.
enable_load_volume_from_conf = true
# 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 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: "NodePort"
# # the loadBalancerIP for static ip config when the type=LoadBalancer and loadBalancerIp is not empty.
# loadbalancerIP: ""
# # add annotations for cn service.
# annotations: {}
# # 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
# port: 8040
# 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:
- name: LOG_CONSOLE
value: "1"
# define resources requests and limits for cn pods.
resources:
requests:
cpu: 100m
memory: 200Mi
limits:
cpu: 1
memory: 2Gi
# 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.
# 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
# storageClassName: ""
# # the storage size of persistent volume for data.
# storageSize: 5Gi
# # If storageMountPath is empty, the storageMountPath will be set to /opt/starrocks/cn/storage.
# storageMountPath: ""
# # 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: 1Gi
# 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 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment