From 9bff7bc1a5e5020e2ca013bb0b8a159178183f5f Mon Sep 17 00:00:00 2001 From: zyy17 Date: Wed, 16 Oct 2024 22:48:40 +0800 Subject: [PATCH 1/2] refactor: add logging and monitoring configurations --- charts/greptimedb-cluster/Chart.yaml | 2 +- charts/greptimedb-cluster/README.md | 34 ++++- .../greptimedb-cluster/templates/cluster.yaml | 111 +++++++++++++++- charts/greptimedb-cluster/values.yaml | 125 +++++++++++++++++- 4 files changed, 261 insertions(+), 11 deletions(-) diff --git a/charts/greptimedb-cluster/Chart.yaml b/charts/greptimedb-cluster/Chart.yaml index b11d7af..819c114 100644 --- a/charts/greptimedb-cluster/Chart.yaml +++ b/charts/greptimedb-cluster/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: greptimedb-cluster description: A Helm chart for deploying GreptimeDB cluster in Kubernetes. type: application -version: 0.2.16 +version: 0.2.17 appVersion: 0.9.4 home: https://github.com/GreptimeTeam/greptimedb sources: diff --git a/charts/greptimedb-cluster/README.md b/charts/greptimedb-cluster/README.md index ff67c6f..7362415 100644 --- a/charts/greptimedb-cluster/README.md +++ b/charts/greptimedb-cluster/README.md @@ -2,7 +2,7 @@ A Helm chart for deploying GreptimeDB cluster in Kubernetes. -![Version: 0.2.16](https://img.shields.io/badge/Version-0.2.16-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.9.4](https://img.shields.io/badge/AppVersion-0.9.4-informational?style=flat-square) +![Version: 0.2.17](https://img.shields.io/badge/Version-0.2.17-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.9.4](https://img.shields.io/badge/AppVersion-0.9.4-informational?style=flat-square) ## Source Code @@ -92,9 +92,10 @@ helm uninstall mycluster -n default | base.podTemplate.nodeSelector | object | `{}` | The pod node selector | | base.podTemplate.serviceAccountName | string | `""` | The global service account | | base.podTemplate.tolerations | list | `[]` | The pod tolerations | -| datanode | object | `{"configData":"","configFile":"","podTemplate":{"affinity":{},"annotations":{},"labels":{},"main":{"args":[],"command":[],"env":[],"image":"","readinessProbe":{},"resources":{"limits":{},"requests":{}},"volumeMounts":[]},"nodeSelector":{},"serviceAccount":{"annotations":{},"create":false},"tolerations":[],"volumes":[]},"replicas":3,"storage":{"dataHome":"/data/greptimedb","mountPath":"/data/greptimedb","storageClassName":null,"storageRetainPolicy":"Retain","storageSize":"10Gi","walDir":"/data/greptimedb/wal"}}` | Datanode configure | +| datanode | object | `{"configData":"","configFile":"","logging":{},"podTemplate":{"affinity":{},"annotations":{},"labels":{},"main":{"args":[],"command":[],"env":[],"image":"","readinessProbe":{},"resources":{"limits":{},"requests":{}},"volumeMounts":[]},"nodeSelector":{},"serviceAccount":{"annotations":{},"create":false},"tolerations":[],"volumes":[]},"replicas":1,"storage":{"dataHome":"/data/greptimedb","mountPath":"/data/greptimedb","storageClassName":null,"storageRetainPolicy":"Retain","storageSize":"10Gi","walDir":"/data/greptimedb/wal"}}` | Datanode configure | | datanode.configData | string | `""` | Extra raw toml config data of datanode. Skip if the `configFile` is used. | | datanode.configFile | string | `""` | Extra toml file of datanode. | +| datanode.logging | object | `{}` | Logging configuration for datanode, if not set, it will use the global logging configuration. | | datanode.podTemplate | object | `{"affinity":{},"annotations":{},"labels":{},"main":{"args":[],"command":[],"env":[],"image":"","readinessProbe":{},"resources":{"limits":{},"requests":{}},"volumeMounts":[]},"nodeSelector":{},"serviceAccount":{"annotations":{},"create":false},"tolerations":[],"volumes":[]}` | The pod template for datanode | | datanode.podTemplate.affinity | object | `{}` | The pod affinity | | datanode.podTemplate.annotations | object | `{}` | The annotations to be created to the pod. | @@ -113,7 +114,7 @@ helm uninstall mycluster -n default | datanode.podTemplate.serviceAccount.create | bool | `false` | Create a service account | | datanode.podTemplate.tolerations | list | `[]` | The pod tolerations | | datanode.podTemplate.volumes | list | `[]` | The pod volumes | -| datanode.replicas | int | `3` | Datanode replicas | +| datanode.replicas | int | `1` | Datanode replicas | | datanode.storage.dataHome | string | `"/data/greptimedb"` | The dataHome directory, default is "/data/greptimedb/" | | datanode.storage.mountPath | string | `"/data/greptimedb"` | The data directory of the storage, default is "/data/greptimedb" | | datanode.storage.storageClassName | string | `nil` | Storage class for datanode persistent volume | @@ -123,10 +124,11 @@ helm uninstall mycluster -n default | debugPod.enabled | bool | `false` | Enable debug pod | | debugPod.image | object | `{"registry":"docker.io","repository":"greptime/greptime-tool","tag":"20240905-67eaa147"}` | The debug pod image | | debugPod.resources | object | `{"limits":{"cpu":"200m","memory":"256Mi"},"requests":{"cpu":"50m","memory":"64Mi"}}` | The debug pod resource | -| flownode | object | `{"configData":"","configFile":"","enabled":false,"podTemplate":{"affinity":{},"annotations":{},"labels":{},"main":{"args":[],"command":[],"env":[],"image":"","readinessProbe":{},"resources":{"limits":{},"requests":{}},"volumeMounts":[]},"nodeSelector":{},"serviceAccount":{"annotations":{},"create":false},"tolerations":[],"volumes":[]},"replicas":1}` | Flownode configure. **It's NOT READY YET** | +| flownode | object | `{"configData":"","configFile":"","enabled":false,"logging":{},"podTemplate":{"affinity":{},"annotations":{},"labels":{},"main":{"args":[],"command":[],"env":[],"image":"","readinessProbe":{},"resources":{"limits":{},"requests":{}},"volumeMounts":[]},"nodeSelector":{},"serviceAccount":{"annotations":{},"create":false},"tolerations":[],"volumes":[]},"replicas":1}` | Flownode configure. **It's NOT READY YET** | | flownode.configData | string | `""` | Extra raw toml config data of flownode. Skip if the `configFile` is used. | | flownode.configFile | string | `""` | Extra toml file of flownode. | | flownode.enabled | bool | `false` | Enable flownode | +| flownode.logging | object | `{}` | Logging configuration for flownode, if not set, it will use the global logging configuration. | | flownode.podTemplate | object | `{"affinity":{},"annotations":{},"labels":{},"main":{"args":[],"command":[],"env":[],"image":"","readinessProbe":{},"resources":{"limits":{},"requests":{}},"volumeMounts":[]},"nodeSelector":{},"serviceAccount":{"annotations":{},"create":false},"tolerations":[],"volumes":[]}` | The pod template for frontend | | flownode.podTemplate.affinity | object | `{}` | The pod affinity | | flownode.podTemplate.annotations | object | `{}` | The annotations to be created to the pod. | @@ -146,9 +148,10 @@ helm uninstall mycluster -n default | flownode.podTemplate.tolerations | list | `[]` | The pod tolerations | | flownode.podTemplate.volumes | list | `[]` | The pod volumes | | flownode.replicas | int | `1` | Flownode replicas | -| frontend | object | `{"configData":"","configFile":"","podTemplate":{"affinity":{},"annotations":{},"labels":{},"main":{"args":[],"command":[],"env":[],"image":"","readinessProbe":{},"resources":{"limits":{},"requests":{}},"volumeMounts":[]},"nodeSelector":{},"serviceAccount":{"annotations":{},"create":false},"tolerations":[],"volumes":[]},"replicas":1,"service":{},"tls":{}}` | Frontend configure | +| frontend | object | `{"configData":"","configFile":"","logging":{},"podTemplate":{"affinity":{},"annotations":{},"labels":{},"main":{"args":[],"command":[],"env":[],"image":"","readinessProbe":{},"resources":{"limits":{},"requests":{}},"volumeMounts":[]},"nodeSelector":{},"serviceAccount":{"annotations":{},"create":false},"tolerations":[],"volumes":[]},"replicas":1,"service":{},"tls":{}}` | Frontend configure | | frontend.configData | string | `""` | Extra raw toml config data of frontend. Skip if the `configFile` is used. | | frontend.configFile | string | `""` | Extra toml file of frontend. | +| frontend.logging | object | `{}` | Logging configuration for frontend, if not set, it will use the global logging configuration. | | frontend.podTemplate | object | `{"affinity":{},"annotations":{},"labels":{},"main":{"args":[],"command":[],"env":[],"image":"","readinessProbe":{},"resources":{"limits":{},"requests":{}},"volumeMounts":[]},"nodeSelector":{},"serviceAccount":{"annotations":{},"create":false},"tolerations":[],"volumes":[]}` | The pod template for frontend | | frontend.podTemplate.affinity | object | `{}` | The pod affinity | | frontend.podTemplate.annotations | object | `{}` | The annotations to be created to the pod. | @@ -178,12 +181,19 @@ helm uninstall mycluster -n default | image.tag | string | `"v0.9.4"` | The image tag | | initializer.registry | string | `"docker.io"` | Initializer image registry | | initializer.repository | string | `"greptime/greptimedb-initializer"` | Initializer image repository | -| initializer.tag | string | `"v0.1.0"` | Initializer image tag | -| meta | object | `{"configData":"","configFile":"","enableRegionFailover":false,"etcdEndpoints":"etcd.etcd-cluster.svc.cluster.local:2379","podTemplate":{"affinity":{},"annotations":{},"labels":{},"main":{"args":[],"command":[],"env":[],"image":"","resources":{"limits":{},"requests":{}},"volumeMounts":[]},"nodeSelector":{},"readinessProbe":{},"serviceAccount":{"annotations":{},"create":false},"tolerations":[],"volumes":[]},"replicas":1,"storeKeyPrefix":""}` | Meta configure | +| initializer.tag | string | `"v0.1.1"` | Initializer image tag | +| logging | object | `{"format":"text","level":"info","logsDir":"/data/greptimedb/logs","onlyLogToStdout":false,"persistentWithData":false}` | Global logging configuration | +| logging.format | string | `"text"` | The log format for greptimedb, only support "json" and "text" | +| logging.level | string | `"info"` | The log level for greptimedb, only support "debug", "info", "warn", "debug" | +| logging.logsDir | string | `"/data/greptimedb/logs"` | The logs directory for greptimedb | +| logging.onlyLogToStdout | bool | `false` | Whether to log to stdout only | +| logging.persistentWithData | bool | `false` | indicates whether to persist the log with the datanode data storage. It **ONLY** works for the datanode component. | +| meta | object | `{"configData":"","configFile":"","enableRegionFailover":false,"etcdEndpoints":"etcd.etcd-cluster.svc.cluster.local:2379","logging":{},"podTemplate":{"affinity":{},"annotations":{},"labels":{},"main":{"args":[],"command":[],"env":[],"image":"","resources":{"limits":{},"requests":{}},"volumeMounts":[]},"nodeSelector":{},"readinessProbe":{},"serviceAccount":{"annotations":{},"create":false},"tolerations":[],"volumes":[]},"replicas":1,"storeKeyPrefix":""}` | Meta configure | | meta.configData | string | `""` | Extra raw toml config data of meta. Skip if the `configFile` is used. | | meta.configFile | string | `""` | Extra toml file of meta. | | meta.enableRegionFailover | bool | `false` | Whether to enable region failover | | meta.etcdEndpoints | string | `"etcd.etcd-cluster.svc.cluster.local:2379"` | Meta etcd endpoints | +| meta.logging | object | `{}` | Logging configuration for meta, if not set, it will use the global logging configuration. | | meta.podTemplate | object | `{"affinity":{},"annotations":{},"labels":{},"main":{"args":[],"command":[],"env":[],"image":"","resources":{"limits":{},"requests":{}},"volumeMounts":[]},"nodeSelector":{},"readinessProbe":{},"serviceAccount":{"annotations":{},"create":false},"tolerations":[],"volumes":[]}` | The pod template for meta | | meta.podTemplate.affinity | object | `{}` | The pod affinity | | meta.podTemplate.annotations | object | `{}` | The annotations to be created to the pod. | @@ -204,6 +214,16 @@ helm uninstall mycluster -n default | meta.podTemplate.volumes | list | `[]` | The pod volumes | | meta.replicas | int | `1` | Meta replicas | | meta.storeKeyPrefix | string | `""` | Meta will store data with this key prefix | +| monitoring | object | `{"enabled":false,"logsCollection":{"pipeline":{"data":""}},"standalone":{},"vector":{"registry":"docker.io","repository":"timberio/vector","resource":{"limits":{"cpu":"50m","memory":"64Mi"},"requests":{"cpu":"50m","memory":"64Mi"}},"tag":"nightly-alpine"}}` | The monitoring bootstrap configuration | +| monitoring.enabled | bool | `false` | Enable monitoring | +| monitoring.logsCollection | object | `{"pipeline":{"data":""}}` | Configure the logs collection | +| monitoring.logsCollection.pipeline | object | `{"data":""}` | The greptimedb pipeline for logs collection | +| monitoring.standalone | object | `{}` | Configure the standalone instance for storing monitoring data | +| monitoring.vector | object | `{"registry":"docker.io","repository":"timberio/vector","resource":{"limits":{"cpu":"50m","memory":"64Mi"},"requests":{"cpu":"50m","memory":"64Mi"}},"tag":"nightly-alpine"}` | Configure vector for logs and metrics collection. | +| monitoring.vector.registry | string | `"docker.io"` | vector image registry | +| monitoring.vector.repository | string | `"timberio/vector"` | vector image repository | +| monitoring.vector.resource | object | `{"limits":{"cpu":"50m","memory":"64Mi"},"requests":{"cpu":"50m","memory":"64Mi"}}` | vector resource | +| monitoring.vector.tag | string | `"nightly-alpine"` | vector image tag | | mysqlServicePort | int | `4002` | GreptimeDB mysql service port | | objectStorage | object | `{"gcs":{},"oss":{},"s3":{}}` | Configure to object storage | | postgresServicePort | int | `4003` | GreptimeDB postgres service port | diff --git a/charts/greptimedb-cluster/templates/cluster.yaml b/charts/greptimedb-cluster/templates/cluster.yaml index 37df99d..d3e3e14 100644 --- a/charts/greptimedb-cluster/templates/cluster.yaml +++ b/charts/greptimedb-cluster/templates/cluster.yaml @@ -129,6 +129,24 @@ spec: secretName: {{ .Release.Name }}-users-auth {{- end }} {{- end }} + {{- if .Values.frontend.logging }} + logging: + {{- if .Values.frontend.logging.level }} + level: {{ .Values.frontend.logging.level }} + {{- end }} + {{- if .Values.frontend.logging.format }} + format: {{ .Values.frontend.logging.format }} + {{- end }} + {{- if .Values.frontend.logging.logsDir }} + logsDir: {{ .Values.frontend.logging.logsDir }} + {{- end }} + {{- if .Values.frontend.logging.onlyLogToStdout }} + onlyLogToStdout: {{ .Values.frontend.logging.onlyLogToStdout }} + {{- end }} + {{- if .Values.frontend.logging.persistentWithData }} + persistentWithData: {{ .Values.frontend.logging.persistentWithData }} + {{- end }} + {{- end }} meta: replicas: {{ .Values.meta.replicas }} {{- if or .Values.meta.configFile .Values.meta.configData }} @@ -149,6 +167,24 @@ spec: {{- if .Values.meta.enableRegionFailover }} enableRegionFailover: {{ .Values.meta.enableRegionFailover }} {{- end }} + {{- if .Values.meta.logging }} + logging: + {{- if .Values.meta.logging.level }} + level: {{ .Values.meta.logging.level }} + {{- end }} + {{- if .Values.meta.logging.format }} + format: {{ .Values.meta.logging.format }} + {{- end }} + {{- if .Values.meta.logging.logsDir }} + logsDir: {{ .Values.meta.logging.logsDir }} + {{- end }} + {{- if .Values.meta.logging.onlyLogToStdout }} + onlyLogToStdout: {{ .Values.meta.logging.onlyLogToStdout }} + {{- end }} + {{- if .Values.meta.logging.persistentWithData }} + persistentWithData: {{ .Values.meta.logging.persistentWithData }} + {{- end }} + {{- end }} template: main: {{- if .Values.meta.podTemplate.main.image }} @@ -247,6 +283,24 @@ spec: {{- if .Values.datanode.podTemplate.volumes}} volumes: {{ .Values.datanode.podTemplate.volumes | toYaml | nindent 8 }} {{- end }} + {{- if .Values.datanode.logging }} + logging: + {{- if .Values.datanode.logging.level }} + level: {{ .Values.datanode.logging.level }} + {{- end }} + {{- if .Values.datanode.logging.format }} + format: {{ .Values.datanode.logging.format }} + {{- end }} + {{- if .Values.datanode.logging.logsDir }} + logsDir: {{ .Values.datanode.logging.logsDir }} + {{- end }} + {{- if .Values.datanode.logging.onlyLogToStdout }} + onlyLogToStdout: {{ .Values.datanode.logging.onlyLogToStdout }} + {{- end }} + {{- if .Values.datanode.logging.persistentWithData }} + persistentWithData: {{ .Values.datanode.logging.persistentWithData }} + {{- end }} + {{- end }} storage: dataHome: {{ .Values.datanode.storage.dataHome }} fs: @@ -306,9 +360,27 @@ spec: {{- if .Values.flownode.podTemplate.nodeSelector }} nodeSelector: {{ .Values.flownode.podTemplate.nodeSelector | toYaml | nindent 8 }} {{- end }} - {{- if .Values.flownode.podTemplate.volumes}} + {{- if .Values.flownode.podTemplate.volumes }} volumes: {{ .Values.flownode.podTemplate.volumes | toYaml | nindent 8 }} {{- end }} + {{- if .Values.flownode.logging }} + logging: + {{- if .Values.flownode.logging.level }} + level: {{ .Values.flownode.logging.level }} + {{- end }} + {{- if .Values.flownode.logging.format }} + format: {{ .Values.flownode.logging.format }} + {{- end }} + {{- if .Values.flownode.logging.logsDir }} + logsDir: {{ .Values.flownode.logging.logsDir }} + {{- end }} + {{- if .Values.flownode.logging.onlyLogToStdout }} + onlyLogToStdout: {{ .Values.flownode.logging.onlyLogToStdout }} + {{- end }} + {{- if .Values.flownode.logging.persistentWithData }} + persistentWithData: {{ .Values.flownode.logging.persistentWithData }} + {{- end }} + {{- end }} {{- end }} {{- if (and .Values.prometheusMonitor (eq .Values.prometheusMonitor.enabled true ))}} prometheusMonitor: {{- toYaml .Values.prometheusMonitor | nindent 4 }} @@ -362,3 +434,40 @@ spec: kafka: {{- toYaml .Values.remoteWal.kafka | nindent 6 }} {{- end }} {{- end }} + {{- if .Values.monitoring.enabled }} + monitoring: + enabled: {{ .Values.monitoring.enabled }} + {{- if .Values.monitoring.standalone }} + standalone: {{ .Values.monitoring.standalone | toYaml | nindent 6 }} + {{- end }} + {{- if .Values.monitoring.logsCollection.pipeline.data }} + logsCollection: + pipeline: + data: {{ .Values.monitoring.logsCollection.pipeline.data }} + {{- end }} + {{- if .Values.monitoring.vector }} + vector: + image: '{{ .Values.monitoring.vector.registry }}/{{ .Values.monitoring.vector.repository }}:{{ .Values.monitoring.vector.tag }}' + {{- if .Values.monitoring.vector.resource }} + resource: {{- toYaml .Values.monitoring.vector.resource | nindent 8 }} + {{- end }} + {{- end }} + {{- end }} + {{- if .Values.logging}} + logging: + {{- if .Values.logging.level }} + level: {{ .Values.logging.level }} + {{- end }} + {{- if .Values.logging.format }} + format: {{ .Values.logging.format }} + {{- end }} + {{- if .Values.logging.logsDir }} + logsDir: {{ .Values.logging.logsDir }} + {{- end }} + {{- if .Values.logging.onlyLogToStdout }} + onlyLogToStdout: {{ .Values.logging.onlyLogToStdout }} + {{- end }} + {{- if .Values.logging.persistentWithData }} + persistentWithData: {{ .Values.logging.persistentWithData }} + {{- end }} + {{- end }} diff --git a/charts/greptimedb-cluster/values.yaml b/charts/greptimedb-cluster/values.yaml index b763ee3..cebf3d2 100644 --- a/charts/greptimedb-cluster/values.yaml +++ b/charts/greptimedb-cluster/values.yaml @@ -14,7 +14,7 @@ initializer: # -- Initializer image repository repository: greptime/greptimedb-initializer # -- Initializer image tag - tag: v0.1.0 + tag: v0.1.1 base: # -- The pod template for base @@ -147,6 +147,24 @@ frontend: tls: {} # secretName: greptimedb-frontend-tls + # -- Logging configuration for frontend, if not set, it will use the global logging configuration. + logging: {} + +# # -- The log level for greptimedb, only support "debug", "info", "warn", "debug" +# level: "info" +# +# # -- The log format for greptimedb, only support "json" and "text" +# format: "text" +# +# # -- The logs directory for greptimedb +# logsDir: "/data/greptimedb/logs" +# +# # -- Whether to log to stdout only +# onlyLogToStdout: false +# +# # -- indicates whether to persist the log with the datanode data storage. It **ONLY** works for the datanode component. +# persistentWithData: false + # -- Meta configure meta: # -- Meta replicas @@ -229,10 +247,28 @@ meta: # -- Whether to enable region failover enableRegionFailover: false + # -- Logging configuration for meta, if not set, it will use the global logging configuration. + logging: {} + +# # -- The log level for greptimedb, only support "debug", "info", "warn", "debug" +# level: "info" +# +# # -- The log format for greptimedb, only support "json" and "text" +# format: "text" +# +# # -- The logs directory for greptimedb +# logsDir: "/data/greptimedb/logs" +# +# # -- Whether to log to stdout only +# onlyLogToStdout: false +# +# # -- indicates whether to persist the log with the datanode data storage. It **ONLY** works for the datanode component. +# persistentWithData: false + # -- Datanode configure datanode: # -- Datanode replicas - replicas: 3 + replicas: 1 # -- Extra toml file of datanode. configFile: "" @@ -317,6 +353,24 @@ datanode: # -- deprecated walDir: "/data/greptimedb/wal" + # -- Logging configuration for datanode, if not set, it will use the global logging configuration. + logging: {} + +# # -- The log level for greptimedb, only support "debug", "info", "warn", "debug" +# level: "info" +# +# # -- The log format for greptimedb, only support "json" and "text" +# format: "text" +# +# # -- The logs directory for greptimedb +# logsDir: "/data/greptimedb/logs" +# +# # -- Whether to log to stdout only +# onlyLogToStdout: false +# +# # -- indicates whether to persist the log with the datanode data storage. It **ONLY** works for the datanode component. +# persistentWithData: false + # -- Flownode configure. **It's NOT READY YET** flownode: # -- Enable flownode @@ -331,6 +385,24 @@ flownode: # -- Extra raw toml config data of flownode. Skip if the `configFile` is used. configData: "" + # -- Logging configuration for flownode, if not set, it will use the global logging configuration. + logging: {} + + # # -- The log level for greptimedb, only support "debug", "info", "warn", "debug" + # level: "info" + # + # # -- The log format for greptimedb, only support "json" and "text" + # format: "text" + # + # # -- The logs directory for greptimedb + # logsDir: "/data/greptimedb/logs" + # + # # -- Whether to log to stdout only + # onlyLogToStdout: false + # + # # -- indicates whether to persist the log with the datanode data storage. It **ONLY** works for the datanode component. + # persistentWithData: false + # -- The pod template for frontend podTemplate: # -- The spec of main container @@ -488,3 +560,52 @@ debugPod: limits: memory: 256Mi cpu: 200m + +# -- The monitoring bootstrap configuration +monitoring: + # -- Enable monitoring + enabled: false + + # -- Configure the standalone instance for storing monitoring data + standalone: {} + + # -- Configure the logs collection + logsCollection: + # -- The greptimedb pipeline for logs collection + pipeline: + data: "" + + # -- Configure vector for logs and metrics collection. + vector: + # -- vector image registry + registry: docker.io + # -- vector image repository + repository: timberio/vector + # -- vector image tag + tag: nightly-alpine + + # -- vector resource + resource: + requests: + cpu: "50m" + memory: "64Mi" + limits: + cpu: "50m" + memory: "64Mi" + +# -- Global logging configuration +logging: + # -- The log level for greptimedb, only support "debug", "info", "warn", "debug" + level: "info" + + # -- The log format for greptimedb, only support "json" and "text" + format: "text" + + # -- The logs directory for greptimedb + logsDir: "/data/greptimedb/logs" + + # -- Whether to log to stdout only + onlyLogToStdout: false + + # -- indicates whether to persist the log with the datanode data storage. It **ONLY** works for the datanode component. + persistentWithData: false From 5b724c118160a875243d5139fc4f384ff576d443 Mon Sep 17 00:00:00 2001 From: zyy17 Date: Thu, 17 Oct 2024 16:04:02 +0800 Subject: [PATCH 2/2] refactor: add example of standalone --- charts/greptimedb-cluster/README.md | 4 +-- charts/greptimedb-cluster/values.yaml | 44 ++++++++++++++++++++++++++- 2 files changed, 45 insertions(+), 3 deletions(-) diff --git a/charts/greptimedb-cluster/README.md b/charts/greptimedb-cluster/README.md index 7362415..0a1c088 100644 --- a/charts/greptimedb-cluster/README.md +++ b/charts/greptimedb-cluster/README.md @@ -214,8 +214,8 @@ helm uninstall mycluster -n default | meta.podTemplate.volumes | list | `[]` | The pod volumes | | meta.replicas | int | `1` | Meta replicas | | meta.storeKeyPrefix | string | `""` | Meta will store data with this key prefix | -| monitoring | object | `{"enabled":false,"logsCollection":{"pipeline":{"data":""}},"standalone":{},"vector":{"registry":"docker.io","repository":"timberio/vector","resource":{"limits":{"cpu":"50m","memory":"64Mi"},"requests":{"cpu":"50m","memory":"64Mi"}},"tag":"nightly-alpine"}}` | The monitoring bootstrap configuration | -| monitoring.enabled | bool | `false` | Enable monitoring | +| monitoring | object | `{"enabled":true,"logsCollection":{"pipeline":{"data":""}},"standalone":{},"vector":{"registry":"docker.io","repository":"timberio/vector","resource":{"limits":{"cpu":"50m","memory":"64Mi"},"requests":{"cpu":"50m","memory":"64Mi"}},"tag":"nightly-alpine"}}` | The monitoring bootstrap configuration | +| monitoring.enabled | bool | `true` | Enable monitoring | | monitoring.logsCollection | object | `{"pipeline":{"data":""}}` | Configure the logs collection | | monitoring.logsCollection.pipeline | object | `{"data":""}` | The greptimedb pipeline for logs collection | | monitoring.standalone | object | `{}` | Configure the standalone instance for storing monitoring data | diff --git a/charts/greptimedb-cluster/values.yaml b/charts/greptimedb-cluster/values.yaml index cebf3d2..b462d48 100644 --- a/charts/greptimedb-cluster/values.yaml +++ b/charts/greptimedb-cluster/values.yaml @@ -564,10 +564,52 @@ debugPod: # -- The monitoring bootstrap configuration monitoring: # -- Enable monitoring - enabled: false + enabled: true # -- Configure the standalone instance for storing monitoring data standalone: {} +# base: +# main: +# # -- The standalone image, if not set, it will use the cluster image. +# image: "" +# +# resources: +# # -- The requested resources for monitoring +# requests: {} +## cpu: 500m +## memory: 512Mi +# +# # -- The resources limits for monitoring +# limits: {} +## cpu: "1" +## memory: "1Gi" +# +# # -- The environment variables for the container +# env: [] +# +# # -- The command to be executed in the container +# command: [] +# +# # -- The arguments to be passed to the command +# args: [] +# +# # -- The annotations to be created to the pod for monitoring +# annotations: {} +# +# # -- The labels to be created to the pod for monitoring +# labels: {} +# +# # -- The pod node selector for monitoring +# nodeSelector: {} +# +# # -- The pod tolerations for monitoring +# tolerations: [] +# +# # -- The pod affinity for monitoring +# affinity: {} +# +# # -- The global service account for monitoring +# serviceAccountName: "" # -- Configure the logs collection logsCollection: