Skip to content

Commit

Permalink
feat: support deploying pika_exporter components using kubeblocks (#2473
Browse files Browse the repository at this point in the history
)

Co-authored-by: liuchengyu <[email protected]>
  • Loading branch information
chengyu-l and liuchengyu authored Mar 11, 2024
1 parent b248901 commit 1e27f89
Show file tree
Hide file tree
Showing 11 changed files with 7,507 additions and 1 deletion.
17 changes: 17 additions & 0 deletions tools/kubeblocks_helm/pika-cluster/templates/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,23 @@ spec:
storage: {{ .size }}
{{- end }}
{{- end }}
- name: pika-exporter
{{- if .Values.useLegacyCompDef }}
componentDefRef: pika-exporter # ref clusterDefinition.componentDefs[x].name
{{- else }}
componentDef: pika-exporter # ref componentDefinition name
{{- end }}
monitor: {{ .Values.monitor.enabled | default false }}
replicas: 1
{{- with .Values.resources.pikaExporter }}
resources:
limits:
cpu: {{ .limits.cpu | quote }}
memory: {{ .limits.memory | quote }}
requests:
cpu: {{ .requests.cpu | quote }}
memory: {{ .requests.memory | quote }}
{{- end }}
- name: codis-proxy
{{- if .Values.useLegacyCompDef }}
componentDefRef: codis-proxy # ref clusterDefinition.componentDefs[x].name
Expand Down
9 changes: 8 additions & 1 deletion tools/kubeblocks_helm/pika-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
# if useLegacyCompDef is false ,cluster will be rendered by component definition rather than componentDefRef in cluster definition
useLegacyCompDef: false
useLegacyCompDef: true

nameOverride: ""
fullnameOverride: ""
Expand Down Expand Up @@ -52,6 +52,13 @@ resources:
requests:
cpu: 500m
memory: 1Gi
pikaExporter:
limits:
cpu: 500m
memory: 3Gi
requests:
cpu: 500m
memory: 1Gi
codisProxy:
limits:
cpu: 500m
Expand Down
12 changes: 12 additions & 0 deletions tools/kubeblocks_helm/pika/config/exporter-info.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
server = true
data = true
clients = true
stats = true
cpu = true
replication = true
keyspace = true
cache = true

execcount = false
commandstats = false
rocksdb = false
Loading

0 comments on commit 1e27f89

Please sign in to comment.