{
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
      "type": [
        "string",
        "null"
      ]
    },
    "kind": {
      "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": [
        "string",
        "null"
      ]
    },
    "metadata": {
      "type": [
        "object",
        "null"
      ]
    },
    "spec": {
      "additionalProperties": false,
      "properties": {
        "dataParallel": {
          "additionalProperties": false,
          "description": "DataParallel configures data parallel processing settings.",
          "properties": {
            "batching": {
              "additionalProperties": false,
              "description": "Batching configures batching settings for data parallel processing.",
              "properties": {
                "maxQueueSize": {
                  "default": 2000,
                  "description": "MaxQueueSize is the maximum number of items in the batch queue.",
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "maxWaitTimeMs": {
                  "default": 10,
                  "description": "MaxWaitTimeMs is the maximum time in milliseconds to wait for a batch to fill.",
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "strategy": {
                  "default": "simple",
                  "description": "Strategy is the batching strategy to use.",
                  "enum": [
                    "simple",
                    "time_window"
                  ],
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            },
            "enabled": {
              "description": "Enabled controls whether data parallel processing is enabled.",
              "type": [
                "boolean",
                "null"
              ]
            },
            "healthMonitoring": {
              "additionalProperties": false,
              "description": "HealthMonitoring configures health monitoring settings for data parallel workers.",
              "properties": {
                "activeCheckIntervalSeconds": {
                  "default": 60,
                  "description": "ActiveCheckIntervalSeconds is the interval in seconds between active health checks.",
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "activeCheckTimeoutSeconds": {
                  "default": 5,
                  "description": "ActiveCheckTimeoutSeconds is the timeout in seconds for active health checks.",
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "checkIntervalSeconds": {
                  "default": 5,
                  "description": "CheckIntervalSeconds is the interval in seconds between health checks.",
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "enableActiveChecks": {
                  "default": false,
                  "description": "EnableActiveChecks controls whether active health checks are enabled.",
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "maxConsecutiveTimeouts": {
                  "default": 3,
                  "description": "MaxConsecutiveTimeouts is the maximum number of consecutive timeouts before a worker is considered unhealthy.",
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "maxRestartAttempts": {
                  "default": 3,
                  "description": "MaxRestartAttempts is the maximum number of restart attempts for an unhealthy worker.",
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "restartCooldownSeconds": {
                  "default": 30,
                  "description": "RestartCooldownSeconds is the cooldown period in seconds between restart attempts.",
                  "format": "int32",
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            },
            "loadBalancingStrategy": {
              "default": "round_robin",
              "description": "LoadBalancingStrategy is the strategy for distributing work across workers.",
              "enum": [
                "round_robin",
                "least_loaded",
                "token_aware"
              ],
              "type": [
                "string",
                "null"
              ]
            },
            "numWorkers": {
              "description": "NumWorkers is the number of data parallel workers. Nil means auto.",
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "workerExecutionTimeoutSeconds": {
              "default": 30,
              "description": "WorkerExecutionTimeoutSeconds is the timeout in seconds for worker execution.",
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "workerInitTimeoutSeconds": {
              "default": 600,
              "description": "WorkerInitTimeoutSeconds is the timeout in seconds for worker initialization.",
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "workerQueueMaxSize": {
              "default": 100,
              "description": "WorkerQueueMaxSize is the maximum size of the worker queue.",
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "metrics": {
          "additionalProperties": false,
          "description": "Metrics configures the Prometheus metrics endpoint exposed by the server.",
          "properties": {
            "enabled": {
              "default": true,
              "description": "Enabled controls whether the Prometheus metrics endpoint is active.\nMaps to SERVER__METRICS__ENABLED.",
              "type": [
                "boolean",
                "null"
              ]
            },
            "path": {
              "default": "/metrics",
              "description": "Path is the HTTP path at which Prometheus metrics are served on the\ndedicated metrics port.\nMaps to SERVER__METRICS__PATH.",
              "type": [
                "string",
                "null"
              ]
            },
            "port": {
              "default": 9946,
              "description": "Port is the dedicated TCP port for the Prometheus HTTP server\n(e.g. 9946).\nMaps to SERVER__METRICS__PORT.",
              "format": "int32",
              "maximum": 65535,
              "minimum": 1,
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "model": {
          "description": "Model is the VoyageAI model to deploy.",
          "enum": [
            "voyage-4-large",
            "voyage-4",
            "voyage-4-lite",
            "rerank-2.5",
            "rerank-2.5-lite",
            "voyage-context-4",
            "voyage-code-3"
          ],
          "type": "string"
        },
        "nodeAffinity": {
          "additionalProperties": false,
          "description": "NodeAffinity configures node affinity scheduling rules for VoyageAI pods.",
          "properties": {
            "preferredDuringSchedulingIgnoredDuringExecution": {
              "description": "The scheduler will prefer to schedule pods to nodes that satisfy\nthe affinity expressions specified by this field, but it may choose\na node that violates one or more of the expressions. The node that is\nmost preferred is the one with the greatest sum of weights, i.e.\nfor each node that meets all of the scheduling requirements (resource\nrequest, requiredDuringScheduling affinity expressions, etc.),\ncompute a sum by iterating through the elements of this field and adding\n\"weight\" to the sum if the node matches the corresponding matchExpressions; the\nnode(s) with the highest sum are the most preferred.",
              "items": {
                "additionalProperties": false,
                "description": "An empty preferred scheduling term matches all objects with implicit weight 0\n(i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).",
                "properties": {
                  "preference": {
                    "additionalProperties": false,
                    "description": "A node selector term, associated with the corresponding weight.",
                    "properties": {
                      "matchExpressions": {
                        "description": "A list of node selector requirements by node's labels.",
                        "items": {
                          "additionalProperties": false,
                          "description": "A node selector requirement is a selector that contains values, a key, and an operator\nthat relates the key and values.",
                          "properties": {
                            "key": {
                              "description": "The label key that the selector applies to.",
                              "type": "string"
                            },
                            "operator": {
                              "description": "Represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.",
                              "type": "string"
                            },
                            "values": {
                              "description": "An array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. If the operator is Gt or Lt, the values\narray must have a single element, which will be interpreted as an integer.\nThis array is replaced during a strategic merge patch.",
                              "items": {
                                "type": "string"
                              },
                              "type": [
                                "array",
                                "null"
                              ],
                              "x-kubernetes-list-type": "atomic"
                            }
                          },
                          "required": [
                            "key",
                            "operator"
                          ],
                          "type": "object"
                        },
                        "type": [
                          "array",
                          "null"
                        ],
                        "x-kubernetes-list-type": "atomic"
                      },
                      "matchFields": {
                        "description": "A list of node selector requirements by node's fields.",
                        "items": {
                          "additionalProperties": false,
                          "description": "A node selector requirement is a selector that contains values, a key, and an operator\nthat relates the key and values.",
                          "properties": {
                            "key": {
                              "description": "The label key that the selector applies to.",
                              "type": "string"
                            },
                            "operator": {
                              "description": "Represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.",
                              "type": "string"
                            },
                            "values": {
                              "description": "An array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. If the operator is Gt or Lt, the values\narray must have a single element, which will be interpreted as an integer.\nThis array is replaced during a strategic merge patch.",
                              "items": {
                                "type": "string"
                              },
                              "type": [
                                "array",
                                "null"
                              ],
                              "x-kubernetes-list-type": "atomic"
                            }
                          },
                          "required": [
                            "key",
                            "operator"
                          ],
                          "type": "object"
                        },
                        "type": [
                          "array",
                          "null"
                        ],
                        "x-kubernetes-list-type": "atomic"
                      }
                    },
                    "type": "object",
                    "x-kubernetes-map-type": "atomic"
                  },
                  "weight": {
                    "description": "Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.",
                    "format": "int32",
                    "type": "integer"
                  }
                },
                "required": [
                  "preference",
                  "weight"
                ],
                "type": "object"
              },
              "type": [
                "array",
                "null"
              ],
              "x-kubernetes-list-type": "atomic"
            },
            "requiredDuringSchedulingIgnoredDuringExecution": {
              "additionalProperties": false,
              "description": "If the affinity requirements specified by this field are not met at\nscheduling time, the pod will not be scheduled onto the node.\nIf the affinity requirements specified by this field cease to be met\nat some point during pod execution (e.g. due to an update), the system\nmay or may not try to eventually evict the pod from its node.",
              "properties": {
                "nodeSelectorTerms": {
                  "description": "Required. A list of node selector terms. The terms are ORed.",
                  "items": {
                    "additionalProperties": false,
                    "description": "A null or empty node selector term matches no objects. The requirements of\nthem are ANDed.\nThe TopologySelectorTerm type implements a subset of the NodeSelectorTerm.",
                    "properties": {
                      "matchExpressions": {
                        "description": "A list of node selector requirements by node's labels.",
                        "items": {
                          "additionalProperties": false,
                          "description": "A node selector requirement is a selector that contains values, a key, and an operator\nthat relates the key and values.",
                          "properties": {
                            "key": {
                              "description": "The label key that the selector applies to.",
                              "type": "string"
                            },
                            "operator": {
                              "description": "Represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.",
                              "type": "string"
                            },
                            "values": {
                              "description": "An array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. If the operator is Gt or Lt, the values\narray must have a single element, which will be interpreted as an integer.\nThis array is replaced during a strategic merge patch.",
                              "items": {
                                "type": "string"
                              },
                              "type": [
                                "array",
                                "null"
                              ],
                              "x-kubernetes-list-type": "atomic"
                            }
                          },
                          "required": [
                            "key",
                            "operator"
                          ],
                          "type": "object"
                        },
                        "type": [
                          "array",
                          "null"
                        ],
                        "x-kubernetes-list-type": "atomic"
                      },
                      "matchFields": {
                        "description": "A list of node selector requirements by node's fields.",
                        "items": {
                          "additionalProperties": false,
                          "description": "A node selector requirement is a selector that contains values, a key, and an operator\nthat relates the key and values.",
                          "properties": {
                            "key": {
                              "description": "The label key that the selector applies to.",
                              "type": "string"
                            },
                            "operator": {
                              "description": "Represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.",
                              "type": "string"
                            },
                            "values": {
                              "description": "An array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. If the operator is Gt or Lt, the values\narray must have a single element, which will be interpreted as an integer.\nThis array is replaced during a strategic merge patch.",
                              "items": {
                                "type": "string"
                              },
                              "type": [
                                "array",
                                "null"
                              ],
                              "x-kubernetes-list-type": "atomic"
                            }
                          },
                          "required": [
                            "key",
                            "operator"
                          ],
                          "type": "object"
                        },
                        "type": [
                          "array",
                          "null"
                        ],
                        "x-kubernetes-list-type": "atomic"
                      }
                    },
                    "type": "object",
                    "x-kubernetes-map-type": "atomic"
                  },
                  "type": "array",
                  "x-kubernetes-list-type": "atomic"
                }
              },
              "required": [
                "nodeSelectorTerms"
              ],
              "type": [
                "object",
                "null"
              ],
              "x-kubernetes-map-type": "atomic"
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "replicas": {
          "default": 1,
          "description": "Replicas is the number of VoyageAI pods to deploy.",
          "format": "int32",
          "minimum": 1,
          "type": [
            "integer",
            "null"
          ]
        },
        "resourceRequirements": {
          "additionalProperties": false,
          "description": "ResourceRequirements configures resource requests and limits for the VoyageAI container.",
          "properties": {
            "claims": {
              "description": "Claims lists the names of resources, defined in spec.resourceClaims,\nthat are used by this container.\n\nThis is an alpha field and requires enabling the\nDynamicResourceAllocation feature gate.\n\nThis field is immutable. It can only be set for containers.",
              "items": {
                "additionalProperties": false,
                "description": "ResourceClaim references one entry in PodSpec.ResourceClaims.",
                "properties": {
                  "name": {
                    "description": "Name must match the name of one entry in pod.spec.resourceClaims of\nthe Pod where this field is used. It makes that resource available\ninside a container.",
                    "type": "string"
                  },
                  "request": {
                    "description": "Request is the name chosen for a request in the referenced claim.\nIf empty, everything from the claim is made available, otherwise\nonly the result of this request.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "name"
                ],
                "type": "object"
              },
              "type": [
                "array",
                "null"
              ],
              "x-kubernetes-list-map-keys": [
                "name"
              ],
              "x-kubernetes-list-type": "map"
            },
            "limits": {
              "additionalProperties": {
                "oneOf": [
                  {
                    "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
                    "type": "string"
                  },
                  {
                    "type": "integer"
                  }
                ],
                "x-kubernetes-int-or-string": true
              },
              "description": "Limits describes the maximum amount of compute resources allowed.\nMore info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/",
              "type": [
                "object",
                "null"
              ]
            },
            "requests": {
              "additionalProperties": {
                "oneOf": [
                  {
                    "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
                    "type": "string"
                  },
                  {
                    "type": "integer"
                  }
                ],
                "x-kubernetes-int-or-string": true
              },
              "description": "Requests describes the minimum amount of compute resources required.\nIf Requests is omitted for a container, it defaults to Limits if that is explicitly specified,\notherwise to an implementation-defined value. Requests cannot exceed Limits.\nMore info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/",
              "type": [
                "object",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "security": {
          "additionalProperties": false,
          "description": "Security configures TLS settings for the VoyageAI server.",
          "properties": {
            "tls": {
              "additionalProperties": false,
              "description": "TLS configures TLS for the VoyageAI server. When set, TLS is enabled.",
              "properties": {
                "certificateKeySecretRef": {
                  "additionalProperties": false,
                  "description": "CertificateKeySecretRef is a reference to a Secret containing a private key and certificate for TLS.\nThe key and cert are expected to be PEM encoded and available at \"tls.key\" and \"tls.crt\".\nThis enables server-side TLS only. For mutual TLS (client certificate\nverification) use a service mesh such as Istio or Linkerd.",
                  "properties": {
                    "name": {
                      "default": "",
                      "description": "Name of the referent.\nThis field is effectively required, but due to backwards compatibility is\nallowed to be empty. Instances of this type with an empty value here are\nalmost certainly wrong.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "type": "object",
                  "x-kubernetes-map-type": "atomic"
                }
              },
              "required": [
                "certificateKeySecretRef"
              ],
              "type": [
                "object",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "server": {
          "additionalProperties": false,
          "default": {},
          "description": "Server configures the VoyageAI server settings.",
          "properties": {
            "maxRequests": {
              "default": 0,
              "description": "MaxRequests is the maximum number of requests before a worker is restarted.",
              "format": "int32",
              "minimum": 0,
              "type": [
                "integer",
                "null"
              ]
            },
            "maxRequestsJitter": {
              "default": 0,
              "description": "MaxRequestsJitter is the jitter applied to MaxRequests.",
              "format": "int32",
              "minimum": 0,
              "type": [
                "integer",
                "null"
              ]
            },
            "port": {
              "default": 8080,
              "description": "Port is the port the VoyageAI server listens on.",
              "format": "int32",
              "maximum": 65535,
              "minimum": 0,
              "type": [
                "integer",
                "null"
              ]
            },
            "timeout": {
              "default": 30,
              "description": "Timeout is the server request timeout in seconds.",
              "format": "int32",
              "minimum": 1,
              "type": [
                "integer",
                "null"
              ]
            },
            "workers": {
              "default": 1,
              "description": "Workers is the number of server workers.",
              "format": "int32",
              "minimum": 1,
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "version": {
          "description": "Version is the version (image tag) of the VoyageAI model image. The full\nimage is composed as \u003crepository\u003e/\u003cmodel\u003e:\u003cversion\u003e, where the repository\nis configured operator-wide via the MDB_VOYAGEAI_REPO_URL environment\nvariable (defaulting to quay.io/mongodb/voyageai).",
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "model",
        "version"
      ],
      "type": "object"
    },
    "status": {
      "additionalProperties": false,
      "properties": {
        "lastTransition": {
          "type": [
            "string",
            "null"
          ]
        },
        "message": {
          "type": [
            "string",
            "null"
          ]
        },
        "observedGeneration": {
          "format": "int64",
          "type": [
            "integer",
            "null"
          ]
        },
        "phase": {
          "type": "string"
        },
        "pvc": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "phase": {
                "type": "string"
              },
              "statefulsetName": {
                "type": "string"
              }
            },
            "required": [
              "phase",
              "statefulsetName"
            ],
            "type": "object"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "resourcesNotReady": {
          "items": {
            "additionalProperties": false,
            "description": "ResourceNotReady describes the dependent resource which is not ready yet",
            "properties": {
              "errors": {
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "kind": {
                "description": "ResourceKind specifies a kind of a Kubernetes resource. Used in status of a Custom Resource",
                "type": "string"
              },
              "message": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "kind",
              "name"
            ],
            "type": "object"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "version": {
          "type": [
            "string",
            "null"
          ]
        },
        "warnings": {
          "items": {
            "type": "string"
          },
          "type": [
            "array",
            "null"
          ]
        }
      },
      "required": [
        "phase"
      ],
      "type": [
        "object",
        "null"
      ]
    }
  },
  "required": [
    "spec"
  ],
  "type": "object"
}