{
    "title": "Chart Values",
    "type": "object",
    "properties": {
        "customCommand": {
            "type": "array",
            "description": "Overrides command line options sent to the NIM with the array listed here. ",
            "default": "[]",
            "items": {
                "type": "string"
            }
        },
        "customArgs": {
            "type": "array",
            "description": "Overrides command line arguments of the NIM container with the array listed here. ",
            "default": "[]",
            "items": {
                "type": "string"
            }
        },
        "env": {
            "type": "array",
            "description": "Adds arbitrary environment variables to the main container.",
            "default": "[]",
            "items": {
                "type": "object"
            }
        },
        "image": {
            "type": "object",
            "properties": {
                "repository": {
                    "type": "string",
                    "description": "Specifies the NIM-LLM Image to deploy.",
                    "default": "\"\""
                },
                "tag": {
                    "type": "string",
                    "description": "Specifies the image tag or version.",
                    "default": "\"\""
                },
                "pullPolicy": {
                    "type": "string",
                    "description": "Sets the image pull policy.",
                    "default": "\"\""
                }
            }
        },
        "initContainers": {
            "type": "object",
            "properties": {
                "extraInit": {
                    "type": "array",
                    "description": "Fully specify any additional init containers your use case requires.",
                    "default": "[]",
                    "items": {
                        "type": "object"
                    }
                }
            }
        },
        "healthPort": {
            "type": "number",
            "description": "Specifies health check port. -- for use with `models.legacyCompat` only since current NIMs have no separate port.",
            "default": 8000
        },
        "podSecurityContext": {
            "type": "object",
            "properties": {
                "runAsUser": {
                    "type": "number",
                    "description": "Specify user UID for pod.",
                    "default": 1000
                },
                "runAsGroup": {
                    "type": "number",
                    "description": "Specify group ID for pod.",
                    "default": 1000
                },
                "fsGroup": {
                    "type": "number",
                    "description": "Specify file system owner group id.",
                    "default": 1000
                }
            }
        },
        "replicaCount": {
            "type": "number",
            "description": "Specify static replica count for deployment.",
            "default": 1
        },
        "serviceAccount": {
            "type": "object",
            "properties": {
                "create": {
                    "type": "boolean",
                    "description": "Specifies whether a service account should be created.",
                    "default": false
                },
                "name": {
                    "type": "string",
                    "description": "Specifies the name of the service account to use. If it is not set and create is `true`, a name is generated using a `fullname` template.",
                    "default": ""
                }
            }
        },
        "statefulSet": {
            "type": "object",
            "properties": {
                "enabled": {
                    "type": "boolean",
                    "description": "Enables `statefulset` deployment. Enabling `statefulSet` allows PVC templates for scaling. If using central PVC with RWX `accessMode`, this isn't needed.",
                    "default": true
                }
            }
        },
        "autoscaling": {
            "type": "object",
            "properties": {
                "enabled": {
                    "type": "boolean",
                    "description": "Enables horizontal pod autoscaler.",
                    "default": false
                },
                "minReplicas": {
                    "type": "number",
                    "description": "Specify minimum replicas for autoscaling.",
                    "default": 1
                },
                "maxReplicas": {
                    "type": "number",
                    "description": "Specify maximum replicas for autoscaling.",
                    "default": 10
                },
                "metrics": {
                    "type": "array",
                    "description": "Array of metrics for autoscaling.",
                    "default": [],
                    "items": {}
                }
            }
        },
        "ingress": {
            "type": "object",
            "properties": {
                "enabled": {
                    "type": "boolean",
                    "description": "Enables ingress.",
                    "default": false
                },
                "className": {
                    "type": "string",
                    "description": "Specify class name for Ingress.",
                    "default": ""
                },
                "annotations": {
                    "type": "object",
                    "description": "Specify additional annotations for ingress.",
                    "default": {}
                },
                "hosts": {
                    "type": "array",
                    "description": "Specify name of host.",
                    "items": {
                        "type": "object",
                        "properties": {
                            "host": {
                                "type": "string",
                                "description": "Specify name of host."
                            },
                            "paths": {
                                "type": "array",
                                "description": "Specify ingress path. ",
                                "items": {
                                    "type": "object",
                                    "properties": {
                                        "path": {
                                            "type": "string",
                                            "description": "Specify ingress path. "
                                        },
                                        "pathType": {
                                            "type": "string",
                                            "description": "Specify path type."
                                        },
                                        "serviceType": {
                                            "type": "string",
                                            "description": "Specify service type. It can be can be `nemo` or `openai` -- make sure your model serves the appropriate port(s)."
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tls": {
                    "type": "array",
                    "description": "Specify list of pairs of TLS `secretName` and hosts.",
                    "default": [],
                    "items": {}
                }
            }
        },
        "livenessProbe": {
            "type": "object",
            "properties": {
                "enabled": {
                    "type": "boolean",
                    "description": "Enables `livenessProbe``.",
                    "default": true
                },
                "method": {
                    "type": "string",
                    "description": "`LivenessProbe` `http` or `script`, but no script is currently provided.",
                    "default": "http"
                },
                "command": {
                    "type": "array",
                    "description": "`LivenessProbe`` script command to use (unsupported at this time).",
                    "default": [
                        "myscript.sh"
                    ],
                    "items": {
                        "type": "string"
                    }
                },
                "path": {
                    "type": "string",
                    "description": "`LivenessProbe`` endpoint path.",
                    "default": "/v1/health/live"
                },
                "initialDelaySeconds": {
                    "type": "number",
                    "description": "Initial delay seconds for `livenessProbe`.",
                    "default": 15
                },
                "timeoutSeconds": {
                    "type": "number",
                    "description": "Timeout seconds for `livenessProbe`.",
                    "default": 1
                },
                "periodSeconds": {
                    "type": "number",
                    "description": "Period seconds for `livenessProbe`.",
                    "default": 10
                },
                "successThreshold": {
                    "type": "number",
                    "description": "Success threshold for `livenessProbe`.",
                    "default": 1
                },
                "failureThreshold": {
                    "type": "number",
                    "description": "Failure threshold for `livenessProbe`.",
                    "default": 3
                }
            }
        },
        "readinessProbe": {
            "type": "object",
            "properties": {
                "enabled": {
                    "type": "boolean",
                    "description": "Enables `readinessProbe`.",
                    "default": true
                },
                "path": {
                    "type": "string",
                    "description": "Readiness Endpoint Path.",
                    "default": "/v1/health/ready"
                },
                "initialDelaySeconds": {
                    "type": "number",
                    "description": "Initial delay seconds for `readinessProbe`.",
                    "default": 15
                },
                "timeoutSeconds": {
                    "type": "number",
                    "description": "Timeout seconds for `readinessProbe`.",
                    "default": 1
                },
                "periodSeconds": {
                    "type": "number",
                    "description": "Period seconds for `readinessProbe`.",
                    "default": 10
                },
                "successThreshold": {
                    "type": "number",
                    "description": "Success threshold for `readinessProbe`.",
                    "default": 1
                },
                "failureThreshold": {
                    "type": "number",
                    "description": "Failure threshold for `readinessProbe`.",
                    "default": 3
                }
            }
        },
        "startupProbe": {
            "type": "object",
            "properties": {
                "enabled": {
                    "type": "boolean",
                    "description": "Enables `startupProbe`.",
                    "default": true
                },
                "path": {
                    "type": "string",
                    "description": "`StartupProbe` Endpoint Path.",
                    "default": "/v1/health/ready"
                },
                "initialDelaySeconds": {
                    "type": "number",
                    "description": "Initial delay seconds for `startupProbe`.",
                    "default": 40
                },
                "timeoutSeconds": {
                    "type": "number",
                    "description": "Timeout seconds for `startupProbe`.",
                    "default": 1
                },
                "periodSeconds": {
                    "type": "number",
                    "description": "Period seconds for `startupProbe`.",
                    "default": 10
                },
                "successThreshold": {
                    "type": "number",
                    "description": "Success threshold for `startupProbe`.",
                    "default": 1
                },
                "failureThreshold": {
                    "type": "number",
                    "description": "Failure threshold for `startupProbe`.",
                    "default": 180
                }
            }
        },
        "metrics": {
            "type": "object",
            "properties": {
                "enabled": {
                    "type": "boolean",
                    "description": "Enables metrics endpoint -- for `legacyCompat` only since current NIMs serve metrics on the OpenAI API port.",
                    "default": true
                },
                "serviceMonitor": {
                    "type": "object",
                    "properties": {
                        "enabled": {
                            "type": "boolean",
                            "description": "Enables `serviceMonitor` creation.",
                            "default": false
                        }
                    }
                }
            }
        },
        "model": {
            "type": "object",
            "properties": {
                "nimCache": {
                    "type": "string",
                    "description": "Path to mount writeable storage or pre-filled model cache for the NIM.",
                    "default": "\"\""
                },
                "name": {
                    "type": "string",
                    "description": "Specifies the name of the model in the API (usually, the name of the NIM). This is mostly used for helm tests and is usually otherwise optional. This must match the name from _/v1/models_ to allow `helm test <release-name>` to work. In `legacyCompat`, this is required and sets the name of the model in /v1/models.",
                    "default": "meta/llama3-8b-instruct"
                },
                "ngcAPISecret": {
                    "type": "string",
                    "description": "Name of pre-existing secret with a key named `NGC_API_KEY` that contains an API key for NGC model downloads.",
                    "default": "\"\""
                },
                "ngcAPIKey": {
                    "type": "string",
                    "description": "NGC API key literal to use as the API secret and image pull secret when set.",
                    "default": "\"\""
                },
                "openaiPort": {
                    "type": "number",
                    "description": "Specifies the Open AI API Port.",
                    "default": 8000
                },
                "jsonLogging": {
                    "type": "boolean",
                    "description": "Turn JSON lines logging on or off. Defaults to true.",
                    "default": true
                },
                "logLevel": {
                    "type": "string",
                    "description": "Log level of NIM service. Possible values of the variable are TRACE, DEBUG, INFO, WARNING, ERROR, CRITICAL.",
                    "default": "INFO"
                },
                "legacyCompat": {
                    "type": "boolean",
                    "description": "Set `true` to enable compatibility with pre-release NIM versions prior to 1.0.0.",
                    "default": false
                },
                "numGpus": {
                    "type": "number",
                    "description": "(deprecated) Specify GPU requirements for the model.",
                    "default": 1
                },
                "subPath": {
                    "type": "string",
                    "description": "(deprecated) Specify path within the model volume to mount if not the root -- default works with `ngcInit` and persistent volume. (`legacyCompat` only)",
                    "default": "model-store"
                },
                "modelStorePath": {
                    "type": "string",
                    "description": "(deprecated) Specify location of unpacked model.",
                    "default": ""
                }
            }
        },
        "persistence": {
            "type": "object",
            "properties": {
                "enabled": {
                    "type": "boolean",
                    "description": "Enables the use of persistent volumes.",
                    "default": false
                },
                "existingClaim": {
                    "type": "string",
                    "description": "Specifies an existing persistent volume claim. If using `existingClaim`, run only one replica or use a `ReadWriteMany` storage setup.",
                    "default": ""
                },
                "storageClass": {
                    "type": "string",
                    "description": "Specifies the persistent volume storage class. If set to `\"-\"`, this disables dynamic provisioning. If left undefined or set to null, the cluster default storage provisioner is used.",
                    "default": "",
                    "nullable": true
                },
                "accessMode": {
                    "type": "string",
                    "description": "Specify `accessMode`. If using an NFS or similar setup, you can use `ReadWriteMany`.",
                    "default": "ReadWriteOnce"
                },
                "stsPersistentVolumeClaimRetentionPolicy": {
                    "type": "object",
                    "properties": {
                        "whenDeleted": {
                            "type": "string",
                            "description": "Specifies persistent volume claim retention policy when deleted. Only used with Stateful Set volume templates.",
                            "default": "Retain"
                        },
                        "whenScaled": {
                            "type": "string",
                            "description": "Specifies persistent volume claim retention policy when scaled. Only used with Stateful Set volume templates.",
                            "default": "Retain"
                        }
                    }
                },
                "size": {
                    "type": "string",
                    "description": "Specifies the size of the persistent volume claim (for example 40Gi).",
                    "default": "50Gi"
                }
            }
        },
        "hostPath": {
            "type": "object",
            "properties": {
                "enabled": {
                    "type": "boolean",
                    "description": "Enable `hostPath`.",
                    "default": false
                },
                "path": {
                    "type": "string",
                    "description": "Specifies path on the node used as a `hostPath` volume. ",
                    "default": "/model-store"
                }
            }
        },
        "nfs": {
            "type": "object",
            "properties": {
                "enabled": {
                    "type": "boolean",
                    "description": "Enables direct pod NFS mount.",
                    "default": false
                },
                "path": {
                    "type": "string",
                    "description": "Specify path on NFS server to mount.",
                    "default": "/exports"
                },
                "server": {
                    "type": "string",
                    "description": "Specify NFS server address.",
                    "default": "nfs-server.example.com"
                },
                "readOnly": {
                    "type": "boolean",
                    "description": "Set to true to mount as read-only.",
                    "default": false
                }
            }
        },
        "service": {
            "type": "object",
            "properties": {
                "type": {
                    "type": "string",
                    "description": "Specifies the service type for the deployment.",
                    "default": "ClusterIP"
                },
                "name": {
                    "type": "string",
                    "description": "Overrides the default service name",
                    "default": ""
                },
                "openaiPort": {
                    "type": "number",
                    "description": "Specifies Open AI Port for the service.",
                    "default": 8000
                },
                "labels": {
                    "type": "object",
                    "description": "Specifies additional labels to be added to service.",
                    "default": {}
                }
            }
        },
        "multiNode": {
            "type": "object",
            "properties": {
                "enabled": {
                    "type": "boolean",
                    "description": "Enables multi-node deployments.",
                    "default": false
                },
                "clusterStartTimeout": {
                    "type": "number",
                    "description": "Sets the number of seconds to wait for worker nodes to come up before failing.",
                    "default": 300
                },
                "gpusPerNode": {
                    "type": "number",
                    "description": "Number of GPUs that will be presented to each pod. In most cases, this should match `resources.limits.nvidia.com/gpu`.",
                    "default": 1
                },
                "workers": {
                    "type": "number",
                    "description": "Specifies how many worker pods per multi-node replica to launch.",
                    "default": 1
                },
                "workerCustomCommand": {
                    "type": "array",
                    "description": "Sets a custom command array for the worker nodes in a LeaderWorkerSet only.",
                    "default": [],
                    "items": {}
                },
                "leaderWorkerSet": {
                    "type": "object",
                    "properties": {
                        "enabled": {
                            "type": "boolean",
                            "description": "NVIDIA recommends you use `LeaderWorkerSets` to deploy. If disabled, defaults to using `MPIJob` from mpi-operator.",
                            "default": true
                        }
                    }
                },
                "existingSSHSecret": {
                    "type": "string",
                    "description": "Sets the SSH private key for MPI to an existing secret. Otherwise, the Helm chart generates a key randomly during installation.",
                    "default": "",
                    "nullable": true
                },
                "mpiJob": {
                    "type": "object",
                    "properties": {
                        "workerAnnotations": {
                            "type": "object",
                            "description": "Annotations only applied to workers for `MPIJob`, if used. This may be necessary to ensure the workers connect to `CNI`s offered by `multus` and the network operator, if used.",
                            "default": {}
                        },
                        "launcherResources": {
                            "type": "object",
                            "description": "Resources section to apply only to the launcher pods in `MPIJob`, if used. Launchers do not get the chart resources restrictions. Only workers do, since they require GPUs.",
                            "default": {}
                        }
                    }
                },
                "optimized": {
                    "type": "object",
                    "properties": {
                        "enabled": {
                            "type": "boolean",
                            "description": "Enables optimized multi-node deployments (currently the only option supported).",
                            "default": true
                        }
                    }
                }
            }
        }
    }
}
