Skip to content

Commit dad3f57

Browse files
Merge pull request #26 from Intreecom/feat/instrumentation-on-off-switch-for-taskiq
Separate switches to on/off instrumentation for workers and schedulers
2 parents d147e64 + b25d509 commit dad3f57

3 files changed

Lines changed: 8 additions & 5 deletions

File tree

charts/py-app/templates/taskiq-scheduler.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ spec:
1313
deployment_type: tkq-scheduler
1414
template:
1515
metadata:
16-
{{- $instrumentationAnnotations := ternary (default dict .Values.instrumentation.annotations) dict .Values.taskiq.instrumentation.enabled }}
16+
{{- $instrumentationAnnotations := ternary (default dict .Values.instrumentation.annotations) dict .Values.taskiq.instrumentation.scheduler.enabled }}
1717
{{- $podAnnotations := merge (deepCopy (default dict .Values.podAnnotations)) $instrumentationAnnotations }}
1818
{{- with $podAnnotations }}
1919
annotations:
2020
{{- toYaml . | nindent 8 }}
2121
{{- end }}
2222
{{- $baseSelectorLabels := (include "py-app.selectorLabels" . | fromYaml) }}
2323
{{- $_ := set $baseSelectorLabels "deployment_type" "tkq-scheduler" }}
24-
{{- $instrumentationLabels := ternary (default dict .Values.instrumentation.labels) dict .Values.taskiq.instrumentation.enabled }}
24+
{{- $instrumentationLabels := ternary (default dict .Values.instrumentation.labels) dict .Values.taskiq.instrumentation.scheduler.enabled }}
2525
{{- $mergedLabels := merge $baseSelectorLabels $instrumentationLabels }}
2626
labels:
2727
{{- toYaml $mergedLabels | nindent 8 }}

charts/py-app/templates/taskiq-worker.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ spec:
1919
deployment_type: tkq-worker
2020
template:
2121
metadata:
22-
{{- $instrumentationAnnotations := ternary (default dict .Values.instrumentation.annotations) dict .Values.taskiq.instrumentation.enabled }}
22+
{{- $instrumentationAnnotations := ternary (default dict .Values.instrumentation.annotations) dict .Values.taskiq.instrumentation.worker.enabled }}
2323
{{- $podAnnotations := merge (deepCopy (default dict .Values.podAnnotations)) $instrumentationAnnotations }}
2424
{{- with $podAnnotations }}
2525
annotations:
2626
{{- toYaml . | nindent 8 }}
2727
{{- end }}
2828
{{- $baseSelectorLabels := (include "py-app.selectorLabels" . | fromYaml) }}
2929
{{- $_ := set $baseSelectorLabels "deployment_type" "tkq-worker" }}
30-
{{- $instrumentationLabels := ternary (default dict .Values.instrumentation.labels) dict .Values.taskiq.instrumentation.enabled }}
30+
{{- $instrumentationLabels := ternary (default dict .Values.instrumentation.labels) dict .Values.taskiq.instrumentation.worker.enabled }}
3131
{{- $mergedLabels := merge $baseSelectorLabels $instrumentationLabels }}
3232
labels:
3333
{{- toYaml $mergedLabels | nindent 8 }}

charts/py-app/values.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ taskiq:
3838
resources: {}
3939
workers: 1
4040
instrumentation:
41-
enabled: false
41+
worker:
42+
enabled: false
43+
scheduler:
44+
enabled: false
4245
autoscaling:
4346
enabled: false
4447
minReplicas: 1

0 commit comments

Comments
 (0)