├── .github └── workflows │ ├── lint-test.yaml │ └── release.yaml ├── .gitignore ├── .helmignore ├── LICENSE ├── README.md └── charts └── chatwoot ├── Chart.lock ├── Chart.yaml ├── README.md ├── charts ├── postgresql-11.6.7.tgz └── redis-16.12.2.tgz ├── templates ├── NOTES.txt ├── _helpers.tpl ├── env-secret.yaml ├── ingress.yaml ├── migrations-job.yaml ├── serviceaccount.yaml ├── tests │ └── test-connection.yaml ├── web-deployment.yaml ├── web-hpa.yaml ├── web-service.yaml ├── worker-deployment.yaml └── worker-hpa.yaml ├── values.ci.yaml ├── values.v4-upgrade.yaml └── values.yaml /.github/workflows/lint-test.yaml: -------------------------------------------------------------------------------- 1 | name: Lint and Test Charts 2 | 3 | on: 4 | push: 5 | branches: [ main ] 6 | pull_request: 7 | branches: [ main ] 8 | 9 | jobs: 10 | lint-test: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - name: Checkout 14 | uses: actions/checkout@v2 15 | with: 16 | fetch-depth: 0 17 | 18 | - name: Set up Helm 19 | uses: azure/setup-helm@v1 20 | with: 21 | version: v3.4.0 22 | 23 | - name: Add helm dependencies 24 | run: | 25 | helm repo add bitnami "https://charts.bitnami.com/bitnami" 26 | 27 | - uses: actions/setup-python@v2 28 | with: 29 | python-version: 3.13 30 | 31 | - name: Set up chart-testing 32 | uses: helm/chart-testing-action@v2.1.0 33 | 34 | - name: Run chart-testing (list-changed) 35 | id: list-changed 36 | run: | 37 | changed=$(ct list-changed --target-branch main) 38 | if [[ -n "$changed" ]]; then 39 | echo "::set-output name=changed::true" 40 | fi 41 | 42 | - name: Run chart-testing (lint) 43 | run: ct lint --target-branch main 44 | 45 | # - name: Create kind cluster 46 | # uses: helm/kind-action@v1.2.0 47 | # if: steps.list-changed.outputs.changed == 'true' 48 | 49 | # - name: Run chart-testing (install) 50 | # run: ct install --target-branch main --helm-extra-args "--timeout 10m" 51 | -------------------------------------------------------------------------------- /.github/workflows/release.yaml: -------------------------------------------------------------------------------- 1 | name: Release Charts 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | 8 | jobs: 9 | release: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Checkout 13 | uses: actions/checkout@v2 14 | with: 15 | fetch-depth: 0 16 | 17 | - name: Configure Git 18 | run: | 19 | git config user.name "$GITHUB_ACTOR" 20 | git config user.email "$GITHUB_ACTOR@users.noreply.github.com" 21 | 22 | - name: Install Helm 23 | uses: azure/setup-helm@v1 24 | with: 25 | version: v3.4.0 26 | 27 | - name: Add helm dependencies 28 | run: | 29 | helm repo add bitnami "https://charts.bitnami.com/bitnami" 30 | 31 | - name: Run chart-releaser 32 | uses: helm/chart-releaser-action@v1.2.1 33 | env: 34 | CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" 35 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .dump 3 | .sql 4 | -------------------------------------------------------------------------------- /.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *~ 18 | # Various IDEs 19 | .project 20 | .idea/ 21 | *.tmproj 22 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017-2021 Chatwoot Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Chatwoot Helm Charts 2 | [![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/artifact-hub)](https://artifacthub.io/packages/helm/chatwoot/chatwoot) 3 | 4 | This repository contains helm charts for [Chatwoot](https://github.com/chatwoot/chatwoot). 5 | 6 | ## Installation 7 | ```bash 8 | helm repo add chatwoot https://chatwoot.github.io/charts 9 | helm install chatwoot chatwoot/chatwoot 10 | ``` 11 | 12 | ## Configuration 13 | Check the [README.md](./charts/chatwoot/README.md) 14 | 15 | ## Questions? Feedback? 16 | [Join our discord server.](https://discord.gg/cJXdrwS) 17 | -------------------------------------------------------------------------------- /charts/chatwoot/Chart.lock: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - name: postgresql 3 | repository: https://charts.bitnami.com/bitnami 4 | version: 11.6.7 5 | - name: redis 6 | repository: https://charts.bitnami.com/bitnami 7 | version: 16.12.2 8 | digest: sha256:37ffe21ee209b759ea2f2cbac615ba3e2f869e8333e6338d911a57078f0307f9 9 | generated: "2022-06-22T17:43:32.391389+05:30" 10 | -------------------------------------------------------------------------------- /charts/chatwoot/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | dependencies: 3 | - condition: postgresql.enabled 4 | name: postgresql 5 | repository: https://charts.bitnami.com/bitnami 6 | version: 11.6.7 7 | - condition: redis.enabled 8 | name: redis 9 | repository: https://charts.bitnami.com/bitnami 10 | version: 16.12.2 11 | name: chatwoot 12 | description: Open-source customer engagement suite, an alternative to Intercom, Zendesk, Salesforce Service Cloud etc. 🔥💬 13 | type: application 14 | keywords: 15 | - chatwoot 16 | - open source 17 | - customer support 18 | - chat 19 | - ruby 20 | - rails 21 | - crm 22 | maintainers: 23 | - name: vishnu-narayanan 24 | email: vishnu@chatwoot.com 25 | - name: sojan-official 26 | email: sojan@chatwoot.com 27 | home: https://github.com/chatwoot/charts 28 | icon: https://chatwoot-public-assets.s3.amazonaws.com/logo/square.png 29 | sources: 30 | - https://github.com/chatwoot/chatwoot 31 | - http://www.chatwoot.com 32 | 33 | # This is the chart version. 34 | version: 2.0.7 35 | 36 | 37 | # This is the application version. 38 | appVersion: "v4.6.0" 39 | -------------------------------------------------------------------------------- /charts/chatwoot/README.md: -------------------------------------------------------------------------------- 1 | # Chatwoot 2 | 3 | [Chatwoot](https://chatwoot.com) is a customer engagement suite. an open-source alternative to Intercom, Zendesk, Salesforce Service Cloud, etc. 🔥💬 4 | 5 | ## TL;DR 6 | 7 | ``` 8 | helm repo add chatwoot https://chatwoot.github.io/charts 9 | helm install chatwoot chatwoot/chatwoot 10 | ``` 11 | 12 | ## Prerequisites 13 | 14 | - Kubernetes 1.16+ 15 | - Helm 3.1.0+ 16 | - PV provisioner support in the underlying infrastructure 17 | 18 | 19 | ## Installing the chart 20 | 21 | To install the chart with the release name `chatwoot`: 22 | 23 | ```console 24 | $ helm install chatwoot chatwoot/chatwoot 25 | ``` 26 | 27 | The command deploys Chatwoot on the Kubernetes cluster in the default configuration. The [parameters](#parameters) section lists the parameters that can be configured during installation. 28 | 29 | > **Tip**: List all releases using `helm list` 30 | 31 | ## Uninstalling the chart 32 | 33 | To uninstall/delete the `chatwoot` deployment: 34 | 35 | ```console 36 | helm delete chatwoot 37 | ``` 38 | 39 | The command removes all the Kubernetes components associated with the chart and deletes the release. 40 | 41 | > **Note**: Persistent volumes are not deleted automatically. They need to be removed manually. 42 | 43 | 44 | ## Parameters 45 | 46 | 47 | ### Chatwoot Image parameters 48 | 49 | | Name | Description | Value | 50 | | ------------------- | ---------------------------------------------------- | --------------------- | 51 | | `image.repository` | Chatwoot image repository | `chatwoot/chatwoot` | 52 | | `image.tag` | Chatwoot image tag (immutable tags are recommended) | `v4.6.0` | 53 | | `image.pullPolicy` | Chatwoot image pull policy | `IfNotPresent` | 54 | 55 | 56 | ### Chatwoot Environment Variables 57 | 58 | | Name | Type | Default Value | 59 | | ------------------------------------ | ------------------------------------------------------------------- | ---------------------------------------------------------- | 60 | | `env.ACTIVE_STORAGE_SERVICE` | Storage service. `local` for disk. `amazon` for s3. | `"local"` | 61 | | `env.ASSET_CDN_HOST` | Set if CDN is used for asset delivery. | `""` | 62 | | `env.INSTALLATION_ENV` | Sets chatwoot installation method. | `"helm"` | 63 | | `env.ENABLE_ACCOUNT_SIGNUP` | `true` : default option, allows sign ups, `false` : disables all the end points related to sign ups, `api_only`: disables the UI for signup but you can create sign ups via the account apis. | `"false"` | 64 | | `env.FORCE_SSL` | Force all access to the app over SSL, default is set to false. | `"false"` | 65 | | `env.FRONTEND_URL` | Replace with the URL you are planning to use for your app. | `"http://0.0.0.0:3000/"` | 66 | | `env.IOS_APP_ID` | Change this variable only if you are using a custom build for mobile app. | `"6C953F3RX2.com.chatwoot.app"` | 67 | | `env.ANDROID_BUNDLE_ID` | Change this variable only if you are using a custom build for mobile app. | `"com.chatwoot.app"` | 68 | | `env.ANDROID_SHA256_CERT_FINGERPRINT`| Change this variable only if you are using a custom build for mobile app. | `"AC:73:8E:DE:EB:5............"` | 69 | | `env.MAILER_SENDER_EMAIL` | The email from which all outgoing emails are sent. | `""` | 70 | | `env.RAILS_ENV` | Sets rails environment. | `"production"` | 71 | | `env.RAILS_MAX_THREADS` | Number of threads each worker will use. | `"5"` | 72 | | `env.SECRET_KEY_BASE` | Used to verify the integrity of signed cookies. Ensure a secure value is set. | `replace_with_your_super_duper_secret_key_base` | 73 | | `env.SENTRY_DSN` | Sentry data source name. | `""` | 74 | | `env.SMTP_ADDRESS` | Set your smtp address. |`""` | 75 | | `env.SMTP_AUTHENTICATION` | Allowed values: `plain`,`login`,`cram_md5` | `"plain"` | 76 | | `env.SMTP_ENABLE_STARTTLS_AUTO` | Defaults to true. | `"true"` | 77 | | `env.SMTP_OPENSSL_VERIFY_MODE` | Can be: `none`, `peer`, `client_once`, `fail_if_no_peer_cert` | `"none"` | 78 | | `env.SMTP_PASSWORD` | SMTP password | `""` | 79 | | `env.SMTP_PORT` | SMTP port | `"587"` | 80 | | `env.SMTP_USERNAME` | SMTP username | `""` | 81 | | `env.USE_INBOX_AVATAR_FOR_BOT` | Bot customizations | `"true"` | 82 | 83 | ### Email setup for conversation continuity (Incoming emails) 84 | 85 | | Name | Type | Default Value | 86 | | ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | 87 | | `env.MAILER_INBOUND_EMAIL_DOMAIN` | This is the domain set for the reply emails when conversation continuity is enabled. | `""` | 88 | | `env.RAILS_INBOUND_EMAIL_SERVICE` | Set this to appropriate ingress channel with regards to incoming emails. Possible values are `relay`, `mailgun`, `mandrill`, `postmark` and `sendgrid`. | `""` | 89 | | `env.RAILS_INBOUND_EMAIL_PASSWORD` | Password for the email service. | `""` | 90 | | `env.MAILGUN_INGRESS_SIGNING_KEY` | Set if using mailgun for incoming conversations. | `""` | 91 | | `env.MANDRILL_INGRESS_API_KEY` | Set if using mandrill for incoming conversations. | `""` | 92 | 93 | ### Postgres variables 94 | 95 | | Name | Type | Default Value | 96 | | ----------------------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------ | 97 | | `postgresql.enabled` | Set to `false` if using external postgres and modify the below variables. | `true` | 98 | | `postgresql.auth.database`| Chatwoot database name | `chatwoot_production` | 99 | | `postgresql.postgresqlHost` | Postgres host. Edit if using external postgres. | `""` | 100 | | `postgresql.auth.postgresPassword`| Postgres password. Edit if using external postgres. | `postgres` | 101 | | `postgresql.postgresqlPort` | Postgres port | `5432` | 102 | | `postgresql.auth.username`| Postgres username. | `postgres` | 103 | 104 | ### Redis variables 105 | 106 | | Name | Type | Default Value | 107 | | ----------------------------------- | ------------------------------------------------------------------------- | --------------------------------------------------- | 108 | | `redis.auth.password` | Password used for internal redis cluster | `redis` | 109 | | `redis.enabled` | Set to `false` if using external redis and modify the below variables. | `true` | 110 | | `redis.host` | Redis host name | `""` | 111 | | `redis.port` | Redis port | `""` | 112 | | `redis.password` | Redis password | `""` | 113 | | `env.REDIS_TLS` | Set to `true` if TLS(`rediss://`) is required | `false` | 114 | | `env.REDIS_SENTINELS` | Redis Sentinel can be used by passing list of sentinel host and ports. | `""` | 115 | | `env.REDIS_SENTINEL_MASTER_NAME` | Redis sentinel master name is required when using sentinel. | `""` | 116 | 117 | 118 | ### Logging variables 119 | 120 | | Name | Type | Default Value | 121 | | ----------------------------------- | ------------------------------------------------------------------- | ---------------------------------------------------------- | 122 | | `env.RAILS_LOG_TO_STDOUT` | string | `"true"` | 123 | | `env.LOG_LEVEL` | string | `"info"` | 124 | | `env.LOG_SIZE` | string | `"500"` | 125 | 126 | ### Third party credentials 127 | 128 | | Name | Type | Default Value | 129 | | ----------------------------------- | -------------------------------------------------------------------- | ---------------------------------------------------------- | 130 | | `env.S3_BUCKET_NAME` | S3 bucket name | `""` | 131 | | `env.AWS_ACCESS_KEY_ID` | Amazon access key ID | `""` | 132 | | `env.AWS_REGION` | Amazon region | `""` | 133 | | `env.AWS_SECRET_ACCESS_KEY` | Amazon secret key ID | `""` | 134 | | `env.FB_APP_ID` | For facebook channel https://www.chatwoot.com/docs/facebook-setup | `""` | 135 | | `env.FB_APP_SECRET` | For facebook channel | `""` | 136 | | `env.FB_VERIFY_TOKEN` | For facebook channel | `""` | 137 | | `env.SLACK_CLIENT_ID` | For slack integration | `""` | 138 | | `env.SLACK_CLIENT_SECRET` | For slack integration | `""` | 139 | | `env.TWITTER_APP_ID` | For twitter channel | `""` | 140 | | `env.TWITTER_CONSUMER_KEY` | For twitter channel | `""` | 141 | | `env.TWITTER_CONSUMER_SECRET` | For twitter channel | `""` | 142 | | `env.TWITTER_ENVIRONMENT` | For twitter channel | `""` | 143 | 144 | ### Autoscaling 145 | 146 | | Name | Type | Default Value | 147 | | ----------------------------------- | -------------------------------------------------------------------- | ---------------------------------------------------------- | 148 | | `web.hpa.enabled` | Horizontal Pod Autoscaling for Chatwoot web | `false` | 149 | | `web.hpa.cputhreshold` | CPU threshold for Chatwoot web | `80` | 150 | | `web.hpa.minpods` | Minimum number of pods for Chatwoot web | `1` | 151 | | `web.hpa.maxpods` | Maximum number of pods for Chatwoot web | `10` | 152 | | `web.replicaCount` | No of web pods if hpa is not enabled | `1` | 153 | | `worker.hpa.enabled` | Horizontal Pod Autoscaling for Chatwoot worker | `false` | 154 | | `worker.hpa.cputhreshold` | CPU threshold for Chatwoot worker | `80` | 155 | | `worker.hpa.minpods` | Minimum number of pods for Chatwoot worker | `2` | 156 | | `worker.hpa.maxpods` | Maximum number of pods for Chatwoot worker | `10` | 157 | | `worker.replicaCount` | No of worker pods if hpa is not enabled | `1` | 158 | | `autoscaling.apiVersion` | Autoscaling API version | `autoscaling/v2` | 159 | 160 | ### Other Parameters 161 | 162 | | Key | Type | Default | Description | 163 | |-----|------|---------|-------------| 164 | | affinity | object | `{}` | | 165 | | existingEnvSecret | string | "" | Allows the use of an existing secret to set env variables | 166 | | fullnameOverride | string | `""` | | 167 | | hooks.affinity | object | `{}` | | 168 | | hooks.migrate.env | list | `[]` | | 169 | | hooks.migrate.hookAnnotation | string | `"post-install,post-upgrade"` | | 170 | | hooks.migrate.resources.limits.memory | string | `"1000Mi"` | | 171 | | hooks.migrate.resources.requests.memory | string | `"1000Mi"` | | 172 | | imagePullSecrets | list | `[]` | | 173 | | ingress.annotations | object | `{}` | | 174 | | ingress.enabled | bool | `false` | | 175 | | ingress.hosts[0].host | string | `""` | | 176 | | ingress.hosts[0].paths[0].backend.service.name | string | `"chatwoot"` | | 177 | | ingress.hosts[0].paths[0].backend.service.port.number | int | `3000` | | 178 | | ingress.hosts[0].paths[0].path | string | `"/"` | | 179 | | ingress.hosts[0].paths[0].pathType | string | `"Prefix"` | | 180 | | ingress.tls | list | `[]` | | 181 | | nameOverride | string | `""` | | 182 | | nodeSelector | object | `{}` | | 183 | | podAnnotations | object | `{}` | | 184 | | podSecurityContext | object | `{}` | | 185 | | redis.master.persistence.enabled | bool | `true` | | 186 | | redis.nameOverride | string | `"chatwoot-redis"` | | 187 | | resources | object | `{}` | | 188 | | securityContext | object | `{}` | | 189 | | service.port | int | `80` | | 190 | | service.type | string | `"ClusterIP"` | | 191 | | serviceAccount.annotations | object | `{}` | | 192 | | serviceAccount.create | bool | `true` | | 193 | | serviceAccount.name | string | `""` | | 194 | | services.annotations | object | `{}` | | 195 | | services.internalPort | int | `3000` | | 196 | | services.name | string | `"chatwoot"` | | 197 | | services.targetPort | int | `3000` | | 198 | | services.type | string | `"LoadBalancer"` | | 199 | | tolerations | list | `[]` | | 200 | 201 | Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, 202 | 203 | ```bash 204 | $ helm install my-release \ 205 | --set env.FRONTEND_URL="chat.yourdomain.com"\ 206 | chatwoot/chatwoot 207 | ``` 208 | 209 | The above command sets the Chatwoot server frontend URL to `chat.yourdoamain.com`. 210 | 211 | Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, 212 | 213 | ```bash 214 | $ helm install my-release -f values.yaml chatwoot/chatwoot 215 | ``` 216 | 217 | > **Tip** You can use the default `values.yaml` file. 218 | 219 | ## Postgres 220 | 221 | PostgreSQL is installed along with the chart if you choose the default setup. To use an external Postgres DB, please set `postgresql.enabled` to `false` and set the variables under the Postgres section above. 222 | 223 | ## Redis 224 | 225 | Redis is installed along with the chart if you choose the default setup. To use an external Redis DB, please set `redis.enabled` to `false` and set the variables under the Redis section above. 226 | 227 | # Autoscaling 228 | 229 | To enable horizontal pod autoscaling, set `web.hpa.enabled` and `worker.hpa.enabled` to `true`. Also make sure to uncomment the values under, `resources.limits` and `resources.requests`. This assumes your k8s cluster is already having a metrics-server. If not, deploy metrics-server with the following command. 230 | 231 | ``` 232 | kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml 233 | ``` 234 | 235 | ## Upgrading 236 | 237 | Do `helm repo update` and check the version of charts that is going to be installed. Helm charts follows semantic versioning and so if the MAJOR version is different from your installed version, there might be breaking changes. Please refer to the changelog before upgrading. 238 | 239 | ``` 240 | # update helm repositories 241 | helm repo update 242 | # list your current installed version 243 | helm list 244 | # show the latest version of charts that is going to be installed 245 | helm search repo chatwoot 246 | ``` 247 | 248 | ``` 249 | #if it is major version update, refer to the changelog before proceeding 250 | helm upgrade chatwoot chatwoot/chatwoot -f .yaml 251 | ``` 252 | ### To 1.x.x 253 | 254 | Make sure you are on Chatwoot helm charts version `0.9.0` before upgrading to version `1.x.x`. If not, please upgrade to `0.9.0` before proceeding. 255 | 256 | ``` 257 | helm repo update 258 | helm upgrade chatwoot chatwoot/chatwoot --version="0.9.0" -f --debug 259 | ``` 260 | 261 | This release changes the postgres and redis versions. This is a breaking change and requires manual data migration if you are not using external postgres and redis. 262 | 263 | > **Note**: This release also changes the postgres and redis auth paramaters values under `.Values.redis` and `.Values.postgres`. 264 | Make the necessary changes to your custom `values.yaml` file if any. 265 | `Values.postgresqlDatabase` --> `Values.auth.postgresqlDatabase` 266 | `Values.postgresqlUsername` --> `Values.auth.postgresqlUsername` 267 | `Values.postgresqlPassword` --> `Values.auth.postgresqlPassword` 268 | 269 | > **Note:** Append the kubectl commands with `-n chatwoot`, if you have deployed it under the chatwoot namespace. 270 | 271 | Before updating, 272 | 273 | 1. Set the replica count to 0 for both Chatwoot web(`.Values.web.replicaCount`) and worker(`.Values.worker.replicaCount`) replica sets. Applying this change 274 | will bring down the pods count to 0. This is to ensure the database will not be having any activity and is in a state to backup. 275 | ``` 276 | helm upgrade chatwoot chatwoot/chatwoot --version="0.9.0" --namespace ug3 -f values.ci.yaml --create-namespace --debug 277 | ``` 278 | 279 | 2. Log into the postgres pod and take a backup of your database. 280 | ``` 281 | kubectl exec -it chatwoot-chatwoot-postgresql-0 -- /bin/sh 282 | env | grep -i postgres_password #get postgres password to use in next step 283 | pg_dump -Fc --no-acl --no-owner -U postgres chatwoot_production > /tmp/cw.dump 284 | exit 285 | ``` 286 | 287 | 3. Copy the backup to your local machine. 288 | ``` 289 | kubectl cp pod/chatwoot-chatwoot-postgresql-0:/tmp/cw.dump ./cw.dump 290 | ``` 291 | 292 | 4. Delete the deployments. 293 | ``` 294 | helm delete chatwoot 295 | kubectl get pvc 296 | # this will delete the database volumes 297 | # make sure you have backed up before proceeding 298 | kubectl delete pvc 299 | kubectl delete pvc 300 | ``` 301 | 302 | 5. Update and install new version of charts. 303 | ``` 304 | helm repo update 305 | #reset web.replicaCount and worker.replicaCount to your previous values 306 | helm install chatwoot chatwoot/chatwoot -f #-n chatwoot 307 | ``` 308 | 309 | 6. Copy the local db backup into postgres pod. 310 | ``` 311 | kubectl cp cw.dump chatwoot-chatwoot-postgresql-0:/tmp/cw.dump 312 | ``` 313 | 314 | 7. Exec into the postgres pod and drop the database. 315 | ``` 316 | kubectl exec -it chatwoot-chatwoot-postgresql-0 -- /bin/sh 317 | psql -u postgres -d postgres 318 | # this is a destructive action 319 | # remove -- to take effect 320 | -- DROP DATABASE chatwoot_production with (FORCE); 321 | exit 322 | ``` 323 | 324 | 8. Restore the database from the backup. If you are seeing no errors, the databse has been restored and you 325 | are good to go. 326 | ``` 327 | pg_restore --verbose --clean --no-acl --no-owner --create -U postgres -d postgres /tmp/cw.dump 328 | ``` 329 | 330 | 9. Exec into the web pod and remove the onboarding variable in redis. 331 | 332 | ``` 333 | kubectl exec -it chatwoot-web-xxxxxxxxxx -- /bin/sh 334 | RAILS_ENV=production bundle exec rails c 335 | ::Redis::Alfred.delete(::Redis::Alfred::CHATWOOT_INSTALLATION_ONBOARDING) 336 | ``` 337 | 338 | 10. Load the Chatwoot web url, log in using the old credentials and verify the contents. Voila! Thats it!! 339 | 340 | ### To 0.9.x 341 | 342 | This release adds support for horizontal pod autoscaling(hpa) for chatwoot-web and chatwoot-worker deployments. 343 | Also, this changes the default redis replica count to `1`. The `Values.web.replicas` and `Values.worker. replicas` parameters 344 | where renamed to `Values.web.replicaCount` and `Values.worker.replicaCount` respectively. Also `services.internlPort` was renamed 345 | to `services.internalPort`. 346 | 347 | Please make the necessary changes in your custom values file if needed. 348 | 349 | ### To 0.8.x 350 | 351 | Move from Kubernetes ConfigMap to Kubernetes Secrets for environment variables. This is not a breaking change. 352 | 353 | ### To 0.6.x 354 | 355 | Existing labels were causing issues with `helm upgrade`. `0.6.x` introduces breaking changes related to selector 356 | labels used for deployments. Please delete your helm release and recreate it. Deleting your helm release will 357 | not delete your persistent volumes used for Redis, and Postgres and as such your data should be safe. 358 | 359 | ``` 360 | helm delete chatwoot 361 | helm repo update 362 | helm install chatwoot chatwoot/chatwoot 363 | ``` 364 | -------------------------------------------------------------------------------- /charts/chatwoot/charts/postgresql-11.6.7.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chatwoot/charts/f3970d11c3b79e8b2e1aad1b66621b12ecf07e37/charts/chatwoot/charts/postgresql-11.6.7.tgz -------------------------------------------------------------------------------- /charts/chatwoot/charts/redis-16.12.2.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chatwoot/charts/f3970d11c3b79e8b2e1aad1b66621b12ecf07e37/charts/chatwoot/charts/redis-16.12.2.tgz -------------------------------------------------------------------------------- /charts/chatwoot/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | Thank you for installing {{ .Chart.Name }}. 2 | 3 | Your release is named {{ .Release.Name }}. 4 | 5 | To learn more about the release, try: 6 | 7 | $ helm status {{ .Release.Name }} 8 | $ helm get all {{ .Release.Name }} 9 | 10 | NOTE: It may take a few minutes for the LoadBalancer IP to be available. 11 | You can watch the status by running 12 | 'kubectl get svc -w {{ template "chatwoot.fullname" . }}' 13 | 14 | export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "chatwoot.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') 15 | echo http://$SERVICE_IP:{{ .Values.services.targetPort }} 16 | -------------------------------------------------------------------------------- /charts/chatwoot/templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{/* 2 | Expand the name of the chart. 3 | */}} 4 | {{- define "chatwoot.name" -}} 5 | {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} 6 | {{- end -}} 7 | 8 | {{/* 9 | Create a default fully qualified app name. 10 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). 11 | If release name contains chart name it will be used as a full name. 12 | */}} 13 | {{- define "chatwoot.fullname" -}} 14 | {{- if .Values.fullnameOverride }} 15 | {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} 16 | {{- else }} 17 | {{- $name := default .Chart.Name .Values.nameOverride }} 18 | {{- if contains $name .Release.Name }} 19 | {{- .Release.Name | trunc 63 | trimSuffix "-" }} 20 | {{- else }} 21 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} 22 | {{- end }} 23 | {{- end }} 24 | {{- end }} 25 | 26 | {{/* 27 | Create chart name and version as used by the chart label. 28 | */}} 29 | {{- define "chatwoot.chart" -}} 30 | {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} 31 | {{- end }} 32 | 33 | {{/* 34 | Common labels 35 | */}} 36 | {{- define "chatwoot.labels" -}} 37 | helm.sh/chart: {{ include "chatwoot.chart" . }} 38 | {{ include "chatwoot.selectorLabels" . }} 39 | {{- if .Chart.AppVersion }} 40 | app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} 41 | {{- end }} 42 | app.kubernetes.io/managed-by: {{ .Release.Service }} 43 | {{- end }} 44 | 45 | {{/* 46 | Selector labels 47 | */}} 48 | {{- define "chatwoot.selectorLabels" -}} 49 | app.kubernetes.io/name: {{ include "chatwoot.name" . }} 50 | app.kubernetes.io/instance: {{ .Release.Name }} 51 | {{- end }} 52 | 53 | {{/* 54 | Create the name of the service account to use 55 | */}} 56 | {{- define "chatwoot.serviceAccountName" -}} 57 | {{- if .Values.serviceAccount.create }} 58 | {{- default (include "chatwoot.fullname" .) .Values.serviceAccount.name }} 59 | {{- else }} 60 | {{- default "default" .Values.serviceAccount.name }} 61 | {{- end }} 62 | {{- end }} 63 | 64 | 65 | {{- define "chatwoot.postgresql.fullname" -}} 66 | {{- if .Values.postgresql.fullnameOverride -}} 67 | {{- .Values.postgresql.fullnameOverride | trunc 63 | trimSuffix "-" -}} 68 | {{- else -}} 69 | {{- $name := default .Chart.Name .Values.postgresql.nameOverride -}} 70 | {{- if contains $name .Release.Name -}} 71 | {{- .Release.Name | trunc 63 | trimSuffix "-" -}} 72 | {{- else -}} 73 | {{- printf "%s-%s" .Release.Name "chatwoot-postgresql" | trunc 63 | trimSuffix "-" -}} 74 | {{- end -}} 75 | {{- end -}} 76 | {{- end -}} 77 | 78 | {{- define "chatwoot.redis.fullname" -}} 79 | {{- if .Values.redis.fullnameOverride -}} 80 | {{- .Values.redis.fullnameOverride | trunc 63 | trimSuffix "-" -}} 81 | {{- else -}} 82 | {{- $name := default .Chart.Name .Values.redis.nameOverride -}} 83 | {{- if contains $name .Release.Name -}} 84 | {{- .Release.Name | trunc 63 | trimSuffix "-" -}} 85 | {{- else -}} 86 | {{- printf "%s-%s" .Release.Name "chatwoot-redis" | trunc 63 | trimSuffix "-" -}} 87 | {{- end -}} 88 | {{- end -}} 89 | {{- end -}} 90 | 91 | 92 | {{/* 93 | Set postgres host 94 | */}} 95 | {{- define "chatwoot.postgresql.host" -}} 96 | {{- if .Values.postgresql.enabled -}} 97 | {{- template "chatwoot.postgresql.fullname" . -}} 98 | {{- else -}} 99 | {{- .Values.postgresql.postgresqlHost -}} 100 | {{- end -}} 101 | {{- end -}} 102 | 103 | {{/* 104 | Set postgres secret 105 | */}} 106 | {{- define "chatwoot.postgresql.secret" -}} 107 | {{- if .Values.postgresql.enabled -}} 108 | {{- template "chatwoot.postgresql.fullname" . -}} 109 | {{- else -}} 110 | {{- template "chatwoot.fullname" . -}} 111 | {{- end -}} 112 | {{- end -}} 113 | 114 | {{/* 115 | Set postgres secretKey 116 | */}} 117 | {{- define "chatwoot.postgresql.secretKey" -}} 118 | {{- if .Values.postgresql.enabled -}} 119 | "postgresql-password" 120 | {{- else -}} 121 | {{- default "postgresql-password" .Values.postgresql.auth.secretKeys.adminPasswordKey | quote -}} 122 | {{- end -}} 123 | {{- end -}} 124 | 125 | {{/* 126 | Set postgres port 127 | */}} 128 | {{- define "chatwoot.postgresql.port" -}} 129 | {{- if .Values.postgresql.enabled -}} 130 | 5432 131 | {{- else -}} 132 | {{- default 5432 .Values.postgresql.postgresqlPort -}} 133 | {{- end -}} 134 | {{- end -}} 135 | 136 | {{/* 137 | Set redis host 138 | */}} 139 | {{- define "chatwoot.redis.host" -}} 140 | {{- if .Values.redis.enabled -}} 141 | {{- template "chatwoot.redis.fullname" . -}}-master 142 | {{- else -}} 143 | {{- .Values.redis.host }} 144 | {{- end -}} 145 | {{- end -}} 146 | 147 | {{/* 148 | Set redis secret 149 | */}} 150 | {{- define "chatwoot.redis.secret" -}} 151 | {{- if .Values.redis.enabled -}} 152 | {{- template "chatwoot.redis.fullname" . -}} 153 | {{- else -}} 154 | {{- template "chatwoot.fullname" . -}} 155 | {{- end -}} 156 | {{- end -}} 157 | 158 | {{/* 159 | Set redis secretKey 160 | */}} 161 | {{- define "chatwoot.redis.secretKey" -}} 162 | {{- if .Values.redis.enabled -}} 163 | "redis-password" 164 | {{- else -}} 165 | {{- default "redis-password" .Values.redis.existingSecretPasswordKey | quote -}} 166 | {{- end -}} 167 | {{- end -}} 168 | 169 | {{/* 170 | Set redis port 171 | */}} 172 | {{- define "chatwoot.redis.port" -}} 173 | {{- if .Values.redis.enabled -}} 174 | 6379 175 | {{- else -}} 176 | {{- default 6379 .Values.redis.port -}} 177 | {{- end -}} 178 | {{- end -}} 179 | 180 | {{/* 181 | Set redis password 182 | */}} 183 | {{- define "chatwoot.redis.password" -}} 184 | {{- if .Values.redis.enabled -}} 185 | {{- default "redis" .Values.redis.auth.password -}} 186 | {{- else -}} 187 | {{- default "redis" .Values.redis.password -}} 188 | {{- end -}} 189 | {{- end -}} 190 | 191 | {{/* 192 | Set redis URL 193 | */}} 194 | {{- define "chatwoot.redis.url" -}} 195 | {{- if .Values.redis.enabled -}} 196 | redis://:{{ .Values.redis.auth.password }}@{{ template "chatwoot.redis.host" . }}:{{ template "chatwoot.redis.port" . }} 197 | {{- else if .Values.env.REDIS_TLS -}} 198 | rediss://:$(REDIS_PASSWORD)@{{ .Values.redis.host }}:{{ .Values.redis.port }} 199 | {{- else -}} 200 | redis://:$(REDIS_PASSWORD)@{{ .Values.redis.host }}:{{ .Values.redis.port }} 201 | {{- end -}} 202 | {{- end -}} 203 | -------------------------------------------------------------------------------- /charts/chatwoot/templates/env-secret.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Secret 3 | metadata: 4 | labels: 5 | app: {{ template "chatwoot.fullname" . }} 6 | chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" 7 | release: "{{ .Release.Name }}" 8 | heritage: "{{ .Release.Service }}" 9 | name: {{ template "chatwoot.fullname" . }}-env 10 | data: 11 | POSTGRES_HOST: {{ include "chatwoot.postgresql.host" . | b64enc | quote }} 12 | POSTGRES_PORT: {{ include "chatwoot.postgresql.port" . | b64enc | quote }} 13 | POSTGRES_USERNAME: {{ default "postgres" .Values.postgresql.auth.username | b64enc | quote }} 14 | {{- if not .Values.postgresql.auth.existingSecret }} 15 | POSTGRES_PASSWORD: {{ default "postgres" .Values.postgresql.auth.postgresPassword | b64enc | quote }} 16 | {{- end }} 17 | POSTGRES_DATABASE: {{ default "chatwoot_production" .Values.postgresql.auth.database | b64enc | quote }} 18 | REDIS_HOST: {{ include "chatwoot.redis.host" . | b64enc | quote }} 19 | REDIS_PORT: {{ include "chatwoot.redis.port" . | b64enc | quote }} 20 | {{- if not .Values.redis.existingSecret }} 21 | REDIS_PASSWORD: {{ include "chatwoot.redis.password" . | b64enc | quote }} 22 | {{- end }} 23 | REDIS_URL: {{ include "chatwoot.redis.url" . | b64enc | quote }} 24 | {{- range $key, $value := .Values.env}} 25 | {{ $key }}: {{ $value | toString | b64enc | quote }} 26 | {{- end }} 27 | -------------------------------------------------------------------------------- /charts/chatwoot/templates/ingress.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.ingress.enabled -}} 2 | {{- $fullName := include "chatwoot.fullname" . -}} 3 | {{- $svcPort := .Values.service.port -}} 4 | {{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} 5 | apiVersion: networking.k8s.io/v1 6 | {{- else -}} 7 | apiVersion: extensions/v1beta1 8 | {{- end }} 9 | kind: Ingress 10 | metadata: 11 | name: {{ $fullName }} 12 | labels: 13 | app: {{ template "chatwoot.fullname" . }} 14 | chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" 15 | release: "{{ .Release.Name }}" 16 | heritage: "{{ .Release.Service }}" 17 | {{- with .Values.ingress.annotations }} 18 | annotations: 19 | {{- toYaml . | nindent 4 }} 20 | {{- end }} 21 | spec: 22 | {{- if and .Values.ingress.ingressClassName (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} 23 | ingressClassName: {{ .Values.ingress.ingressClassName }} 24 | {{- end }} 25 | {{- if .Values.ingress.tls }} 26 | tls: 27 | {{- range .Values.ingress.tls }} 28 | - hosts: 29 | {{- range .hosts }} 30 | - {{ . | quote }} 31 | {{- end }} 32 | secretName: {{ .secretName }} 33 | {{- end }} 34 | {{- end }} 35 | rules: 36 | {{- range .Values.ingress.hosts }} 37 | - host: {{ .host | quote }} 38 | http: 39 | paths: 40 | {{- range .paths }} 41 | - path: {{ .path }} 42 | pathType: {{ .pathType }} 43 | backend: 44 | service: 45 | name: {{ .backend.service.name }} 46 | port: 47 | number: {{ int .backend.service.port.number }} 48 | {{- end }} 49 | {{- end }} 50 | {{- end }} 51 | -------------------------------------------------------------------------------- /charts/chatwoot/templates/migrations-job.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: batch/v1 2 | kind: Job 3 | metadata: 4 | name: "{{ .Release.Name }}-migrate" 5 | labels: 6 | app: {{ template "chatwoot.fullname" . }} 7 | chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" 8 | release: "{{ .Release.Name }}" 9 | heritage: "{{ .Release.Service }}" 10 | annotations: 11 | # This is what defines this resource as a hook. Without this line, the 12 | # job is considered part of the release. 13 | "helm.sh/hook": {{ .Values.hooks.migrate.hookAnnotation }} 14 | "helm.sh/hook-delete-policy": "hook-succeeded,before-hook-creation" 15 | "helm.sh/hook-weight": "-1" 16 | spec: 17 | template: 18 | spec: 19 | {{- with .Values.imagePullSecrets }} 20 | imagePullSecrets: 21 | {{- toYaml . | nindent 6 }} 22 | {{- end }} 23 | restartPolicy: Never 24 | {{- with .Values.tolerations }} 25 | tolerations: 26 | {{- toYaml . | nindent 8 }} 27 | {{- end }} 28 | {{- if .Values.nodeSelector }} 29 | nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.nodeSelector "context" $) | nindent 8 }} 30 | {{- end }} 31 | initContainers: 32 | - name: init-postgres 33 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" 34 | imagePullPolicy: {{ .Values.image.pullPolicy }} 35 | command: ["/bin/sh"] 36 | args: 37 | - -c 38 | - >- 39 | PG_READY="pg_isready -h {{ template "chatwoot.postgresql.host" . }} -p {{ template "chatwoot.postgresql.port" . }}"; 40 | until $PG_READY; 41 | do 42 | sleep 2; 43 | done; 44 | echo "Database ready to accept connections." ; 45 | - name: init-redis 46 | image: busybox:1.28 47 | imagePullPolicy: {{ .Values.image.pullPolicy }} 48 | command: ["sh", "-c", "until nslookup {{ template "chatwoot.redis.host" . }} ; do echo waiting for {{ template "chatwoot.redis.host" . }} ; sleep 2; done;"] 49 | containers: 50 | - name: "db-migrate-job" 51 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" 52 | args: 53 | - bundle 54 | - exec 55 | - rails 56 | - db:chatwoot_prepare 57 | env: 58 | {{- if .Values.postgresql.auth.existingSecret }} 59 | - name: POSTGRES_PASSWORD 60 | valueFrom: 61 | secretKeyRef: 62 | name: {{ .Values.postgresql.auth.existingSecret }} 63 | key: {{ default "password" .Values.postgresql.auth.secretKeys.adminPasswordKey }} 64 | {{- end }} 65 | {{- if .Values.redis.auth.existingSecret }} 66 | - name: REDIS_PASSWORD 67 | valueFrom: 68 | secretKeyRef: 69 | name: {{ .Values.redis.auth.existingSecret }} 70 | key: {{ default "password" .Values.redis.auth.existingSecretPasswordKey }} 71 | {{- end }} 72 | envFrom: 73 | - secretRef: 74 | name: {{ template "chatwoot.fullname" . }}-env 75 | {{- if .Values.existingEnvSecret }} 76 | - secretRef: 77 | name: {{ .Values.existingEnvSecret }} 78 | {{- end }} 79 | imagePullPolicy: {{ .Values.image.pullPolicy }} 80 | volumeMounts: 81 | - name: cache 82 | mountPath: /app/tmp 83 | serviceAccountName: {{ include "chatwoot.serviceAccountName" . }} 84 | {{- if .Values.securityContext }} 85 | securityContext: {{ .Values.securityContext | toYaml | nindent 8 }} 86 | {{- end }} 87 | volumes: 88 | - name: cache 89 | emptyDir: {} 90 | -------------------------------------------------------------------------------- /charts/chatwoot/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceAccount.create -}} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: {{ include "chatwoot.serviceAccountName" . }} 6 | labels: 7 | app: {{ template "chatwoot.fullname" . }} 8 | chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" 9 | release: "{{ .Release.Name }}" 10 | heritage: "{{ .Release.Service }}" 11 | {{- with .Values.serviceAccount.annotations }} 12 | annotations: 13 | {{- toYaml . | nindent 4 }} 14 | {{- end }} 15 | {{- end }} 16 | -------------------------------------------------------------------------------- /charts/chatwoot/templates/tests/test-connection.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: "{{ include "chatwoot.fullname" . }}-test-connection" 5 | labels: 6 | app: {{ template "chatwoot.fullname" . }} 7 | chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" 8 | release: "{{ .Release.Name }}" 9 | heritage: "{{ .Release.Service }}" 10 | annotations: 11 | "helm.sh/hook": test 12 | "helm.sh/hook-delete-policy": hook-succeeded 13 | spec: 14 | {{- with .Values.tolerations }} 15 | tolerations: 16 | {{- toYaml . | nindent 4 }} 17 | {{- end }} 18 | {{- if .Values.nodeSelector }} 19 | nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.nodeSelector "context" $) | nindent 4 }} 20 | {{- end }} 21 | containers: 22 | - name: wget 23 | image: busybox 24 | imagePullPolicy: IfNotPresent 25 | command: ['wget'] 26 | args: ['{{ include "chatwoot.fullname" . }}:{{ .Values.services.targetPort }}'] 27 | restartPolicy: Never 28 | -------------------------------------------------------------------------------- /charts/chatwoot/templates/web-deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ template "chatwoot.fullname" . }}-web 5 | creationTimestamp: null 6 | labels: 7 | app: {{ template "chatwoot.fullname" . }} 8 | chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" 9 | release: "{{ .Release.Name }}" 10 | heritage: "{{ .Release.Service }}" 11 | spec: 12 | replicas: {{ int .Values.web.replicaCount }} 13 | selector: 14 | matchLabels: 15 | app: {{ template "chatwoot.fullname" . }} 16 | release: "{{ .Release.Name }}" 17 | role: web 18 | strategy: {} 19 | template: 20 | metadata: 21 | creationTimestamp: null 22 | labels: 23 | app: {{ template "chatwoot.fullname" . }} 24 | release: "{{ .Release.Name }}" 25 | role: web 26 | annotations: 27 | checksum/config: {{ include (print $.Template.BasePath "/env-secret.yaml") . | sha256sum }} 28 | {{- with .Values.podAnnotations }} 29 | {{- toYaml . | nindent 8 }} 30 | {{- end }} 31 | spec: 32 | {{- with .Values.imagePullSecrets }} 33 | imagePullSecrets: 34 | {{- toYaml . | nindent 6 }} 35 | {{- end }} 36 | {{- with .Values.tolerations }} 37 | tolerations: 38 | {{- toYaml . | nindent 8 }} 39 | {{- end }} 40 | {{- if .Values.nodeSelector }} 41 | nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.nodeSelector "context" $) | nindent 8 }} 42 | {{- end }} 43 | containers: 44 | - args: 45 | - bundle 46 | - exec 47 | - rails 48 | - s 49 | - -p 50 | - {{ .Values.services.internalPort | quote}} 51 | - -b 52 | - 0.0.0.0 53 | command: 54 | - docker/entrypoints/rails.sh 55 | env: 56 | {{- if .Values.postgresql.auth.existingSecret }} 57 | - name: POSTGRES_PASSWORD 58 | valueFrom: 59 | secretKeyRef: 60 | name: {{ .Values.postgresql.auth.existingSecret }} 61 | key: {{ default "password" .Values.postgresql.auth.secretKeys.adminPasswordKey }} 62 | {{- end }} 63 | {{- if .Values.redis.existingSecret }} 64 | - name: REDIS_PASSWORD 65 | valueFrom: 66 | secretKeyRef: 67 | name: {{ .Values.redis.existingSecret }} 68 | key: {{ default "password" .Values.redis.existingSecretKey }} 69 | {{- end }} 70 | envFrom: 71 | - secretRef: 72 | name: {{ template "chatwoot.fullname" . }}-env 73 | {{- if .Values.existingEnvSecret }} 74 | - secretRef: 75 | name: {{ .Values.existingEnvSecret }} 76 | {{- end }} 77 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" 78 | name: {{ .Chart.Name }}-web 79 | ports: 80 | - containerPort: {{ int .Values.services.internalPort }} 81 | imagePullPolicy: {{ .Values.image.pullPolicy }} 82 | {{- with .Values.web.resources }} 83 | resources: 84 | {{- toYaml . | nindent 12 }} 85 | {{- end }} 86 | volumeMounts: 87 | - name: cache 88 | mountPath: /app/tmp 89 | serviceAccountName: {{ include "chatwoot.serviceAccountName" . }} 90 | {{- if .Values.securityContext }} 91 | securityContext: {{ .Values.securityContext | toYaml | nindent 8 }} 92 | {{- end }} 93 | volumes: 94 | - name: cache 95 | emptyDir: {} 96 | 97 | -------------------------------------------------------------------------------- /charts/chatwoot/templates/web-hpa.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.web.hpa.enabled -}} 2 | apiVersion: {{ .Values.autoscaling.apiVersion }} 3 | 4 | kind: HorizontalPodAutoscaler 5 | metadata: 6 | name: {{ template "chatwoot.fullname" . }}-web 7 | labels: 8 | app: {{ template "chatwoot.fullname" . }} 9 | chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" 10 | release: "{{ .Release.Name }}" 11 | heritage: "{{ .Release.Service }}" 12 | spec: 13 | scaleTargetRef: 14 | kind: Deployment 15 | apiVersion: apps/v1 16 | name: {{ template "chatwoot.fullname" . }}-web 17 | minReplicas: {{ .Values.web.hpa.minpods }} 18 | maxReplicas: {{ .Values.web.hpa.maxpods }} 19 | metrics: 20 | - type: Resource 21 | resource: 22 | name: cpu 23 | target: 24 | type: Utilization 25 | averageUtilization: {{ .Values.web.hpa.cputhreshold }} 26 | {{- end }} 27 | -------------------------------------------------------------------------------- /charts/chatwoot/templates/web-service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ template "chatwoot.fullname" . }} 5 | creationTimestamp: null 6 | labels: 7 | app: {{ template "chatwoot.fullname" . }} 8 | chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" 9 | release: "{{ .Release.Name }}" 10 | heritage: "{{ .Release.Service }}" 11 | {{- with .Values.services.annotations }} 12 | annotations: 13 | {{- toYaml . | nindent 4 }} 14 | {{- end }} 15 | spec: 16 | ports: 17 | - name: {{ .Values.services.name | quote}} 18 | port: {{ int .Values.services.internalPort }} 19 | targetPort: {{ int .Values.services.targetPort }} 20 | type: {{ .Values.services.type }} 21 | selector: 22 | app: {{ template "chatwoot.fullname" . }} 23 | role: web 24 | status: 25 | loadBalancer: {} 26 | -------------------------------------------------------------------------------- /charts/chatwoot/templates/worker-deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ template "chatwoot.fullname" . }}-worker 5 | creationTimestamp: null 6 | labels: 7 | app: {{ template "chatwoot.fullname" . }} 8 | chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" 9 | release: "{{ .Release.Name }}" 10 | heritage: "{{ .Release.Service }}" 11 | spec: 12 | replicas: {{ int .Values.worker.replicaCount }} 13 | selector: 14 | matchLabels: 15 | app: {{ template "chatwoot.fullname" . }} 16 | release: "{{ .Release.Name }}" 17 | role: worker 18 | strategy: {} 19 | template: 20 | metadata: 21 | creationTimestamp: null 22 | labels: 23 | app: {{ template "chatwoot.fullname" . }} 24 | release: "{{ .Release.Name }}" 25 | role: worker 26 | annotations: 27 | checksum/config: {{ include (print $.Template.BasePath "/env-secret.yaml") . | sha256sum }} 28 | {{- with .Values.podAnnotations }} 29 | {{- toYaml . | nindent 8 }} 30 | {{- end }} 31 | spec: 32 | {{- with .Values.imagePullSecrets }} 33 | imagePullSecrets: 34 | {{- toYaml . | nindent 6 }} 35 | {{- end }} 36 | {{- with .Values.tolerations }} 37 | tolerations: 38 | {{- toYaml . | nindent 8 }} 39 | {{- end }} 40 | {{- if .Values.nodeSelector }} 41 | nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.nodeSelector "context" $) | nindent 8 }} 42 | {{- end }} 43 | containers: 44 | - args: 45 | - bundle 46 | - exec 47 | - sidekiq 48 | - -C 49 | - config/sidekiq.yml 50 | env: 51 | {{- if .Values.postgresql.auth.existingSecret }} 52 | - name: POSTGRES_PASSWORD 53 | valueFrom: 54 | secretKeyRef: 55 | name: {{ .Values.postgresql.auth.existingSecret }} 56 | key: {{ default "password" .Values.postgresql.auth.secretKeys.adminPasswordKey }} 57 | {{- end }} 58 | {{- if .Values.redis.existingSecret }} 59 | - name: REDIS_PASSWORD 60 | valueFrom: 61 | secretKeyRef: 62 | name: {{ .Values.redis.existingSecret }} 63 | key: {{ default "password" .Values.redis.existingSecretKey }} 64 | {{- end }} 65 | envFrom: 66 | - secretRef: 67 | name: {{ template "chatwoot.fullname" . }}-env 68 | {{- if .Values.existingEnvSecret }} 69 | - secretRef: 70 | name: {{ .Values.existingEnvSecret }} 71 | {{- end }} 72 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" 73 | name: {{ .Chart.Name }}-workers 74 | {{- with .Values.worker.resources }} 75 | resources: 76 | {{- toYaml . | nindent 12 }} 77 | {{- end }} 78 | imagePullPolicy: {{ .Values.image.pullPolicy }} 79 | volumeMounts: 80 | - name: cache 81 | mountPath: /app/tmp 82 | serviceAccountName: {{ include "chatwoot.serviceAccountName" . }} 83 | {{- if .Values.securityContext }} 84 | securityContext: {{ .Values.securityContext | toYaml | nindent 8 }} 85 | {{- end }} 86 | volumes: 87 | - name: cache 88 | emptyDir: {} 89 | 90 | -------------------------------------------------------------------------------- /charts/chatwoot/templates/worker-hpa.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.worker.hpa.enabled -}} 2 | apiVersion: {{ .Values.autoscaling.apiVersion }} 3 | kind: HorizontalPodAutoscaler 4 | metadata: 5 | name: {{ template "chatwoot.fullname" . }}-worker 6 | labels: 7 | app: {{ template "chatwoot.fullname" . }} 8 | chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" 9 | release: "{{ .Release.Name }}" 10 | heritage: "{{ .Release.Service }}" 11 | spec: 12 | scaleTargetRef: 13 | kind: Deployment 14 | apiVersion: apps/v1 15 | name: {{ template "chatwoot.fullname" . }}-worker 16 | minReplicas: {{ .Values.worker.hpa.minpods }} 17 | maxReplicas: {{ .Values.worker.hpa.maxpods }} 18 | metrics: 19 | - type: Resource 20 | resource: 21 | name: cpu 22 | target: 23 | type: Utilization 24 | averageUtilization: {{ .Values.worker.hpa.cputhreshold }} 25 | {{- end }} 26 | -------------------------------------------------------------------------------- /charts/chatwoot/values.ci.yaml: -------------------------------------------------------------------------------- 1 | web: 2 | hpa: 3 | enabled: false 4 | cputhreshold: 80 5 | minpods: 1 6 | maxpods: 10 7 | replicaCount: 1 8 | worker: 9 | hpa: 10 | cputhreshold: 80 11 | minpods: 1 12 | maxpods: 10 13 | enabled: false 14 | replicaCount: 1 15 | 16 | postgresql: 17 | architecture: standalone 18 | auth: 19 | username: postgres 20 | database: chatwoot_production 21 | #password for the admin user 22 | postgresPassword: postgres 23 | 24 | redis: 25 | architecture: standalone 26 | # replica: 27 | # replicaCount: 1 28 | 29 | resources: 30 | limits: 31 | cpu: 500m 32 | memory: 512Mi 33 | requests: 34 | cpu: 250m 35 | memory: 256Mi 36 | -------------------------------------------------------------------------------- /charts/chatwoot/values.v4-upgrade.yaml: -------------------------------------------------------------------------------- 1 | image: 2 | repository: chatwoot/chatwoot 3 | tag: v4.0.1 4 | pullPolicy: IfNotPresent 5 | 6 | postgresql: 7 | image: 8 | registry: ghcr.io 9 | repository: chatwoot/pgvector 10 | -------------------------------------------------------------------------------- /charts/chatwoot/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for chatwoot 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | # Overrides the image tag whose default is the chart appVersion. 5 | image: 6 | repository: chatwoot/chatwoot 7 | tag: v4.6.0 8 | pullPolicy: IfNotPresent 9 | 10 | # Set to autoscaling/v2beta2 for older versions of kubernetes that do not have autoscaling/v2 API (pre v1.26) 11 | # See https://kubernetes.io/docs/reference/using-api/deprecation-guide/#horizontalpodautoscaler-v126 12 | autoscaling: 13 | apiVersion: autoscaling/v2 14 | 15 | web: 16 | hpa: 17 | # set this to true to enable horizontal pod autoscaling 18 | # uncomment values.resources section if hpa is enabled 19 | enabled: false 20 | cputhreshold: 75 21 | minpods: 1 22 | maxpods: 10 23 | replicaCount: 1 24 | resources: {} 25 | # We usually recommend not to specify default resources and to leave this as a conscious 26 | # choice for the user. This also increases chances charts run on environments with little 27 | # resources, such as Minikube. If you do want to specify resources, uncomment the following 28 | # lines, adjust them as necessary, and remove the curly braces after 'resources:'. 29 | # limits: 30 | # cpu: 500m 31 | # memory: 512Mi 32 | # requests: 33 | # cpu: 250m 34 | # memory: 256Mi 35 | worker: 36 | hpa: 37 | # set this to true to enable horizontal pod autoscaling 38 | # uncomment values.resources section if hpa is enabled 39 | enabled: false 40 | cputhreshold: 75 41 | minpods: 2 42 | maxpods: 10 43 | replicaCount: 2 44 | resources: {} 45 | # We usually recommend not to specify default resources and to leave this as a conscious 46 | # choice for the user. This also increases chances charts run on environments with little 47 | # resources, such as Minikube. If you do want to specify resources, uncomment the following 48 | # lines, adjust them as necessary, and remove the curly braces after 'resources:'. 49 | # limits: 50 | # cpu: 500m 51 | # memory: 512Mi 52 | # requests: 53 | # cpu: 250m 54 | # memory: 256Mi 55 | 56 | services: 57 | name: chatwoot 58 | internalPort: 3000 59 | targetPort: 3000 60 | type: LoadBalancer 61 | annotations: {} 62 | # For example 63 | # service.beta.kubernetes.io/aws-load-balancer-type: external 64 | # service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: ip 65 | # service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing 66 | 67 | imagePullSecrets: [] 68 | nameOverride: "" 69 | fullnameOverride: "" 70 | 71 | serviceAccount: 72 | # Specifies whether a service account should be created 73 | create: true 74 | # Annotations to add to the service account 75 | annotations: {} 76 | # The name of the service account to use. 77 | # If not set and create is true, a name is generated using the fullname template 78 | name: "" 79 | 80 | podAnnotations: {} 81 | 82 | podSecurityContext: {} 83 | # fsGroup: 2000 84 | 85 | securityContext: {} 86 | # capabilities: 87 | # drop: 88 | # - ALL 89 | # readOnlyRootFilesystem: true 90 | # runAsNonRoot: true 91 | # runAsUser: 1000 92 | 93 | service: 94 | type: ClusterIP 95 | port: 80 96 | 97 | ingress: 98 | enabled: false 99 | # For Kubernetes >= 1.18 you should specify the ingress-controller via the field ingressClassName 100 | # See https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/#specifying-the-class-of-an-ingress 101 | # ingressClassName: nginx 102 | annotations: {} 103 | # kubernetes.io/ingress.class: nginx 104 | # kubernetes.io/tls-acme: "true" 105 | hosts: 106 | - host: "" 107 | paths: 108 | - path: / 109 | pathType: Prefix 110 | backend: 111 | service: 112 | name: chatwoot 113 | port: 114 | number: 3000 115 | tls: [] 116 | # - secretName: chart-example-tls 117 | # hosts: 118 | # - chart-example.local 119 | 120 | nodeSelector: {} 121 | 122 | tolerations: [] 123 | 124 | affinity: {} 125 | 126 | postgresql: 127 | enabled: true 128 | nameOverride: chatwoot-postgresql 129 | image: 130 | registry: ghcr.io 131 | repository: chatwoot/pgvector 132 | auth: 133 | username: postgres 134 | postgresPassword: postgres 135 | database: chatwoot_production 136 | # when existingSecret is defined auth.password, auth.PostgressPassword 137 | # is ignored. 138 | # existingSecret: secret-name 139 | # secretKeys: 140 | # adminPasswordKey: postgres-password 141 | # replicationPasswordKey: replication-password 142 | # The following variables are only used when internal PG is disabled 143 | # postgresqlHost: postgres 144 | # postgresqlPort: 5432 145 | 146 | redis: 147 | enabled: true 148 | nameOverride: chatwoot-redis 149 | auth: 150 | password: redis 151 | # when defined the password field is ignored 152 | # existingSecret: secret-name 153 | # existingSecretPasswordKey: "" 154 | # The following variables are only used when internal Redis is disabled 155 | # host: redis 156 | # Just omit the password field if your redis cluster doesn't use password 157 | # password: redis 158 | # port: 6379 159 | master: 160 | persistence: 161 | enabled: true 162 | # If change pvc size redis.master.persistence.size: 20Gi 163 | replica: 164 | replicaCount: 1 165 | 166 | # Provide affinity for hooks if needed 167 | hooks: 168 | affinity: {} 169 | migrate: 170 | env: [] 171 | resources: 172 | limits: 173 | memory: 1000Mi 174 | requests: 175 | memory: 1000Mi 176 | # Defaults to performing the DB migration job after the install/upgrade. 177 | # Can be overridden to "pre-install,pre-upgrade" with caution to perform migrations that are sometimes required for the deployment to become healthy 178 | hookAnnotation: "post-install,post-upgrade" 179 | 180 | # ENVIRONMENT VARIABLES 181 | 182 | # If set, will apply environment variables found in this secret, after the variables defined in the env key. 183 | existingEnvSecret: "" 184 | 185 | env: 186 | ACTIVE_STORAGE_SERVICE: local 187 | ANDROID_BUNDLE_ID: com.chatwoot.app 188 | ANDROID_SHA256_CERT_FINGERPRINT: "AC:73:8E:DE:EB:56:EA:CC:10:87:02:A7:65:37:7B:38:D4:5D:D4:53:F8:3B:FB:D3:C6:28:64:1D:AA:08:1E:D8" 189 | ASSET_CDN_HOST: "" 190 | AWS_ACCESS_KEY_ID: "" 191 | AWS_REGION: "" 192 | AWS_SECRET_ACCESS_KEY: "" 193 | ENABLE_ACCOUNT_SIGNUP: false 194 | FB_APP_ID: "" 195 | FB_APP_SECRET: "" 196 | FB_VERIFY_TOKEN: "" 197 | FORCE_SSL: false 198 | FRONTEND_URL: "http://0.0.0.0:3000" 199 | INSTALLATION_ENV: helm 200 | IOS_APP_ID: 6C953F3RX2.com.chatwoot.app 201 | LOG_LEVEL: info 202 | LOG_SIZE: 500 203 | MAILER_INBOUND_EMAIL_DOMAIN: "" 204 | MAILER_SENDER_EMAIL: "" 205 | MAILGUN_INGRESS_SIGNING_KEY: "" 206 | MANDRILL_INGRESS_API_KEY: "" 207 | RAILS_ENV: production 208 | RAILS_INBOUND_EMAIL_PASSWORD: "" 209 | RAILS_INBOUND_EMAIL_SERVICE: "" 210 | RAILS_LOG_TO_STDOUT: true 211 | RAILS_MAX_THREADS: 5 212 | REDIS_SENTINEL_MASTER_NAME: "" 213 | REDIS_SENTINELS: "" 214 | REDIS_TLS: false 215 | S3_BUCKET_NAME: "" 216 | SECRET_KEY_BASE: replace_with_your_super_duper_secret_key_base 217 | SENTRY_DSN: "" 218 | SLACK_CLIENT_ID: "" 219 | SLACK_CLIENT_SECRET: "" 220 | SMTP_ADDRESS: "" 221 | SMTP_AUTHENTICATION: plain 222 | SMTP_ENABLE_STARTTLS_AUTO: true 223 | SMTP_OPENSSL_VERIFY_MODE: none 224 | SMTP_PASSWORD: "" 225 | SMTP_PORT: 587 226 | SMTP_USERNAME: "" 227 | TWITTER_APP_ID: "" 228 | TWITTER_CONSUMER_KEY: "" 229 | TWITTER_CONSUMER_SECRET: "" 230 | TWITTER_ENVIRONMENT: "" 231 | USE_INBOX_AVATAR_FOR_BOT: true 232 | --------------------------------------------------------------------------------