close CLOUD-137 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced advanced workspace-scoped search and aggregation capabilities with support for complex queries, highlights, and pagination. - Added pluggable search providers: Elasticsearch and Manticoresearch. - New GraphQL queries, schema types, and resolver support for search and aggregation. - Enhanced configuration options for search providers in self-hosted and cloud deployments. - Added Docker Compose services and environment variables for Elasticsearch and Manticoresearch. - Integrated indexer service into deployment and CI workflows. - **Bug Fixes** - Improved error handling with new user-friendly error messages for search provider and indexer issues. - **Documentation** - Updated configuration examples and environment variable references for indexer and search providers. - **Tests** - Added extensive end-to-end and provider-specific tests covering indexing, searching, aggregation, deletion, and error cases. - Included snapshot tests and test fixtures for search providers. - **Chores** - Updated deployment scripts, Helm charts, and Kubernetes manifests to include indexer-related environment variables and secrets. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
64 lines
2.3 KiB
YAML
64 lines
2.3 KiB
YAML
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: {{ include "graphql.fullname" . }}-database-migration
|
|
labels:
|
|
{{- include "graphql.labels" . | nindent 4 }}
|
|
annotations:
|
|
"helm.sh/hook": post-install,pre-upgrade
|
|
"helm.sh/hook-weight": "-1"
|
|
"helm.sh/hook-delete-policy": before-hook-creation
|
|
|
|
spec:
|
|
template:
|
|
spec:
|
|
serviceAccountName: {{ include "graphql.serviceAccountName" . }}
|
|
containers:
|
|
- name: {{ .Chart.Name }}
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
|
command: ["yarn", "predeploy"]
|
|
env:
|
|
- name: NODE_ENV
|
|
value: "{{ .Values.env }}"
|
|
- name: AFFINE_ENV
|
|
value: "{{ .Release.Namespace }}"
|
|
- name: DEPLOYMENT_TYPE
|
|
value: "{{ .Values.global.deployment.type }}"
|
|
- name: DEPLOYMENT_PLATFORM
|
|
value: "{{ .Values.global.deployment.platform }}"
|
|
- name: DATABASE_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: pg-postgresql
|
|
key: postgres-password
|
|
- name: DATABASE_URL
|
|
value: postgres://{{ .Values.global.database.user }}:$(DATABASE_PASSWORD)@{{ .Values.global.database.host }}:{{ .Values.global.database.port }}/{{ .Values.global.database.name }}
|
|
- name: REDIS_SERVER_HOST
|
|
value: "{{ .Values.global.redis.host }}"
|
|
- name: REDIS_SERVER_PORT
|
|
value: "{{ .Values.global.redis.port }}"
|
|
- name: REDIS_SERVER_USER
|
|
value: "{{ .Values.global.redis.username }}"
|
|
- name: REDIS_SERVER_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: redis
|
|
key: redis-password
|
|
- name: AFFINE_INDEXER_SEARCH_PROVIDER
|
|
value: "{{ .Values.global.indexer.provider }}"
|
|
- name: AFFINE_INDEXER_SEARCH_ENDPOINT
|
|
value: "{{ .Values.global.indexer.endpoint }}"
|
|
- name: AFFINE_INDEXER_SEARCH_USERNAME
|
|
value: "{{ .Values.global.indexer.username }}"
|
|
- name: AFFINE_INDEXER_SEARCH_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: indexer
|
|
key: indexer-password
|
|
resources:
|
|
requests:
|
|
cpu: '100m'
|
|
memory: '200Mi'
|
|
restartPolicy: Never
|
|
backoffLimit: 1
|