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

Add rocket.chat #752

Merged
merged 10 commits into from
Jul 5, 2017
1 change: 1 addition & 0 deletions stable/rocketchat/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the standard .gitignore. Let's wait on the outcome of https://github.com/kubernetes/charts/pull/485/files#r106305261

Looks like we prefer the "canonical" helmignore from now on but many charts still have just this. It probably makes more sense to sync them up in a separate PR across all charts.

20 changes: 20 additions & 0 deletions stable/rocketchat/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: rocketchat
version: 0.0.1
description: Prepare to take off with the ultimate chat platform, experience the next level of team communications
keywords:
- chat
- communication
- http
- web
- application
- nodejs
- javascript
- meteor
home: https://rocket.chat/
icon: https://cdn-www.rocket.chat/images/logo/logo.svg
sources:
- https://github.com/RocketChat/Docker.Official.Image/
maintainers:
- name: RocketChat
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Name should be a Github user.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@unguiculus this is the org name. Do we need to add individual maintainers listed here?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pierreozoux I can provide a list from Rocket.Chat that would handle any issues that would arise as well as of course your self.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@unguiculus I notice many of the bitnami created ones refer to their org name on github and add an email address. But i've gone ahead and added two additional maintainers by github username.

email: buildmaster@rocket.chat
engine: gotpl
9 changes: 9 additions & 0 deletions stable/rocketchat/requirements.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
dependencies:
- condition: ""
enabled: false
name: mongodb
repository: https://kubernetes-charts.storage.googleapis.com/
tags: null
version: 0.4.7
digest: sha256:f9a353fccf8fa5264b98b34f2a46034b0f8ed769352bb275c4f5a8e70529e1fc
generated: 2017-03-31T09:37:37.204280722+01:00
4 changes: 4 additions & 0 deletions stable/rocketchat/requirements.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dependencies:
- name: mongodb
version: 0.4.7
repository: https://kubernetes-charts.storage.googleapis.com/
22 changes: 22 additions & 0 deletions stable/rocketchat/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Rocket.Chat can be accessed via port 80 on the following DNS name from within your cluster:

- http://{{ template "fullname" . }}.{{ .Release.Namespace }}

You can easily connect to the remote instance from your browser. Forward the webserver port to localhost:8888

- kubectl port-forward --namespace {{ .Release.Namespace }} $(kubectl get pods --namespace {{ .Release.Namespace }} -l app={{ template "fullname" . }} -o jsonpath='{ .items[0].metadata.name }') 8888
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix label selectors:
-l app="{{ template "fullname" . }},release={{ .Release.Name }}"

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, also added these labels to the actual pod level so the command would work in the first place :)


You can also connect to the container running Rocket.Chat. To open a shell session in the pod run the following:

- kubectl exec -i -t --namespace {{ .Release.Namespace }} $(kubectl get pods --namespace {{ .Release.Namespace }} -l app={{ template "fullname" . }} -o jsonpath='{.items[0].metadata.name}') /bin/sh

To trail the logs for the Rocket.Chat pod run the following:

- kubectl logs -f --namespace {{ .Release.Namespace }} $(kubectl get pods --namespace {{ .Release.Namespace }} -l app={{ template "fullname" . }} -o jsonpath='{ .items[0].metadata.name }')

{{- if .Values.ingress.enabled }}

Rocket.Chat will be available at the URL:

- http://{{ .Values.host }}
{{- end -}}
24 changes: 24 additions & 0 deletions stable/rocketchat/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "fullname" -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "mongodb.fullname" -}}
{{- printf "%s-%s" .Release.Name "mongodb" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
65 changes: 65 additions & 0 deletions stable/rocketchat/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{{- if default "" .Values.host }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is empty by default. When I install the chart with defaults only MongoDB comes up. It should be possible to install a chart with default values.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: {{ template "fullname" . }}
labels:
app: {{ template "name" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
replicas: 1
template:
metadata:
labels:
app: {{ template "name" . }}
spec:
containers:
- name: {{ template "fullname" . }}
image: "{{ .Values.image }}"
imagePullPolicy: {{ default "" .Values.imagePullPolicy | quote }}
env:
- name: MONGO_URL
{{ if .Values.mongodb.mongodbUsername }}
valueFrom:
secretKeyRef:
name: {{ template "fullname" . }}
key: mongo-uri
{{ else }}
value: mongodb://{{ template "mongodb.fullname" . }}:27017/rocketchat
{{ end }}
- name: ROOT_URL
value: https://{{ .Values.host }}
- name: MAIL_URL
valueFrom:
secretKeyRef:
name: {{ template "fullname" . }}
key: mail-url
{{- range $key, $value := .Values.config }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
ports:
- name: http
containerPort: 3000
livenessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 20
timeoutSeconds: 5
resources:
{{ toYaml .Values.resources | indent 10 }}
volumeMounts:
- name: rocket-data
mountPath: /app/uploads
volumes:
- name: rocket-data
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ template "fullname" . }}
{{- else }}
emptyDir: {}
{{- end }}
{{- end -}}
31 changes: 31 additions & 0 deletions stable/rocketchat/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{{- if .Values.ingress.enabled -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ template "fullname" . }}
labels:
app: {{ template "name" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
annotations:
{{ toYaml .Values.ingress.annotations | indent 4 }}
{{- if .Values.ingress.tls }}
kubernetes.io/tls-acme: "true"
{{- end }}
spec:
{{- if .Values.ingress.tls }}
tls:
- hosts:
- {{ .Values.host }}
secretName: {{ template "fullname" . }}-tls
{{- end }}
rules:
- host: {{ .Values.host }}
http:
paths:
- path: /
backend:
serviceName: {{ template "fullname" . }}
servicePort: 3000
{{- end -}}
21 changes: 21 additions & 0 deletions stable/rocketchat/templates/pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{{- if .Values.persistence.enabled -}}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ template "fullname" . }}
labels:
app: {{ template "name" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
annotations:
{{- if .Values.persistence.storageClass }}
volume.beta.kubernetes.io/storage-class: {{ .Values.persistence.storageClass | quote }}
{{- end }}
spec:
accessModes:
- {{ .Values.persistence.accessMode | quote }}
resources:
requests:
storage: {{ .Values.persistence.size | quote }}
{{- end -}}
15 changes: 15 additions & 0 deletions stable/rocketchat/templates/secrets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ template "fullname" . }}
labels:
app: {{ template "name" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
type: Opaque
data:
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 }}
{{ if .Values.mongodb.mongodbUsername }}
mongo-uri: {{ printf "mongodb://%s:%s@%s-mongodb:27017/%s" .Values.mongodb.mongodbUsername .Values.mongodb.mongodbPassword .Release.Name .Values.mongodb.mongodbDatabase | b64enc | quote }}
{{ end }}
17 changes: 17 additions & 0 deletions stable/rocketchat/templates/svc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "fullname" . }}
labels:
app: {{ template "name" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
ports:
- name: http
port: 3000
targetPort: http
selector:
app: {{ template "name" . }}
release: "{{ .Release.Name }}"
85 changes: 85 additions & 0 deletions stable/rocketchat/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
## Rocket Chat image version
## ref: https://hub.docker.com/r/library/rocket.chat/tags/
##
image: rocket.chat:0.54

## Specify a imagePullPolicy
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
##
# imagePullPolicy:

## Host for the application
##
# host:

# Main RocketChat configuration:
config:
SMTP_Host:
SMTP_Port:
SMTP_Username:
SMTP_Password:
From_Email:
Jitsi_Enabled: false
Jitsi_Domain: meet.jit.si
Jitsi_URL_Room_Prefix: RocketChat
Jitsi_Open_New_Window: false
Jitsi_Enable_Channels: false
Jitsi_Chrome_Extension:
WebRTC_Enable_Channel: false
WebRTC_Enable_Private: false
WebRTC_Enable_Direct: false

##
## MongoDB chart configuration
##
mongodb:
## MongoDB admin password
### ref: https://github.com/bitnami/bitnami-docker-mongodb/blob/master/README.md#setting-the-root-password-on-first-run
###
## mongodbRootPassword:
#
## MongoDB custom user and database
## ref: https://github.com/bitnami/bitnami-docker-mongodb/blob/master/README.md#creating-a-user-and-database-on-first-run
##
# mongodbUsername:
# mongodbPassword:
# mongodbDatabase:
## Enable persistence using Persistent Volume Claims
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
##
persistence:
enabled: true
## If defined, volume.beta.kubernetes.io/storage-class: <storageClass>
##
# storageClass:
accessMode: ReadWriteOnce
size: 8Gi

## Enable persistence using Persistent Volume Claims
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
##
persistence:
enabled: true
## If defined, volume.beta.kubernetes.io/storage-class: <storageClass>
##
# storageClass:
accessMode: ReadWriteOnce
size: 8Gi

## Configure resource requests and limits
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
##
# resources:
# requests:
# memory: 512Mi
# cpu: 300m

## Configure the ingress object to hook into existing infastructure
### ref : http://kubernetes.io/docs/user-guide/ingress/
###
ingress:
enabled: false
tls: false
annotations:
kubernetes.io/ingress.class: "nginx"