Skip to content

Commit 70d54b8

Browse files
committed
feat: add possibility to use grove in dynamo graph helm chart
1 parent db933ed commit 70d54b8

File tree

1 file changed

+110
-0
lines changed

1 file changed

+110
-0
lines changed
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
{{- if eq .Values.deploymentType "grove" }}
16+
---
17+
apiVersion: grove.io/v1alpha1
18+
kind: PodGangSet
19+
metadata:
20+
name: {{ $.Release.Name }}
21+
labels:
22+
app: {{ $.Release.Name }}
23+
spec:
24+
replicas: 1
25+
template:
26+
cliques:
27+
{{- range $serviceName, $serviceSpec := .Values.spec.services }}
28+
- name: {{ $serviceName | lower }}
29+
spec:
30+
roleName: {{ $serviceName | lower }}
31+
replicas: {{ $serviceSpec.replicas }}
32+
podSpec:
33+
containers:
34+
- name: main
35+
image: {{ $serviceSpec.extraPodSpec.mainContainer.image }}
36+
{{- if $serviceSpec.resources }}
37+
resources:
38+
requests:
39+
{{- if $serviceSpec.resources.cpu }}
40+
cpu: "{{ $serviceSpec.resources.cpu }}"
41+
{{- end }}
42+
{{- if $serviceSpec.resources.memory }}
43+
memory: "{{ $serviceSpec.resources.memory }}"
44+
{{- end }}
45+
{{- if $serviceSpec.resources.gpu }}
46+
nvidia.com/gpu: "{{ $serviceSpec.resources.gpu }}"
47+
{{- end }}
48+
limits:
49+
{{- if $serviceSpec.resources.cpu }}
50+
cpu: "{{ $serviceSpec.resources.cpu }}"
51+
{{- end }}
52+
{{- if $serviceSpec.resources.memory }}
53+
memory: "{{ $serviceSpec.resources.memory }}"
54+
{{- end }}
55+
{{- if $serviceSpec.resources.gpu }}
56+
nvidia.com/gpu: "{{ $serviceSpec.resources.gpu }}"
57+
{{- end }}
58+
{{- end }}
59+
workingDir: {{ $serviceSpec.extraPodSpec.mainContainer.workingDir }}
60+
args:
61+
{{- $serviceSpec.extraPodSpec.mainContainer.args | toYaml | nindent 14 }}
62+
env:
63+
- name: DYNAMO_PORT
64+
value: "{{ $.Values.dynamoPort | default 8000 }}"
65+
{{- if $.Values.etcdAddr }}
66+
- name: ETCD_ENDPOINTS
67+
value: "{{ $.Values.etcdAddr }}"
68+
{{- end }}
69+
{{- if $.Values.natsAddr }}
70+
- name: NATS_SERVER
71+
value: "{{ $.Values.natsAddr }}"
72+
{{- end }}
73+
{{- if $serviceSpec.envFromSecret }}
74+
envFrom:
75+
- secretRef:
76+
name: {{ $serviceSpec.envFromSecret }}
77+
{{- end }}
78+
ports:
79+
- name: health
80+
containerPort: {{ $.Values.healthPort | default 5000 }}
81+
livenessProbe:
82+
{{- if $serviceSpec.extraPodSpec.mainContainer.livenessProbe }}
83+
{{ $serviceSpec.extraPodSpec.mainContainer.livenessProbe | toYaml | nindent 10 }}
84+
{{- else }}
85+
initialDelaySeconds: 60
86+
periodSeconds: 60
87+
timeoutSeconds: 5
88+
failureThreshold: 10
89+
successThreshold: 1
90+
httpGet:
91+
path: /healthz
92+
port: health
93+
scheme: HTTP
94+
{{- end }}
95+
readinessProbe:
96+
{{- if $serviceSpec.extraPodSpec.mainContainer.readinessProbe }}
97+
{{ $serviceSpec.extraPodSpec.mainContainer.readinessProbe | toYaml | nindent 10 }}
98+
{{- else }}
99+
initialDelaySeconds: 60
100+
periodSeconds: 60
101+
timeoutSeconds: 5
102+
failureThreshold: 10
103+
successThreshold: 1
104+
httpGet:
105+
path: /readyz
106+
port: health
107+
scheme: HTTP
108+
{{- end }}
109+
{{- end }}
110+
{{- end }}

0 commit comments

Comments
 (0)