diff --git a/charts/snapshot/templates/_helpers.tpl b/charts/snapshot/templates/_helpers.tpl index 7a3927ec..8b2f82ec 100644 --- a/charts/snapshot/templates/_helpers.tpl +++ b/charts/snapshot/templates/_helpers.tpl @@ -101,3 +101,6 @@ reads for rootfs-diff capture, and CRI-O config.json fallback). {{- define "snapshot.runtimeStorageDir" -}} {{- if eq .Values.runtime.type "crio" -}}/var/lib/containers{{- else -}}/var/lib/containerd{{- end -}} {{- end }} + +{{- define "snapshot.pageBrokerControlPath" -}}/pagebroker/control{{- end -}} +{{- define "snapshot.pageBrokerStagingPath" -}}/pagebroker/staging{{- end -}} diff --git a/charts/snapshot/templates/configmap.yaml b/charts/snapshot/templates/configmap.yaml index 29d08408..c005557e 100644 --- a/charts/snapshot/templates/configmap.yaml +++ b/charts/snapshot/templates/configmap.yaml @@ -25,6 +25,12 @@ data: overlay: exclusions: {{ toYaml .Values.config.overlay.exclusions | nindent 8 }} + pageBroker: + enabled: {{ .Values.pageBroker.enabled }} + {{- if .Values.pageBroker.enabled }} + controlSocketPath: {{ printf "%s/pagebroker.sock" (include "snapshot.pageBrokerControlPath" .) | quote }} + {{- end }} + restore: restoreTimeoutSeconds: {{ .Values.config.restore.restoreTimeoutSeconds }} diff --git a/charts/snapshot/templates/daemonset.yaml b/charts/snapshot/templates/daemonset.yaml index 1cbb0642..5463b3ed 100644 --- a/charts/snapshot/templates/daemonset.yaml +++ b/charts/snapshot/templates/daemonset.yaml @@ -2,6 +2,8 @@ {{- $socket := include "snapshot.runtimeSocket" . -}} {{- $socketDir := $socket | dir -}} {{- $storageDir := include "snapshot.runtimeStorageDir" . -}} +{{- $pageBrokerControlPath := include "snapshot.pageBrokerControlPath" . -}} +{{- $pageBrokerStagingPath := include "snapshot.pageBrokerStagingPath" . -}} # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 @@ -104,6 +106,24 @@ spec: mountPath: /host-seccomp {{- end }} containers: + {{- if .Values.pageBroker.enabled }} + - name: pagebroker + image: "{{ .Values.pageBroker.image.repository }}:{{ .Values.pageBroker.image.tag }}" + imagePullPolicy: {{ .Values.pageBroker.image.pullPolicy }} + args: + - {{ printf "%s/pagebroker.sock" $pageBrokerControlPath | quote }} + - {{ $pageBrokerStagingPath | quote }} + - {{ .Values.storage.pvc.basePath | quote }} + - --max-concurrent-requests + - {{ .Values.pageBroker.maxConcurrentRequests | quote }} + resources: + {{- toYaml .Values.pageBroker.resources | nindent 12 }} + volumeMounts: + - name: pagebroker + mountPath: /pagebroker + - name: checkpoints + mountPath: {{ .Values.storage.pvc.basePath }} + {{- end }} - name: agent image: "{{ .Values.image.agent.repository }}:{{ .Values.image.agent.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.agent.pullPolicy }} @@ -127,6 +147,10 @@ spec: - name: config mountPath: /etc/snapshot readOnly: true + {{- if .Values.pageBroker.enabled }} + - name: pagebroker + mountPath: /pagebroker + {{- end }} {{- if eq .Values.storage.type "pvc" }} # Every agent owns direct access to the shared checkpoint store. - name: checkpoints @@ -173,6 +197,12 @@ spec: - name: config configMap: name: {{ include "snapshot.fullname" . }}-config + {{- if .Values.pageBroker.enabled }} + - name: pagebroker + emptyDir: + medium: Memory + sizeLimit: {{ .Values.pageBroker.stagingSizeLimit | quote }} + {{- end }} {{- if .Values.seccomp.deploy }} # Seccomp profile ConfigMap (used by initContainer) - name: seccomp-profiles diff --git a/charts/snapshot/values.yaml b/charts/snapshot/values.yaml index f4e0dc3a..047ee891 100644 --- a/charts/snapshot/values.yaml +++ b/charts/snapshot/values.yaml @@ -75,6 +75,22 @@ storage: oci: uri: "" +pageBroker: + enabled: false + maxConcurrentRequests: 16 + stagingSizeLimit: 64Gi + resources: + requests: + cpu: 8 + memory: 64Gi + limits: + cpu: 32 + memory: 72Gi + image: + repository: nvcr.io/nvidia/ai-dynamo/pagebroker + tag: 1.4.0 + pullPolicy: Always + # DaemonSet configuration for the checkpoint/restore agent daemonset: # Agent and nsrestore log level (trace, debug, info, warn, error)