{
  "description": "LoraAdapter is the Schema for the loraadapters 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": "LoraAdapterSpec defines the desired state of LoraAdapter.",
      "properties": {
        "adapterSource": {
          "additionalProperties": false,
          "description": "AdapterSource defines where to get the LoRA adapter from.",
          "properties": {
            "adapterName": {
              "description": "AdapterName is the name of the adapter to apply.",
              "type": "string"
            },
            "adapterPath": {
              "description": "AdapterPath is the path to the LoRA adapter weights. For local sources: required, specifies the path to the adapter For remote sources: optional, will be updated by the controller with the download path",
              "type": [
                "string",
                "null"
              ]
            },
            "credentialsSecretRef": {
              "additionalProperties": false,
              "description": "CredentialsSecretRef references a secret containing storage credentials.",
              "properties": {
                "key": {
                  "description": "Key in the secret containing the value",
                  "type": "string"
                },
                "name": {
                  "description": "Name of the secret",
                  "type": "string"
                }
              },
              "required": [
                "key",
                "name"
              ],
              "type": [
                "object",
                "null"
              ],
              "x-kubernetes-map-type": "atomic"
            },
            "maxAdapters": {
              "description": "MaxAdapters is the maximum number of adapters to load.",
              "format": "int32",
              "type": [
                "integer",
                "null"
              ]
            },
            "pattern": {
              "description": "Pattern is the pattern to use for the adapter name.",
              "type": [
                "string",
                "null"
              ]
            },
            "repository": {
              "description": "Repository is the repository to get the LoRA adapter from.",
              "type": [
                "string",
                "null"
              ]
            },
            "type": {
              "description": "Type is the type of the adapter source.",
              "enum": [
                "local",
                "s3",
                "http",
                "huggingface"
              ],
              "type": "string"
            }
          },
          "required": [
            "adapterName",
            "type"
          ],
          "type": "object"
        },
        "baseModel": {
          "description": "BaseModel is the name of the base model this adapter is for.",
          "type": "string"
        },
        "loraAdapterDeploymentConfig": {
          "additionalProperties": false,
          "description": "DeploymentConfig defines how the adapter should be deployed",
          "properties": {
            "algorithm": {
              "default": "default",
              "description": "Algorithm specifies which placement algorithm to use.",
              "enum": [
                "default",
                "ordered",
                "equalized"
              ],
              "type": "string"
            },
            "replicas": {
              "description": "Replicas is the number of replicas that should load this adapter.",
              "format": "int32",
              "minimum": 0,
              "type": [
                "integer",
                "null"
              ]
            }
          },
          "required": [
            "algorithm"
          ],
          "type": [
            "object",
            "null"
          ]
        },
        "vllmApiKey": {
          "additionalProperties": false,
          "description": "VLLMApiKey defines the configuration for vLLM API key authentication",
          "properties": {
            "secretKey": {
              "description": "Key in the secret containing the API key",
              "type": "string"
            },
            "secretName": {
              "description": "Name of the secret",
              "type": "string"
            }
          },
          "required": [
            "secretKey",
            "secretName"
          ],
          "type": [
            "object",
            "null"
          ]
        }
      },
      "required": [
        "adapterSource",
        "baseModel"
      ],
      "type": [
        "object",
        "null"
      ]
    },
    "status": {
      "additionalProperties": false,
      "description": "LoraAdapterStatus defines the observed state of LoraAdapter.",
      "properties": {
        "conditions": {
          "description": "Condition contains details for one aspect of the current state of this API Resource.",
          "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.",
                "format": "date-time",
                "type": "string"
              },
              "message": {
                "description": "Message is a human-readable message indicating details about why the current state is set.",
                "maxLength": 32768,
                "type": "string"
              },
              "reason": {
                "description": "Reason is a brief reason for the condition's current status.",
                "maxLength": 1024,
                "minLength": 1,
                "type": "string"
              },
              "status": {
                "description": "Status is the status of the condition.",
                "enum": [
                  "True",
                  "False",
                  "Unknown"
                ],
                "type": "string"
              },
              "type": {
                "description": "type of condition in 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"
          ]
        },
        "loadedAdapters": {
          "description": "LoadedAdapters tracks the loading status of adapters and their pod assignments.",
          "items": {
            "additionalProperties": false,
            "description": "LoadedAdapter represents an adapter that has been loaded into a pod",
            "properties": {
              "loadTime": {
                "description": "LoadTime is when the adapter was loaded",
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "description": "Name is the name of the adapter",
                "type": "string"
              },
              "path": {
                "description": "Path is the path where the adapter is loaded",
                "type": "string"
              },
              "podAssignments": {
                "additionalProperties": false,
                "description": "PodAssignments represents the pods this adapter has been assigned to",
                "properties": {
                  "namespace": {
                    "description": "Namespace is the namespace of the pod",
                    "type": "string"
                  },
                  "podName": {
                    "description": "Pod represents the pod information",
                    "type": "string"
                  }
                },
                "required": [
                  "namespace",
                  "podName"
                ],
                "type": "object"
              },
              "status": {
                "description": "Status is the status of the adapter",
                "type": "string"
              }
            },
            "required": [
              "name",
              "path",
              "podAssignments",
              "status"
            ],
            "type": "object"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "message": {
          "description": "Message provides additional information about the current phase.",
          "type": [
            "string",
            "null"
          ]
        },
        "observedGeneration": {
          "description": "ObservedGeneration represents the .metadata.generation that the condition was set based upon.",
          "format": "int64",
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        },
        "phase": {
          "description": "Phase represents the current phase of the adapter deployment.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "type": [
        "object",
        "null"
      ]
    }
  },
  "type": "object"
}