Skip to content

Commit b69e272

Browse files
authored
Merge branch 'main' into fix-current-time
2 parents 370c0cc + 495d4ca commit b69e272

13 files changed

+446
-1
lines changed

deployment/helm/charts/onyx/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ home: https://www.onyx.app/
55
sources:
66
- "https://github.com/onyx-dot-app/onyx"
77
type: application
8-
version: 0.2.11
8+
version: 0.2.12
99
appVersion: latest
1010
annotations:
1111
category: Productivity
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{{- if .Values.api.autoscaling.enabled }}
2+
apiVersion: keda.sh/v1alpha1
3+
kind: ScaledObject
4+
metadata:
5+
name: {{ include "onyx-stack.fullname" . }}-api
6+
labels:
7+
{{- include "onyx-stack.labels" . | nindent 4 }}
8+
spec:
9+
scaleTargetRef:
10+
apiVersion: apps/v1
11+
kind: Deployment
12+
name: {{ include "onyx-stack.fullname" . }}-api-server
13+
minReplicaCount: {{ .Values.api.autoscaling.minReplicas | default 1 }}
14+
maxReplicaCount: {{ .Values.api.autoscaling.maxReplicas | default 10 }}
15+
pollingInterval: {{ .Values.api.autoscaling.pollingInterval | default 30 }}
16+
cooldownPeriod: {{ .Values.api.autoscaling.cooldownPeriod | default 300 }}
17+
idleReplicaCount: {{ .Values.api.autoscaling.idleReplicaCount | default 1 }}
18+
fallback:
19+
failureThreshold: {{ .Values.api.autoscaling.failureThreshold | default 3 }}
20+
replicas: {{ .Values.api.autoscaling.fallbackReplicas | default 1 }}
21+
triggers:
22+
{{- if .Values.api.autoscaling.targetCPUUtilizationPercentage }}
23+
- type: cpu
24+
metricType: Utilization
25+
metadata:
26+
value: "{{ .Values.api.autoscaling.targetCPUUtilizationPercentage }}"
27+
{{- end }}
28+
{{- if .Values.api.autoscaling.targetMemoryUtilizationPercentage }}
29+
- type: memory
30+
metricType: Utilization
31+
metadata:
32+
value: "{{ .Values.api.autoscaling.targetMemoryUtilizationPercentage }}"
33+
{{- end }}
34+
{{- if .Values.api.autoscaling.customTriggers }}
35+
{{- toYaml .Values.api.autoscaling.customTriggers | nindent 4 }}
36+
{{- end }}
37+
{{- end }}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{{- if .Values.celery_worker_docfetching.autoscaling.enabled }}
2+
apiVersion: keda.sh/v1alpha1
3+
kind: ScaledObject
4+
metadata:
5+
name: {{ include "onyx-stack.fullname" . }}-celery-worker-docfetching
6+
labels:
7+
{{- include "onyx-stack.labels" . | nindent 4 }}
8+
spec:
9+
scaleTargetRef:
10+
apiVersion: apps/v1
11+
kind: Deployment
12+
name: {{ include "onyx-stack.fullname" . }}-celery-worker-docfetching
13+
minReplicaCount: {{ .Values.celery_worker_docfetching.autoscaling.minReplicas | default 1 }}
14+
maxReplicaCount: {{ .Values.celery_worker_docfetching.autoscaling.maxReplicas | default 20 }}
15+
pollingInterval: {{ .Values.celery_worker_docfetching.autoscaling.pollingInterval | default 30 }}
16+
cooldownPeriod: {{ .Values.celery_worker_docfetching.autoscaling.cooldownPeriod | default 300 }}
17+
idleReplicaCount: {{ .Values.celery_worker_docfetching.autoscaling.idleReplicaCount | default 1 }}
18+
fallback:
19+
failureThreshold: {{ .Values.celery_worker_docfetching.autoscaling.failureThreshold | default 3 }}
20+
replicas: {{ .Values.celery_worker_docfetching.autoscaling.fallbackReplicas | default 1 }}
21+
triggers:
22+
{{- if .Values.celery_worker_docfetching.autoscaling.targetCPUUtilizationPercentage }}
23+
- type: cpu
24+
metadata:
25+
type: Utilization
26+
value: "{{ .Values.celery_worker_docfetching.autoscaling.targetCPUUtilizationPercentage }}"
27+
{{- end }}
28+
{{- if .Values.celery_worker_docfetching.autoscaling.targetMemoryUtilizationPercentage }}
29+
- type: memory
30+
metadata:
31+
type: Utilization
32+
value: "{{ .Values.celery_worker_docfetching.autoscaling.targetMemoryUtilizationPercentage }}"
33+
{{- end }}
34+
{{- if .Values.celery_worker_docfetching.autoscaling.customTriggers }}
35+
{{- toYaml .Values.celery_worker_docfetching.autoscaling.customTriggers | nindent 4 }}
36+
{{- end }}
37+
{{- end }}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{{- if .Values.celery_worker_docprocessing.autoscaling.enabled }}
2+
apiVersion: keda.sh/v1alpha1
3+
kind: ScaledObject
4+
metadata:
5+
name: {{ include "onyx-stack.fullname" . }}-celery-worker-docprocessing
6+
labels:
7+
{{- include "onyx-stack.labels" . | nindent 4 }}
8+
spec:
9+
scaleTargetRef:
10+
apiVersion: apps/v1
11+
kind: Deployment
12+
name: {{ include "onyx-stack.fullname" . }}-celery-worker-docprocessing
13+
minReplicaCount: {{ .Values.celery_worker_docprocessing.autoscaling.minReplicas | default 1 }}
14+
maxReplicaCount: {{ .Values.celery_worker_docprocessing.autoscaling.maxReplicas | default 10 }}
15+
pollingInterval: {{ .Values.celery_worker_docprocessing.autoscaling.pollingInterval | default 30 }}
16+
cooldownPeriod: {{ .Values.celery_worker_docprocessing.autoscaling.cooldownPeriod | default 300 }}
17+
idleReplicaCount: {{ .Values.celery_worker_docprocessing.autoscaling.idleReplicaCount | default 1 }}
18+
fallback:
19+
failureThreshold: {{ .Values.celery_worker_docprocessing.autoscaling.failureThreshold | default 3 }}
20+
replicas: {{ .Values.celery_worker_docprocessing.autoscaling.fallbackReplicas | default 1 }}
21+
triggers:
22+
{{- if .Values.celery_worker_docprocessing.autoscaling.targetCPUUtilizationPercentage }}
23+
- type: cpu
24+
metricType: Utilization
25+
metadata:
26+
value: "{{ .Values.celery_worker_docprocessing.autoscaling.targetCPUUtilizationPercentage }}"
27+
{{- end }}
28+
{{- if .Values.celery_worker_docprocessing.autoscaling.targetMemoryUtilizationPercentage }}
29+
- type: memory
30+
metricType: Utilization
31+
metadata:
32+
value: "{{ .Values.celery_worker_docprocessing.autoscaling.targetMemoryUtilizationPercentage }}"
33+
{{- end }}
34+
{{- if .Values.celery_worker_docprocessing.autoscaling.customTriggers }}
35+
{{- toYaml .Values.celery_worker_docprocessing.autoscaling.customTriggers | nindent 4 }}
36+
{{- end }}
37+
{{- end }}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{{- if .Values.celery_worker_heavy.autoscaling.enabled }}
2+
apiVersion: keda.sh/v1alpha1
3+
kind: ScaledObject
4+
metadata:
5+
name: {{ include "onyx-stack.fullname" . }}-celery-worker-heavy
6+
labels:
7+
{{- include "onyx-stack.labels" . | nindent 4 }}
8+
spec:
9+
scaleTargetRef:
10+
apiVersion: apps/v1
11+
kind: Deployment
12+
name: {{ include "onyx-stack.fullname" . }}-celery-worker-heavy
13+
minReplicaCount: {{ .Values.celery_worker_heavy.autoscaling.minReplicas | default 1 }}
14+
maxReplicaCount: {{ .Values.celery_worker_heavy.autoscaling.maxReplicas | default 10 }}
15+
pollingInterval: {{ .Values.celery_worker_heavy.autoscaling.pollingInterval | default 30 }}
16+
cooldownPeriod: {{ .Values.celery_worker_heavy.autoscaling.cooldownPeriod | default 300 }}
17+
idleReplicaCount: {{ .Values.celery_worker_heavy.autoscaling.idleReplicaCount | default 1 }}
18+
fallback:
19+
failureThreshold: {{ .Values.celery_worker_heavy.autoscaling.failureThreshold | default 3 }}
20+
replicas: {{ .Values.celery_worker_heavy.autoscaling.fallbackReplicas | default 1 }}
21+
triggers:
22+
{{- if .Values.celery_worker_heavy.autoscaling.targetCPUUtilizationPercentage }}
23+
- type: cpu
24+
metricType: Utilization
25+
metadata:
26+
value: "{{ .Values.celery_worker_heavy.autoscaling.targetCPUUtilizationPercentage }}"
27+
{{- end }}
28+
{{- if .Values.celery_worker_heavy.autoscaling.targetMemoryUtilizationPercentage }}
29+
- type: memory
30+
metricType: Utilization
31+
metadata:
32+
value: "{{ .Values.celery_worker_heavy.autoscaling.targetMemoryUtilizationPercentage }}"
33+
{{- end }}
34+
{{- if .Values.celery_worker_heavy.autoscaling.customTriggers }}
35+
{{- toYaml .Values.celery_worker_heavy.autoscaling.customTriggers | nindent 4 }}
36+
{{- end }}
37+
{{- end }}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{{- if .Values.celery_worker_light.autoscaling.enabled }}
2+
apiVersion: keda.sh/v1alpha1
3+
kind: ScaledObject
4+
metadata:
5+
name: {{ include "onyx-stack.fullname" . }}-celery-worker-light
6+
labels:
7+
{{- include "onyx-stack.labels" . | nindent 4 }}
8+
spec:
9+
scaleTargetRef:
10+
apiVersion: apps/v1
11+
kind: Deployment
12+
name: {{ include "onyx-stack.fullname" . }}-celery-worker-light
13+
minReplicaCount: {{ .Values.celery_worker_light.autoscaling.minReplicas | default 1 }}
14+
maxReplicaCount: {{ .Values.celery_worker_light.autoscaling.maxReplicas | default 10 }}
15+
pollingInterval: {{ .Values.celery_worker_light.autoscaling.pollingInterval | default 30 }}
16+
cooldownPeriod: {{ .Values.celery_worker_light.autoscaling.cooldownPeriod | default 300 }}
17+
idleReplicaCount: {{ .Values.celery_worker_light.autoscaling.idleReplicaCount | default 1 }}
18+
fallback:
19+
failureThreshold: {{ .Values.celery_worker_light.autoscaling.failureThreshold | default 3 }}
20+
replicas: {{ .Values.celery_worker_light.autoscaling.fallbackReplicas | default 1 }}
21+
triggers:
22+
{{- if .Values.celery_worker_light.autoscaling.targetCPUUtilizationPercentage }}
23+
- type: cpu
24+
metricType: Utilization
25+
metadata:
26+
value: "{{ .Values.celery_worker_light.autoscaling.targetCPUUtilizationPercentage }}"
27+
{{- end }}
28+
{{- if .Values.celery_worker_light.autoscaling.targetMemoryUtilizationPercentage }}
29+
- type: memory
30+
metricType: Utilization
31+
metadata:
32+
value: "{{ .Values.celery_worker_light.autoscaling.targetMemoryUtilizationPercentage }}"
33+
{{- end }}
34+
{{- if .Values.celery_worker_light.autoscaling.customTriggers }}
35+
{{- toYaml .Values.celery_worker_light.autoscaling.customTriggers | nindent 4 }}
36+
{{- end }}
37+
{{- end }}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{{- if .Values.celery_worker_monitoring.autoscaling.enabled }}
2+
apiVersion: keda.sh/v1alpha1
3+
kind: ScaledObject
4+
metadata:
5+
name: {{ include "onyx-stack.fullname" . }}-celery-worker-monitoring
6+
labels:
7+
{{- include "onyx-stack.labels" . | nindent 4 }}
8+
spec:
9+
scaleTargetRef:
10+
apiVersion: apps/v1
11+
kind: Deployment
12+
name: {{ include "onyx-stack.fullname" . }}-celery-worker-monitoring
13+
minReplicaCount: {{ .Values.celery_worker_monitoring.autoscaling.minReplicas | default 1 }}
14+
maxReplicaCount: {{ .Values.celery_worker_monitoring.autoscaling.maxReplicas | default 10 }}
15+
pollingInterval: {{ .Values.celery_worker_monitoring.autoscaling.pollingInterval | default 30 }}
16+
cooldownPeriod: {{ .Values.celery_worker_monitoring.autoscaling.cooldownPeriod | default 300 }}
17+
idleReplicaCount: {{ .Values.celery_worker_monitoring.autoscaling.idleReplicaCount | default 1 }}
18+
fallback:
19+
failureThreshold: {{ .Values.celery_worker_monitoring.autoscaling.failureThreshold | default 3 }}
20+
replicas: {{ .Values.celery_worker_monitoring.autoscaling.fallbackReplicas | default 1 }}
21+
triggers:
22+
{{- if .Values.celery_worker_monitoring.autoscaling.targetCPUUtilizationPercentage }}
23+
- type: cpu
24+
metricType: Utilization
25+
metadata:
26+
value: "{{ .Values.celery_worker_monitoring.autoscaling.targetCPUUtilizationPercentage }}"
27+
{{- end }}
28+
{{- if .Values.celery_worker_monitoring.autoscaling.targetMemoryUtilizationPercentage }}
29+
- type: memory
30+
metricType: Utilization
31+
metadata:
32+
value: "{{ .Values.celery_worker_monitoring.autoscaling.targetMemoryUtilizationPercentage }}"
33+
{{- end }}
34+
{{- if .Values.celery_worker_monitoring.autoscaling.customTriggers }}
35+
{{- toYaml .Values.celery_worker_monitoring.autoscaling.customTriggers | nindent 4 }}
36+
{{- end }}
37+
{{- end }}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{{- if .Values.celery_worker_primary.autoscaling.enabled }}
2+
apiVersion: keda.sh/v1alpha1
3+
kind: ScaledObject
4+
metadata:
5+
name: {{ include "onyx-stack.fullname" . }}-celery-worker-primary
6+
labels:
7+
{{- include "onyx-stack.labels" . | nindent 4 }}
8+
spec:
9+
scaleTargetRef:
10+
apiVersion: apps/v1
11+
kind: Deployment
12+
name: {{ include "onyx-stack.fullname" . }}-celery-worker-primary
13+
minReplicaCount: {{ .Values.celery_worker_primary.autoscaling.minReplicas | default 1 }}
14+
maxReplicaCount: {{ .Values.celery_worker_primary.autoscaling.maxReplicas | default 10 }}
15+
pollingInterval: {{ .Values.celery_worker_primary.autoscaling.pollingInterval | default 30 }}
16+
cooldownPeriod: {{ .Values.celery_worker_primary.autoscaling.cooldownPeriod | default 300 }}
17+
idleReplicaCount: {{ .Values.celery_worker_primary.autoscaling.idleReplicaCount | default 1 }}
18+
fallback:
19+
failureThreshold: {{ .Values.celery_worker_primary.autoscaling.failureThreshold | default 3 }}
20+
replicas: {{ .Values.celery_worker_primary.autoscaling.fallbackReplicas | default 1 }}
21+
triggers:
22+
{{- if .Values.celery_worker_primary.autoscaling.targetCPUUtilizationPercentage }}
23+
- type: cpu
24+
metricType: Utilization
25+
metadata:
26+
value: "{{ .Values.celery_worker_primary.autoscaling.targetCPUUtilizationPercentage }}"
27+
{{- end }}
28+
{{- if .Values.celery_worker_primary.autoscaling.targetMemoryUtilizationPercentage }}
29+
- type: memory
30+
metricType: Utilization
31+
metadata:
32+
value: "{{ .Values.celery_worker_primary.autoscaling.targetMemoryUtilizationPercentage }}"
33+
{{- end }}
34+
{{- if .Values.celery_worker_primary.autoscaling.customTriggers }}
35+
{{- toYaml .Values.celery_worker_primary.autoscaling.customTriggers | nindent 4 }}
36+
{{- end }}
37+
{{- end }}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{{- if .Values.celery_worker_user_files_indexing.autoscaling.enabled }}
2+
apiVersion: keda.sh/v1alpha1
3+
kind: ScaledObject
4+
metadata:
5+
name: {{ include "onyx-stack.fullname" . }}-celery-worker-user-files-indexing
6+
labels:
7+
{{- include "onyx-stack.labels" . | nindent 4 }}
8+
spec:
9+
scaleTargetRef:
10+
apiVersion: apps/v1
11+
kind: Deployment
12+
name: {{ include "onyx-stack.fullname" . }}-celery-worker-user-files-indexing
13+
minReplicaCount: {{ .Values.celery_worker_user_files_indexing.autoscaling.minReplicas | default 1 }}
14+
maxReplicaCount: {{ .Values.celery_worker_user_files_indexing.autoscaling.maxReplicas | default 10 }}
15+
pollingInterval: {{ .Values.celery_worker_user_files_indexing.autoscaling.pollingInterval | default 30 }}
16+
cooldownPeriod: {{ .Values.celery_worker_user_files_indexing.autoscaling.cooldownPeriod | default 300 }}
17+
idleReplicaCount: {{ .Values.celery_worker_user_files_indexing.autoscaling.idleReplicaCount | default 1 }}
18+
fallback:
19+
failureThreshold: {{ .Values.celery_worker_user_files_indexing.autoscaling.failureThreshold | default 3 }}
20+
replicas: {{ .Values.celery_worker_user_files_indexing.autoscaling.fallbackReplicas | default 1 }}
21+
triggers:
22+
{{- if .Values.celery_worker_user_files_indexing.autoscaling.targetCPUUtilizationPercentage }}
23+
- type: cpu
24+
metricType: Utilization
25+
metadata:
26+
value: "{{ .Values.celery_worker_user_files_indexing.autoscaling.targetCPUUtilizationPercentage }}"
27+
{{- end }}
28+
{{- if .Values.celery_worker_user_files_indexing.autoscaling.targetMemoryUtilizationPercentage }}
29+
- type: memory
30+
metricType: Utilization
31+
metadata:
32+
value: "{{ .Values.celery_worker_user_files_indexing.autoscaling.targetMemoryUtilizationPercentage }}"
33+
{{- end }}
34+
{{- if .Values.celery_worker_user_files_indexing.autoscaling.customTriggers }}
35+
{{- toYaml .Values.celery_worker_user_files_indexing.autoscaling.customTriggers | nindent 4 }}
36+
{{- end }}
37+
{{- end }}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{{- if .Values.webserver.autoscaling.enabled }}
2+
apiVersion: keda.sh/v1alpha1
3+
kind: ScaledObject
4+
metadata:
5+
name: {{ include "onyx-stack.fullname" . }}-web-server
6+
labels:
7+
{{- include "onyx-stack.labels" . | nindent 4 }}
8+
spec:
9+
scaleTargetRef:
10+
apiVersion: apps/v1
11+
kind: Deployment
12+
name: {{ include "onyx-stack.fullname" . }}-web-server
13+
minReplicaCount: {{ .Values.webserver.autoscaling.minReplicas }}
14+
maxReplicaCount: {{ .Values.webserver.autoscaling.maxReplicas }}
15+
pollingInterval: {{ .Values.webserver.autoscaling.pollingInterval | default 30 }}
16+
cooldownPeriod: {{ .Values.webserver.autoscaling.cooldownPeriod | default 300 }}
17+
idleReplicaCount: {{ .Values.webserver.autoscaling.idleReplicaCount | default 1 }}
18+
fallback:
19+
failureThreshold: {{ .Values.webserver.autoscaling.failureThreshold | default 3 }}
20+
replicas: {{ .Values.webserver.autoscaling.fallbackReplicas | default 1 }}
21+
triggers:
22+
{{- if .Values.webserver.autoscaling.targetCPUUtilizationPercentage }}
23+
- type: cpu
24+
metricType: Utilization
25+
metadata:
26+
value: "{{ .Values.webserver.autoscaling.targetCPUUtilizationPercentage }}"
27+
{{- end }}
28+
{{- if .Values.webserver.autoscaling.targetMemoryUtilizationPercentage }}
29+
- type: memory
30+
metricType: Utilization
31+
metadata:
32+
value: "{{ .Values.webserver.autoscaling.targetMemoryUtilizationPercentage }}"
33+
{{- end }}
34+
{{- if .Values.webserver.autoscaling.customTriggers }}
35+
{{- toYaml .Values.webserver.autoscaling.customTriggers | nindent 4 }}
36+
{{- end }}
37+
{{- end }}

0 commit comments

Comments
 (0)