Skip to content

Commit

Permalink
Merge pull request #45 from sriniarul/master
Browse files Browse the repository at this point in the history
Scheduler and Webserver with separate resource configuration
  • Loading branch information
wangxiaoyou1993 committed Apr 23, 2024
2 parents 0624325 + e176d24 commit 1261eef
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
6 changes: 5 additions & 1 deletion charts/mageai/templates/scheduler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ spec:
containerPort: {{ .Values.service.port }}
protocol: TCP
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- if .Values.scheduler.resources }}
{{- toYaml .Values.scheduler.resources | nindent 12 }}
{{- else }}
{{- toYaml .Values.resources | nindent 12 }}
{{- end }}
envFrom:
{{- if .Values.config }}
- configMapRef:
Expand Down
6 changes: 5 additions & 1 deletion charts/mageai/templates/webservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ spec:
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- if .Values.webServer.resources }}
{{- toYaml .Values.webServer.resources | nindent 12 }}
{{- else }}
{{- toYaml .Values.resources | nindent 12 }}
{{- end }}
envFrom:
{{- if .Values.config }}
- configMapRef:
Expand Down
22 changes: 22 additions & 0 deletions charts/mageai/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,34 @@ standaloneScheduler: false
scheduler:
replicaCount: 1
name: mageai-scheduler
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi


# Effective if standaloneScheduler is true
webServer:
replicaCount: 1
name: mageai-webserver
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi

# Enable redis if you want more replica
redis:
Expand Down

0 comments on commit 1261eef

Please sign in to comment.