diff --git a/charts/greptimedb-standalone/templates/podmonitor.yaml b/charts/greptimedb-standalone/templates/podmonitor.yaml index 148a6b0..938a886 100644 --- a/charts/greptimedb-standalone/templates/podmonitor.yaml +++ b/charts/greptimedb-standalone/templates/podmonitor.yaml @@ -1,13 +1,20 @@ +{{- if .Values.monitoring.enabled }} apiVersion: monitoring.coreos.com/v1 kind: PodMonitor metadata: name: {{ include "greptimedb.fullname" . }} namespace: {{ .Release.Namespace }} + {{- with .Values.monitoring.labels }} labels: - release: prometheus + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.monitoring.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} spec: podMetricsEndpoints: - - interval: 30s + - interval: {{ .Values.monitoring.interval }} port: http path: /metrics namespaceSelector: @@ -16,3 +23,4 @@ spec: selector: matchLabels: {{- include "greptimedb.selectorLabels" . | nindent 6 }} +{{- end }} diff --git a/charts/greptimedb-standalone/templates/service.yaml b/charts/greptimedb-standalone/templates/service.yaml index 673f826..09ac8d0 100644 --- a/charts/greptimedb-standalone/templates/service.yaml +++ b/charts/greptimedb-standalone/templates/service.yaml @@ -4,6 +4,10 @@ metadata: name: {{ include "greptimedb.fullname" . }} labels: {{- include "greptimedb.labels" . | nindent 4 }} + {{- with .Values.service.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} spec: type: {{ .Values.service.type }} ports: diff --git a/charts/greptimedb-standalone/templates/statefulset.yaml b/charts/greptimedb-standalone/templates/statefulset.yaml index 260ecee..1c73867 100644 --- a/charts/greptimedb-standalone/templates/statefulset.yaml +++ b/charts/greptimedb-standalone/templates/statefulset.yaml @@ -90,19 +90,19 @@ spec: {{- toYaml . | nindent 12 }} {{- end }} volumeMounts: - - name: tmp - mountPath: /tmp + - name: data + mountPath: /data {{- with .Values.resources }} resources: {{- toYaml . | nindent 12 }} {{- end }} {{- with .Values.affinity }} affinity: - {{- tpl . $ | nindent 8 }} + {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.dnsConfig }} dnsConfig: - {{- tpl . $ | nindent 8 }} + {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.nodeSelector }} nodeSelector: @@ -112,15 +112,12 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} - volumes: - - name: tmp - emptyDir: {} {{- if .Values.persistence.enabled }} volumeClaimTemplates: - apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: storage + name: data spec: accessModes: - ReadWriteOnce diff --git a/charts/greptimedb-standalone/values.yaml b/charts/greptimedb-standalone/values.yaml index 780f03e..99bbf14 100644 --- a/charts/greptimedb-standalone/values.yaml +++ b/charts/greptimedb-standalone/values.yaml @@ -33,9 +33,32 @@ command: [ args: [] # Environment variables -env: [] -# - name: DEMO_GREETING -# value: "Hello from the environment" +env: + GREPTIMEDB_STANDALONE__HTTP_OPTIONS__ADDR: "0.0.0.0:4000" + GREPTIMEDB_STANDALONE__HTTP_OPTIONS__TIMEOUT: "120s" + GREPTIMEDB_STANDALONE__PROM_OPTIONS__ADDR: "0.0.0.0:4004" + GREPTIMEDB_STANDALONE__WAL__FILE_SIZE: "128MB" + GREPTIMEDB_STANDALONE__WAL__PURGE_THRESHOLD: "2GB" + GREPTIMEDB_STANDALONE__STORAGE__TYPE: "File" + # Temporary put this in another directory to clear the database's data. + GREPTIMEDB_STANDALONE__STORAGE__DATA_HOME: "/tmp/greptimedb/data" + # GREPTIMEDB_STANDALONE__STORAGE__TYPE: "S3" + # GREPTIMEDB_STANDALONE__STORAGE__BUCKET: "bucket-name" + # GREPTIMEDB_STANDALONE__STORAGE__ROOT: "/data" + # GREPTIMEDB_STANDALONE__STORAGE__REGION: "ap-southeast-1" + GREPTIMEDB_STANDALONE__STORAGE__CACHE_PATH: "/tmp/greptimedb/s3cache" + GREPTIMEDB_STANDALONE__STORAGE__GLOBAL_TTL: "1d" + GREPTIMEDB_STANDALONE__STORAGE__MANIFEST__CHECKPOINT_ON_STARTUP: "true" + # GREPTIMEDB_STANDALONE__STORAGE__FLUSH__REGION_WRITE_BUFFER_SIZE: "256MB" + # GREPTIMEDB_STANDALONE__STORAGE__FLUSH__REGION_WRITE_BUFFER_SIZE: "1MB" + GREPTIMEDB_STANDALONE__STORAGE__FLUSH__GLOBAL_WRITE_BUFFER_SIZE: "512MB" + # GREPTIMEDB_STANDALONE__STORAGE__FLUSH__GLOBAL_WRITE_BUFFER_SIZE: "300MB" + # GREPTIMEDB_STANDALONE__STORAGE__FLUSH__GLOBAL_WRITE_BUFFER_SIZE: "100MB" + # GREPTIMEDB_STANDALONE__STORAGE__FLUSH__AUTO_FLUSH_INTERVAL: "5m" + # GREPTIMEDB_STANDALONE__STORAGE__FLUSH__MAX_FLUSH_TASKS: "2" + # GREPTIMEDB_STANDALONE__STORAGE__COMPACTION__MAX_INFLIGHT_TASKS: "2" + MALLOC_CONF: "prof:true" + # GREPTIMEDB_STANDALONE__STORAGE__SKIP_WAL: "true" # Environment variables envFrom: {} @@ -64,10 +87,6 @@ securityContext: {} # runAsGroup: 3000 # fsGroup: 2000 -service: - type: ClusterIP - - # Resource requests and limits for the container resources: {} # limits: @@ -77,12 +96,10 @@ resources: {} # cpu: 200m # memory: 512Mi - # The node selector nodeSelector: {} # disktype: ssd - # The tolerations tolerations: {} # - key: "key1" @@ -90,7 +107,6 @@ tolerations: {} # value: "value1" # effect: "NoSchedule" - # The affinity rules affinity: {} # nodeAffinity: @@ -121,23 +137,32 @@ dnsConfig: {} # - name: ndots # value: "2" - # Grace period to allow the single binary to shutdown before it is killed terminationGracePeriodSeconds: 30 - persistence: # Enable persistent disk enabled: true - # Enable StatefulSetAutoDeletePVC feature enableStatefulSetAutoDeletePVC: false - # Size of persistent disk size: 10Gi - # Storage class name storageClass: null - # Selector for persistent disk selector: null + +monitoring: + enabled: true + # PodMonitor annotations + annotations: {} + # PodMonitor labels + labels: + release: prometheus + # PodMonitor scrape interval + interval: 15s + +service: + type: ClusterIP + # Annotations for Service + annotations: {}