diff --git a/helm/etl-service/templates/configmap.yaml b/helm/etl-service/templates/configmap.yaml index a163fe7..65c8ab2 100644 --- a/helm/etl-service/templates/configmap.yaml +++ b/helm/etl-service/templates/configmap.yaml @@ -10,6 +10,7 @@ metadata: data: # S3 (без секретов — они в Secret) S3_ENDPOINT_URL: {{ .Values.s3.endpointUrl | quote }} + S3_REGION: {{ .Values.s3.region | qoute }} S3_BUCKET: {{ .Values.s3.bucket | quote }} S3_PREFIX: {{ .Values.s3.prefix | quote }} S3_PROCESSED_PREFIX: {{ .Values.s3.processedPrefix | quote }} @@ -32,8 +33,12 @@ data: # Processing CHUNKING_STRATEGY: {{ .Values.processing.chunkingStrategy | quote }} - CHUNK_SIZE: {{ .Values.processing.chunkSize | quote }} - CHUNK_OVERLAP: {{ .Values.processing.chunkOverlap | quote }} + CHUNK_MAX_TOKENS: {{ .Values.processing.chunkMaxTokens | quote }} # Batching EMBEDDING_BATCH_SIZE: {{ .Values.batching.embeddingBatchSize | quote }} + EMBEDDING_CONCURRENCY: {{ .Values.batching.embeddingConcurrency | quote }} + + # Checkpoints + CHECKPOINT_ENABLED: {{ .Values.checkpoint.enabled | quote }} + S3_CHECKPOINT_PREFIX: {{ .Values.checkpoint.s3checkpointsPrefix | quote }} \ No newline at end of file diff --git a/helm/etl-service/templates/deployment.yaml b/helm/etl-service/templates/deployment.yaml new file mode 100644 index 0000000..b6a8e95 --- /dev/null +++ b/helm/etl-service/templates/deployment.yaml @@ -0,0 +1,61 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Chart.Name }} + labels: + app.kubernetes.io/name: {{ .Chart.Name }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} + app.kubernetes.io/managed-by: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount | default 1 }} + selector: + matchLabels: + app.kubernetes.io/name: {{ .Chart.Name }} + app.kubernetes.io/instance: {{ .Release.Name }} + template: + metadata: + labels: + app.kubernetes.io/name: {{ .Chart.Name }} + app.kubernetes.io/instance: {{ .Release.Name }} + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - name: http + containerPort: {{ .Values.port | default 8000 }} + protocol: TCP + envFrom: + - configMapRef: + name: {{ .Chart.Name }}-config + {{- if .Values.existingSecret }} + - secretRef: + name: {{ .Values.existingSecret | quote }} + {{- else }} + - secretRef: + name: {{ .Chart.Name }}-secret + {{- end }} + resources: + {{- toYaml .Values.resources | nindent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} \ No newline at end of file diff --git a/helm/etl-service/templates/secret.yaml b/helm/etl-service/templates/secret.yaml index 73eff45..e24b2f6 100644 --- a/helm/etl-service/templates/secret.yaml +++ b/helm/etl-service/templates/secret.yaml @@ -9,7 +9,12 @@ metadata: app.kubernetes.io/managed-by: {{ .Release.Service }} type: Opaque stringData: - EMBEDDING_API_KEY: {{ .Values.embedding.apiKey | quote }} + # S3 S3_ACCESS_KEY_ID: {{ .Values.s3.accessKeyId | quote }} S3_SECRET_ACCESS_KEY: {{ .Values.s3.secretAccessKey | quote }} + + # Qdrant QDRANT_API_KEY: {{ .Values.qdrant.apiKey | quote }} + + # Embedding + EMBEDDING_API_KEY: {{ .Values.embedding.apiKey | quote }} \ No newline at end of file diff --git a/helm/etl-service/values.yaml b/helm/etl-service/values.yaml index 07e7696..10e86e8 100644 --- a/helm/etl-service/values.yaml +++ b/helm/etl-service/values.yaml @@ -2,9 +2,9 @@ # Образ # ────────────────────────────────────────────── image: - repository: etl-service - tag: "0.1.0" - pullPolicy: IfNotPresent + repository: gitflic.project2.cloud/repository/images/etl + tag: "build-11" + pullPolicy: Always # ────────────────────────────────────────────── # Resources @@ -17,15 +17,18 @@ resources: cpu: 500m memory: 512Mi +# ────────────────────────────────────────────── +# Existing Secret (обязательно укажите имя) +# ────────────────────────────────────────────── +# Секрет должен содержать ключи: +# S3_ACCESS_KEY_ID, S3_SECRET_ACCESS_KEY, EMBEDDING_API_KEY +existingSecret: "etl-secret" + # ────────────────────────────────────────────── # S3 # ────────────────────────────────────────────── s3: - endpointUrl: "http://minio:9000" - # Access key — в Secret - accessKeyId: "" - # Secret access key — в Secret - secretAccessKey: "" + endpointUrl: "https://s3.cloud.ru" bucket: "documents" prefix: "input/" processedPrefix: "processed/" @@ -34,9 +37,7 @@ s3: # Qdrant # ────────────────────────────────────────────── qdrant: - url: "http://qdrant:6333" - # API-ключ — в Secret - apiKey: "" + url: "http://qdrant.project2.cloud:6333" collectionName: "documents" vectorSize: 1536 distance: "cosine" @@ -46,9 +47,7 @@ qdrant: # ────────────────────────────────────────────── embedding: provider: "openai" - # API-ключ — в Secret, не указывайте здесь - apiKey: "" - apiUrl: "https://api.openai.com/v1" + apiUrl: "https://foundation-models.api.cloud.ru/v1" model: "text-embedding-3-small" # ────────────────────────────────────────────── @@ -74,13 +73,10 @@ batching: embeddingBatchSize: 100 # ────────────────────────────────────────────── -# CronJob +# Deployment # ────────────────────────────────────────────── -schedule: "0 */6 * * *" # каждые 6 часов -concurrencyPolicy: Forbid # не запускать параллельные джобы -successfulJobsHistoryLimit: 3 -failedJobsHistoryLimit: 1 -activeDeadlineSeconds: 3600 # таймаут 1 час +replicaCount: 1 +port: 8000 # ────────────────────────────────────────────── # Image Pull Secrets (для приватных registry) @@ -92,8 +88,9 @@ imagePullSecrets: [] # ────────────────────────────────────────────── podAnnotations: {} -nodeSelector: {} +nodeSelector: + assignment: application tolerations: [] -affinity: {} +affinity: {} \ No newline at end of file