locostack.com_documents.yaml 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345
  1. ---
  2. apiVersion: apiextensions.k8s.io/v1
  3. kind: CustomResourceDefinition
  4. metadata:
  5. annotations:
  6. controller-gen.kubebuilder.io/version: v0.20.1
  7. name: documents.locostack.com
  8. spec:
  9. group: locostack.com
  10. names:
  11. kind: Document
  12. listKind: DocumentList
  13. plural: documents
  14. shortNames:
  15. - doc
  16. singular: document
  17. scope: Namespaced
  18. versions:
  19. - additionalPrinterColumns:
  20. - jsonPath: .status.phase
  21. name: Phase
  22. type: string
  23. name: v1alpha1
  24. schema:
  25. openAPIV3Schema:
  26. description: Document is the Schema for the documents API
  27. properties:
  28. apiVersion:
  29. description: |-
  30. APIVersion defines the versioned schema of this representation of an object.
  31. Servers should convert recognized schemas to the latest internal value, and
  32. may reject unrecognized values.
  33. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  34. type: string
  35. kind:
  36. description: |-
  37. Kind is a string value representing the REST resource this object represents.
  38. Servers may infer this from the endpoint the client submits requests to.
  39. Cannot be updated.
  40. In CamelCase.
  41. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  42. type: string
  43. metadata:
  44. type: object
  45. spec:
  46. description: spec defines the desired state of Document
  47. properties:
  48. chunkingStrategy:
  49. description: chunkingStrategy configures how the document content
  50. is split into chunks before embedding.
  51. properties:
  52. chunkOverlap:
  53. default: 64
  54. description: |-
  55. chunkOverlap is the number of tokens carried over from the previous chunk
  56. to preserve context at boundaries.
  57. format: int32
  58. minimum: 0
  59. type: integer
  60. chunkSize:
  61. default: 512
  62. description: chunkSize is the target chunk size in tokens.
  63. format: int32
  64. minimum: 1
  65. type: integer
  66. separators:
  67. description: separators is an ordered list of separator strings
  68. for the recursive strategy.
  69. items:
  70. type: string
  71. type: array
  72. strategy:
  73. default: recursive
  74. description: |-
  75. strategy selects the chunking algorithm.
  76. fixed: split at exact token boundaries.
  77. recursive: split on separators, respecting document structure (default).
  78. semantic: split at semantic boundaries using the embedding model.
  79. sentence, markdown, html: structure-aware strategies for specific formats.
  80. enum:
  81. - fixed
  82. - recursive
  83. - markdown
  84. type: string
  85. type: object
  86. knowledgeBaseRef:
  87. description: knowledgeBaseRef references the target knowledge base.
  88. properties:
  89. apiVersion:
  90. description: API version of the referent.
  91. type: string
  92. fieldPath:
  93. description: |-
  94. If referring to a piece of an object instead of an entire object, this string
  95. should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2].
  96. For example, if the object reference is to a container within a pod, this would take on a value like:
  97. "spec.containers{name}" (where "name" refers to the name of the container that triggered
  98. the event) or if no container name is specified "spec.containers[2]" (container with
  99. index 2 in this pod). This syntax is chosen only to have some well-defined way of
  100. referencing a part of an object.
  101. type: string
  102. kind:
  103. description: |-
  104. Kind of the referent.
  105. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  106. type: string
  107. name:
  108. description: |-
  109. Name of the referent.
  110. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
  111. type: string
  112. namespace:
  113. description: |-
  114. Namespace of the referent.
  115. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
  116. type: string
  117. resourceVersion:
  118. description: |-
  119. Specific resourceVersion to which this reference is made, if any.
  120. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
  121. type: string
  122. uid:
  123. description: |-
  124. UID of the referent.
  125. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
  126. type: string
  127. type: object
  128. x-kubernetes-map-type: atomic
  129. source:
  130. description: source describes the origin of the document content and
  131. metadata.
  132. properties:
  133. huggingFace:
  134. description: |-
  135. huggingFace pulls artifacts from HuggingFace Hub.
  136. The operator creates a managed PVC and a one-off download Job.
  137. properties:
  138. endpoint:
  139. description: |-
  140. endpoint is the base URL for HuggingFace API requests.
  141. Defaults to "https://huggingface.co" if not specified.
  142. type: string
  143. fileName:
  144. description: fileName is the specific file to pull from the
  145. repo (e.g. a single GGUF for llama.cpp).
  146. type: string
  147. repo:
  148. description: |-
  149. repo is the HuggingFace repository id (e.g. meta-llama/Llama-3.1-8B-Instruct).
  150. Defaults from modelClassRef.baseModelId when omitted.
  151. type: string
  152. revision:
  153. description: revision is the branch, tag, or commit to pull.
  154. Defaults to "main".
  155. type: string
  156. tokenSecretRef:
  157. description: |-
  158. tokenSecretRef references a Secret key holding an HF token for gated or private repos.
  159. Injected into the download Job only; inference pods do not receive the token.
  160. properties:
  161. key:
  162. description: The key of the secret to select from. Must
  163. be a valid secret key.
  164. type: string
  165. name:
  166. default: ""
  167. description: |-
  168. Name of the referent.
  169. This field is effectively required, but due to backwards compatibility is
  170. allowed to be empty. Instances of this type with an empty value here are
  171. almost certainly wrong.
  172. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
  173. type: string
  174. optional:
  175. description: Specify whether the Secret or its key must
  176. be defined
  177. type: boolean
  178. required:
  179. - key
  180. type: object
  181. x-kubernetes-map-type: atomic
  182. required:
  183. - repo
  184. type: object
  185. pvc:
  186. description: |-
  187. pvc mounts artifacts from a PersistentVolumeClaim.
  188. The user is responsible for populating the volume before referencing it.
  189. properties:
  190. claimName:
  191. description: claimName is the name of an existing PVC in the
  192. same namespace.
  193. type: string
  194. filePath:
  195. description: filePath is the path inside the PVC where the
  196. artifact is located.
  197. type: string
  198. required:
  199. - claimName
  200. type: object
  201. url:
  202. description: |-
  203. url downloads artifacts from an arbitrary HTTP/HTTPS URL.
  204. The operator creates a managed PVC and a one-off download Job.
  205. properties:
  206. authSecretRef:
  207. description: |-
  208. authSecretRef references a Secret whose key-value pairs are injected as HTTP
  209. request headers into the download Job. Not mounted in inference pods.
  210. properties:
  211. name:
  212. default: ""
  213. description: |-
  214. Name of the referent.
  215. This field is effectively required, but due to backwards compatibility is
  216. allowed to be empty. Instances of this type with an empty value here are
  217. almost certainly wrong.
  218. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
  219. type: string
  220. type: object
  221. x-kubernetes-map-type: atomic
  222. checksum:
  223. description: 'checksum is the expected checksum of the downloaded
  224. file (format: sha256:<hex>).'
  225. type: string
  226. fileName:
  227. description: |-
  228. fileName is the filename to write inside the PVC.
  229. Defaults to the last path segment of the URL.
  230. type: string
  231. url:
  232. description: url is the HTTP or HTTPS URL to download the
  233. artifacts from.
  234. type: string
  235. required:
  236. - url
  237. type: object
  238. type: object
  239. required:
  240. - chunkingStrategy
  241. - knowledgeBaseRef
  242. - source
  243. type: object
  244. status:
  245. description: status defines the observed state of Document
  246. properties:
  247. conditions:
  248. description: |-
  249. conditions represent the current state of the Document resource.
  250. Each condition has a unique type and reflects the status of a specific aspect of the resource.
  251. Standard condition types include:
  252. - "Available": the resource is fully functional
  253. - "Progressing": the resource is being created or updated
  254. - "Degraded": the resource failed to reach or maintain its desired state
  255. The status of each condition is one of True, False, or Unknown.
  256. items:
  257. description: Condition contains details for one aspect of the current
  258. state of this API Resource.
  259. properties:
  260. lastTransitionTime:
  261. description: |-
  262. lastTransitionTime is the last time the condition transitioned from one status to another.
  263. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
  264. format: date-time
  265. type: string
  266. message:
  267. description: |-
  268. message is a human readable message indicating details about the transition.
  269. This may be an empty string.
  270. maxLength: 32768
  271. type: string
  272. observedGeneration:
  273. description: |-
  274. observedGeneration represents the .metadata.generation that the condition was set based upon.
  275. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
  276. with respect to the current state of the instance.
  277. format: int64
  278. minimum: 0
  279. type: integer
  280. reason:
  281. description: |-
  282. reason contains a programmatic identifier indicating the reason for the condition's last transition.
  283. Producers of specific condition types may define expected values and meanings for this field,
  284. and whether the values are considered a guaranteed API.
  285. The value should be a CamelCase string.
  286. This field may not be empty.
  287. maxLength: 1024
  288. minLength: 1
  289. pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
  290. type: string
  291. status:
  292. description: status of the condition, one of True, False, Unknown.
  293. enum:
  294. - "True"
  295. - "False"
  296. - Unknown
  297. type: string
  298. type:
  299. description: type of condition in CamelCase or in foo.example.com/CamelCase.
  300. maxLength: 316
  301. 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])$
  302. type: string
  303. required:
  304. - lastTransitionTime
  305. - message
  306. - reason
  307. - status
  308. - type
  309. type: object
  310. type: array
  311. x-kubernetes-list-map-keys:
  312. - type
  313. x-kubernetes-list-type: map
  314. ingestedAt:
  315. description: ingestedAt is the timestamp of the last successful ingestion.
  316. format: date-time
  317. type: string
  318. jobName:
  319. description: jobName is the name of the active or most-recently-completed
  320. ingestor Job.
  321. type: string
  322. observedGeneration:
  323. description: observedGeneration is the .metadata.generation last reconciled.
  324. format: int64
  325. type: integer
  326. phase:
  327. description: 'phase is the current ingestion phase: Pending, Ingesting,
  328. Ready, Failed, or Egesting.'
  329. enum:
  330. - Pending
  331. - Ingesting
  332. - Ready
  333. - Failed
  334. - Egesting
  335. type: string
  336. type: object
  337. required:
  338. - spec
  339. type: object
  340. served: true
  341. storage: true
  342. subresources:
  343. status: {}