Skip to content

Commit 1276de7

Browse files
committed
chore (helm): add service for tensor-fusion
1 parent b692653 commit 1276de7

File tree

6 files changed

+90
-73
lines changed

6 files changed

+90
-73
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,18 @@ spec:
4141
- name: cert
4242
readOnly: true
4343
mountPath: /tmp/k8s-webhook-server/serving-certs
44-
items:
45-
- key: tls.crt
46-
path: cert
47-
- key: tls.key
48-
path: key
4944
- name: config
5045
mountPath: /etc/tensor-fusion
5146
volumes:
5247
- name: cert
5348
secret:
5449
secretName: {{.Values.controller.admissionWebhooks.secretName}}
5550
defaultMode: 420
51+
items:
52+
- key: cert
53+
path: tls.crt
54+
- key: key
55+
path: tls.key
5656
- name: config
5757
configMap:
5858
name: {{ include "tensor-fusion.fullname" . }}-config
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: {{ include "tensor-fusion.fullname" . }}
5+
namespace: {{ include "tensor-fusion.namespace" . }}
6+
spec:
7+
ports:
8+
- port: 8080
9+
protocol: TCP
10+
targetPort: 8080
11+
selector:
12+
{{- include "tensor-fusion.controller.selectorLabels" . | nindent 6 }}

charts/tensor-fusion/templates/hypervisor-daemonset.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ spec:
5353
imagePullPolicy: IfNotPresent
5454
- name: vector
5555
image: docker.io/timberio/vector:nightly-2025-01-07-debian
56+
env:
57+
- name: NODE_IP
58+
valueFrom:
59+
fieldRef:
60+
apiVersion: v1
61+
fieldPath: status.hostIP
5662
resources:
5763
requests:
5864
cpu: 50m

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ data:
2828
- parse_influx
2929
source: |
3030
.namespace = "tf"
31+
.tags.nodeip = "${NODE_IP}"
3132
3233
log_to_metric:
3334
type: log_to_metric
@@ -36,6 +37,7 @@ data:
3637
all_metrics: true
3738
metrics: []
3839
sinks:
40+
3941
sink_greptimedb_metrics:
4042
type: greptimedb_metrics
4143
inputs:

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

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,68 @@ metadata:
44
name: {{ include "tensor-fusion.fullname" . }}-config
55
namespace: {{ include "tensor-fusion.namespace" . }}
66
data:
7-
config.yaml: | {{ toYaml .Values.controller.config | nindent 4 }}
7+
config.yaml: |-
8+
worker:
9+
template:
10+
spec:
11+
terminationGracePeriodSeconds: 0
12+
runtimeClassName: nvidia
13+
volumes:
14+
- name: worker-sock
15+
hostPath:
16+
path: /tensor-fusion/worker/sock
17+
type: DirectoryOrCreate
18+
hostNetwork: true
19+
hostPID: true
20+
containers:
21+
- name: tensor-fusion-worker
22+
image: tensorfusion/tensor-fusion-worker:latest
23+
env:
24+
- name: POD_NAME
25+
valueFrom:
26+
fieldRef:
27+
apiVersion: v1
28+
fieldPath: metadata.name
29+
- name: TF_ENABLE_LOG
30+
value: '1'
31+
volumeMounts:
32+
- name: worker-sock
33+
mountPath: /tensor-fusion/worker/sock
34+
command:
35+
- /home/app/tensor-fusion-worker
36+
- -n
37+
- native
38+
- -p
39+
- '$(TENSOR_FUSION_WORKER_PORT)'
40+
- -a
41+
- '0x1129'
42+
- -l
43+
- /tensor-fusion/worker/sock/$(POD_NAME).sock
44+
45+
podMutation:
46+
operatorEndpoint: http://{{ include "tensor-fusion.fullname" . }}.{{ include "tensor-fusion.namespace" . }}:8080
47+
patchToContainer:
48+
volumeMounts:
49+
- mountPath: /tensor-fusion
50+
name: tf-libs
51+
env:
52+
- name: LD_PRELOAD
53+
value: /tensor-fusion/libcuda.so
54+
- name: TF_ENABLE_LOG
55+
value: '1'
56+
patchToPod:
57+
spec:
58+
volumes:
59+
- name: tf-libs
60+
emptyDir: {}
61+
initContainers:
62+
- name: inject-lib
63+
image: tensorfusion/tensor-fusion-client:latest
64+
command:
65+
- sh
66+
- -c
67+
- cp /home/app/*.so /tensor-fusion/ && cp nvidia-smi-linux-amd64-550.54.15 /tensor-fusion/nvidia-smi
68+
volumeMounts:
69+
- mountPath: /tensor-fusion
70+
name: tf-libs
71+

charts/tensor-fusion/values.yaml

Lines changed: 0 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -55,70 +55,3 @@ controller:
5555
secretName: tensor-fusion-webhook-secret
5656
patch:
5757
image: registry.k8s.io/ingress-nginx/kube-webhook-certgen:v1.5.0
58-
59-
config:
60-
worker:
61-
port: 9999
62-
template:
63-
spec:
64-
terminationGracePeriodSeconds: 0
65-
runtimeClassName: nvidia
66-
volumes:
67-
- name: worker-sock
68-
hostPath:
69-
path: /tensor-fusion/worker/sock
70-
type: DirectoryOrCreate
71-
hostNetwork: true
72-
hostPID: true
73-
containers:
74-
- name: tensor-fusion-worker
75-
image: tensorfusion/tensor-fusion-worker:latest
76-
env:
77-
- name: POD_NAME
78-
valueFrom:
79-
fieldRef:
80-
apiVersion: v1
81-
fieldPath: metadata.name
82-
- name: TF_ENABLE_LOG
83-
value: '1'
84-
volumeMounts:
85-
- name: worker-sock
86-
mountPath: /tensor-fusion/worker/sock
87-
command:
88-
- /home/app/tensor-fusion-worker
89-
- -n
90-
- native
91-
- -p
92-
- '9999'
93-
- -a
94-
- '0x1129'
95-
- -l
96-
- /tensor-fusion/worker/sock/$(POD_NAME).sock
97-
98-
podMutation:
99-
operatorEndpoint: http://tensor-fusion-controller.tensor-fusion:8080
100-
patchToContainer:
101-
volumeMounts:
102-
- mountPath: /tensor-fusion
103-
name: tf-libs
104-
env:
105-
- name: LD_PRELOAD
106-
value: /tensor-fusion/libcuda.so
107-
- name: TF_ENABLE_LOG
108-
value: '1'
109-
patchToPod:
110-
spec:
111-
volumes:
112-
- name: tf-libs
113-
emptyDir: {}
114-
initContainers:
115-
- name: inject-lib
116-
image: tensorfusion/tensor-fusion-client:latest
117-
command:
118-
- sh
119-
- -c
120-
- cp /home/app/*.so /tensor-fusion/
121-
volumeMounts:
122-
- mountPath: /tensor-fusion
123-
name: tf-libs
124-

0 commit comments

Comments
 (0)