From fa7547486bbba59ce84cf63dee6285c66d8d7c2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20R=C3=BCegg?= Date: Wed, 15 May 2019 10:42:23 +0200 Subject: [PATCH] [stable/rocketchat] Upgrade to RocketChat 1.0.3 (#13758) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update to new version of RocketChat and enable MongoDB replica set since it's required for version 1.x. Signed-off-by: Simon Rüegg --- stable/rocketchat/Chart.yaml | 7 +++---- stable/rocketchat/README.md | 4 +++- stable/rocketchat/templates/deployment.yaml | 7 ++++++- stable/rocketchat/templates/secret.yaml | 4 ++++ stable/rocketchat/values.yaml | 10 ++++++++-- 5 files changed, 24 insertions(+), 8 deletions(-) diff --git a/stable/rocketchat/Chart.yaml b/stable/rocketchat/Chart.yaml index 01c3d7d26b..e138e1923a 100644 --- a/stable/rocketchat/Chart.yaml +++ b/stable/rocketchat/Chart.yaml @@ -1,8 +1,7 @@ name: rocketchat -version: 1.0.0 -appVersion: 0.74.3 -description: Prepare to take off with the ultimate chat platform, experience the next - level of team communications +version: 1.1.0 +appVersion: 1.0.3 +description: Prepare to take off with the ultimate chat platform, experience the next level of team communications keywords: - chat - communication diff --git a/stable/rocketchat/README.md b/stable/rocketchat/README.md index 51e6246952..a818e9874b 100644 --- a/stable/rocketchat/README.md +++ b/stable/rocketchat/README.md @@ -5,7 +5,7 @@ ## TL;DR; ```console -$ helm install stable/rocketchat --set mongodb.mongodbPassword=$(echo -n $(openssl rand -base64 32)) +$ helm install stable/rocketchat --set mongodb.mongodbPassword=$(echo -n $(openssl rand -base64 32)),mongodb.mongodbRootPassword=$(echo -n $(openssl rand -base64 32)) ``` ## Introduction @@ -52,6 +52,7 @@ Parameter | Description | Default `smtp.port` | Port of the SMTP server | `587` `extraEnv` | Extra environment variables for Rocket.Chat. Used with `tpl` function, so this needs to be a string | `""` `externalMongodbUrl` | MongoDB URL if using an externally provisioned MongoDB | `""` +`externalMongodbOplogUrl` | MongoDB OpLog URL if using an externally provisioned MongoDB. Required if `externalMongodbUrl` is set | `""` `mongodb.enabled` | Enable or disable MongoDB dependency. Refer to the [stable/mongodb docs](https://github.com/helm/charts/tree/master/stable/mongodb#configuration) for more information | `true` `persistence.enabled` | Enable persistence using a PVC. This is not necessary if you're using the default (and recommended) [GridFS](https://rocket.chat/docs/administrator-guides/file-upload/) file storage | `false` `persistence.storageClass` | Storage class of the PVC to use | `""` @@ -91,6 +92,7 @@ Rocket.Chat uses a MongoDB instance to presist its data. By default, the [MongoDB](https://github.com/kubernetes/charts/tree/master/stable/mongodb) chart is deployed and configured as database. Please refer to this chart for additional MongoDB configuration options. Make sure to set at least the `mongodb.mongodbRootPassword`, `mongodb.mongodbUsername` and `mongodb.mongodbPassword` values. +> **WARNING**: The root credentials are used to connect to the MongoDB OpLog #### Using an External Database diff --git a/stable/rocketchat/templates/deployment.yaml b/stable/rocketchat/templates/deployment.yaml index 4e4a223c66..87f40b9019 100644 --- a/stable/rocketchat/templates/deployment.yaml +++ b/stable/rocketchat/templates/deployment.yaml @@ -8,7 +8,7 @@ metadata: app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} spec: - replicas: 1 + replicas: {{ .Values.replicaCount }} selector: matchLabels: app.kubernetes.io/name: {{ include "rocketchat.name" . }} @@ -42,6 +42,11 @@ spec: secretKeyRef: name: {{ template "rocketchat.fullname" . }} key: mongo-uri + - name: MONGO_OPLOG_URL + valueFrom: + secretKeyRef: + name: {{ template "rocketchat.fullname" . }} + key: mongo-oplog-uri {{- if .Values.host }} - name: ROOT_URL value: https://{{ .Values.host }} diff --git a/stable/rocketchat/templates/secret.yaml b/stable/rocketchat/templates/secret.yaml index f430b088e3..1f44a13e92 100644 --- a/stable/rocketchat/templates/secret.yaml +++ b/stable/rocketchat/templates/secret.yaml @@ -14,11 +14,15 @@ data: {{- end }} {{- if .Values.externalMongodbUrl }} mongo-uri: {{ .Values.externalMongodbUrl | b64enc | quote }} + mongo-oplog-uri: {{ required "Please specify the external MongoDB OpLog URL" .Values.externalMongodbOplogUrl | b64enc | quote }} {{- else }} {{- $fullname := include "mongodb.fullname" . -}} {{- $username := required "Please specify a MongoDB username" .Values.mongodb.mongodbUsername }} {{- $password := required "Please specify a MongoDB password" .Values.mongodb.mongodbPassword }} + {{- $rootPassword := required "Please specify a MongoDB password" .Values.mongodb.mongodbRootPassword }} + {{- $rsName := .Values.mongodb.replicaSet.name }} {{- $port := .Values.mongodb.service.port }} {{- $dbname := required "Please specify a MongoDB database" .Values.mongodb.mongodbDatabase }} mongo-uri: {{ printf "mongodb://%s:%s@%s-mongodb:%.0f/%s" $username $password $fullname $port $dbname | b64enc | quote }} + mongo-oplog-uri: {{ printf "mongodb://root:%s@%s-mongodb:%.0f/local?replicaSet=%s&authSource=admin" $rootPassword $fullname $port $rsName | b64enc | quote }} {{- end }} diff --git a/stable/rocketchat/values.yaml b/stable/rocketchat/values.yaml index 369072f1b0..43687c8fb1 100644 --- a/stable/rocketchat/values.yaml +++ b/stable/rocketchat/values.yaml @@ -2,8 +2,8 @@ ## ref: https://hub.docker.com/r/rocketchat/rocket.chat/tags ## image: - repository: rocketchat/rocket.chat - tag: 0.74.3 + repository: docker.io/library/rocket.chat + tag: 1.0.3 pullPolicy: IfNotPresent ## Host for the application @@ -28,6 +28,7 @@ extraEnv: # | ## MongoDB URL if using an externally provisioned MongoDB externalMongodbUrl: # mongodb://user:password@localhost:27017/rocketchat +externalMongodbOplogUrl: # mongodb://user:password@localhost:27017/local?replicaSet=rs0&authSource=admin ## ## MongoDB chart configuration @@ -42,6 +43,11 @@ mongodb: mongodbUsername: rocketchat # mongodbPassword: mongodbDatabase: rocketchat + + replicaSet: + enabled: true + # key: + persistence: enabled: true ## mongodb data Persistent Volume Storage Class