dynamo-epp.yaml 4.34 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{{- /* ------------ file-scope vars (no output) ------------ */ -}}
{{- $platformNs   := default .Release.Namespace .Values.platformNamespace -}}
{{- $platformName := default "dynamo-platform" .Values.platformReleaseName -}}
{{- $useDynamo    := default false .Values.epp.useDynamo -}}
{{- $dynNsAll     := default .Values.dynamoNamespace .Values.epp.dynamo.namespace -}}
{{- $ns           := ternary (required "set epp.dynamo.namespace (or top-level dynamoNamespace) when epp.useDynamo=true" $dynNsAll) "" $useDynamo -}}
{{- $kv           := default "16" .Values.epp.dynamo.kvBlockSize -}}
{{- $std          := .Values.extension.standardImage -}}
{{- $dyn          := .Values.extension.dynamoImage -}}
{{- $fallback     := ternary $dyn $std .Values.epp.useDynamo -}}
{{- $eppImage     := default $fallback .Values.extension.image -}}


---  # <-- start of actual YAML document
29
30
31
apiVersion: apps/v1
kind: Deployment
metadata:
32
33
  name: {{ .Values.model.shortName }}-epp
  namespace: {{ .Release.Namespace }}
34
  labels:
35
    app: {{ .Values.model.shortName }}-epp
36
37
38
39
spec:
  replicas: 1
  selector:
    matchLabels:
40
      app: {{ .Values.model.shortName }}-epp
41
42
43
  template:
    metadata:
      labels:
44
        app: {{ .Values.model.shortName }}-epp
45
46
    spec:
      terminationGracePeriodSeconds: 130
47
48
49
50
51
52
53
54

      {{- if .Values.imagePullSecrets }}
      imagePullSecrets:
      {{- range .Values.imagePullSecrets }}
        - name: {{ . | quote }}
      {{- end }}
      {{- end }}

55
56
      containers:
      - name: epp
57
        image: "{{ $eppImage }}"
58
        imagePullPolicy: {{ default "IfNotPresent" .Values.epp.imagePullPolicy }}
59
        args:
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
        {{- if .Values.epp.argsOverride }}
        {{- toYaml .Values.epp.argsOverride | nindent 8 }}
        {{- else }}
          - -poolName
          - "{{ .Values.model.shortName }}-pool"
          - -poolNamespace
          - "{{ .Release.Namespace }}"
          - -v
          - "4"
          - --zap-encoder
          - "json"
          - -grpcPort
          - "9002"
          - -grpcHealthPort
          - "9003"
75
          {{- if $useDynamo }}
76
          - -configFile
77
78
          - "{{ .Values.epp.configFile }}"
          {{- end }}
79
        {{- end }}
80

81
        {{- if $useDynamo }}
82
        volumeMounts:
83
84
85
          - name: epp-config
            mountPath: /etc/epp
            readOnly: true
86
        {{- end }}
87

88
        env:
89
        {{- if $useDynamo }}
90
91
92
93
          - name: ETCD_ENDPOINTS
            value: "{{ $platformName }}-etcd.{{ $platformNs }}:2379"
          - name: NATS_SERVER
            value: "nats://{{ $platformName }}-nats.{{ $platformNs }}:4222"
94
          - name: DYN_NAMESPACE
95
96
97
            value: "{{ $ns }}"
          - name: DYNAMO_KV_BLOCK_SIZE
            value: "{{ $kv }}"
98
99
          - name: DYNAMO_ROUTER_REPLICA_SYNC
            value: "true"
100
101
          - name: USE_STREAMING
            value: "true"
102
        {{- end }}
103
104
105
106
        {{- range .Values.epp.extraEnv }}
          - name: {{ .name }}
            value: {{ .value | quote }}
        {{- end }}
107

108
        ports:
109
110
111
112
          - containerPort: 9002
          - containerPort: 9003
          - name: metrics
            containerPort: 9090
113
114
115
116
117
118
119
120
121
122
123
        livenessProbe:
          grpc:
            port: 9003
            service: inference-extension
          initialDelaySeconds: 5
          periodSeconds: 10
        readinessProbe:
          grpc:
            port: 9003
            service: inference-extension
          initialDelaySeconds: 5
124
125
          periodSeconds: 10

126
      {{- if $useDynamo }}
127
128
129
130
131
132
133
      volumes:
        - name: epp-config
          configMap:
            name: {{ include "dynamo-gaie.fullname" . }}-epp-config
            items:
              - key: epp-config-dynamo.yaml
                path: epp-config-dynamo.yaml
134
      {{- end }}