Skip to content

Commit

Permalink
Merge pull request #345 from RasaHQ/infra-457
Browse files Browse the repository at this point in the history
Add rabbitmq queue for the event service deployment
  • Loading branch information
miraai authored Aug 2, 2023
2 parents 7e4cf9c + 629ec71 commit ed002df
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
4 changes: 2 additions & 2 deletions charts/rasa-x/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
apiVersion: v2

version: "4.5.20"
version: "4.5.21"

appVersion: "1.2.2"

Expand Down Expand Up @@ -42,4 +42,4 @@ annotations:
# See: https://artifacthub.io/docs/topics/annotations/helm/#supported-annotations
artifacthub.io/changes: |
- kind: fixed
description: Fixed issue with variable typing for customModelServer
description: Fixed adding rabbitmq queue to Event Service deployment
11 changes: 11 additions & 0 deletions charts/rasa-x/templates/_rabbitmq.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,14 @@ Return the rabbitmq queue.
{{- define "rasa-x.rabbitmq.queue" -}}
{{- default "rasa_production_events" .Values.rasa.rabbitQueue | quote -}}
{{- end -}}

{{/*
Return the rabbitmq queue for event service.
*/}}
{{- define "eventService.rabbitmq.queue" -}}
{{- if .Values.eventService.rabbitQueue -}}
{{- .Values.eventService.rabbitQueue | quote -}}
{{- else -}}
{{- default "rasa_production_events" .Values.rasa.rabbitQueue | quote -}}
{{- end -}}
{{- end -}}
2 changes: 1 addition & 1 deletion charts/rasa-x/templates/event-service-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ spec:
value: {{ default 5673 .Values.eventService.port | quote }}
{{- if $.Values.rabbitmq.enabled }}
- name: "RABBITMQ_QUEUE"
value: {{ template "rasa-x.rabbitmq.queue" . }}
value: {{ template "eventService.rabbitmq.queue" . }}
- name: "RABBITMQ_PASSWORD"
valueFrom:
secretKeyRef:
Expand Down
3 changes: 2 additions & 1 deletion charts/rasa-x/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,8 @@ eventService:
replicaCount: 1
# databaseName the event service uses to store data
databaseName: "rasa"

# rabbitQueue name for the eventService if `rasa.rabbitQueue` is not used
rabbitQueue: ""
# tolerations can be used to control the pod to node assignment
# https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
tolerations: []
Expand Down

0 comments on commit ed002df

Please sign in to comment.