常见 Helm Chart 配置项
对于每一个 Helm Chart,你都可以通过创建 values.yaml 来进行配置。当你需要应用配置时,你可以通过 helm upgrade 命令来应用配置:
helm upgrade --install ${release-name} ${chart-name} --namespace ${namespace} -f values.yaml
GreptimeDB Cluster Chart
完整的配置项可参考 GreptimeDB Cluster Chart。
GreptimeDB 运行镜像配置
顶层变量 image 用于配置集群全局的运行镜像,如下所示:
image:
# -- The image registry
registry: greptime-registry.cn-hangzhou.cr.aliyuncs.com
# -- The image repository
repository: greptime/greptimedb
# -- The image tag
tag: "v0.17.2"
# -- The image pull secrets
pullSecrets: []
如果你想为集群中的每个 Role 配置不同的镜像,可以使用 ${role}.podTemplate.main.image 字段(其中 role 可以是 meta、frontend、datanode 和 flownode),该字段会覆盖顶层变量 image 的配置,如下所示:
image:
# -- The image registry
registry: greptime-registry.cn-hangzhou.cr.aliyuncs.com
# -- The image repository
repository: greptime/greptimedb
# -- The image tag
tag: "v0.17.2"
# -- The image pull secrets
pullSecrets: []
frontend:
podTemplate:
main:
image: "greptime-registry.cn-hangzhou.cr.aliyuncs.com/greptime/greptimedb:latest"
此时 frontend 的镜像将会被设置为 greptime-registry.cn-hangzhou.cr.aliyuncs.com/greptime/greptimedb:latest,而其他组件的镜像将会使用顶层变量 image 的配置。
服务端口配置
你可以使用如下字段来配置服务端口,如下所示:
httpServicePort:用于配置 HTTP 服务的端口,默认 4000;grpcServicePort:用于配置 SQL 服务的端口,默认 4001;mysqlServicePort:用于配置 MySQL 服务的端口,默认 4002;postgresServicePort:用于配置 PostgreSQL 服务的端口,默认 4003;
Datanode 存储配置
你可以通过 datanode.storage 字段来配置 Datanode 的存储,如下所示:
datanode:
storage:
# -- Storage class for datanode persistent volume
storageClassName: null
# -- Storage size for datanode persistent volume
storageSize: 10Gi
# -- Storage retain policy for datanode persistent volume
storageRetainPolicy: Retain
# -- The dataHome directory, default is "/data/greptimedb/"
dataHome: "/data/greptimedb"
storageClassName:用于配置 StorageClass,默认使用 Kubernetes 当前默认的 StorageClass;storageSize:用于配置 Storage 的大小,默认 10Gi。你可以使用常用的容量单位,如10Gi、10GB等;storageRetainPolicy:用于配置 Storage 的保留策略,默认Retain,如果设置为Delete,则当集群被删除时,相应的 Storage 也会被删除;dataHome:用于配置数据目录,默认/data/greptimedb/;