# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "snapshot.fullname" . }}-config
  namespace: {{ .Release.Namespace }}
  labels:
    {{- include "snapshot.labels" . | nindent 4 }}
data:
  config.yaml: |
    overlay:
      exclusions: {{ toYaml .Values.config.overlay.exclusions | nindent 8 }}

    restore:
      nsRestorePath: {{ .Values.config.restore.nsRestorePath | quote }}
      restoreReadyTimeoutSeconds: {{ .Values.config.restore.restoreReadyTimeoutSeconds }}

    criu:
      binaryPath: {{ .Values.config.criu.binaryPath | quote }}
      ghostLimit: {{ .Values.config.criu.ghostLimit }}
      logLevel: {{ .Values.config.criu.logLevel }}
      workDir: {{ .Values.config.criu.workDir | quote }}
      leaveRunning: {{ .Values.config.criu.leaveRunning }}
      shellJob: {{ .Values.config.criu.shellJob }}
      tcpClose: {{ .Values.config.criu.tcpClose }}
      tcpEstablished: {{ .Values.config.criu.tcpEstablished }}
      fileLocks: {{ .Values.config.criu.fileLocks }}
      orphanPtsMaster: {{ .Values.config.criu.orphanPtsMaster }}
      extUnixSk: {{ .Values.config.criu.extUnixSk }}
      linkRemap: {{ .Values.config.criu.linkRemap }}
      extMasters: {{ .Values.config.criu.extMasters }}
      manageCgroupsMode: {{ .Values.config.criu.manageCgroupsMode | quote }}
      rstSibling: {{ .Values.config.criu.rstSibling }}
      mntnsCompatMode: {{ .Values.config.criu.mntnsCompatMode }}
      evasiveDevices: {{ .Values.config.criu.evasiveDevices }}
      forceIrmap: {{ .Values.config.criu.forceIrmap }}
      autoDedup: {{ .Values.config.criu.autoDedup }}
      lazyPages: {{ .Values.config.criu.lazyPages }}
      libDir: {{ .Values.config.criu.libDir | quote }}
      allowUprobes: {{ .Values.config.criu.allowUprobes }}
      skipInFlight: {{ .Values.config.criu.skipInFlight }}
