Skip to content
This repository was archived by the owner on Feb 22, 2022. It is now read-only.

Commit 496c968

Browse files
pierreozouxVic Iglesias
authored and
Vic Iglesias
committed
Add rocket.chat (#752)
* Add rocket.chat * Add additional maintainers beyond the github org * Fix mongo dependency * Improved Labels, Chart Defaults, Notes * Add labels to pod for proper kubectl selection * Allow chart to be installed with no values set * Improved output notes * add helm chart to suggested install command * Add deploy platform environment variable * Add Instance IP to pod env variable to make scaling easier * Switch app name to use app's name * Update to latest Rocket.Chat version * Remove else from ROOT_URL, its not needed
1 parent d6bccef commit 496c968

12 files changed

+331
-0
lines changed

stable/rocketchat/.helmignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.git

stable/rocketchat/Chart.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: rocketchat
2+
version: 0.0.1
3+
description: Prepare to take off with the ultimate chat platform, experience the next level of team communications
4+
keywords:
5+
- chat
6+
- communication
7+
- http
8+
- web
9+
- application
10+
- nodejs
11+
- javascript
12+
- meteor
13+
home: https://rocket.chat/
14+
icon: https://cdn-www.rocket.chat/images/logo/logo.svg
15+
sources:
16+
- https://github.com/RocketChat/Docker.Official.Image/
17+
maintainers:
18+
- name: RocketChat
19+
20+
- name: geekgonecrazy
21+
- name: pierreozoux
22+
engine: gotpl

stable/rocketchat/requirements.lock

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
dependencies:
2+
- alias: ""
3+
condition: ""
4+
enabled: false
5+
import-values: null
6+
name: mongodb
7+
repository: https://kubernetes-charts.storage.googleapis.com/
8+
tags: null
9+
version: 0.4.7
10+
digest: sha256:e76c2327ca138151bcc776ae4b46197069026fb14f1c2386e446f91f5488593b
11+
generated: 2017-06-29T11:26:54.116252379-05:00

stable/rocketchat/requirements.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
dependencies:
2+
- name: mongodb
3+
version: 0.4.7
4+
repository: https://kubernetes-charts.storage.googleapis.com/

stable/rocketchat/templates/NOTES.txt

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Rocket.Chat can be accessed via port 80 on the following DNS name from within your cluster:
2+
3+
- http://{{ template "fullname" . }}.{{ .Release.Namespace }}
4+
5+
You can easily connect to the remote instance from your browser. Forward the webserver port to localhost:8888
6+
7+
- kubectl port-forward --namespace {{ .Release.Namespace }} $(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "name" . }},release={{ .Release.Name }}" -o jsonpath='{ .items[0].metadata.name }') 8888:3000
8+
9+
You can also connect to the container running Rocket.Chat. To open a shell session in the pod run the following:
10+
11+
- kubectl exec -i -t --namespace {{ .Release.Namespace }} $(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "name" . }},release={{ .Release.Name }}" -o jsonpath='{.items[0].metadata.name}') /bin/sh
12+
13+
To trail the logs for the Rocket.Chat pod run the following:
14+
15+
- kubectl logs -f --namespace {{ .Release.Namespace }} $(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "name" . }},release={{ .Release.Name }}" -o jsonpath='{ .items[0].metadata.name }')
16+
17+
{{- if .Values.ingress.enabled }}
18+
19+
Rocket.Chat will be available at the URL:
20+
21+
- http://{{ .Values.host }}
22+
{{ else }}
23+
24+
To expose Rocket.Chat via an Ingress you need to set host and enable ingress.
25+
26+
helm install --set host=chat.yourdomain.com --set ingress.enabled=true stable/rocketchat
27+
{{- end -}}
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{{/* vim: set filetype=mustache: */}}
2+
{{/*
3+
Expand the name of the chart.
4+
*/}}
5+
{{- define "name" -}}
6+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
7+
{{- end -}}
8+
9+
{{/*
10+
Create a default fully qualified app name.
11+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
12+
*/}}
13+
{{- define "fullname" -}}
14+
{{- $name := default .Chart.Name .Values.nameOverride -}}
15+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
16+
{{- end -}}
17+
18+
{{/*
19+
Create a default fully qualified app name.
20+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
21+
*/}}
22+
{{- define "mongodb.fullname" -}}
23+
{{- printf "%s-%s" .Release.Name "mongodb" | trunc 63 | trimSuffix "-" -}}
24+
{{- end -}}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
apiVersion: extensions/v1beta1
2+
kind: Deployment
3+
metadata:
4+
name: {{ template "fullname" . }}
5+
labels:
6+
app: {{ template "name" . }}
7+
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
8+
release: "{{ .Release.Name }}"
9+
heritage: "{{ .Release.Service }}"
10+
spec:
11+
replicas: 1
12+
template:
13+
metadata:
14+
labels:
15+
app: {{ template "name" . }}
16+
release: "{{ .Release.Name }}"
17+
spec:
18+
containers:
19+
- name: {{ template "fullname" . }}
20+
image: "{{ .Values.image }}"
21+
imagePullPolicy: {{ default "" .Values.imagePullPolicy | quote }}
22+
env:
23+
- name: DEPLOY_PLATFORM
24+
value: helm-chart
25+
- name: INSTANCE_IP
26+
valueFrom:
27+
fieldRef:
28+
fieldPath: status.podIP
29+
- name: MONGO_URL
30+
{{ if .Values.mongodb.mongodbUsername }}
31+
valueFrom:
32+
secretKeyRef:
33+
name: {{ template "fullname" . }}
34+
key: mongo-uri
35+
{{ else }}
36+
value: mongodb://{{ template "mongodb.fullname" . }}:27017/rocketchat
37+
{{ end }}
38+
{{ if .Values.host }}
39+
- name: ROOT_URL
40+
value: https://{{ .Values.host }}
41+
{{ end }}
42+
- name: MAIL_URL
43+
valueFrom:
44+
secretKeyRef:
45+
name: {{ template "fullname" . }}
46+
key: mail-url
47+
{{- range $key, $value := .Values.config }}
48+
- name: {{ $key }}
49+
value: {{ $value | quote }}
50+
{{- end }}
51+
ports:
52+
- name: http
53+
containerPort: 3000
54+
livenessProbe:
55+
httpGet:
56+
path: /
57+
port: http
58+
initialDelaySeconds: 20
59+
timeoutSeconds: 5
60+
resources:
61+
{{ toYaml .Values.resources | indent 10 }}
62+
volumeMounts:
63+
- name: rocket-data
64+
mountPath: /app/uploads
65+
volumes:
66+
- name: rocket-data
67+
{{- if .Values.persistence.enabled }}
68+
persistentVolumeClaim:
69+
claimName: {{ template "fullname" . }}
70+
{{- else }}
71+
emptyDir: {}
72+
{{- end }}
73+
+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{{- if .Values.ingress.enabled -}}
2+
apiVersion: extensions/v1beta1
3+
kind: Ingress
4+
metadata:
5+
name: {{ template "fullname" . }}
6+
labels:
7+
app: {{ template "name" . }}
8+
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
9+
release: "{{ .Release.Name }}"
10+
heritage: "{{ .Release.Service }}"
11+
annotations:
12+
{{ toYaml .Values.ingress.annotations | indent 4 }}
13+
{{- if .Values.ingress.tls }}
14+
kubernetes.io/tls-acme: "true"
15+
{{- end }}
16+
spec:
17+
{{- if .Values.ingress.tls }}
18+
tls:
19+
- hosts:
20+
- {{ .Values.host }}
21+
secretName: {{ template "fullname" . }}-tls
22+
{{- end }}
23+
rules:
24+
- host: {{ .Values.host }}
25+
http:
26+
paths:
27+
- path: /
28+
backend:
29+
serviceName: {{ template "fullname" . }}
30+
servicePort: 3000
31+
{{- end -}}

stable/rocketchat/templates/pvc.yaml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{{- if .Values.persistence.enabled -}}
2+
kind: PersistentVolumeClaim
3+
apiVersion: v1
4+
metadata:
5+
name: {{ template "fullname" . }}
6+
labels:
7+
app: {{ template "name" . }}
8+
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
9+
release: "{{ .Release.Name }}"
10+
heritage: "{{ .Release.Service }}"
11+
annotations:
12+
{{- if .Values.persistence.storageClass }}
13+
volume.beta.kubernetes.io/storage-class: {{ .Values.persistence.storageClass | quote }}
14+
{{- end }}
15+
spec:
16+
accessModes:
17+
- {{ .Values.persistence.accessMode | quote }}
18+
resources:
19+
requests:
20+
storage: {{ .Values.persistence.size | quote }}
21+
{{- end -}}
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: v1
2+
kind: Secret
3+
metadata:
4+
name: {{ template "fullname" . }}
5+
labels:
6+
app: {{ template "name" . }}
7+
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
8+
release: "{{ .Release.Name }}"
9+
heritage: "{{ .Release.Service }}"
10+
type: Opaque
11+
data:
12+
mail-url: {{ printf "smtp://%s:%s@%s:%s" .Values.config.SMTP_Username .Values.config.SMTP_Password .Values.config.SMTP_Host .Values.config.SMTP_Port | b64enc | quote }}
13+
{{ if .Values.mongodb.mongodbUsername }}
14+
mongo-uri: {{ printf "mongodb://%s:%s@%s-mongodb:27017/%s" .Values.mongodb.mongodbUsername .Values.mongodb.mongodbPassword .Release.Name .Values.mongodb.mongodbDatabase | b64enc | quote }}
15+
{{ end }}

stable/rocketchat/templates/svc.yaml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: {{ template "fullname" . }}
5+
labels:
6+
app: {{ template "name" . }}
7+
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
8+
release: "{{ .Release.Name }}"
9+
heritage: "{{ .Release.Service }}"
10+
spec:
11+
ports:
12+
- name: http
13+
port: 3000
14+
targetPort: http
15+
selector:
16+
app: {{ template "name" . }}
17+
release: "{{ .Release.Name }}"

stable/rocketchat/values.yaml

+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
## Rocket Chat image version
2+
## ref: https://hub.docker.com/r/library/rocket.chat/tags/
3+
##
4+
image: rocket.chat:0.56
5+
6+
## Specify a imagePullPolicy
7+
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
8+
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
9+
##
10+
# imagePullPolicy:
11+
12+
## Host for the application
13+
##
14+
# host:
15+
16+
# Main RocketChat configuration:
17+
config:
18+
SMTP_Host:
19+
SMTP_Port:
20+
SMTP_Username:
21+
SMTP_Password:
22+
From_Email:
23+
Jitsi_Enabled: false
24+
Jitsi_Domain: meet.jit.si
25+
Jitsi_URL_Room_Prefix: RocketChat
26+
Jitsi_Open_New_Window: false
27+
Jitsi_Enable_Channels: false
28+
Jitsi_Chrome_Extension:
29+
WebRTC_Enable_Channel: false
30+
WebRTC_Enable_Private: false
31+
WebRTC_Enable_Direct: false
32+
33+
##
34+
## MongoDB chart configuration
35+
##
36+
mongodb:
37+
## MongoDB admin password
38+
### ref: https://github.com/bitnami/bitnami-docker-mongodb/blob/master/README.md#setting-the-root-password-on-first-run
39+
###
40+
## mongodbRootPassword:
41+
#
42+
## MongoDB custom user and database
43+
## ref: https://github.com/bitnami/bitnami-docker-mongodb/blob/master/README.md#creating-a-user-and-database-on-first-run
44+
##
45+
# mongodbUsername:
46+
# mongodbPassword:
47+
# mongodbDatabase:
48+
## Enable persistence using Persistent Volume Claims
49+
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
50+
##
51+
persistence:
52+
enabled: true
53+
## If defined, volume.beta.kubernetes.io/storage-class: <storageClass>
54+
##
55+
# storageClass:
56+
accessMode: ReadWriteOnce
57+
size: 8Gi
58+
59+
## Enable persistence using Persistent Volume Claims
60+
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
61+
##
62+
persistence:
63+
enabled: true
64+
## If defined, volume.beta.kubernetes.io/storage-class: <storageClass>
65+
##
66+
# storageClass:
67+
accessMode: ReadWriteOnce
68+
size: 8Gi
69+
70+
## Configure resource requests and limits
71+
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
72+
##
73+
# resources:
74+
# requests:
75+
# memory: 512Mi
76+
# cpu: 300m
77+
78+
## Configure the ingress object to hook into existing infastructure
79+
### ref : http://kubernetes.io/docs/user-guide/ingress/
80+
###
81+
ingress:
82+
enabled: false
83+
tls: false
84+
annotations:
85+
kubernetes.io/ingress.class: "nginx"

0 commit comments

Comments
 (0)