-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support deploying pika_exporter components using kubeblocks
- Loading branch information
liuchengyu
committed
Mar 8, 2024
1 parent
a753d90
commit f6cbfd2
Showing
8 changed files
with
157 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
tools/kubeblocks_helm/pika/templates/componentdefinition-pika-exporter.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
apiVersion: apps.kubeblocks.io/v1alpha1 | ||
kind: ComponentDefinition | ||
metadata: | ||
name: pika-exporter | ||
labels: | ||
{{- include "pika.labels" . | nindent 4 }} | ||
spec: | ||
provider: pika | ||
description: A pika exporter component definition | ||
serviceKind: pika-exporter | ||
serviceVersion: {{ .Chart.AppVersion }} | ||
services: | ||
- name: expoter | ||
serviceName: expoter | ||
spec: | ||
ports: | ||
- name: expoter | ||
port: 9121 | ||
targetPort: expoter | ||
updateStrategy: Serial | ||
configs: | ||
- name: pika-config | ||
templateRef: pika-conf-template | ||
volumeName: config | ||
vars: | ||
## reference to the pika-codis-dashboard service | ||
- name: DASHBOARD_ADDR | ||
valueFrom: | ||
serviceVarRef: | ||
compDef: pika-codis-dashboard | ||
name: dashboard | ||
optional: true | ||
host: Optional | ||
runtime: | ||
initContainers: | ||
- name: wait-codis-dashboard | ||
image: busybox:1.28 | ||
command: | ||
- 'sh' | ||
- '-c' | ||
- "until nc -z ${DASHBOARD_ADDR} 18080; do echo waiting for codis dashboard; sleep 2; done;" | ||
containers: | ||
- name: pika-exporter | ||
image: {{ include "pikaExporter.image" . }} | ||
imagePullPolicy: {{ include "pikaExporter.imagePullPolicy" . }} | ||
ports: | ||
- name: expoter | ||
containerPort: 9121 | ||
volumeMounts: | ||
- name: config | ||
mountPath: /etc/pika | ||
command: | ||
- "/pika/bin/pika_exporter" | ||
args: | ||
- "-config" | ||
- "/etc/pika/info.toml" | ||
- "-codis.addr" | ||
- "http://$(DASHBOARD_ADDR):18080/topom" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters