Skip to content

Commit

Permalink
feat: add more values
Browse files Browse the repository at this point in the history
  • Loading branch information
daviderli614 committed Oct 12, 2023
1 parent 0c65012 commit 5468ba8
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 26 deletions.
12 changes: 10 additions & 2 deletions charts/greptimedb-standalone/templates/podmonitor.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -16,3 +23,4 @@ spec:
selector:
matchLabels:
{{- include "greptimedb.selectorLabels" . | nindent 6 }}
{{- end }}
4 changes: 4 additions & 0 deletions charts/greptimedb-standalone/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
13 changes: 5 additions & 8 deletions charts/greptimedb-standalone/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
57 changes: 41 additions & 16 deletions charts/greptimedb-standalone/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: {}
Expand Down Expand Up @@ -64,10 +87,6 @@ securityContext: {}
# runAsGroup: 3000
# fsGroup: 2000

service:
type: ClusterIP


# Resource requests and limits for the container
resources: {}
# limits:
Expand All @@ -77,20 +96,17 @@ resources: {}
# cpu: 200m
# memory: 512Mi


# The node selector
nodeSelector: {}
# disktype: ssd


# The tolerations
tolerations: {}
# - key: "key1"
# operator: "Equal"
# value: "value1"
# effect: "NoSchedule"


# The affinity rules
affinity: {}
# nodeAffinity:
Expand Down Expand Up @@ -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: {}

0 comments on commit 5468ba8

Please sign in to comment.