dynamo-epp.yaml 4.12 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# 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.
apiVersion: apps/v1
kind: Deployment
metadata:
18
19
  name: {{ .Values.model.shortName }}-epp
  namespace: {{ .Release.Namespace }}
20
  labels:
21
    app: {{ .Values.model.shortName }}-epp
22
23
24
25
spec:
  replicas: 1
  selector:
    matchLabels:
26
      app: {{ .Values.model.shortName }}-epp
27
28
29
  template:
    metadata:
      labels:
30
        app: {{ .Values.model.shortName }}-epp
31
32
33
    spec:
      # Conservatively, this timeout should mirror the longest grace period of the pods within the pool
      terminationGracePeriodSeconds: 130
34
35
36
37
38
39
40
41

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

42
43
      containers:
      - name: epp
44
45
        image: "{{ if .Values.eppAware.enabled }}{{ default .Values.extension.image .Values.eppAware.eppImage }}{{ else }}{{ .Values.extension.image }}{{ end }}"
        imagePullPolicy: {{ default "IfNotPresent" .Values.epp.imagePullPolicy }}
46
        args:
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
        {{- 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"
62
        {{- if .Values.eppAware.enabled }}
63
64
65
          - -configFile
          - "/etc/epp/epp-config-dynamo.yaml"
        {{- end }}
66
        {{- end }}
67
68
69
70
71
72
73

        {{- $platformNs := default .Release.Namespace .Values.platformNamespace -}}
        {{- $platformName := default "dynamo-platform" .Values.platformReleaseName -}}
        {{- $ns := required "set eppAware.dynamoNamespace via values" .Values.eppAware.dynamoNamespace -}}
        {{- $comp := default "backend" .Values.eppAware.dynamoComponent -}}
        {{- $kv := default "16" .Values.eppAware.dynamoKvBlockSize -}}

74
75
        {{- if .Values.eppAware.enabled }}
        volumeMounts:
76
77
78
          - name: epp-config
            mountPath: /etc/epp
            readOnly: true
79
        {{- end }}
80

81
        env:
82
83
84
85
86
        {{- if .Values.eppAware.enabled }}
          - name: ETCD_ENDPOINTS
            value: "{{ $platformName }}-etcd.{{ $platformNs }}:2379"
          - name: NATS_SERVER
            value: "nats://{{ $platformName }}-nats.{{ $platformNs }}:4222"
87
          - name: DYN_NAMESPACE
88
89
90
91
92
93
            value: "{{ $ns }}"
          - name: DYNAMO_COMPONENT
            value: "{{ $comp }}"
          - name: DYNAMO_KV_BLOCK_SIZE
            value: "{{ $kv }}"
        {{- end }}
94
95
96
97
        {{- range .Values.epp.extraEnv }}
          - name: {{ .name }}
            value: {{ .value | quote }}
        {{- end }}
98

99
        ports:
100
101
102
103
          - containerPort: 9002
          - containerPort: 9003
          - name: metrics
            containerPort: 9090
104
105
106
107
108
109
110
111
112
113
114
        livenessProbe:
          grpc:
            port: 9003
            service: inference-extension
          initialDelaySeconds: 5
          periodSeconds: 10
        readinessProbe:
          grpc:
            port: 9003
            service: inference-extension
          initialDelaySeconds: 5
115
116
          periodSeconds: 10

117
118
119
120
121
122
123
124
      {{- if .Values.eppAware.enabled }}
      volumes:
        - name: epp-config
          configMap:
            name: {{ include "dynamo-gaie.fullname" . }}-epp-config
            items:
              - key: epp-config-dynamo.yaml
                path: epp-config-dynamo.yaml
125
      {{- end }}