|
|
@@ -0,0 +1,345 @@
|
|
|
+---
|
|
|
+apiVersion: apiextensions.k8s.io/v1
|
|
|
+kind: CustomResourceDefinition
|
|
|
+metadata:
|
|
|
+ annotations:
|
|
|
+ controller-gen.kubebuilder.io/version: v0.20.1
|
|
|
+ name: documents.locostack.com
|
|
|
+spec:
|
|
|
+ group: locostack.com
|
|
|
+ names:
|
|
|
+ kind: Document
|
|
|
+ listKind: DocumentList
|
|
|
+ plural: documents
|
|
|
+ shortNames:
|
|
|
+ - doc
|
|
|
+ singular: document
|
|
|
+ scope: Namespaced
|
|
|
+ versions:
|
|
|
+ - additionalPrinterColumns:
|
|
|
+ - jsonPath: .status.phase
|
|
|
+ name: Phase
|
|
|
+ type: string
|
|
|
+ name: v1alpha1
|
|
|
+ schema:
|
|
|
+ openAPIV3Schema:
|
|
|
+ description: Document is the Schema for the documents API
|
|
|
+ properties:
|
|
|
+ apiVersion:
|
|
|
+ description: |-
|
|
|
+ APIVersion defines the versioned schema of this representation of an object.
|
|
|
+ Servers should convert recognized schemas to the latest internal value, and
|
|
|
+ may reject unrecognized values.
|
|
|
+ More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
|
|
+ type: string
|
|
|
+ kind:
|
|
|
+ description: |-
|
|
|
+ Kind is a string value representing the REST resource this object represents.
|
|
|
+ Servers may infer this from the endpoint the client submits requests to.
|
|
|
+ Cannot be updated.
|
|
|
+ In CamelCase.
|
|
|
+ More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
|
|
+ type: string
|
|
|
+ metadata:
|
|
|
+ type: object
|
|
|
+ spec:
|
|
|
+ description: spec defines the desired state of Document
|
|
|
+ properties:
|
|
|
+ chunkingStrategy:
|
|
|
+ description: chunkingStrategy configures how the document content
|
|
|
+ is split into chunks before embedding.
|
|
|
+ properties:
|
|
|
+ chunkOverlap:
|
|
|
+ default: 64
|
|
|
+ description: |-
|
|
|
+ chunkOverlap is the number of tokens carried over from the previous chunk
|
|
|
+ to preserve context at boundaries.
|
|
|
+ format: int32
|
|
|
+ minimum: 0
|
|
|
+ type: integer
|
|
|
+ chunkSize:
|
|
|
+ default: 512
|
|
|
+ description: chunkSize is the target chunk size in tokens.
|
|
|
+ format: int32
|
|
|
+ minimum: 1
|
|
|
+ type: integer
|
|
|
+ separators:
|
|
|
+ description: separators is an ordered list of separator strings
|
|
|
+ for the recursive strategy.
|
|
|
+ items:
|
|
|
+ type: string
|
|
|
+ type: array
|
|
|
+ strategy:
|
|
|
+ default: recursive
|
|
|
+ description: |-
|
|
|
+ strategy selects the chunking algorithm.
|
|
|
+ fixed: split at exact token boundaries.
|
|
|
+ recursive: split on separators, respecting document structure (default).
|
|
|
+ semantic: split at semantic boundaries using the embedding model.
|
|
|
+ sentence, markdown, html: structure-aware strategies for specific formats.
|
|
|
+ enum:
|
|
|
+ - fixed
|
|
|
+ - recursive
|
|
|
+ - markdown
|
|
|
+ type: string
|
|
|
+ type: object
|
|
|
+ knowledgeBaseRef:
|
|
|
+ description: knowledgeBaseRef references the target knowledge base.
|
|
|
+ properties:
|
|
|
+ apiVersion:
|
|
|
+ description: API version of the referent.
|
|
|
+ type: string
|
|
|
+ fieldPath:
|
|
|
+ description: |-
|
|
|
+ If referring to a piece of an object instead of an entire object, this string
|
|
|
+ should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2].
|
|
|
+ For example, if the object reference is to a container within a pod, this would take on a value like:
|
|
|
+ "spec.containers{name}" (where "name" refers to the name of the container that triggered
|
|
|
+ the event) or if no container name is specified "spec.containers[2]" (container with
|
|
|
+ index 2 in this pod). This syntax is chosen only to have some well-defined way of
|
|
|
+ referencing a part of an object.
|
|
|
+ type: string
|
|
|
+ kind:
|
|
|
+ description: |-
|
|
|
+ Kind of the referent.
|
|
|
+ More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
|
|
+ type: string
|
|
|
+ name:
|
|
|
+ description: |-
|
|
|
+ Name of the referent.
|
|
|
+ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
|
|
+ type: string
|
|
|
+ namespace:
|
|
|
+ description: |-
|
|
|
+ Namespace of the referent.
|
|
|
+ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
|
|
|
+ type: string
|
|
|
+ resourceVersion:
|
|
|
+ description: |-
|
|
|
+ Specific resourceVersion to which this reference is made, if any.
|
|
|
+ More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
|
|
|
+ type: string
|
|
|
+ uid:
|
|
|
+ description: |-
|
|
|
+ UID of the referent.
|
|
|
+ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
|
|
|
+ type: string
|
|
|
+ type: object
|
|
|
+ x-kubernetes-map-type: atomic
|
|
|
+ source:
|
|
|
+ description: source describes the origin of the document content and
|
|
|
+ metadata.
|
|
|
+ properties:
|
|
|
+ huggingFace:
|
|
|
+ description: |-
|
|
|
+ huggingFace pulls artifacts from HuggingFace Hub.
|
|
|
+ The operator creates a managed PVC and a one-off download Job.
|
|
|
+ properties:
|
|
|
+ endpoint:
|
|
|
+ description: |-
|
|
|
+ endpoint is the base URL for HuggingFace API requests.
|
|
|
+ Defaults to "https://huggingface.co" if not specified.
|
|
|
+ type: string
|
|
|
+ fileName:
|
|
|
+ description: fileName is the specific file to pull from the
|
|
|
+ repo (e.g. a single GGUF for llama.cpp).
|
|
|
+ type: string
|
|
|
+ repo:
|
|
|
+ description: |-
|
|
|
+ repo is the HuggingFace repository id (e.g. meta-llama/Llama-3.1-8B-Instruct).
|
|
|
+ Defaults from modelClassRef.baseModelId when omitted.
|
|
|
+ type: string
|
|
|
+ revision:
|
|
|
+ description: revision is the branch, tag, or commit to pull.
|
|
|
+ Defaults to "main".
|
|
|
+ type: string
|
|
|
+ tokenSecretRef:
|
|
|
+ description: |-
|
|
|
+ tokenSecretRef references a Secret key holding an HF token for gated or private repos.
|
|
|
+ Injected into the download Job only; inference pods do not receive the token.
|
|
|
+ properties:
|
|
|
+ key:
|
|
|
+ description: The key of the secret to select from. Must
|
|
|
+ be a valid secret key.
|
|
|
+ type: string
|
|
|
+ name:
|
|
|
+ default: ""
|
|
|
+ description: |-
|
|
|
+ Name of the referent.
|
|
|
+ This field is effectively required, but due to backwards compatibility is
|
|
|
+ allowed to be empty. Instances of this type with an empty value here are
|
|
|
+ almost certainly wrong.
|
|
|
+ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
|
|
+ type: string
|
|
|
+ optional:
|
|
|
+ description: Specify whether the Secret or its key must
|
|
|
+ be defined
|
|
|
+ type: boolean
|
|
|
+ required:
|
|
|
+ - key
|
|
|
+ type: object
|
|
|
+ x-kubernetes-map-type: atomic
|
|
|
+ required:
|
|
|
+ - repo
|
|
|
+ type: object
|
|
|
+ pvc:
|
|
|
+ description: |-
|
|
|
+ pvc mounts artifacts from a PersistentVolumeClaim.
|
|
|
+ The user is responsible for populating the volume before referencing it.
|
|
|
+ properties:
|
|
|
+ claimName:
|
|
|
+ description: claimName is the name of an existing PVC in the
|
|
|
+ same namespace.
|
|
|
+ type: string
|
|
|
+ filePath:
|
|
|
+ description: filePath is the path inside the PVC where the
|
|
|
+ artifact is located.
|
|
|
+ type: string
|
|
|
+ required:
|
|
|
+ - claimName
|
|
|
+ type: object
|
|
|
+ url:
|
|
|
+ description: |-
|
|
|
+ url downloads artifacts from an arbitrary HTTP/HTTPS URL.
|
|
|
+ The operator creates a managed PVC and a one-off download Job.
|
|
|
+ properties:
|
|
|
+ authSecretRef:
|
|
|
+ description: |-
|
|
|
+ authSecretRef references a Secret whose key-value pairs are injected as HTTP
|
|
|
+ request headers into the download Job. Not mounted in inference pods.
|
|
|
+ properties:
|
|
|
+ name:
|
|
|
+ default: ""
|
|
|
+ description: |-
|
|
|
+ Name of the referent.
|
|
|
+ This field is effectively required, but due to backwards compatibility is
|
|
|
+ allowed to be empty. Instances of this type with an empty value here are
|
|
|
+ almost certainly wrong.
|
|
|
+ More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
|
|
+ type: string
|
|
|
+ type: object
|
|
|
+ x-kubernetes-map-type: atomic
|
|
|
+ checksum:
|
|
|
+ description: 'checksum is the expected checksum of the downloaded
|
|
|
+ file (format: sha256:<hex>).'
|
|
|
+ type: string
|
|
|
+ fileName:
|
|
|
+ description: |-
|
|
|
+ fileName is the filename to write inside the PVC.
|
|
|
+ Defaults to the last path segment of the URL.
|
|
|
+ type: string
|
|
|
+ url:
|
|
|
+ description: url is the HTTP or HTTPS URL to download the
|
|
|
+ artifacts from.
|
|
|
+ type: string
|
|
|
+ required:
|
|
|
+ - url
|
|
|
+ type: object
|
|
|
+ type: object
|
|
|
+ required:
|
|
|
+ - chunkingStrategy
|
|
|
+ - knowledgeBaseRef
|
|
|
+ - source
|
|
|
+ type: object
|
|
|
+ status:
|
|
|
+ description: status defines the observed state of Document
|
|
|
+ properties:
|
|
|
+ conditions:
|
|
|
+ description: |-
|
|
|
+ conditions represent the current state of the Document resource.
|
|
|
+ Each condition has a unique type and reflects the status of a specific aspect of the resource.
|
|
|
+
|
|
|
+ Standard condition types include:
|
|
|
+ - "Available": the resource is fully functional
|
|
|
+ - "Progressing": the resource is being created or updated
|
|
|
+ - "Degraded": the resource failed to reach or maintain its desired state
|
|
|
+
|
|
|
+ The status of each condition is one of True, False, or Unknown.
|
|
|
+ items:
|
|
|
+ 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.
|
|
|
+ This 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.
|
|
|
+ This may be an empty string.
|
|
|
+ maxLength: 32768
|
|
|
+ type: string
|
|
|
+ observedGeneration:
|
|
|
+ description: |-
|
|
|
+ observedGeneration represents the .metadata.generation that the condition was set based upon.
|
|
|
+ For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
|
|
|
+ with respect to the current state of the instance.
|
|
|
+ format: int64
|
|
|
+ minimum: 0
|
|
|
+ type: integer
|
|
|
+ reason:
|
|
|
+ description: |-
|
|
|
+ reason contains a programmatic identifier indicating the reason for the condition's last transition.
|
|
|
+ Producers of specific condition types may define expected values and meanings for this field,
|
|
|
+ and whether the values are considered a guaranteed API.
|
|
|
+ The value should be a CamelCase string.
|
|
|
+ This 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
|
|
|
+ x-kubernetes-list-map-keys:
|
|
|
+ - type
|
|
|
+ x-kubernetes-list-type: map
|
|
|
+ ingestedAt:
|
|
|
+ description: ingestedAt is the timestamp of the last successful ingestion.
|
|
|
+ format: date-time
|
|
|
+ type: string
|
|
|
+ jobName:
|
|
|
+ description: jobName is the name of the active or most-recently-completed
|
|
|
+ ingestor Job.
|
|
|
+ type: string
|
|
|
+ observedGeneration:
|
|
|
+ description: observedGeneration is the .metadata.generation last reconciled.
|
|
|
+ format: int64
|
|
|
+ type: integer
|
|
|
+ phase:
|
|
|
+ description: 'phase is the current ingestion phase: Pending, Ingesting,
|
|
|
+ Ready, Failed, or Egesting.'
|
|
|
+ enum:
|
|
|
+ - Pending
|
|
|
+ - Ingesting
|
|
|
+ - Ready
|
|
|
+ - Failed
|
|
|
+ - Egesting
|
|
|
+ type: string
|
|
|
+ type: object
|
|
|
+ required:
|
|
|
+ - spec
|
|
|
+ type: object
|
|
|
+ served: true
|
|
|
+ storage: true
|
|
|
+ subresources:
|
|
|
+ status: {}
|