|
| 1 | +# Zulip |
| 2 | + |
| 3 | +   |
| 4 | + |
| 5 | +[Zulip](https://zulip.com/) is an open source threaded team chat that helps teams stay productive and focused. |
| 6 | + |
| 7 | +Helm chart based on https://github.com/zulip/docker-zulip |
| 8 | + |
| 9 | +## Installation |
| 10 | + |
| 11 | +Copy `values-local.yaml.example`, modify it as instructed in the comments, then |
| 12 | +install with the following commands: |
| 13 | + |
| 14 | +``` |
| 15 | +helm dependency update # Get helm dependency charts |
| 16 | +helm install -f ./values-local.yaml zulip . # Install Zulip |
| 17 | +``` |
| 18 | + |
| 19 | +This will show a message on how to reach your Zulip installation and how to |
| 20 | +create your first realm. Wait for all your pods to be ready before you continue. |
| 21 | +You can run `kubectl get pods` to their current state. Once all pods are ready, |
| 22 | +you can run the commands to create a Realm, and you can reach Zulip following |
| 23 | +the instructions as well. |
| 24 | + |
| 25 | +### Installing on Minikube |
| 26 | + |
| 27 | +You need to do a few things to make |
| 28 | +[minikube](https://minikube.sigs.k8s.io/docs/) serve Zulip with a TLS |
| 29 | +certificate. Without it, Zulip will not work. |
| 30 | + |
| 31 | +If you haven't already, you need to set up `cert-manager` inside your minikube. |
| 32 | + |
| 33 | +First, enable the "ingress" minikube addon ([more info available |
| 34 | +here](https://kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/#enable-the-ingress-controller)) |
| 35 | + |
| 36 | +``` |
| 37 | +minikube addons enable ingress |
| 38 | +``` |
| 39 | + |
| 40 | +Second, [install cert-manager into your minikube |
| 41 | +cluster](https://cert-manager.io/docs/installation/#default-static-install): |
| 42 | + |
| 43 | +``` |
| 44 | +kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.8.0/cert-manager.yaml |
| 45 | +``` |
| 46 | + |
| 47 | +Now you'll need to add an issuer that issues self-signed certificates. Copy this |
| 48 | +into a file, `self-signed-issuer.yaml` |
| 49 | + |
| 50 | +``` |
| 51 | +apiVersion: cert-manager.io/v1 |
| 52 | +kind: ClusterIssuer |
| 53 | +metadata: |
| 54 | + name: selfsigned |
| 55 | + namespace: cert-manager |
| 56 | +spec: |
| 57 | + selfSigned: {} |
| 58 | +``` |
| 59 | + |
| 60 | +Now apply the issuer: `kubectl apply -f self-signed-issuer.yaml` |
| 61 | + |
| 62 | +We'll host Zulip on `zulip.local`. Add that to your `/etc/hosts` file and |
| 63 | +point it to the IP address you get with the command `minikube ip`. |
| 64 | + |
| 65 | +Now you're ready to follow [the installation instructions above](#installation). |
| 66 | + |
| 67 | +## Values |
| 68 | + |
| 69 | +| Key | Type | Default | Description | |
| 70 | +|-----|------|---------|-------------| |
| 71 | +| affinity | object | `{}` | Affinity for pod assignment. Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity | |
| 72 | +| fullnameOverride | string | `""` | Fully override common.names.fullname template. | |
| 73 | +| image.pullPolicy | string | `"IfNotPresent"` | Pull policy for Zulip docker image. Ref: https://kubernetes.io/docs/user-guide/images/#pre-pulling-images | |
| 74 | +| image.repository | string | `"zulip/docker-zulip"` | Defaults to hub.docker.com/zulip/docker-zulip, but can be overwritten with a full HTTPS address. | |
| 75 | +| image.tag | string | `"5.2-0"` | Zulip image tag (immutable tags are recommended) | |
| 76 | +| imagePullSecrets | list | `[]` | Global Docker registry secret names as an array. | |
| 77 | +| ingress.annotations | object | `{}` | Can be used to add custom Ingress annotations. | |
| 78 | +| ingress.enabled | bool | `false` | Enable this to use an Ingress to reach the Zulip service. | |
| 79 | +| ingress.hosts[0] | object | `{"host":"zulip.example.com","paths":[{"path":"/"}]}` | Host for the Ingress. Should be the same as `zulip.environment.SETTING_EXTERNAL_HOST`. | |
| 80 | +| ingress.hosts[0].paths | list | `[{"path":"/"}]` | Serves Zulip root of the chosen host domain. | |
| 81 | +| ingress.tls | list | `[]` | Set a specific secret to read the TLS certificate from. If you use cert-manager, it will save the TLS secret here. If you do not, you need to manually create a secret with your TLS certificate. | |
| 82 | +| livenessProbe | object | `{"enabled":true,"failureThreshold":3,"initialDelaySeconds":10,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":5}` | Liveness probe values. Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes | |
| 83 | +| memcached | object | `{"memcachedUsername":"zulip@localhost"}` | Memcached settings, see [Requirements](#Requirements). | |
| 84 | +| nameOverride | string | `""` | Partially override common.names.fullname template (will maintain the release name). | |
| 85 | +| nodeSelector | object | `{}` | Optionally add a nodeSelector to the Zulip pod, so it runs on a specific node. Ref: https://kubernetes.io/docs/user-guide/node-selection/ | |
| 86 | +| podAnnotations | object | `{}` | Custom annotations to add to the Zulip Pod. | |
| 87 | +| podLabels | object | `{}` | Custom labels to add to the Zulip Pod. | |
| 88 | +| podSecurityContext | object | `{}` | Can be used to override the default PodSecurityContext (fsGroup, runAsUser and runAsGroup) of the Zulip _Pod_. | |
| 89 | +| postSetup.scripts | object | `{}` | The Docker entrypoint script runs commands from `/data/post-setup.d` after the Zulip application's Setup phase has completed. Scripts can be added here as `script_filename: <script contents>` and they will be mounted in `/data/post-setup.d/script_filename`. | |
| 90 | +| postgresql | object | `{"auth":{"database":"zulip","username":"zulip"},"image":{"repository":"zulip/zulip-postgresql","tag":14},"primary":{"containerSecurityContext":{"runAsUser":0}}}` | PostgreSQL settings, see [Requirements](#Requirements). | |
| 91 | +| rabbitmq | object | `{"auth":{"username":"zulip"},"persistence":{"enabled":false}}` | Rabbitmq settings, see [Requirements](#Requirements). | |
| 92 | +| redis | object | `{"architecture":"standalone","master":{"persistence":{"enabled":false}}}` | Redis settings, see [Requirements](#Requirements). | |
| 93 | +| resources | object | `{}` | | |
| 94 | +| securityContext | object | `{}` | Can be used to override the default SecurityContext of the Zulip _container_. | |
| 95 | +| service | object | `{"port":80,"type":"ClusterIP"}` | Service type and port for the Kubernetes service that connects to Zulip. Default: ClusterIP, needs an Ingress to be used. | |
| 96 | +| serviceAccount.annotations | object | `{}` | Annotations to add to the service account. | |
| 97 | +| serviceAccount.create | bool | `true` | Specifies whether a service account should be created. | |
| 98 | +| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template | |
| 99 | +| startupProbe | object | `{"enabled":true,"failureThreshold":30,"initialDelaySeconds":10,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":5}` | Startup probe values. Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes | |
| 100 | +| statefulSetAnnotations | object | `{}` | Custom annotations to add to the Zulip StatefulSet. | |
| 101 | +| statefulSetLabels | object | `{}` | Custom labels to add to the Zulip StatefulSet. | |
| 102 | +| tolerations | list | `[]` | Tolerations for pod assignment. Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ | |
| 103 | +| zulip.environment.DISABLE_HTTPS | bool | `true` | Disables HTTPS if set to "true". HTTPS and certificates are managed by the Kubernetes cluster, so by default it's disabled inside the container | |
| 104 | +| zulip.environment.SECRETS_email_password | string | `"123456789"` | SMTP email password. | |
| 105 | +| zulip.environment.SETTING_EMAIL_HOST | string | `""` | | |
| 106 | +| zulip.environment.SETTING_EMAIL_HOST_USER | string | `"[email protected]"` | | |
| 107 | +| zulip.environment.SETTING_EMAIL_PORT | string | `"587"` | | |
| 108 | +| zulip.environment.SETTING_EMAIL_USE_SSL | string | `"False"` | | |
| 109 | +| zulip.environment.SETTING_EMAIL_USE_TLS | string | `"True"` | | |
| 110 | +| zulip.environment.SETTING_EXTERNAL_HOST | string | `"zulip.example.com"` | Domain Zulip is hosted on. | |
| 111 | +| zulip.environment.SETTING_ZULIP_ADMINISTRATOR | string | `"[email protected]"` | | |
| 112 | +| zulip.environment.SSL_CERTIFICATE_GENERATION | string | `"self-signed"` | Set SSL certificate generation to self-signed because Kubernetes manages the client-facing SSL certs. | |
| 113 | +| zulip.environment.ZULIP_AUTH_BACKENDS | string | `"EmailAuthBackend"` | | |
| 114 | +| zulip.persistence | object | `{"accessMode":"ReadWriteOnce","enabled":true,"size":"10Gi"}` | If `persistence.existingClaim` is not set, a PVC is generated with these specifications. | |
| 115 | + |
| 116 | +## About this helm chart |
| 117 | + |
| 118 | +This helm chart sets up a StatefulSet that runs a Zulip pod, that in turn runs |
| 119 | +the [docker-zulip](https://hub.docker.com/r/zulip/docker-zulip/) Dockerized |
| 120 | +Zulip version. Configuration of Zulip happens through environment variables that |
| 121 | +are defined in the `values.yaml` under `zulip.environment`. These environment |
| 122 | +variables are forwarded to the Docker container, you can read more about |
| 123 | +configuring Zulip through environment variables |
| 124 | +[here](https://github.com/zulip/docker-zulip/#configuration). |
| 125 | + |
| 126 | +### Dependencies |
| 127 | + |
| 128 | +The chart uses Memcached, RabbitMQ and Redis helm charts defined in |
| 129 | +the Bitnami Helm repository. Most of these are configured following their |
| 130 | +default settings, but you can check |
| 131 | +https://github.com/bitnami/charts/tree/master/bitnami/ for more configuration |
| 132 | +options of the subcharts. |
| 133 | + |
| 134 | +For PostgreSQL the chart also uses the Bitnami chart to install it on the |
| 135 | +Kubernetes cluster. However, in this case we use Zulip's |
| 136 | +[zulip-postgresql](https://hub.docker.com/r/zulip/zulip-postgresql) docker |
| 137 | +image, because it contains the Postgresql plugins that are needed to run Zulip. |
| 138 | + |
| 139 | +## Requirements |
| 140 | + |
| 141 | +| Repository | Name | Version | |
| 142 | +|------------|------|---------| |
| 143 | +| https://charts.bitnami.com/bitnami | memcached | 6.0.16 | |
| 144 | +| https://charts.bitnami.com/bitnami | postgresql | 11.1.22 | |
| 145 | +| https://charts.bitnami.com/bitnami | rabbitmq | 8.32.0 | |
| 146 | +| https://charts.bitnami.com/bitnami | redis | 16.8.7 | |
0 commit comments