Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update charts for tantivy search container #80

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
193 changes: 193 additions & 0 deletions charts/windmill/templates/indexer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
{{- if and .Values.enterprise.enabled .Values.windmill.indexer.enabled -}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: windmill-indexer
labels:
app: windmill-indexer
app.kubernetes.io/name: windmill-indexer
chart: {{ template "windmill.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: 1
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 3
maxUnavailable: 0
selector:
matchLabels:
app: windmill-indexer
template:
metadata:
labels:
app: windmill-indexer
app.kubernetes.io/name: windmill-indexer
container: windmill-indexer
{{- with .Values.windmill.indexer.labels }}
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.windmill.indexer.annotations }}
annotations:
{{ toYaml . | indent 8 }}
{{- end }}
spec:
{{ if .Values.windmill.imagePullSecrets }}
imagePullSecrets:
- name: {{ .Values.windmill.imagePullSecrets }}
{{ end }}
containers:
- name: windmill-indexer
securityContext:
{{- with .Values.windmill.indexer.containerSecurityContext }}
{{- toYaml . | nindent 10 }}
{{- end }}
image: {{ default "ghcr.io/windmill-labs/windmill-ee" .Values.windmill.image }}:{{ default "latest" .Values.windmill.tag }}
imagePullPolicy: Always
ports:
- containerPort: 8000
readinessProbe:
timeoutSeconds: 1
successThreshold: 1
failureThreshold: 1
httpGet:
host:
scheme: HTTP
path: /
httpHeaders:
- name: Host
value: localhost
port: 8000
initialDelaySeconds: 5
periodSeconds: 5
env:
{{- with .Values.windmill.indexer.extraEnv }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{ if .Values.enterprise.enabled }}
- name : "METRICS_ADDR"
value: "true"
{{ end }}
{{ if .Values.windmill.databaseUrlSecretName }}
- name: "DATABASE_URL"
valueFrom:
secretKeyRef:
name: "{{ .Values.windmill.databaseUrlSecretName }}"
key: "{{ .Values.windmill.databaseUrlSecretKey }}"
{{ else }}
- name: "DATABASE_URL"
value: "{{ .Values.windmill.databaseUrl }}"
{{ end }}
- name: "BASE_URL"
value: "{{ .Values.windmill.baseProtocol }}://{{ .Values.windmill.baseDomain }}"
- name: "RUST_LOG"
value: "{{ .Values.windmill.rustLog }}"
- name: "MODE"
value: "indexer"
- name: "JSON_FMT"
value: "true"
{{ if .Values.windmill.instanceEventsWebhook }}
- name: "INSTANCE_EVENTS_WEBHOOK"
value: "true"
{{ end }}
{{ if .Values.enterprise.enabled }}
{{ if .Values.enterprise.licenseKeySecretName }}
- name: "LICENSE_KEY"
valueFrom:
secretKeyRef:
name: {{ .Values.enterprise.licenseKeySecretName }}
key: {{ .Values.enterprise.licenseKeySecretKey }}
{{ else }}
- name: "LICENSE_KEY"
value: "{{ .Values.enterprise.licenseKey }}"
{{ end }}
{{ if .Values.enterprise.samlMetadata }}
- name: "SAML_METADATA"
value: "{{ .Values.enterprise.samlMetadata }}"
{{ end }}
{{ if $.Values.enterprise.enabledS3DistributedCache }}
- name: "S3_CACHE_BUCKET"
value: "{{ $.Values.enterprise.s3CacheBucket }}"
{{ end }}
{{if .Values.enterprise.scimTokenSecretName}}
- name: "SCIM_TOKEN"
valueFrom:
secretKeyRef:
name: "{{ .Values.enterprise.scimTokenSecretName }}"
key: "{{ .Values.enterprise.scimTokenSecretKey }}"
{{ else if .Values.enterprise.scimToken}}
- name: "SCIM_TOKEN"
value: "{{ .Values.enterprise.scimToken }}"
{{ end }}
{{ end }}
{{ if .Values.windmill.openaiAzureBasePath}}
- name: OPENAI_AZURE_BASE_PATH
value: "{{ .Values.windmill.openaiAzureBasePath }}"
{{ end }}
{{ if .Values.windmill.cookieDomain }}
- name: "COOKIE_DOMAIN"
value: "{{ .Values.windmill.cookieDomain }}"
{{ end }}
{{ if .Values.windmill.indexer.tantivyMaxIndexedJobLogSize__mb }}
- name: "TANTIVY_MAX_INDEXED_JOB_LOG_SIZE__MB"
value: "{{ .Values.windmill.indexer.tantivyMaxIndexedJobLogSize__mb }}"
{{ end }}
{{ if .Values.windmill.indexer.tantivyS3BackupPeriod__s }}
- name: "TANTIVY_S3_BACKUP_PERIOD__S"
value: "{{ .Values.windmill.indexer.tantivyS3BackupPeriod__s }}"
{{ end }}
{{ if .Values.windmill.indexer.tantivyIndexWriterMemoryBudget__mb }}
- name: "TANTIVY_INDEX_WRITER_MEMORY_BUDGET__MB"
value: "{{ .Values.windmill.indexer.tantivyIndexWriterMemoryBudget__mb }}"
{{ end }}
{{ if .Values.windmill.indexer.tantivyRefreshIndexPeriod__s }}
- name: "TANTIVY_REFRESH_INDEX_PERIOD__S"
value: "{{ .Values.windmill.indexer.tantivyRefreshIndexPeriod__s }}"
{{ end }}
{{ if .Values.windmill.indexer.tantivyDocCommitMaxBatchSize }}
- name: "TANTIVY_DOC_COMMIT_MAX_BATCH_SIZE"
value: "{{ .Values.windmill.indexer.tantivyDocCommitMaxBatchSize }}"
{{ end }}
{{ if .Values.windmill.indexer.tantivyShowMemoryEvery }}
- name: "TANTIVY_SHOW_MEMORY_EVERY"
value: "{{ .Values.windmill.indexer.tantivyShowMemoryEvery }}"
{{ end }}

resources:
{{ toYaml .Values.windmill.indexer.resources | indent 12 }}
{{- with .Values.windmill.indexer.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.windmill.indexer.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.windmill.indexer.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.windmill.indexer.podSecurityContext }}
securityContext:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.windmill.indexer.securityContext }}
securityContext:
{{ toYaml . | indent 8 }}
{{- end }}
---
apiVersion: v1
kind: Service
metadata:
name: windmill-indexer
spec:
ports:
- port: 8000
protocol: TCP
targetPort: 8000
selector:
app.kubernetes.io/name: windmill-indexer
sessionAffinity: ClientIP
type: ClusterIP
{{- end -}}
12 changes: 12 additions & 0 deletions charts/windmill/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,18 @@ spec:
name: windmill-multiplayer
port:
number: 3002
{{ if .Values.windmill.indexer.enabled }}
- host: {{ .Values.windmill.baseDomain | quote }}
http:
paths:
- path: /api/srch/
pathType: Prefix
backend:
service:
name: windmill-indexer
port:
number: 8000
{{ end }}
{{ if .Values.hub.enabled }}
- host: {{ .Values.hub.baseDomain | quote }}
http:
Expand Down
50 changes: 50 additions & 0 deletions charts/windmill/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,56 @@ windmill:
# -- target CPU utilization
targetCPUUtilizationPercentage: 80

# indexer configuration
indexer:
tag: "latest"

enabled: true

# -- Annotations to apply to the pods
annotations: {}

# -- Annotations to apply to the pods
labels: {}

# -- Node selector to use for scheduling the pods
nodeSelector: {}

# -- Tolerations to apply to the pods
tolerations: []

# -- legacy, use podSecurityContext instead
securityContext:
# -- Security context to apply to the pods
podSecurityContext:
# -- run as user. The default is 0 for root user
runAsUser: 0
# -- run explicitly as a non-root user. The default is false.
runAsNonRoot: false
containerSecurityContext: {}

# -- Affinity rules to apply to the pods
affinity: {}

# -- Resource limits and requests for the pods
resources: {}

# -- job logs bigger than this will be truncated before indexing
tantivyMaxIndexedJobLogSize__mb: 1
# -- how often to backup the index into object storage in seconds
tantivyS3BackupPeriod__s: 3600
# -- higher budget for higher indexing throughput
tantivyIndexWriterMemoryBudget__mb: 500
# -- how often to start indexing new jobs
tantivyRefreshIndexPeriod__s: 300
# -- how many documents to batch in one commit
tantivyDocCommitMaxBatchSize: 100000
# -- log memory usage and progress every so many documents indexed
tantivyShowMemoryEvery: 10000

# -- Extra environment variables to apply to the pods
extraEnv: []

ingress:
# -- enable/disable included ingress resource
enabled: true
Expand Down
Loading