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

Allows various container configs with the mcs #2648

Merged
merged 2 commits into from
Dec 15, 2024
Merged
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
2 changes: 1 addition & 1 deletion ops/helm-charts/metrics-calculation-service/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ name: metrics-calculation-service
description: The metrics calculation service

type: application
version: 0.7.0
version: 0.8.0
appVersion: 0.1.0
17 changes: 16 additions & 1 deletion ops/helm-charts/metrics-calculation-service/templates/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ spec:
serviceAccountName: {{ include "mcs.fullname" . }}
containers:
- name: metrics-calculation-service
# TODO: Remove latest tag and use a specific version
image: {{ .Values.mcs.image.repo }}:{{ .Values.mcs.image.tag }}
command: ["uvicorn"]
args:
Expand All @@ -33,6 +32,22 @@ spec:
imagePullPolicy: Always
ports:
- containerPort: 8000
{{- with .Values.mcs.frontend.affinity }}
affinity:
{{ toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.mcs.frontend.nodeSelector }}
nodeSelector:
{{ toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.mcs.frontend.tolerations }}
tolerations:
{{ toYaml . | nindent 12 }}
{{- end }}
{{- with. Values.mcs.frontend.resources }}
resources:
{{ toYaml . | nindent 12 }}
{{- end }}
volumeMounts:
- name: config
mountPath: /config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ spec:
{{ include "mcs.selectorLabels" . | nindent 4 }}
ports:
- protocol: TCP
port: {{ .Values.mcs.service.port }}
port: {{ .Values.mcs.frontend.service.port }}
targetPort: 8000
9 changes: 7 additions & 2 deletions ops/helm-charts/metrics-calculation-service/values.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
global:
fullnameOverride: ""
mcs:
service:
port: 8000
frontend:
service:
port: 8000
affinity: {}
nodeSelector: {}
tolerations: []
resources: {}
logging:
format: "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
root:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ metadata:
spec:
values:
mcs:
frontend:
resources:
requests:
cpu: "3000m"
memory: "8Gi"
tolerations:
- key: pool_type
operator: Equal
value: standard
effect: NoSchedule
nodeSelector:
pool_type: standard
cluster:
name: mcs-worker
namespace: production-mcs
Expand Down
2 changes: 1 addition & 1 deletion warehouse/metrics_tools/factory/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ def generated_rolling_query(
start=start,
end=end,
dialect="duckdb",
batch_size=1,
batch_size=env.ensure_int("SQLMESH_MCS_BATCH_SIZE", 10),
columns=columns,
ref=ref,
locals=sqlmesh_vars,
Expand Down
Loading