Skip to content

Commit 3e493bf

Browse files
authored
fix: split vector config into operator and hypervisor configs (#143)
* chore: remove language selection links from README.md * fix: split vector config into operator and hypervisor configs, update mount path
1 parent 54cb81a commit 3e493bf

File tree

2 files changed

+33
-30
lines changed

2 files changed

+33
-30
lines changed

charts/tensor-fusion/templates/controller-deployment.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ spec:
8989
- name: logs
9090
mountPath: /logs
9191
- name: vector-config
92-
mountPath: /etc/vector
92+
mountPath: /etc/vector/vector.yaml
93+
subPath: vector-operator.yaml
9394
volumes:
9495
- name: cert
9596
secret:

charts/tensor-fusion/templates/vector-config.yaml

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,37 @@ metadata:
44
name: {{ include "tensor-fusion.fullname" . }}-vector-config
55
namespace: {{ include "tensor-fusion.namespace" . }}
66
data:
7-
vector.yaml: |
7+
vector-operator.yaml: |
8+
api:
9+
enabled: true
10+
sources:
11+
controller_metrics:
12+
type: prometheus_scrape
13+
endpoints:
14+
- http://localhost:9000/metrics
15+
transforms:
16+
prepare_controller_metrics:
17+
type: remap
18+
inputs:
19+
- controller_metrics
20+
source: |
21+
.namespace = "tf"
22+
sinks:
23+
sink_greptimedb_controller_metrics:
24+
type: prometheus_remote_write
25+
inputs:
26+
- prepare_controller_metrics
27+
{{- if ne .Values.greptime.isCloud true }}
28+
endpoint: http://{{ .Values.greptime.host }}:4000/v1/prometheus/write?db=public
29+
{{- else }}
30+
endpoint: https://{{ .Values.greptime.host }}/v1/prometheus/write?db={{ .Values.greptime.db }}
31+
auth:
32+
strategy: basic
33+
user: {{ .Values.greptime.user }}
34+
password: {{ .Values.greptime.password }}
35+
{{- end }}
36+
37+
vector-hypervisor.yaml: |
838
api:
939
enabled: true
1040
@@ -15,19 +45,13 @@ data:
1545
include:
1646
- /logs/metrics.log
1747
18-
controller_metrics:
19-
type: prometheus_scrape
20-
endpoints:
21-
- http://localhost:9000/metrics
22-
2348
transforms:
2449
parse_influx:
2550
type: remap
2651
inputs:
2752
- metrics
2853
source: |
2954
. = parse_influxdb!(.message)
30-
3155
prepare_metrics:
3256
type: remap
3357
inputs:
@@ -43,13 +67,6 @@ data:
4367
all_metrics: true
4468
metrics: []
4569
46-
prepare_controller_metrics:
47-
type: remap
48-
inputs:
49-
- controller_metrics
50-
source: |
51-
.namespace = "tf"
52-
5370
sinks:
5471
sink_greptimedb_hypervisor_metrics:
5572
type: greptimedb_metrics
@@ -64,18 +81,3 @@ data:
6481
tls: {}
6582
{{- end }}
6683
67-
sink_greptimedb_controller_metrics:
68-
type: prometheus_remote_write
69-
inputs:
70-
- prepare_controller_metrics
71-
{{- if ne .Values.greptime.isCloud true }}
72-
endpoint: http://{{ .Values.greptime.host }}:4000/v1/prometheus/write?db=public
73-
{{- else }}
74-
endpoint: https://{{ .Values.greptime.host }}/v1/prometheus/write?db={{ .Values.greptime.db }}
75-
auth:
76-
strategy: basic
77-
user: {{ .Values.greptime.user }}
78-
password: {{ .Values.greptime.password }}
79-
{{- end }}
80-
81-

0 commit comments

Comments
 (0)