{
  "description": "EmbeddingServer is the Schema for the embeddingservers API",
  "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,
      "description": "EmbeddingServerSpec defines the desired state of EmbeddingServer",
      "properties": {
        "args": {
          "description": "Args are additional arguments to pass to the embedding inference server",
          "items": {
            "type": "string"
          },
          "type": [
            "array",
            "null"
          ],
          "x-kubernetes-list-type": "atomic"
        },
        "env": {
          "description": "Env are environment variables to set in the container",
          "items": {
            "additionalProperties": false,
            "description": "EnvVar represents an environment variable in a container",
            "properties": {
              "name": {
                "description": "Name of the environment variable",
                "type": "string"
              },
              "value": {
                "description": "Value of the environment variable",
                "type": "string"
              }
            },
            "required": [
              "name",
              "value"
            ],
            "type": "object"
          },
          "type": [
            "array",
            "null"
          ],
          "x-kubernetes-list-map-keys": [
            "name"
          ],
          "x-kubernetes-list-type": "map"
        },
        "hfTokenSecretRef": {
          "additionalProperties": false,
          "description": "HFTokenSecretRef is a reference to a Kubernetes Secret containing the huggingface token.\nIf provided, the secret value will be provided to the embedding server for authentication with huggingface.",
          "properties": {
            "key": {
              "description": "Key is the key within the secret",
              "type": "string"
            },
            "name": {
              "description": "Name is the name of the secret",
              "type": "string"
            }
          },
          "required": [
            "key",
            "name"
          ],
          "type": [
            "object",
            "null"
          ]
        },
        "image": {
          "default": "ghcr.io/huggingface/text-embeddings-inference:cpu-latest",
          "description": "Image is the container image for the embedding inference server.\nImages must be from HuggingFace Text Embeddings Inference (https://github.com/huggingface/text-embeddings-inference).",
          "type": [
            "string",
            "null"
          ]
        },
        "imagePullPolicy": {
          "default": "IfNotPresent",
          "description": "ImagePullPolicy defines the pull policy for the container image",
          "enum": [
            "Always",
            "Never",
            "IfNotPresent"
          ],
          "type": [
            "string",
            "null"
          ]
        },
        "model": {
          "default": "BAAI/bge-small-en-v1.5",
          "description": "Model is the HuggingFace embedding model to use (e.g., \"sentence-transformers/all-MiniLM-L6-v2\")",
          "type": [
            "string",
            "null"
          ]
        },
        "modelCache": {
          "additionalProperties": false,
          "description": "ModelCache configures persistent storage for downloaded models\nWhen enabled, models are cached in a PVC and reused across pod restarts",
          "properties": {
            "accessMode": {
              "default": "ReadWriteOnce",
              "description": "AccessMode is the access mode for the PVC",
              "enum": [
                "ReadWriteOnce",
                "ReadWriteMany",
                "ReadOnlyMany"
              ],
              "type": [
                "string",
                "null"
              ]
            },
            "enabled": {
              "default": true,
              "description": "Enabled controls whether model caching is enabled",
              "type": [
                "boolean",
                "null"
              ]
            },
            "size": {
              "default": "10Gi",
              "description": "Size is the size of the PVC for model caching (e.g., \"10Gi\")",
              "type": [
                "string",
                "null"
              ]
            },
            "storageClassName": {
              "description": "StorageClassName is the storage class to use for the PVC\nIf not specified, uses the cluster's default storage class",
              "type": [
                "string",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "podTemplateSpec": {
          "description": "PodTemplateSpec allows customizing the pod (node selection, tolerations, etc.)\nThis field accepts a PodTemplateSpec object as JSON/YAML.\nNote that to modify the specific container the embedding server runs in, you must specify\nthe 'embedding' container name in the PodTemplateSpec.",
          "type": [
            "object",
            "null"
          ],
          "x-kubernetes-preserve-unknown-fields": true
        },
        "port": {
          "default": 8080,
          "description": "Port is the port to expose the embedding service on",
          "format": "int32",
          "maximum": 65535,
          "minimum": 1,
          "type": [
            "integer",
            "null"
          ]
        },
        "replicas": {
          "default": 1,
          "description": "Replicas is the number of embedding server replicas to run",
          "format": "int32",
          "minimum": 1,
          "type": [
            "integer",
            "null"
          ]
        },
        "resourceOverrides": {
          "additionalProperties": false,
          "description": "ResourceOverrides allows overriding annotations and labels for resources created by the operator",
          "properties": {
            "persistentVolumeClaim": {
              "additionalProperties": false,
              "description": "PersistentVolumeClaim defines overrides for the PVC resource",
              "properties": {
                "annotations": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "description": "Annotations to add or override on the resource",
                  "type": [
                    "object",
                    "null"
                  ]
                },
                "labels": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "description": "Labels to add or override on the resource",
                  "type": [
                    "object",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            },
            "service": {
              "additionalProperties": false,
              "description": "Service defines overrides for the Service resource",
              "properties": {
                "annotations": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "description": "Annotations to add or override on the resource",
                  "type": [
                    "object",
                    "null"
                  ]
                },
                "labels": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "description": "Labels to add or override on the resource",
                  "type": [
                    "object",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            },
            "statefulSet": {
              "additionalProperties": false,
              "description": "StatefulSet defines overrides for the StatefulSet resource",
              "properties": {
                "annotations": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "description": "Annotations to add or override on the resource",
                  "type": [
                    "object",
                    "null"
                  ]
                },
                "labels": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "description": "Labels to add or override on the resource",
                  "type": [
                    "object",
                    "null"
                  ]
                },
                "podTemplateMetadataOverrides": {
                  "additionalProperties": false,
                  "description": "PodTemplateMetadataOverrides defines metadata overrides for the pod template",
                  "properties": {
                    "annotations": {
                      "additionalProperties": {
                        "type": "string"
                      },
                      "description": "Annotations to add or override on the resource",
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "labels": {
                      "additionalProperties": {
                        "type": "string"
                      },
                      "description": "Labels to add or override on the resource",
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": [
                    "object",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "resources": {
          "additionalProperties": false,
          "description": "Resources defines compute resources for the embedding server",
          "properties": {
            "limits": {
              "additionalProperties": false,
              "description": "Limits describes the maximum amount of compute resources allowed",
              "properties": {
                "cpu": {
                  "description": "CPU is the CPU limit in cores (e.g., \"500m\" for 0.5 cores)",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "memory": {
                  "description": "Memory is the memory limit in bytes (e.g., \"64Mi\" for 64 megabytes)",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            },
            "requests": {
              "additionalProperties": false,
              "description": "Requests describes the minimum amount of compute resources required",
              "properties": {
                "cpu": {
                  "description": "CPU is the CPU limit in cores (e.g., \"500m\" for 0.5 cores)",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "memory": {
                  "description": "Memory is the memory limit in bytes (e.g., \"64Mi\" for 64 megabytes)",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        }
      },
      "type": [
        "object",
        "null"
      ]
    },
    "status": {
      "additionalProperties": false,
      "description": "EmbeddingServerStatus defines the observed state of EmbeddingServer",
      "properties": {
        "conditions": {
          "description": "Conditions represent the latest available observations of the EmbeddingServer's state",
          "items": {
            "additionalProperties": false,
            "description": "Condition contains details for one aspect of the current state of this API Resource.",
            "properties": {
              "lastTransitionTime": {
                "description": "lastTransitionTime is the last time the condition transitioned from one status to another.\nThis should be when the underlying condition changed.  If that is not known, then using the time when the API field changed is acceptable.",
                "format": "date-time",
                "type": "string"
              },
              "message": {
                "description": "message is a human readable message indicating details about the transition.\nThis may be an empty string.",
                "maxLength": 32768,
                "type": "string"
              },
              "observedGeneration": {
                "description": "observedGeneration represents the .metadata.generation that the condition was set based upon.\nFor instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date\nwith respect to the current state of the instance.",
                "format": "int64",
                "minimum": 0,
                "type": [
                  "integer",
                  "null"
                ]
              },
              "reason": {
                "description": "reason contains a programmatic identifier indicating the reason for the condition's last transition.\nProducers of specific condition types may define expected values and meanings for this field,\nand whether the values are considered a guaranteed API.\nThe value should be a CamelCase string.\nThis field may not be empty.",
                "maxLength": 1024,
                "minLength": 1,
                "pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$",
                "type": "string"
              },
              "status": {
                "description": "status of the condition, one of True, False, Unknown.",
                "enum": [
                  "True",
                  "False",
                  "Unknown"
                ],
                "type": "string"
              },
              "type": {
                "description": "type of condition in CamelCase or in foo.example.com/CamelCase.",
                "maxLength": 316,
                "pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$",
                "type": "string"
              }
            },
            "required": [
              "lastTransitionTime",
              "message",
              "reason",
              "status",
              "type"
            ],
            "type": "object"
          },
          "type": [
            "array",
            "null"
          ],
          "x-kubernetes-list-map-keys": [
            "type"
          ],
          "x-kubernetes-list-type": "map"
        },
        "message": {
          "description": "Message provides additional information about the current phase",
          "type": [
            "string",
            "null"
          ]
        },
        "observedGeneration": {
          "description": "ObservedGeneration reflects the generation most recently observed by the controller",
          "format": "int64",
          "type": [
            "integer",
            "null"
          ]
        },
        "phase": {
          "description": "Phase is the current phase of the EmbeddingServer",
          "enum": [
            "Pending",
            "Downloading",
            "Ready",
            "Failed",
            "Terminating"
          ],
          "type": [
            "string",
            "null"
          ]
        },
        "readyReplicas": {
          "description": "ReadyReplicas is the number of ready replicas",
          "format": "int32",
          "type": [
            "integer",
            "null"
          ]
        },
        "url": {
          "description": "URL is the URL where the embedding service can be accessed",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "type": [
        "object",
        "null"
      ]
    }
  },
  "type": "object"
}