Skip to content
Open
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
22 changes: 22 additions & 0 deletions rocketchat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ The following table lists the configurable parameters of the Rocket.Chat chart a
| `global.affinity` | common affinity for all pods (rocket.chat and all microservices) | {} |
| `tolerations` | tolerations for main rocket.chat pods (the `meteor` service) | [] |
| `microservices.enabled` | Use [microservices](https://docs.rocket.chat/quick-start/installing-and-updating/micro-services-setup-beta) architecture | `false` |
| `microservices.streamHub.enabled` | Enable the Stream Hub microservice. **DEPRECATED**: Disabled by default for versions >= 7.7.3. For versions < 7.7.3, enabled by default unless explicitly disabled. Will be removed completely in version 8.0.0. When enabled, automatically sets `DB_WATCHERS=true` on all services. | `false` (auto-enabled for < 7.7.3) |
| `microservices.presence.replicas` | Number of replicas to run for the presence service | `1` |
| `microservices.ddpStreamer.replicas` | Number of replicas to run for the ddpStreamer service | `1` |
| `microservices.account.replicas` | Number of replicas to run for the account service | `1` |
Expand Down Expand Up @@ -217,6 +218,27 @@ nats:
key: "nats-url"
```

### Stream Hub Microservice Deprecation

> **IMPORTANT**: As of Rocket.Chat version 7.7.3, the Stream Hub microservice is deprecated and disabled by default.

The Stream Hub microservice (`microservices.streamHub`) is being phased out:

- **Versions < 7.7.3**: Stream Hub is automatically enabled when using microservices architecture (unless explicitly disabled)
- **Versions >= 7.7.3**: Stream Hub is disabled by default and should not be used for new deployments
- **Version 8.0.0+**: Stream Hub will be removed completely

If you need to enable Stream Hub for older versions or backward compatibility, set:

```yaml
microservices:
enabled: true
streamHub:
enabled: true
```

**Note**: When Stream Hub is enabled, the `DB_WATCHERS=true` environment variable is automatically set on all Rocket.Chat services to support database change stream watching.

### Database Setup

Rocket.Chat uses a MongoDB instance to presist its data.
Expand Down
21 changes: 21 additions & 0 deletions rocketchat/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -203,3 +203,24 @@ One of the following must be true to set the TRANSPORTER environment variable:
{{- end -}}
{{- end -}} {{/* End if Nats enabled */}}
{{- end -}} {{/* rocketchat.transporter.connectionString */}}

{{/*
Check if streamHub should be enabled.
Logic:
1. If explicitly set (.Values.microservices.streamHub.enabled), use that value
2. For versions < 7.7.3, enable by default
3. For versions >= 7.7.3, disable by default
*/}}
{{- define "rocketchat.streamHub.enabled" -}}
{{- $version := .Values.image.tag | default .Chart.AppVersion -}}
{{- $explicitlySet := hasKey .Values.microservices.streamHub "enabled" -}}
{{- if $explicitlySet -}}
{{- .Values.microservices.streamHub.enabled -}}
{{- else -}}
{{- if semverCompare "<7.7.3" $version -}}
{{- print "true" -}}
{{- else -}}
{{- print "false" -}}
{{- end -}}
{{- end -}}
{{- end -}}
4 changes: 4 additions & 0 deletions rocketchat/templates/chat-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ spec:
# Environment variables for microservices option
{{- include "rocketchat.transporter.connectionString" (dict "Values" $.Values "Release" $.Release) | nindent 8 }}
{{- if .Values.microservices.enabled }}
{{- if eq (include "rocketchat.streamHub.enabled" .) "true" }}
- name: DB_WATCHERS
value: "true"
{{- end }}
- name: MOLECULER_LOG_LEVEL
value: {{ .Values.microservices.logLevel | quote }}
- name: HEARTBEAT_INTERVAL
Expand Down
4 changes: 4 additions & 0 deletions rocketchat/templates/microservices-account-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ spec:
key: mongo-uri
{{- end }}
{{- include "rocketchat.transporter.connectionString" (dict "Values" $.Values "Release" $.Release) | nindent 8 }}
{{- if eq (include "rocketchat.streamHub.enabled" .) "true" }}
- name: DB_WATCHERS
value: "true"
{{- end }}
- name: MOLECULER_LOG_LEVEL
value: {{ .Values.microservices.logLevel | quote }}
- name: HEARTBEAT_INTERVAL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ spec:
key: mongo-uri
{{- end }}
{{- include "rocketchat.transporter.connectionString" (dict "Values" $.Values "Release" $.Release) | nindent 8 }}
{{- if eq (include "rocketchat.streamHub.enabled" .) "true" }}
- name: DB_WATCHERS
value: "true"
{{- end }}
- name: MOLECULER_LOG_LEVEL
value: {{ .Values.microservices.logLevel | quote }}
- name: HEARTBEAT_INTERVAL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ spec:
key: mongo-uri
{{- end }}
{{- include "rocketchat.transporter.connectionString" (dict "Values" $.Values "Release" $.Release) | nindent 8 }}
{{- if eq (include "rocketchat.streamHub.enabled" .) "true" }}
- name: DB_WATCHERS
value: "true"
{{- end }}
- name: MOLECULER_LOG_LEVEL
value: {{ .Values.microservices.logLevel | quote }}
- name: PORT
Expand Down
4 changes: 4 additions & 0 deletions rocketchat/templates/microservices-presence-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ spec:
key: mongo-uri
{{- end }}
{{- include "rocketchat.transporter.connectionString" (dict "Values" $.Values "Release" $.Release) | nindent 8 }}
{{- if eq (include "rocketchat.streamHub.enabled" .) "true" }}
- name: DB_WATCHERS
value: "true"
{{- end }}
- name: MOLECULER_LOG_LEVEL
value: {{ .Values.microservices.logLevel | quote }}
- name: HEARTBEAT_INTERVAL
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.microservices.enabled }}
{{- if and .Values.microservices.enabled (eq (include "rocketchat.streamHub.enabled" .) "true") }}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -72,6 +72,8 @@ spec:
key: mongo-oplog-uri
{{- end }}
{{- include "rocketchat.transporter.connectionString" (dict "Values" $.Values "Release" $.Release) | nindent 8 }}
- name: DB_WATCHERS
value: "true"
- name: MOLECULER_LOG_LEVEL
value: {{ .Values.microservices.logLevel | quote }}
- name: HEARTBEAT_INTERVAL
Expand Down
2 changes: 1 addition & 1 deletion rocketchat/templates/microservices-stream-hub-service.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.microservices.enabled }}
{{- if and .Values.microservices.enabled (eq (include "rocketchat.streamHub.enabled" .) "true") }}
{{- if .Values.prometheusScraping.enabled }}
{{- $service := .Values.service -}}
apiVersion: v1
Expand Down
5 changes: 5 additions & 0 deletions rocketchat/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,11 @@ microservices:
tolerations: []

streamHub:
# IMPORTANT: Stream Hub is disabled by default as of Rocket.Chat 7.7.3
# For versions < 7.7.3, it will be automatically enabled unless explicitly disabled here
# After version 8.0.0, this service will be removed completely
# Note: When enabled, DB_WATCHERS=true is automatically set on all services
enabled: false
image:
repository: rocketchat/stream-hub-service
pullPolicy: IfNotPresent
Expand Down
Loading