Skip to content

Commit

Permalink
feat: allow overriding resources and replicas for all core containers (
Browse files Browse the repository at this point in the history
  • Loading branch information
schoren authored Aug 27, 2024
1 parent b7d7924 commit c6ebae0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
4 changes: 2 additions & 2 deletions charts/tracetest-core/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
{{- include "tracetest-core.labels" $ | nindent 4 }}
tracetest/component: {{ .name }}
spec:
replicas: {{ .replicaCount }}
replicas: {{ .replicaCount | default $.Values.deploymentReplicas | default 1 }}
selector:
matchLabels:
{{- include "tracetest-core.selectorLabels" $ | nindent 6 }}
Expand Down Expand Up @@ -115,7 +115,7 @@ spec:
path: /
port: http
resources:
{{- toYaml .resources | nindent 12 }}
{{- toYaml (default $.Values.deploymentResources .resources) | nindent 12 }}
volumeMounts:
- name: config
mountPath: /app/config
Expand Down
16 changes: 15 additions & 1 deletion charts/tracetest-core/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ global:
licenseKey: ""
imagePullSecret: ""
tracetestImageRegistry: ""
replicasPerService: 1

tracetestCore:
service:
Expand Down Expand Up @@ -35,33 +34,48 @@ server:
image:
repository: kubeshop/tracetest-core

# this value applies to all deployments, unless a deployment overrides it
deploymentReplicas: 1
deploymentResources: {}
deployments:
- name: api
# uncomment if you want this service to override the global deploymentReplicas
# replicaCount: 1
env:
TRACETEST_SERVER_API_ENABLED: true
TRACETEST_SERVER_WORKFLOW_ENABLED: false

- name: worker-trigger
# uncomment if you want this service to override the global deploymentReplicas
# replicaCount: 1
env:
TRACETEST_SERVER_API_ENABLED: false
TRACETEST_SERVER_WORKFLOW_ENABLED: true
TRACETEST_SERVER_WORKFLOW_STEPS: trigger_resolver trigger_result
- name: worker-poller
# uncomment if you want this service to override the global deploymentReplicas
# replicaCount: 1
env:
TRACETEST_SERVER_API_ENABLED: false
TRACETEST_SERVER_WORKFLOW_ENABLED: true
TRACETEST_SERVER_WORKFLOW_STEPS: poll_start poll_evaluate
- name: worker-results
# uncomment if you want this service to override the global deploymentReplicas
# replicaCount: 1
env:
TRACETEST_SERVER_API_ENABLED: false
TRACETEST_SERVER_WORKFLOW_ENABLED: true
TRACETEST_SERVER_WORKFLOW_STEPS: linter_runner assertion_runner
- name: worker-monitors
# uncomment if you want this service to override the global deploymentReplicas
# replicaCount: 1
env:
TRACETEST_SERVER_API_ENABLED: false
TRACETEST_SERVER_WORKFLOW_ENABLED: true
TRACETEST_SERVER_WORKFLOW_STEPS: monitor_runner monitor_alerts
- name: worker-suites
# uncomment if you want this service to override the global deploymentReplicas
# replicaCount: 1
env:
TRACETEST_SERVER_API_ENABLED: false
TRACETEST_SERVER_WORKFLOW_ENABLED: true
Expand Down

0 comments on commit c6ebae0

Please sign in to comment.