├── .github ├── ISSUE_TEMPLATE.md ├── PULL_REQUEST_TEMPLATE.md ├── ct.yaml ├── dependabot.yml ├── kind-config.yaml ├── kubeconform.sh ├── linters │ ├── .checkov.yaml │ └── .markdown-lint.yml ├── updatecli.yaml └── workflows │ ├── ci.yaml │ ├── release.yaml │ ├── stale.yml │ └── sync-readme.yaml ├── .gitignore ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md └── zammad ├── .helmignore ├── Chart.yaml ├── README.md ├── ci ├── README.md ├── default-values.yaml ├── full-objects.yaml └── full-values.yaml ├── templates ├── NOTES.txt ├── _helpers.tpl ├── configmap-init.yaml ├── configmap-nginx.yaml ├── cronjob-reindex.yaml ├── deployment-nginx.yaml ├── deployment-railsserver.yaml ├── deployment-scheduler.yaml ├── deployment-websocket.yaml ├── ingress.yaml ├── job-init.yaml ├── secrets.yaml ├── service-nginx.yaml ├── service-railsserver.yaml ├── service-websocket.yaml ├── serviceaccount.yaml └── tests │ ├── run-tests.yaml │ └── test-connection.yaml └── values.yaml /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | **Is this a request for help?**: 8 | 9 | --- 10 | 11 | **Is this a BUG REPORT or FEATURE REQUEST?** (choose one): 12 | 13 | 26 | 27 | **Version of Helm and Kubernetes**: 28 | 29 | 30 | **What happened**: 31 | 32 | 33 | **What you expected to happen**: 34 | 35 | 36 | **How to reproduce it** (as minimally and precisely as possible): 37 | 38 | 39 | **Anything else we need to know**: 40 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | #### What this PR does / why we need it 21 | 22 | - . 23 | 24 | #### Which issue this PR fixes 25 | 26 | *(optional, in `fixes #(, fixes #, …)` format, will close that issue when PR gets merged)* 27 | 28 | - fixes # 29 | 30 | #### Special notes for your reviewer 31 | 32 | - . 33 | 34 | #### Checklist 35 | 36 | [Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.] 37 | 38 | - [ ] Chart Version bumped 39 | - [ ] Upgrading instructions are documented in the zammad/README.md 40 | -------------------------------------------------------------------------------- /.github/ct.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | chart-dirs: . 3 | chart-repos: 4 | - bitnami=https://charts.bitnami.com/bitnami 5 | check-version-increment: true 6 | debug: true 7 | # upgrade: true # Causes issues because of low performance on default GitHub actions servers. 8 | target-branch: main 9 | namespace: zammad 10 | release-label: zammad 11 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | --- 2 | version: 2 3 | updates: 4 | - package-ecosystem: "docker" 5 | directory: "/zammad" 6 | schedule: 7 | interval: "daily" 8 | time: "09:00" 9 | timezone: "Europe/Berlin" 10 | 11 | - package-ecosystem: "github-actions" 12 | directory: "/" 13 | schedule: 14 | interval: "daily" 15 | time: "09:00" 16 | timezone: "Europe/Berlin" 17 | -------------------------------------------------------------------------------- /.github/kind-config.yaml: -------------------------------------------------------------------------------- 1 | kind: Cluster 2 | apiVersion: kind.x-k8s.io/v1alpha4 3 | nodes: 4 | - role: control-plane 5 | - role: worker 6 | - role: worker 7 | -------------------------------------------------------------------------------- /.github/kubeconform.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # use kubeconform to validate helm generated kubernetes manifest 4 | # 5 | 6 | set -o errexit 7 | set -o pipefail 8 | 9 | CHART_DIRS="zammad/" 10 | 11 | # install kubeconform 12 | curl --silent --show-error --fail --location --output /tmp/kubeconform.tar.gz https://github.com/yannh/kubeconform/releases/download/"${KUBECONFORM_VERSION}"/kubeconform-linux-amd64.tar.gz 13 | sudo tar -C /usr/local/bin -xf /tmp/kubeconform.tar.gz kubeconform 14 | 15 | # validate charts 16 | for CHART_DIR in ${CHART_DIRS};do 17 | echo "helm dependency build…" 18 | helm dependency build "${CHART_DIR}" 19 | 20 | echo "kubeconform(ing) ${CHART_DIR##charts/} chart…" 21 | helm template "${CHART_DIR}" | kubeconform --strict --verbose --kubernetes-version "${KUBERNETES_VERSION#v}" 22 | done 23 | -------------------------------------------------------------------------------- /.github/linters/.checkov.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | # Don't report passed checks in output 3 | quiet: true 4 | 5 | skip-path: 6 | - zammad/templates/tests 7 | - zammad/ci 8 | - zammad/charts 9 | 10 | skip-check: 11 | # These checks don't seem to make sense with a / our Helm chart 12 | - CKV_K8S_21 # "The default namespace should not be used" 13 | - CKV_K8S_10 # "CPU requests should be set" 14 | - CKV_K8S_11 # "CPU limits should be set" 15 | - CKV_K8S_15 # "Image Pull Policy should be Always" 16 | - CKV_K8S_12 # "Memory requests should be set" 17 | - CKV_K8S_13 # "Memory limits should be set" 18 | - CKV_K8S_43 # "Image should use digest" 19 | - CKV_K8S_38 # "Ensure that Service Account Tokens are only mounted where necessary" 20 | - CKV_K8S_20 # "Containers should not run with allowPrivilegeEscalation" 21 | - CKV_K8S_16 # "Container should not be privileged" 22 | - CKV_K8S_40 # "Containers should run as a high UID to avoid host conflict" 23 | - CKV_K8S_23 # "Minimize the admission of root containers" 24 | - CKV_K8S_22 # "Use read-only filesystem for containers where possible" 25 | 26 | # Maybe consider for improvement 27 | - CKV_K8S_35 # "Prefer using secrets as files over secrets as environment variables" 28 | -------------------------------------------------------------------------------- /.github/linters/.markdown-lint.yml: -------------------------------------------------------------------------------- 1 | MD013: 2 | line_length: 400 3 | -------------------------------------------------------------------------------- /.github/updatecli.yaml: -------------------------------------------------------------------------------- 1 | name: "Update Zammad version and dependency charts (patch and minor only)" 2 | 3 | sources: 4 | zammad: 5 | kind: dockerimage 6 | spec: 7 | image: "zammad/zammad-docker-compose" 8 | architecture: "linux/amd64" 9 | # tagfilter: "^6\\.5\\.0$" 10 | # tagfilter: "^6\\.5\\.0-\\d{1}" 11 | tagfilter: "^6\\.5\\.0-\\d{2}" 12 | # tagfilter: "^6\\.5\\.0-\\d{3}" 13 | alpine: 14 | kind: dockerimage 15 | spec: 16 | image: "alpine" 17 | architecture: "linux/amd64" 18 | versionfilter: 19 | pattern: '3.x.x' 20 | kind: semver 21 | elasticsearch: 22 | kind: helmchart 23 | spec: 24 | url: https://charts.bitnami.com/bitnami 25 | name: elasticsearch 26 | versionfilter: 27 | pattern: "21.x.x" 28 | minio: 29 | kind: helmchart 30 | spec: 31 | url: https://charts.bitnami.com/bitnami 32 | name: minio 33 | versionfilter: 34 | pattern: "14.x.x" 35 | memcached: 36 | kind: helmchart 37 | spec: 38 | url: https://charts.bitnami.com/bitnami 39 | name: memcached 40 | versionfilter: 41 | pattern: "7.x.x" 42 | postgresql: 43 | kind: helmchart 44 | spec: 45 | url: https://charts.bitnami.com/bitnami 46 | name: postgresql 47 | versionfilter: 48 | pattern: "16.x.x" 49 | redis: 50 | kind: helmchart 51 | spec: 52 | url: https://charts.bitnami.com/bitnami 53 | name: redis 54 | versionfilter: 55 | pattern: "20.x.x" 56 | 57 | conditions: {} 58 | 59 | targets: 60 | zammad: 61 | kind: helmchart 62 | sourceid: zammad 63 | spec: 64 | name: "zammad" 65 | file: "Chart.yaml" 66 | key: "$.appVersion" 67 | versionincrement: patch 68 | alpine: 69 | kind: file 70 | sourceid: alpine 71 | spec: 72 | file: zammad/values.yaml 73 | matchpattern: ' tag: "\d+\.\d+\.\d+"' 74 | replacepattern: ' tag: "{{ source `alpine` }}"' 75 | elasticsearch: 76 | kind: helmchart 77 | sourceid: elasticsearch 78 | spec: 79 | name: "zammad" 80 | file: "Chart.yaml" 81 | key: "$.dependencies[0].version" 82 | versionincrement: patch 83 | minio: 84 | kind: helmchart 85 | sourceid: minio 86 | spec: 87 | name: "zammad" 88 | file: "Chart.yaml" 89 | key: "$.dependencies[1].version" 90 | versionincrement: patch 91 | memcached: 92 | kind: helmchart 93 | sourceid: memcached 94 | spec: 95 | name: "zammad" 96 | file: "Chart.yaml" 97 | key: "$.dependencies[2].version" 98 | versionincrement: patch 99 | postgresql: 100 | kind: helmchart 101 | sourceid: postgresql 102 | spec: 103 | name: "zammad" 104 | file: "Chart.yaml" 105 | key: "$.dependencies[3].version" 106 | versionincrement: patch 107 | redis: 108 | kind: helmchart 109 | sourceid: redis 110 | spec: 111 | name: "zammad" 112 | file: "Chart.yaml" 113 | key: "$.dependencies[4].version" 114 | versionincrement: patch -------------------------------------------------------------------------------- /.github/workflows/ci.yaml: -------------------------------------------------------------------------------- 1 | name: ci 2 | 3 | permissions: read-all 4 | 5 | on: 6 | pull_request: 7 | branches: 8 | - main 9 | 10 | env: 11 | helm-version: "v3.18.0" 12 | kubeconform-version: "v0.7.0" 13 | 14 | jobs: 15 | super-linter: 16 | permissions: 17 | statuses: write 18 | runs-on: ubuntu-24.04 19 | steps: 20 | - name: Checkout Code 21 | uses: actions/checkout@v4 22 | with: 23 | fetch-depth: 0 24 | 25 | - name: Lint Code Base 26 | uses: github/super-linter/slim@v7 27 | env: 28 | DEFAULT_BRANCH: main 29 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 30 | LINTER_RULES_PATH: .github/linters 31 | VALIDATE_ALL_CODEBASE: false 32 | VALIDATE_JSCPD: false 33 | VALIDATE_KUBERNETES_KUBECONFORM: false 34 | VALIDATE_YAML: false 35 | VALIDATE_YAML_PRETTIER: false 36 | 37 | lint-chart: 38 | runs-on: ubuntu-24.04 39 | steps: 40 | - name: Checkout 41 | uses: actions/checkout@v4 42 | with: 43 | fetch-depth: 0 44 | 45 | - name: Set up Helm 46 | uses: azure/setup-helm@v4 47 | with: 48 | version: "${{ env.helm-version }}" 49 | 50 | - uses: actions/setup-python@v5 51 | with: 52 | python-version: 3.13 53 | 54 | - name: Set up chart-testing 55 | uses: helm/chart-testing-action@v2.7.0 56 | 57 | - name: Run chart-testing (lint) 58 | run: ct lint --config .github/ct.yaml 59 | 60 | kubeconform-chart: 61 | runs-on: ubuntu-24.04 62 | needs: 63 | - lint-chart 64 | - super-linter 65 | strategy: 66 | matrix: 67 | k8s: 68 | - v1.31.9 69 | - v1.32.5 70 | - v1.33.1 71 | steps: 72 | - name: Checkout 73 | uses: actions/checkout@v4 74 | with: 75 | fetch-depth: 0 76 | 77 | - name: Set up Helm 78 | uses: azure/setup-helm@v4 79 | with: 80 | version: "${{ env.helm-version }}" 81 | 82 | - name: Run kubeconform 83 | env: 84 | KUBERNETES_VERSION: ${{ matrix.k8s }} 85 | KUBECONFORM_VERSION: "${{ env.kubeconform-version }}" 86 | run: .github/kubeconform.sh 87 | 88 | install-chart: 89 | name: install-chart 90 | runs-on: ubuntu-24.04 91 | needs: 92 | - kubeconform-chart 93 | strategy: 94 | matrix: 95 | k8s: 96 | # Versions of kindest/node 97 | - v1.31.9 98 | - v1.32.5 99 | - v1.33.1 100 | steps: 101 | - name: Checkout 102 | uses: actions/checkout@v4 103 | with: 104 | fetch-depth: 0 105 | 106 | - name: Set up Helm 107 | uses: azure/setup-helm@v4 108 | with: 109 | version: "${{ env.helm-version }}" 110 | 111 | - uses: actions/setup-python@v5 112 | with: 113 | python-version: 3.13 114 | 115 | - name: Set up chart-testing 116 | uses: helm/chart-testing-action@v2.7.0 117 | 118 | - name: Run chart-testing (list-changed) 119 | id: list-changed 120 | run: if [[ -n "$(ct list-changed --config .github/ct.yaml)" ]]; then echo 'changed=true' >> "$GITHUB_OUTPUT"; fi 121 | 122 | - name: Create kind cluster 123 | uses: helm/kind-action@v1.12.0 124 | if: steps.list-changed.outputs.changed == 'true' 125 | with: 126 | config: .github/kind-config.yaml 127 | node_image: kindest/node:${{ matrix.k8s }} 128 | 129 | - name: Create Namespace 'zammad' 130 | run: kubectl create namespace zammad 131 | 132 | - name: Install additional objects for 'full' test scenario 133 | run: kubectl create --namespace zammad --filename zammad/ci/full-objects.yaml 134 | 135 | - name: Run chart-testing (install) 136 | run: ct install --config .github/ct.yaml --helm-extra-args '--timeout 900s' 137 | -------------------------------------------------------------------------------- /.github/workflows/release.yaml: -------------------------------------------------------------------------------- 1 | name: Release Charts 2 | 3 | permissions: read-all 4 | 5 | on: 6 | push: 7 | branches: 8 | - main 9 | 10 | env: 11 | helm-version: "v3.18.0" 12 | 13 | jobs: 14 | release: 15 | permissions: 16 | contents: write # to push chart release and create a release (helm/chart-releaser-action) 17 | packages: write # needed for ghcr access 18 | id-token: write # needed for keyless signing 19 | runs-on: ubuntu-24.04 20 | steps: 21 | - name: Checkout 22 | uses: actions/checkout@v4 23 | with: 24 | fetch-depth: 0 25 | 26 | - name: Configure Git 27 | run: | 28 | git config user.name "$GITHUB_ACTOR" 29 | git config user.email "$GITHUB_ACTOR@users.noreply.github.com" 30 | 31 | - name: Install Helm 32 | uses: azure/setup-helm@v4 33 | with: 34 | version: "${{ env.helm-version }}" 35 | 36 | - name: Add dependency chart repos 37 | run: helm repo add bitnami https://charts.bitnami.com/bitnami 38 | 39 | - name: Run chart-releaser 40 | uses: helm/chart-releaser-action@v1.7.0 41 | env: 42 | CR_GENERATE_RELEASE_NOTES: true 43 | CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" 44 | with: 45 | charts_dir: . 46 | 47 | # see https://github.com/helm/chart-releaser/issues/183 48 | - name: Login to GitHub Container Registry 49 | uses: docker/login-action@v3 50 | with: 51 | registry: ghcr.io 52 | username: ${{ github.actor }} 53 | password: ${{ secrets.GITHUB_TOKEN }} 54 | 55 | - name: Push chart to GHCR 56 | run: | 57 | shopt -s nullglob 58 | for pkg in .cr-release-packages/*; do 59 | if [ -z "${pkg:-}" ]; then 60 | break 61 | fi 62 | helm push "${pkg}" "oci://ghcr.io/${GITHUB_REPOSITORY_OWNER}/charts" 63 | done 64 | -------------------------------------------------------------------------------- /.github/workflows/stale.yml: -------------------------------------------------------------------------------- 1 | # This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time. 2 | # 3 | # You can adjust the behavior by modifying this file. 4 | # For more information, see: 5 | # https://github.com/actions/stale 6 | name: Mark stale issues and pull requests 7 | 8 | permissions: read-all 9 | 10 | on: 11 | schedule: 12 | - cron: '15 5 * * *' 13 | 14 | jobs: 15 | stale: 16 | 17 | runs-on: ubuntu-24.04 18 | permissions: 19 | issues: write 20 | pull-requests: write 21 | 22 | steps: 23 | - uses: actions/stale@v9 24 | with: 25 | repo-token: ${{ secrets.GITHUB_TOKEN }} 26 | stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.' 27 | stale-pr-message: 'This PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.' 28 | stale-issue-label: 'stale' 29 | stale-pr-label: 'stale' 30 | exempt-issue-labels: 'pinned' 31 | exempt-pr-labels: 'pinned' 32 | -------------------------------------------------------------------------------- /.github/workflows/sync-readme.yaml: -------------------------------------------------------------------------------- 1 | name: sync-readme 2 | 3 | permissions: read-all 4 | 5 | on: 6 | push: 7 | branches: 8 | - 'main' 9 | paths: 10 | - 'README.md' 11 | 12 | jobs: 13 | build: 14 | permissions: 15 | contents: write # for git push 16 | runs-on: ubuntu-24.04 17 | steps: 18 | - name: Checkout 19 | uses: actions/checkout@v4 20 | 21 | - name: copy README.md 22 | run: | 23 | cp -f README.md ${{ runner.temp }}/README.md 24 | 25 | - name: Checkout gh-pages 26 | uses: actions/checkout@v4 27 | with: 28 | ref: gh-pages 29 | 30 | - name: commit 31 | run: | 32 | cp -f ${{ runner.temp }}/README.md . 33 | git config user.name "$GITHUB_ACTOR" 34 | git config user.email "$GITHUB_ACTOR@users.noreply.github.com" 35 | git add README.md 36 | git commit --signoff -m "Sync README from main" 37 | git push 38 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | tmp 2 | zammad.github.io 3 | zammad/charts 4 | zammad/Chart.lock 5 | zammad/index.yaml 6 | zammad/requirements.lock 7 | values.yaml -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Community Code of Conduct 2 | 3 | This project follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md). 4 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing Guidelines 2 | 3 | Contributions are welcome via GitHub pull requests. This document outlines the process to help get your contribution accepted. 4 | 5 | ## Sign off Your Work 6 | 7 | The Developer Certificate of Origin (DCO) is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing to the project. 8 | Here is the full text of the [DCO](http://developercertificate.org/). 9 | Contributors must sign-off that they adhere to these requirements by adding a `Signed-off-by` line to commit messages. 10 | 11 | ```text 12 | This is my commit message 13 | 14 | Signed-off-by: Random J Developer 15 | ``` 16 | 17 | See `git help commit`: 18 | 19 | ```text 20 | -s, --signoff 21 | Add Signed-off-by line by the committer at the end of the commit log 22 | message. The meaning of a signoff depends on the project, but it typically 23 | certifies that committer has the rights to submit this work under the same 24 | license and agrees to a Developer Certificate of Origin (see 25 | http://developercertificate.org/ for more information). 26 | ``` 27 | 28 | ## How to Contribute 29 | 30 | 1. Fork this repository, develop, and test your changes 31 | 1. Remember to sign off your commits as described above 32 | 1. Submit a pull request 33 | 34 | ***NOTE***: In order to make testing and merging of PRs easier, please submit changes to multiple charts in separate PRs. 35 | 36 | ### Technical Requirements 37 | 38 | * Must pass [DCO check](#sign-off-your-work) 39 | * Must follow [Charts best practices](https://helm.sh/docs/topics/chart_best_practices/) 40 | * Must pass CI jobs for linting and installing changed charts with the [chart-testing](https://github.com/helm/chart-testing) tool 41 | * Any change to a chart requires a version bump following [SemVer](https://semver.org/) principles. See [Immutability](#immutability) and [Versioning](#versioning) below 42 | 43 | Once changes have been merged, the release job will automatically run to package and release changed charts. 44 | 45 | ### Immutability 46 | 47 | Chart releases must be immutable. Any change to a chart warrants a chart version bump even if it is only changed to the documentation. 48 | 49 | ### Versioning 50 | 51 | The chart `version` should follow [SemVer](https://semver.org/). 52 | 53 | Charts should start at `1.0.0`. Any breaking (backwards incompatible) changes to a chart should: 54 | 55 | 1. Bump the MAJOR version 56 | 2. In the README, under a section called "Upgrading", describe the manual steps necessary to upgrade to the new (specified) MAJOR version 57 | 58 | ### Community Requirements 59 | 60 | This project is released with a [Contributor Covenant](https://www.contributor-covenant.org). 61 | By participating in this project you agree to abide by its terms. 62 | See [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md). 63 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU AFFERO GENERAL PUBLIC LICENSE 2 | Version 3, 19 November 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU Affero General Public License is a free, copyleft license for 11 | software and other kinds of works, specifically designed to ensure 12 | cooperation with the community in the case of network server software. 13 | 14 | The licenses for most software and other practical works are designed 15 | to take away your freedom to share and change the works. By contrast, 16 | our General Public Licenses are intended to guarantee your freedom to 17 | share and change all versions of a program--to make sure it remains free 18 | software for all its users. 19 | 20 | When we speak of free software, we are referring to freedom, not 21 | price. Our General Public Licenses are designed to make sure that you 22 | have the freedom to distribute copies of free software (and charge for 23 | them if you wish), that you receive source code or can get it if you 24 | want it, that you can change the software or use pieces of it in new 25 | free programs, and that you know you can do these things. 26 | 27 | Developers that use our General Public Licenses protect your rights 28 | with two steps: (1) assert copyright on the software, and (2) offer 29 | you this License which gives you legal permission to copy, distribute 30 | and/or modify the software. 31 | 32 | A secondary benefit of defending all users' freedom is that 33 | improvements made in alternate versions of the program, if they 34 | receive widespread use, become available for other developers to 35 | incorporate. Many developers of free software are heartened and 36 | encouraged by the resulting cooperation. However, in the case of 37 | software used on network servers, this result may fail to come about. 38 | The GNU General Public License permits making a modified version and 39 | letting the public access it on a server without ever releasing its 40 | source code to the public. 41 | 42 | The GNU Affero General Public License is designed specifically to 43 | ensure that, in such cases, the modified source code becomes available 44 | to the community. It requires the operator of a network server to 45 | provide the source code of the modified version running there to the 46 | users of that server. Therefore, public use of a modified version, on 47 | a publicly accessible server, gives the public access to the source 48 | code of the modified version. 49 | 50 | An older license, called the Affero General Public License and 51 | published by Affero, was designed to accomplish similar goals. This is 52 | a different license, not a version of the Affero GPL, but Affero has 53 | released a new version of the Affero GPL which permits relicensing under 54 | this license. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | TERMS AND CONDITIONS 60 | 61 | 0. Definitions. 62 | 63 | "This License" refers to version 3 of the GNU Affero General Public License. 64 | 65 | "Copyright" also means copyright-like laws that apply to other kinds of 66 | works, such as semiconductor masks. 67 | 68 | "The Program" refers to any copyrightable work licensed under this 69 | License. Each licensee is addressed as "you". "Licensees" and 70 | "recipients" may be individuals or organizations. 71 | 72 | To "modify" a work means to copy from or adapt all or part of the work 73 | in a fashion requiring copyright permission, other than the making of an 74 | exact copy. The resulting work is called a "modified version" of the 75 | earlier work or a work "based on" the earlier work. 76 | 77 | A "covered work" means either the unmodified Program or a work based 78 | on the Program. 79 | 80 | To "propagate" a work means to do anything with it that, without 81 | permission, would make you directly or secondarily liable for 82 | infringement under applicable copyright law, except executing it on a 83 | computer or modifying a private copy. Propagation includes copying, 84 | distribution (with or without modification), making available to the 85 | public, and in some countries other activities as well. 86 | 87 | To "convey" a work means any kind of propagation that enables other 88 | parties to make or receive copies. Mere interaction with a user through 89 | a computer network, with no transfer of a copy, is not conveying. 90 | 91 | An interactive user interface displays "Appropriate Legal Notices" 92 | to the extent that it includes a convenient and prominently visible 93 | feature that (1) displays an appropriate copyright notice, and (2) 94 | tells the user that there is no warranty for the work (except to the 95 | extent that warranties are provided), that licensees may convey the 96 | work under this License, and how to view a copy of this License. If 97 | the interface presents a list of user commands or options, such as a 98 | menu, a prominent item in the list meets this criterion. 99 | 100 | 1. Source Code. 101 | 102 | The "source code" for a work means the preferred form of the work 103 | for making modifications to it. "Object code" means any non-source 104 | form of a work. 105 | 106 | A "Standard Interface" means an interface that either is an official 107 | standard defined by a recognized standards body, or, in the case of 108 | interfaces specified for a particular programming language, one that 109 | is widely used among developers working in that language. 110 | 111 | The "System Libraries" of an executable work include anything, other 112 | than the work as a whole, that (a) is included in the normal form of 113 | packaging a Major Component, but which is not part of that Major 114 | Component, and (b) serves only to enable use of the work with that 115 | Major Component, or to implement a Standard Interface for which an 116 | implementation is available to the public in source code form. A 117 | "Major Component", in this context, means a major essential component 118 | (kernel, window system, and so on) of the specific operating system 119 | (if any) on which the executable work runs, or a compiler used to 120 | produce the work, or an object code interpreter used to run it. 121 | 122 | The "Corresponding Source" for a work in object code form means all 123 | the source code needed to generate, install, and (for an executable 124 | work) run the object code and to modify the work, including scripts to 125 | control those activities. However, it does not include the work's 126 | System Libraries, or general-purpose tools or generally available free 127 | programs which are used unmodified in performing those activities but 128 | which are not part of the work. For example, Corresponding Source 129 | includes interface definition files associated with source files for 130 | the work, and the source code for shared libraries and dynamically 131 | linked subprograms that the work is specifically designed to require, 132 | such as by intimate data communication or control flow between those 133 | subprograms and other parts of the work. 134 | 135 | The Corresponding Source need not include anything that users 136 | can regenerate automatically from other parts of the Corresponding 137 | Source. 138 | 139 | The Corresponding Source for a work in source code form is that 140 | same work. 141 | 142 | 2. Basic Permissions. 143 | 144 | All rights granted under this License are granted for the term of 145 | copyright on the Program, and are irrevocable provided the stated 146 | conditions are met. This License explicitly affirms your unlimited 147 | permission to run the unmodified Program. The output from running a 148 | covered work is covered by this License only if the output, given its 149 | content, constitutes a covered work. This License acknowledges your 150 | rights of fair use or other equivalent, as provided by copyright law. 151 | 152 | You may make, run and propagate covered works that you do not 153 | convey, without conditions so long as your license otherwise remains 154 | in force. You may convey covered works to others for the sole purpose 155 | of having them make modifications exclusively for you, or provide you 156 | with facilities for running those works, provided that you comply with 157 | the terms of this License in conveying all material for which you do 158 | not control copyright. Those thus making or running the covered works 159 | for you must do so exclusively on your behalf, under your direction 160 | and control, on terms that prohibit them from making any copies of 161 | your copyrighted material outside their relationship with you. 162 | 163 | Conveying under any other circumstances is permitted solely under 164 | the conditions stated below. Sublicensing is not allowed; section 10 165 | makes it unnecessary. 166 | 167 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 168 | 169 | No covered work shall be deemed part of an effective technological 170 | measure under any applicable law fulfilling obligations under article 171 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 172 | similar laws prohibiting or restricting circumvention of such 173 | measures. 174 | 175 | When you convey a covered work, you waive any legal power to forbid 176 | circumvention of technological measures to the extent such circumvention 177 | is effected by exercising rights under this License with respect to 178 | the covered work, and you disclaim any intention to limit operation or 179 | modification of the work as a means of enforcing, against the work's 180 | users, your or third parties' legal rights to forbid circumvention of 181 | technological measures. 182 | 183 | 4. Conveying Verbatim Copies. 184 | 185 | You may convey verbatim copies of the Program's source code as you 186 | receive it, in any medium, provided that you conspicuously and 187 | appropriately publish on each copy an appropriate copyright notice; 188 | keep intact all notices stating that this License and any 189 | non-permissive terms added in accord with section 7 apply to the code; 190 | keep intact all notices of the absence of any warranty; and give all 191 | recipients a copy of this License along with the Program. 192 | 193 | You may charge any price or no price for each copy that you convey, 194 | and you may offer support or warranty protection for a fee. 195 | 196 | 5. Conveying Modified Source Versions. 197 | 198 | You may convey a work based on the Program, or the modifications to 199 | produce it from the Program, in the form of source code under the 200 | terms of section 4, provided that you also meet all of these conditions: 201 | 202 | a) The work must carry prominent notices stating that you modified 203 | it, and giving a relevant date. 204 | 205 | b) The work must carry prominent notices stating that it is 206 | released under this License and any conditions added under section 207 | 7. This requirement modifies the requirement in section 4 to 208 | "keep intact all notices". 209 | 210 | c) You must license the entire work, as a whole, under this 211 | License to anyone who comes into possession of a copy. This 212 | License will therefore apply, along with any applicable section 7 213 | additional terms, to the whole of the work, and all its parts, 214 | regardless of how they are packaged. This License gives no 215 | permission to license the work in any other way, but it does not 216 | invalidate such permission if you have separately received it. 217 | 218 | d) If the work has interactive user interfaces, each must display 219 | Appropriate Legal Notices; however, if the Program has interactive 220 | interfaces that do not display Appropriate Legal Notices, your 221 | work need not make them do so. 222 | 223 | A compilation of a covered work with other separate and independent 224 | works, which are not by their nature extensions of the covered work, 225 | and which are not combined with it such as to form a larger program, 226 | in or on a volume of a storage or distribution medium, is called an 227 | "aggregate" if the compilation and its resulting copyright are not 228 | used to limit the access or legal rights of the compilation's users 229 | beyond what the individual works permit. Inclusion of a covered work 230 | in an aggregate does not cause this License to apply to the other 231 | parts of the aggregate. 232 | 233 | 6. Conveying Non-Source Forms. 234 | 235 | You may convey a covered work in object code form under the terms 236 | of sections 4 and 5, provided that you also convey the 237 | machine-readable Corresponding Source under the terms of this License, 238 | in one of these ways: 239 | 240 | a) Convey the object code in, or embodied in, a physical product 241 | (including a physical distribution medium), accompanied by the 242 | Corresponding Source fixed on a durable physical medium 243 | customarily used for software interchange. 244 | 245 | b) Convey the object code in, or embodied in, a physical product 246 | (including a physical distribution medium), accompanied by a 247 | written offer, valid for at least three years and valid for as 248 | long as you offer spare parts or customer support for that product 249 | model, to give anyone who possesses the object code either (1) a 250 | copy of the Corresponding Source for all the software in the 251 | product that is covered by this License, on a durable physical 252 | medium customarily used for software interchange, for a price no 253 | more than your reasonable cost of physically performing this 254 | conveying of source, or (2) access to copy the 255 | Corresponding Source from a network server at no charge. 256 | 257 | c) Convey individual copies of the object code with a copy of the 258 | written offer to provide the Corresponding Source. This 259 | alternative is allowed only occasionally and noncommercially, and 260 | only if you received the object code with such an offer, in accord 261 | with subsection 6b. 262 | 263 | d) Convey the object code by offering access from a designated 264 | place (gratis or for a charge), and offer equivalent access to the 265 | Corresponding Source in the same way through the same place at no 266 | further charge. You need not require recipients to copy the 267 | Corresponding Source along with the object code. If the place to 268 | copy the object code is a network server, the Corresponding Source 269 | may be on a different server (operated by you or a third party) 270 | that supports equivalent copying facilities, provided you maintain 271 | clear directions next to the object code saying where to find the 272 | Corresponding Source. Regardless of what server hosts the 273 | Corresponding Source, you remain obligated to ensure that it is 274 | available for as long as needed to satisfy these requirements. 275 | 276 | e) Convey the object code using peer-to-peer transmission, provided 277 | you inform other peers where the object code and Corresponding 278 | Source of the work are being offered to the general public at no 279 | charge under subsection 6d. 280 | 281 | A separable portion of the object code, whose source code is excluded 282 | from the Corresponding Source as a System Library, need not be 283 | included in conveying the object code work. 284 | 285 | A "User Product" is either (1) a "consumer product", which means any 286 | tangible personal property which is normally used for personal, family, 287 | or household purposes, or (2) anything designed or sold for incorporation 288 | into a dwelling. In determining whether a product is a consumer product, 289 | doubtful cases shall be resolved in favor of coverage. For a particular 290 | product received by a particular user, "normally used" refers to a 291 | typical or common use of that class of product, regardless of the status 292 | of the particular user or of the way in which the particular user 293 | actually uses, or expects or is expected to use, the product. A product 294 | is a consumer product regardless of whether the product has substantial 295 | commercial, industrial or non-consumer uses, unless such uses represent 296 | the only significant mode of use of the product. 297 | 298 | "Installation Information" for a User Product means any methods, 299 | procedures, authorization keys, or other information required to install 300 | and execute modified versions of a covered work in that User Product from 301 | a modified version of its Corresponding Source. The information must 302 | suffice to ensure that the continued functioning of the modified object 303 | code is in no case prevented or interfered with solely because 304 | modification has been made. 305 | 306 | If you convey an object code work under this section in, or with, or 307 | specifically for use in, a User Product, and the conveying occurs as 308 | part of a transaction in which the right of possession and use of the 309 | User Product is transferred to the recipient in perpetuity or for a 310 | fixed term (regardless of how the transaction is characterized), the 311 | Corresponding Source conveyed under this section must be accompanied 312 | by the Installation Information. But this requirement does not apply 313 | if neither you nor any third party retains the ability to install 314 | modified object code on the User Product (for example, the work has 315 | been installed in ROM). 316 | 317 | The requirement to provide Installation Information does not include a 318 | requirement to continue to provide support service, warranty, or updates 319 | for a work that has been modified or installed by the recipient, or for 320 | the User Product in which it has been modified or installed. Access to a 321 | network may be denied when the modification itself materially and 322 | adversely affects the operation of the network or violates the rules and 323 | protocols for communication across the network. 324 | 325 | Corresponding Source conveyed, and Installation Information provided, 326 | in accord with this section must be in a format that is publicly 327 | documented (and with an implementation available to the public in 328 | source code form), and must require no special password or key for 329 | unpacking, reading or copying. 330 | 331 | 7. Additional Terms. 332 | 333 | "Additional permissions" are terms that supplement the terms of this 334 | License by making exceptions from one or more of its conditions. 335 | Additional permissions that are applicable to the entire Program shall 336 | be treated as though they were included in this License, to the extent 337 | that they are valid under applicable law. If additional permissions 338 | apply only to part of the Program, that part may be used separately 339 | under those permissions, but the entire Program remains governed by 340 | this License without regard to the additional permissions. 341 | 342 | When you convey a copy of a covered work, you may at your option 343 | remove any additional permissions from that copy, or from any part of 344 | it. (Additional permissions may be written to require their own 345 | removal in certain cases when you modify the work.) You may place 346 | additional permissions on material, added by you to a covered work, 347 | for which you have or can give appropriate copyright permission. 348 | 349 | Notwithstanding any other provision of this License, for material you 350 | add to a covered work, you may (if authorized by the copyright holders of 351 | that material) supplement the terms of this License with terms: 352 | 353 | a) Disclaiming warranty or limiting liability differently from the 354 | terms of sections 15 and 16 of this License; or 355 | 356 | b) Requiring preservation of specified reasonable legal notices or 357 | author attributions in that material or in the Appropriate Legal 358 | Notices displayed by works containing it; or 359 | 360 | c) Prohibiting misrepresentation of the origin of that material, or 361 | requiring that modified versions of such material be marked in 362 | reasonable ways as different from the original version; or 363 | 364 | d) Limiting the use for publicity purposes of names of licensors or 365 | authors of the material; or 366 | 367 | e) Declining to grant rights under trademark law for use of some 368 | trade names, trademarks, or service marks; or 369 | 370 | f) Requiring indemnification of licensors and authors of that 371 | material by anyone who conveys the material (or modified versions of 372 | it) with contractual assumptions of liability to the recipient, for 373 | any liability that these contractual assumptions directly impose on 374 | those licensors and authors. 375 | 376 | All other non-permissive additional terms are considered "further 377 | restrictions" within the meaning of section 10. If the Program as you 378 | received it, or any part of it, contains a notice stating that it is 379 | governed by this License along with a term that is a further 380 | restriction, you may remove that term. If a license document contains 381 | a further restriction but permits relicensing or conveying under this 382 | License, you may add to a covered work material governed by the terms 383 | of that license document, provided that the further restriction does 384 | not survive such relicensing or conveying. 385 | 386 | If you add terms to a covered work in accord with this section, you 387 | must place, in the relevant source files, a statement of the 388 | additional terms that apply to those files, or a notice indicating 389 | where to find the applicable terms. 390 | 391 | Additional terms, permissive or non-permissive, may be stated in the 392 | form of a separately written license, or stated as exceptions; 393 | the above requirements apply either way. 394 | 395 | 8. Termination. 396 | 397 | You may not propagate or modify a covered work except as expressly 398 | provided under this License. Any attempt otherwise to propagate or 399 | modify it is void, and will automatically terminate your rights under 400 | this License (including any patent licenses granted under the third 401 | paragraph of section 11). 402 | 403 | However, if you cease all violation of this License, then your 404 | license from a particular copyright holder is reinstated (a) 405 | provisionally, unless and until the copyright holder explicitly and 406 | finally terminates your license, and (b) permanently, if the copyright 407 | holder fails to notify you of the violation by some reasonable means 408 | prior to 60 days after the cessation. 409 | 410 | Moreover, your license from a particular copyright holder is 411 | reinstated permanently if the copyright holder notifies you of the 412 | violation by some reasonable means, this is the first time you have 413 | received notice of violation of this License (for any work) from that 414 | copyright holder, and you cure the violation prior to 30 days after 415 | your receipt of the notice. 416 | 417 | Termination of your rights under this section does not terminate the 418 | licenses of parties who have received copies or rights from you under 419 | this License. If your rights have been terminated and not permanently 420 | reinstated, you do not qualify to receive new licenses for the same 421 | material under section 10. 422 | 423 | 9. Acceptance Not Required for Having Copies. 424 | 425 | You are not required to accept this License in order to receive or 426 | run a copy of the Program. Ancillary propagation of a covered work 427 | occurring solely as a consequence of using peer-to-peer transmission 428 | to receive a copy likewise does not require acceptance. However, 429 | nothing other than this License grants you permission to propagate or 430 | modify any covered work. These actions infringe copyright if you do 431 | not accept this License. Therefore, by modifying or propagating a 432 | covered work, you indicate your acceptance of this License to do so. 433 | 434 | 10. Automatic Licensing of Downstream Recipients. 435 | 436 | Each time you convey a covered work, the recipient automatically 437 | receives a license from the original licensors, to run, modify and 438 | propagate that work, subject to this License. You are not responsible 439 | for enforcing compliance by third parties with this License. 440 | 441 | An "entity transaction" is a transaction transferring control of an 442 | organization, or substantially all assets of one, or subdividing an 443 | organization, or merging organizations. If propagation of a covered 444 | work results from an entity transaction, each party to that 445 | transaction who receives a copy of the work also receives whatever 446 | licenses to the work the party's predecessor in interest had or could 447 | give under the previous paragraph, plus a right to possession of the 448 | Corresponding Source of the work from the predecessor in interest, if 449 | the predecessor has it or can get it with reasonable efforts. 450 | 451 | You may not impose any further restrictions on the exercise of the 452 | rights granted or affirmed under this License. For example, you may 453 | not impose a license fee, royalty, or other charge for exercise of 454 | rights granted under this License, and you may not initiate litigation 455 | (including a cross-claim or counterclaim in a lawsuit) alleging that 456 | any patent claim is infringed by making, using, selling, offering for 457 | sale, or importing the Program or any portion of it. 458 | 459 | 11. Patents. 460 | 461 | A "contributor" is a copyright holder who authorizes use under this 462 | License of the Program or a work on which the Program is based. The 463 | work thus licensed is called the contributor's "contributor version". 464 | 465 | A contributor's "essential patent claims" are all patent claims 466 | owned or controlled by the contributor, whether already acquired or 467 | hereafter acquired, that would be infringed by some manner, permitted 468 | by this License, of making, using, or selling its contributor version, 469 | but do not include claims that would be infringed only as a 470 | consequence of further modification of the contributor version. For 471 | purposes of this definition, "control" includes the right to grant 472 | patent sublicenses in a manner consistent with the requirements of 473 | this License. 474 | 475 | Each contributor grants you a non-exclusive, worldwide, royalty-free 476 | patent license under the contributor's essential patent claims, to 477 | make, use, sell, offer for sale, import and otherwise run, modify and 478 | propagate the contents of its contributor version. 479 | 480 | In the following three paragraphs, a "patent license" is any express 481 | agreement or commitment, however denominated, not to enforce a patent 482 | (such as an express permission to practice a patent or covenant not to 483 | sue for patent infringement). To "grant" such a patent license to a 484 | party means to make such an agreement or commitment not to enforce a 485 | patent against the party. 486 | 487 | If you convey a covered work, knowingly relying on a patent license, 488 | and the Corresponding Source of the work is not available for anyone 489 | to copy, free of charge and under the terms of this License, through a 490 | publicly available network server or other readily accessible means, 491 | then you must either (1) cause the Corresponding Source to be so 492 | available, or (2) arrange to deprive yourself of the benefit of the 493 | patent license for this particular work, or (3) arrange, in a manner 494 | consistent with the requirements of this License, to extend the patent 495 | license to downstream recipients. "Knowingly relying" means you have 496 | actual knowledge that, but for the patent license, your conveying the 497 | covered work in a country, or your recipient's use of the covered work 498 | in a country, would infringe one or more identifiable patents in that 499 | country that you have reason to believe are valid. 500 | 501 | If, pursuant to or in connection with a single transaction or 502 | arrangement, you convey, or propagate by procuring conveyance of, a 503 | covered work, and grant a patent license to some of the parties 504 | receiving the covered work authorizing them to use, propagate, modify 505 | or convey a specific copy of the covered work, then the patent license 506 | you grant is automatically extended to all recipients of the covered 507 | work and works based on it. 508 | 509 | A patent license is "discriminatory" if it does not include within 510 | the scope of its coverage, prohibits the exercise of, or is 511 | conditioned on the non-exercise of one or more of the rights that are 512 | specifically granted under this License. You may not convey a covered 513 | work if you are a party to an arrangement with a third party that is 514 | in the business of distributing software, under which you make payment 515 | to the third party based on the extent of your activity of conveying 516 | the work, and under which the third party grants, to any of the 517 | parties who would receive the covered work from you, a discriminatory 518 | patent license (a) in connection with copies of the covered work 519 | conveyed by you (or copies made from those copies), or (b) primarily 520 | for and in connection with specific products or compilations that 521 | contain the covered work, unless you entered into that arrangement, 522 | or that patent license was granted, prior to 28 March 2007. 523 | 524 | Nothing in this License shall be construed as excluding or limiting 525 | any implied license or other defenses to infringement that may 526 | otherwise be available to you under applicable patent law. 527 | 528 | 12. No Surrender of Others' Freedom. 529 | 530 | If conditions are imposed on you (whether by court order, agreement or 531 | otherwise) that contradict the conditions of this License, they do not 532 | excuse you from the conditions of this License. If you cannot convey a 533 | covered work so as to satisfy simultaneously your obligations under this 534 | License and any other pertinent obligations, then as a consequence you may 535 | not convey it at all. For example, if you agree to terms that obligate you 536 | to collect a royalty for further conveying from those to whom you convey 537 | the Program, the only way you could satisfy both those terms and this 538 | License would be to refrain entirely from conveying the Program. 539 | 540 | 13. Remote Network Interaction; Use with the GNU General Public License. 541 | 542 | Notwithstanding any other provision of this License, if you modify the 543 | Program, your modified version must prominently offer all users 544 | interacting with it remotely through a computer network (if your version 545 | supports such interaction) an opportunity to receive the Corresponding 546 | Source of your version by providing access to the Corresponding Source 547 | from a network server at no charge, through some standard or customary 548 | means of facilitating copying of software. This Corresponding Source 549 | shall include the Corresponding Source for any work covered by version 3 550 | of the GNU General Public License that is incorporated pursuant to the 551 | following paragraph. 552 | 553 | Notwithstanding any other provision of this License, you have 554 | permission to link or combine any covered work with a work licensed 555 | under version 3 of the GNU General Public License into a single 556 | combined work, and to convey the resulting work. The terms of this 557 | License will continue to apply to the part which is the covered work, 558 | but the work with which it is combined will remain governed by version 559 | 3 of the GNU General Public License. 560 | 561 | 14. Revised Versions of this License. 562 | 563 | The Free Software Foundation may publish revised and/or new versions of 564 | the GNU Affero General Public License from time to time. Such new versions 565 | will be similar in spirit to the present version, but may differ in detail to 566 | address new problems or concerns. 567 | 568 | Each version is given a distinguishing version number. If the 569 | Program specifies that a certain numbered version of the GNU Affero General 570 | Public License "or any later version" applies to it, you have the 571 | option of following the terms and conditions either of that numbered 572 | version or of any later version published by the Free Software 573 | Foundation. If the Program does not specify a version number of the 574 | GNU Affero General Public License, you may choose any version ever published 575 | by the Free Software Foundation. 576 | 577 | If the Program specifies that a proxy can decide which future 578 | versions of the GNU Affero General Public License can be used, that proxy's 579 | public statement of acceptance of a version permanently authorizes you 580 | to choose that version for the Program. 581 | 582 | Later license versions may give you additional or different 583 | permissions. However, no additional obligations are imposed on any 584 | author or copyright holder as a result of your choosing to follow a 585 | later version. 586 | 587 | 15. Disclaimer of Warranty. 588 | 589 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 590 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 591 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 592 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 593 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 594 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 595 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 596 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 597 | 598 | 16. Limitation of Liability. 599 | 600 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 601 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 602 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 603 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 604 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 605 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 606 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 607 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 608 | SUCH DAMAGES. 609 | 610 | 17. Interpretation of Sections 15 and 16. 611 | 612 | If the disclaimer of warranty and limitation of liability provided 613 | above cannot be given local legal effect according to their terms, 614 | reviewing courts shall apply local law that most closely approximates 615 | an absolute waiver of all civil liability in connection with the 616 | Program, unless a warranty or assumption of liability accompanies a 617 | copy of the Program in return for a fee. 618 | 619 | END OF TERMS AND CONDITIONS 620 | 621 | How to Apply These Terms to Your New Programs 622 | 623 | If you develop a new program, and you want it to be of the greatest 624 | possible use to the public, the best way to achieve this is to make it 625 | free software which everyone can redistribute and change under these terms. 626 | 627 | To do so, attach the following notices to the program. It is safest 628 | to attach them to the start of each source file to most effectively 629 | state the exclusion of warranty; and each file should have at least 630 | the "copyright" line and a pointer to where the full notice is found. 631 | 632 | 633 | Copyright (C) 634 | 635 | This program is free software: you can redistribute it and/or modify 636 | it under the terms of the GNU Affero General Public License as published 637 | by the Free Software Foundation, either version 3 of the License, or 638 | (at your option) any later version. 639 | 640 | This program is distributed in the hope that it will be useful, 641 | but WITHOUT ANY WARRANTY; without even the implied warranty of 642 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 643 | GNU Affero General Public License for more details. 644 | 645 | You should have received a copy of the GNU Affero General Public License 646 | along with this program. If not, see . 647 | 648 | Also add information on how to contact you by electronic and paper mail. 649 | 650 | If your software can interact with users remotely through a computer 651 | network, you should also make sure that it provides a way for users to 652 | get its source. For example, if your program is a web application, its 653 | interface could display a "Source" link that leads users to an archive 654 | of the code. There are many ways you could offer source, and different 655 | solutions will be better for different programs; see section 13 for the 656 | specific requirements. 657 | 658 | You should also get your employer (if you work as a programmer) or school, 659 | if any, to sign a "copyright disclaimer" for the program, if necessary. 660 | For more information on this, and how to apply and follow the GNU AGPL, see 661 | . 662 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Zammad Helm Chart 2 | 3 | [![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/zammad)](https://artifacthub.io/packages/helm/zammad/zammad) 4 | [![Release downloads](https://img.shields.io/github/downloads/zammad/zammad-helm/total.svg)](https://github.com/zammad/zammad-helm/releases) 5 | [![Release Charts](https://github.com/zammad/zammad-helm/workflows/Release%20Charts/badge.svg)](https://github.com/zammad/zammad-helm/commits/master) 6 | 7 | A [Helm](https://helm.sh) chart to install [Zammad](https://zammad.org) on [Kubernetes](https://kubernetes.io) 8 | 9 | Please see [zammad/README.md](zammad/README.md) for detailed information & instructions. 10 | 11 | ## Sources 12 | 13 | * [Helm chart sources](https://github.com/zammad/zammad-helm) 14 | * [Helm repository source](https://github.com/zammad/zammad-helm/tree/gh-pages) 15 | * [Helm releases](https://github.com/zammad/zammad-helm/releases) 16 | 17 | ## Contributing 18 | 19 | Please see our [contributing guidelines](https://github.com/zammad/zammad-helm/blob/master/CONTRIBUTING.md). 20 | -------------------------------------------------------------------------------- /zammad/.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 | 23 | 24 | -------------------------------------------------------------------------------- /zammad/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: zammad 3 | version: 14.1.3 4 | appVersion: 6.5.0-75 5 | description: Zammad is a web based open source helpdesk/customer support system with many features to manage customer communication via several channels like telephone, facebook, twitter, chat and e-mails. 6 | home: https://zammad.org 7 | icon: https://raw.githubusercontent.com/zammad/zammad-documentation/main/images/zammad_logo_600x520.png 8 | sources: 9 | - https://github.com/zammad/zammad 10 | - https://github.com/zammad/zammad-helm 11 | maintainers: 12 | - name: monotek 13 | email: monotek23@gmail.com 14 | - name: mgruner 15 | email: enjoy@zammad.com 16 | dependencies: 17 | - name: elasticsearch 18 | repository: https://charts.bitnami.com/bitnami 19 | version: 21.6.3 20 | condition: zammadConfig.elasticsearch.enabled 21 | - name: minio 22 | version: 14.10.5 23 | repository: https://charts.bitnami.com/bitnami 24 | condition: zammadConfig.minio.enabled 25 | - name: memcached 26 | version: 7.8.3 27 | repository: https://charts.bitnami.com/bitnami 28 | condition: zammadConfig.memcached.enabled 29 | - name: postgresql 30 | version: 16.7.4 31 | repository: https://charts.bitnami.com/bitnami 32 | condition: zammadConfig.postgresql.enabled 33 | - name: redis 34 | version: 20.13.4 35 | repository: https://charts.bitnami.com/bitnami 36 | condition: zammadConfig.redis.enabled 37 | -------------------------------------------------------------------------------- /zammad/README.md: -------------------------------------------------------------------------------- 1 | # Zammad Helm Chart 2 | 3 | A [Helm](https://helm.sh) chart to install [Zammad](https://zammad.org) on [Kubernetes](https://kubernetes.io) 4 | 5 | ## About Zammad 6 | 7 | Are you juggling countless customer inquiries across multiple channels? 8 | Struggling to keep your support team on the same page? 9 | Or spending more time managing your helpdesk than delivering exceptional support to your customers? 10 | 11 | Zammad is your Swiss Army knife - a web-based, open-source helpdesk and customer support platform 12 | packed with features to streamline customer communication across channels like email, chat, telephone and social media. 13 | 14 | ### The Software 15 | 16 | The Zammad software is and will stay open source. It is licensed under the GNU AGPLv3. 17 | The source code is [available on GitHub](https://github.com/zammad/zammad) and owned by 18 | the [Zammad Foundation](https://zammad-foundation.org/), which is independent of commercial 19 | providers such as Zammad GmbH. 20 | 21 | ### The Company - Zammad GmbH 22 | 23 | The development of Zammad is carried out by the [amazing team of people](https://zammad.com/en/company) 24 | at [Zammad GmbH](https://zammad.com/) in collaboration with the community. 25 | We love to create open source software for you. If you want to ensure the Zammad software 26 | has a bright and sustainable future, consider becoming a Zammad customer! 27 | 28 | > Are you tired of complex setup, configuration, backup and update tasks? Let us handle this stuff for you! 🚀 29 | > 30 | > The easiest and often most cost-effective way to operate Zammad is [our cloud service](https://zammad.com/en/pricing). 31 | > Give it a try with a [free trial instance](https://zammad.com/en/getting-started)! 32 | 33 | ## Introduction 34 | 35 | This chart will do the following: 36 | 37 | - Install several `Deployment`s for the different Zammad services 38 | - Install Elasticsearch, Memcached, PostgreSQL, Redis & Minio (optional) as requirements 39 | 40 | Be aware that the Zammad Helm chart version is different from the actual Zammad version. 41 | 42 | ## Prerequisites 43 | 44 | - Kubernetes 1.19+ 45 | - Helm 3.2.0+ 46 | - Cluster with at least 4GB of free RAM 47 | 48 | ## Installing the Chart 49 | 50 | To install the chart use the following: 51 | 52 | ```console 53 | helm repo add zammad https://zammad.github.io/zammad-helm 54 | helm upgrade --install zammad zammad/zammad 55 | ``` 56 | 57 | Once the Zammad pod is ready, it can be accessed using the ingress or port forwarding. 58 | To use port forwarding: 59 | 60 | ```console 61 | kubectl port-forward service/zammad-nginx 8080 62 | ``` 63 | 64 | Now you can open in your browser. 65 | 66 | ## Uninstalling the Chart 67 | 68 | To remove the chart again use the following: 69 | 70 | ```console 71 | helm delete zammad 72 | ``` 73 | 74 | ## Configuration 75 | 76 | See [Customizing the Chart Before Installing](https://helm.sh/docs/intro/using_helm/#customizing-the-chart-before-installing). 77 | To see all configurable options with detailed comments, visit the chart's [values.yaml](./values.yaml), or run this configuration command: 78 | 79 | ```console 80 | helm show values zammad/zammad 81 | ``` 82 | 83 | ### Choosing the Storage Provider 84 | 85 | Zammad uses the database as the default storage provider for new systems. This works well for the majority of systems. 86 | Only if you have a large volume of tickets and attachments, you may need to store attachments in another storage provider. 87 | 88 | We recommend the `S3` storage provider using the optional `minio` subchart in this case. 89 | 90 | You can also use `File` storage. In this case, you need to provide an existing `PVC` via `zammadConfig.storageVolume`. 91 | Note that this `PVC` must provide `ReadWriteMany` access to work properly for the different Deployments which may be on different nodes. 92 | 93 | #### How to migrate from `File` to `S3` storage 94 | 95 | - In the admin panel, go to "System -> Storage" and select "Simple Storage (S3)" as the new storage provider. 96 | - Migrate existing `File` store content by running `kubectl exec zammad-0 -c zammad-railsserver -- rails r "Store::File.move('File', 'S3')"`. Example: 97 | 98 | ```log 99 | kubectl exec zammad-0 -c zammad-railsserver -- rails r "Store::File.move('File', 'S3')" 100 | I, [2024-01-24T11:06:13.501572 #168] INFO -- : ActionCable is using the redis instance at redis://:zammad@zammad-redis-master:6379. 101 | I, [2024-01-24T11:06:13.506180#168-5980] INFO -- : Using memcached as Rails cache store. 102 | I, [2024-01-24T11:06:13.506246#168-5980] INFO -- : Using the Redis back end for Zammad's web socket session store. 103 | I, [2024-01-24T11:06:14.561169#168-5980] INFO -- : storage remove '/opt/zammad/storage/fs/ab76/81d1/a4177/4c41f/12ddb67/96ee19e/a7e7c780a3227936c507cfbfe946afb9' 104 | I, [2024-01-24T11:06:14.561654#168-5980] INFO -- : Moved file ab7681d1a41774c41f12ddb6796ee19ea7e7c780a3227936c507cfbfe946afb9 from File to S3 105 | I, [2024-01-24T11:06:14.566327#168-5980] INFO -- : storage remove '/opt/zammad/storage/fs/dbaa/01dd/0df3a/33bce/e87c420/f221f59/6df9db38a402b30fccea09cc444a9fb0' 106 | I, [2024-01-24T11:06:14.566513#168-5980] INFO -- : Moved file dbaa01dd0df3a33bcee87c420f221f596df9db38a402b30fccea09cc444a9fb0 from File to S3 107 | I, [2024-01-24T11:06:14.627896#168-5980] INFO -- : storage remove '/opt/zammad/storage/fs/e81f/fb09/c5a26/f2081/f93401a/cbe8fff/9983e56c86fccb48d17a2eb1e5900b5b' 108 | ``` 109 | 110 | ### Deploying on OpenShift 111 | 112 | To deploy on OpenShift unprivileged and with [arbitrary UIDs and GIDs](https://cloud.redhat.com/blog/a-guide-to-openshift-and-uids): 113 | 114 | - [Delete the default key](https://helm.sh/docs/chart_template_guide/values_files/#deleting-a-default-key) `securityContext` and `zammadConfig.initContainers.zammad.securityContext.runAsUser` with `null`. 115 | - Disable if used: 116 | - also `podSecurityContext` in all subcharts. 117 | - the privileged [sysctlImage](https://github.com/bitnami/charts/tree/main/bitnami/elasticsearch#default-kernel-settings) in elasticsearch subchart. 118 | 119 | ```yaml 120 | securityContext: null 121 | 122 | zammadConfig: 123 | initContainers: 124 | zammad: 125 | securityContext: 126 | runAsUser: null 127 | volumePermissions: 128 | enabled: false 129 | tmpDirVolume: 130 | emptyDir: 131 | medium: memory 132 | 133 | elasticsearch: 134 | sysctlImage: 135 | enabled: false 136 | master: 137 | podSecurityContext: 138 | enabled: false 139 | containerSecurityContext: 140 | enabled: false 141 | 142 | memcached: 143 | podSecurityContext: 144 | enabled: false 145 | containerSecurityContext: 146 | enabled: false 147 | 148 | minio: 149 | podSecurityContext: 150 | enabled: false 151 | containerSecurityContext: 152 | enabled: false 153 | 154 | redis: 155 | master: 156 | podSecurityContext: 157 | enabled: false 158 | containerSecurityContext: 159 | enabled: false 160 | replica: 161 | podSecurityContext: 162 | enabled: false 163 | containerSecurityContext: 164 | enabled: false 165 | ``` 166 | 167 | ### Deploying with ArgoCD 168 | 169 | Due to the way Argo CD syncs Helm charts into the cluster and this chart deploying the initialization job, the default configuration can lead to Sync loops where Argo CD will create an infinite amount of initialization jobs. 170 | To prevent this, disable the random name for the initialization job and add the according annotation to the job to let Argo CD treat it as a Sync Hook. 171 | 172 | ```yaml 173 | zammadConfig: 174 | initJob: 175 | randomName: false 176 | annotations: 177 | argocd.argoproj.io/hook: Sync 178 | ``` 179 | 180 | ## Maintenance Tasks 181 | 182 | If you have to run any maintenance commands inside of the Zammad stack, you can do that by 183 | executing them inside of a running Zammad pod: 184 | 185 | ```sh 186 | kubectl exec zammad-railsserver-NAME_OF_YOUR_RAILSSERVER_POD -c zammad-railsserver -- bash 187 | ``` 188 | 189 | For reindexing the elasticsearch data, e.g. after application updates, there is a slightly more convenient way 190 | available. You can create a job from a cronjob template for it: 191 | 192 | ```sh 193 | kubectl create job my-reindex-job --from=cronjob/zammad-cronjob-reindex 194 | ``` 195 | 196 | This cronjob never runs by default, but you can channge `zammadConfig.cronJob.reindex.suspend` 197 | and `zammadConfig.cronJob.reindex.schedule` if you want to run it periodically. 198 | 199 | ## Upgrading 200 | 201 | ### From Chart Version 13.x to 14.0.0 202 | 203 | - The default value of `zammadConfig.elasticsearch.reindex` changed from `true` to `false`. This means that 204 | with the default value, the chart will no longer reindex the elasticsearch content after every single 205 | update (which caused search results to be incomplete until the reindexing finished). 206 | - With the new default value of `false`, the chart will still create an index on installation (if no index is present). 207 | 208 | ### From Chart Version 12.x to 13.0.0 209 | 210 | - All subcharts received updates to the latest major version. Please refer to their upgrading instructions. 211 | - Note especially [bitnami/postgresql#upgrading](https://artifacthub.io/packages/helm/bitnami/postgresql#upgrading), 212 | because the upgrade to PostgeSQL 17 will require manual action to upgrade the cluster data to the new version. 213 | 214 | ### From Chart Version 11.x to 12.0.0 215 | 216 | #### The Previous `StatefulSet` Was Split up into `Deployments` 217 | 218 | - `replicas` can be set independently now for `zammad-nginx` and `zammad-railsserver`, allowing free scaling and HA setup for these. 219 | - For `zammad-scheduler` and `zammad-websocket`, `replicas` is fixed to `1` as they may only run once in the cluster. 220 | - The `initContainers` moved to a new `zammad-init` `Job` now which will be run on every `helm upgrade`. This reduces startup time greatly. 221 | - The nginx `Service` was renamed from `zammad` to `zammad-nginx`. 222 | - The previous `Values.sidecars` setting does not exist any more. Instead, you need to specify sidecars now on a per deployment basis, e.g. `Values.zammadConfig.scheduler.sidecars`. 223 | 224 | #### Storage Requirements Changed 225 | 226 | - If you use the default `DB` or the new `S3` storage backend for file storage, you don't need to do anything. 227 | - If you use the `File` storage backend instead, Zammad now requires a `ReadWriteMany` volume for `storage/` that is shared in the cluster. 228 | - If you already had one via `persistence.existingClaim` before, you need to ensure it has `ReadWriteMany` access to be mountable across nodes and provide it via `zammadConfig.storageVolume.existingClaim`. 229 | - If you used the default `PersistentVolumeClaim` of the `StatefulSet`, you need to take manual action: 230 | - You can either migrate to `S3` storage **before upgrading** to the new major version as described above in [Configuration](#how-to-migrate-from-file-to-s3-storage). 231 | - Or you can provide a `zammadConfig.storageVolume.existingClaim` with `ReadWriteMany` permission and migrate your existing data to it from the old `StatefulSet`. 232 | 233 | ### From Chart Version 10.x to 11.0.0 234 | 235 | - Minimum Zammad version is now 6.3.0, where there is no `var/` folder any more, and the related 236 | mount points have been removed. 237 | - The handling of the Autowizard secret was simplified. It is no longer processed by an init container, 238 | but instead mounted directly into the Zammad container. Therefore the secret must contain the actual 239 | raw JSON value, and not the base64 encoded JSON. So if you use an existing Autowizard secret, 240 | you will need to change it to contain the raw value now. 241 | - There is a new `.Values.zammadConfig.postgresql.options` setting that can be used to specify additional 242 | settings for the database connection. By default it specifies Zammad's default Rails DB pool size of 50. 243 | For large installations you may need to increase this value. 244 | 245 | ### From Chart Version 9.x to 10.0.0 246 | 247 | - all containers uses `readOnlyRootFilesystem: true` again 248 | - volumePermissions init container config has been moved to initContainers section 249 | - if you used it before you have to adapt your config 250 | - it's also enabled by default now to workaround rails world writable tmp dir issues 251 | - if you don't like to use it you might want to set tmpDirVolume.emptyDir.medium to "Memory" instead 252 | 253 | ### From Chart Version 8.x to 9.0.0 254 | 255 | - Zammads PVC changed to only hold contents of /opt/zammad/var & /opt/zammad/storage instead of the whole Zammad content 256 | - A new PVC `zammad-var` is created for this 257 | - the old zammad PVC is kept in case you need data from there (for example if you used filesystem storage) 258 | - you need to copy the contents of /opt/zammad/storage to the new volume manually or restore them from a backup 259 | - to update Zammad you have to delete the Zammad StatefulSet first, as the immutable volume config is changed 260 | - `kubectl delete sts zammad` 261 | - `helm upgrade zammad zammad/zammad` 262 | - Zammads initContainer rsync step is no longer needed and therfore removed 263 | - DB config is now done via `DATABASE_URL` env var instead of creating a database.yml in the config directory 264 | - Zammads pod securityContext has a new default setting for "seccompProfile:" with value "type: RuntimeDefault" 265 | - Docker registry changed to ghcr.io/zammad/zammad 266 | - auto_wizard.json is placed into /opt/zammad/var directory now 267 | - All subcharts have been updated 268 | 269 | ### From Chart Version 7.x to 8.0.0 270 | 271 | SecurityContexts of pod and containers are configurable now. 272 | We also changed the default securitycontexts, to be a bit more restrictive, therefore the major version upgrade of the chart. 273 | 274 | On the pod level the following defaults are used: 275 | 276 | ```yaml 277 | securityContext: 278 | fsGroup: 1000 279 | runAsUser: 1000 280 | runAsNonRoot: true 281 | runAsGroup: 1000 282 | ``` 283 | 284 | On the containerlevel the following settings are used fo all zammad containers now (some init containers may run as root though): 285 | 286 | ```yaml 287 | securityContext: 288 | allowPrivilegeEscalation: false 289 | capabilities: 290 | drop: 291 | - ALL 292 | readOnlyRootFilesystem: true 293 | privileged: false 294 | ``` 295 | 296 | As `readOnlyRootFilesystem: true` is set for all Zammad containers, the Nginx container writes its PID and tmp files to `/tmp`. 297 | The `/tmp` volume can be configured via `zammadConfig.tmpDirVolume`. Currently a 100Mi emptyDir is used for that. 298 | The nginx config in `/etc/nginx/nginx.conf` is now populated from the Nginx configmap too. 299 | 300 | If the volumpermissions initContainer is used, the username and group are taken from the `securityContext.runAsUser` & `securityContext.runAsGroup` variables. 301 | 302 | The rsync command in the zammad-init container has been changed to not use "--no-perms --no-owner --no-group --omit-dir-times". 303 | If you wan't the old behaviout use the new `.Values.zammadConfig.initContainers.zammad.extraRsyncParams` variable, to add these options again. 304 | 305 | We've also set the Elasticsearch master heapsize to "512m" by default. 306 | 307 | ### From Chart Version 6.x to 7.0.0 308 | 309 | - Bitnami Elasticsearch chart is used now as Elastic does not support the old chart anymore in favour of ECK operator 310 | - reindexing of all data is needed so get sure "zammadConfig.elasticsearch.reindex" is set to "true" 311 | - Memchached was updated from 6.0.16 to 6.3.0 312 | - PostgreSQL chart was updated from 10.16.2 to 12.1.0 313 | - this includes major version change of Postgres DB version too 314 | - backup / restore is needed to update 315 | - postgres password settings were changed 316 | - see also upgrading [PostgreSQL upgrading notes](https://github.com/bitnami/charts/tree/main/bitnami/postgresql#upgrading) 317 | - Redis chart is updated from 16.8.7 to 17.3.7 318 | - see [Redis upgrading notes](https://github.com/bitnami/charts/tree/main/bitnami/redis#to-1700) 319 | - Zammad 320 | - Pod Security Policy settings were removed as these are [deprecated in Kubernetes 1.25](https://kubernetes.io/docs/concepts/security/pod-security-policy/) 321 | - Docker image tag is used from Chart.yaml "appVersion" field by default 322 | - Replicas can be configured (needs ReadWriteMany volume if replica > 1!) 323 | - livenessProbes and readinessProbe have been adjusted to not be the same 324 | - config values has been removed from chart readme as it's easier to maintain them at a single place 325 | 326 | ### From Chart Version 6.0.4 to 6.0.x 327 | 328 | - minimum helm version now is 3.2.0+ 329 | - minimum Kubernetes version now is 1.19+ 330 | 331 | ### From Chart Version 5.x to 6.x 332 | 333 | - `envConfig` variable was replaced with `zammadConfig` 334 | - `nginx`, `rails`, `scheduler`, `websocket` and `zammad` vars has been merged into `zammadConfig` 335 | - Chart dependency vars have changed (reside in `zammadConfig` too now), so if you've disabled any of them you have to adapt to the new values from the Chart.yaml 336 | - `extraEnv` var is a list now 337 | 338 | ### From Chart Version 4.x to 5.x 339 | 340 | - health checks have been extended from boolean flags that simply toggle readinessProbes and livenessProbes on the containers to templated 341 | ones: .zammad.{nginx,rails,websocket}.readinessProbe and .zammad.{nginx,rails,websocket}.livenessProbe have been removed in favor of livenessProbe/readinessProbe 342 | templates at .{nginx,railsserver,websocket}. You can customize those directly in your overriding values.yaml. 343 | - resource constraints have been grouped under .{nginx,railsserver,websocket} from above. They are disabled by default (same as prior versions), but in your overrides, make sure 344 | to reflect those changes. 345 | 346 | ### From Chart Version 1.x 347 | 348 | This has changed: 349 | 350 | - requirement chart condition variable name was changed 351 | - the labels have changed 352 | - the persistent volume claim was changed to persistent volume claim template 353 | - import your filebackup here 354 | - all requirement charts has been updated to the latest versions 355 | - Elasticsearch 356 | - docker image was changed to `elastic/elasticsearch` 357 | - version was raised from 5.6 to 7.6 358 | - reindexing will be done automatically 359 | - Postgres 360 | - `bitnami/postgresql` chart is used instead of `stable/postgresql` 361 | - version was raised from 10.6.0 to 11.7.0 362 | - there is no automated upgrade path 363 | - you have to import a backup manually 364 | - Memcached 365 | - `bitnami/memcached` chart is used instead of `stable/memcached` 366 | - version was raised from 1.5.6 to 1.5.22 367 | - nothing to do here 368 | 369 | **Before the update backup Zammad files and make a PostgreSQL backup, as you will need these backups later!** 370 | 371 | - If your helm release was named "zammad" and also installed in the namespace "zammad" like: 372 | 373 | ```bash 374 | helm upgrade --install zammad zammad/zammad --namespace=zammad --version=1.2.1 375 | ``` 376 | 377 | - Do the upgrade like this: 378 | 379 | ```bash 380 | helm delete --purge zammad 381 | kubectl -n zammad delete pvc data-zammad-postgresql-0 data-zammad-elasticsearch-data-0 data-zammad-elasticsearch-master-0 382 | helm upgrade --install zammad zammad/zammad --namespace=zammad --version=2.0.3 383 | ``` 384 | 385 | - Import your file and SQL backups inside the Zammad & PostgreSQL containers 386 | 387 | ### From Zammad 2.6.x to 3.x 388 | 389 | As Helm 2.x was deprecated Helm 3.x is needed now to install Zammad Helm chart. 390 | Minimum Kubernetes version is 1.16.x now. 391 | 392 | As PostgreSQL dependency Helm chart was updated, have a look at the upgrading instructions to 9.0.0 and 10.0.0 of the PostgreSQL chart: 393 | 394 | - 395 | - 396 | 397 | ### From Zammad 3.5.x to 4.x 398 | 399 | Ingress config has been updated to the default of charts created with Helm 3.6.0 so you might need to adapt your ingress config. 400 | -------------------------------------------------------------------------------- /zammad/ci/README.md: -------------------------------------------------------------------------------- 1 | # Chart-Testing 2 | 3 | This directory provides [files for testing different configurations with chart-testing](https://github.com/helm/chart-testing/blob/main/doc/ct_install.md). 4 | -------------------------------------------------------------------------------- /zammad/ci/default-values.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zammad/zammad-helm/129ee096941a8070fc81d3c366eda771b315d5d8/zammad/ci/default-values.yaml -------------------------------------------------------------------------------- /zammad/ci/full-objects.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | data: 3 | root-password: emFtbWFkYWRtaW4= 4 | root-user: emFtbWFkYWRtaW4= 5 | kind: Secret 6 | metadata: 7 | name: minio-existing-secret 8 | namespace: zammad 9 | type: Opaque 10 | --- 11 | apiVersion: v1 12 | data: 13 | redis-password: cmVkaXM= 14 | kind: Secret 15 | metadata: 16 | name: redis-existing-secret 17 | namespace: zammad 18 | type: Opaque 19 | --- 20 | apiVersion: v1 21 | data: 22 | postgresql-password: emFtbWFk 23 | kind: Secret 24 | metadata: 25 | name: postgresql-existing-secret 26 | namespace: zammad 27 | type: Opaque 28 | --- 29 | apiVersion: v1 30 | data: 31 | elasticsearch-password: emFtbWFk 32 | kind: Secret 33 | metadata: 34 | name: elasticsearch-existing-secret 35 | namespace: zammad 36 | type: Opaque 37 | --- 38 | apiVersion: v1 39 | data: 40 | autowizard: ewogICJVc2VycyI6IFsKICAgIHsKICAgICAgImxvZ2luIjogImFkbWluQGV4YW1wbGUuY29tIiwKICAgICAgImZpcnN0bmFtZSI6ICJUZXN0IEFkbWluIiwKICAgICAgImxhc3RuYW1lIjogIkFnZW50IiwKICAgICAgImVtYWlsIjogImFkbWluQGV4YW1wbGUuY29tIiwKICAgICAgInBhc3N3b3JkIjogInRlc3QiCiAgICB9LAogICAgewogICAgICAibG9naW4iOiAiYWdlbnQxQGV4YW1wbGUuY29tIiwKICAgICAgImZpcnN0bmFtZSI6ICJBZ2VudCAxIiwKICAgICAgImxhc3RuYW1lIjogIlRlc3QiLAogICAgICAiZW1haWwiOiAiYWdlbnQxQGV4YW1wbGUuY29tIiwKICAgICAgInBhc3N3b3JkIjogInRlc3QiLAogICAgICAicm9sZXMiOiBbIkFnZW50Il0KICAgIH0KICBdLAogICJHcm91cHMiOiBbCiAgICB7CiAgICAgICJuYW1lIjogInNvbWUgZ3JvdXAxIiwKICAgICAgInVzZXJzIjogWyJhZG1pbkBleGFtcGxlLmNvbSIsICJhZ2VudDFAZXhhbXBsZS5jb20iXQogICAgfSwKICAgIHsKICAgICAgIm5hbWUiOiAiVXNlcnMiLAogICAgICAidXNlcnMiOiBbImFkbWluQGV4YW1wbGUuY29tIiwgImFnZW50MUBleGFtcGxlLmNvbSJdLAogICAgICAic2lnbmF0dXJlIjogImRlZmF1bHQiLAogICAgICAiZW1haWxfYWRkcmVzc19pZCI6IDEKICAgIH0KICBdLAogICJDaGFubmVscyI6IFsKICAgIHsKICAgICAgImlkIjogMSwKICAgICAgImFyZWEiOiAiRW1haWw6OkFjY291bnQiLAogICAgICAiZ3JvdXAiOiAiVXNlcnMiLAogICAgICAib3B0aW9ucyI6IHsKICAgICAgICAiaW5ib3VuZCI6IHsKICAgICAgICAgICJhZGFwdGVyIjogImltYXAiLAogICAgICAgICAgIm9wdGlvbnMiOiB7CiAgICAgICAgICAgICJob3N0IjogIm14MS5leGFtcGxlLmNvbSIsCiAgICAgICAgICAgICJ1c2VyIjogIm5vdF9leGlzdGluZyIsCiAgICAgICAgICAgICJwYXNzd29yZCI6ICJub3RfZXhpc3RpbmciLAogICAgICAgICAgICAic3NsIjogInNzbCIKICAgICAgICAgIH0KICAgICAgICB9LAogICAgICAgICJvdXRib3VuZCI6IHsKICAgICAgICAgICJhZGFwdGVyIjogInNlbmRtYWlsIgogICAgICAgIH0KICAgICAgfQogICAgfQogIF0sCiAgIkVtYWlsQWRkcmVzc2VzIjogWwogICAgewogICAgICAiaWQiOiAxLAogICAgICAiY2hhbm5lbF9pZCI6IDEsCiAgICAgICJuYW1lIjogIlphbW1hZCBIZWxwZGVzayIsCiAgICAgICJlbWFpbCI6ICJ6YW1tYWRAbG9jYWxob3N0IgogICAgfQogIF0sCiAgIlNldHRpbmdzIjogWwogICAgewogICAgICAibmFtZSI6ICJwcm9kdWN0X25hbWUiLAogICAgICAidmFsdWUiOiAiWmFtbWFkIFRlc3QgU3lzdGVtIgogICAgfSwKICAgIHsKICAgICAgIm5hbWUiOiAiZGV2ZWxvcGVyX21vZGUiLAogICAgICAidmFsdWUiOiB0cnVlCiAgICB9CiAgXSwKICAiVGV4dE1vZHVsZUxvY2FsZSI6IHsKICAgICJMb2NhbGUiOiAiZGUtZGUiCiAgfQp9Cg== 41 | kind: Secret 42 | metadata: 43 | name: autowizard 44 | namespace: zammad 45 | type: Opaque 46 | --- 47 | apiVersion: v1 48 | kind: PersistentVolumeClaim 49 | metadata: 50 | name: storage-volume-claim 51 | namespace: zammad 52 | spec: 53 | accessModes: 54 | - ReadWriteOnce # Testing env does not provide ReadWrite Many, but for CI this is enough. 55 | resources: 56 | requests: 57 | storage: 32Mi 58 | --- 59 | apiVersion: v1 60 | kind: ConfigMap 61 | metadata: 62 | name: custom-file 63 | namespace: zammad 64 | data: 65 | custom_file.txt: test -------------------------------------------------------------------------------- /zammad/ci/full-values.yaml: -------------------------------------------------------------------------------- 1 | secrets: 2 | autowizard: 3 | useExisting: true 4 | secretKey: autowizard 5 | secretName: autowizard 6 | elasticsearch: 7 | useExisting: true 8 | secretKey: elasticsearch-password 9 | secretName: elasticsearch-existing-secret 10 | postgresql: 11 | useExisting: true 12 | secretKey: postgresql-password 13 | secretName: postgresql-existing-secret 14 | redis: 15 | useExisting: true 16 | secretKey: redis-password 17 | secretName: redis-existing-secret 18 | 19 | autoWizard: 20 | enabled: true 21 | 22 | elasticsearch: 23 | security: 24 | existingSecret: elasticsearch-existing-secret 25 | 26 | ingress: 27 | enabled: true 28 | 29 | minio: 30 | auth: 31 | existingSecret: minio-existing-secret 32 | 33 | redis: 34 | auth: 35 | existingSecret: redis-existing-secret 36 | existingSecretPasswordKey: redis-password 37 | 38 | zammadConfig: 39 | storageVolume: 40 | enabled: true 41 | existingClaim: 'storage-volume-claim' 42 | minio: 43 | enabled: true 44 | customVolumes: 45 | - name: custom-volume 46 | configMap: 47 | name: custom-file 48 | customVolumeMounts: 49 | - name: custom-volume 50 | mountPath: /opt/zammad/custom_mount 51 | readOnly: true 52 | nginx: 53 | clientMaxBodySize: 111M 54 | podLabels: 55 | my-nginx-pod-label: my-nginx-pod-label-value 56 | podAnnotations: 57 | my-nginx-pod-annotation: my-nginx-pod-annotation-value 58 | railsserver: 59 | podLabels: 60 | my-railsserver-pod-label: my-railsserver-pod-label-value 61 | podAnnotations: 62 | my-railsserver-pod-annotation: my-railsserver-pod-annotation-value 63 | scheduler: 64 | podLabels: 65 | my-scheduler-pod-label: my-scheduler-pod-label-value 66 | podAnnotations: 67 | my-scheduler-pod-annotation: my-scheduler-pod-annotation-value 68 | websocket: 69 | podLabels: 70 | my-websocket-pod-label: my-websocket-pod-label-value 71 | podAnnotations: 72 | my-websocket-pod-annotation: my-websocket-pod-annotation-value 73 | initJob: 74 | podLabels: 75 | my-initJob-pod-label: my-initJob-pod-label-value 76 | podAnnotations: 77 | my-initJob-pod-annotation: my-initJob-pod-annotation-value 78 | podSpec: 79 | activeDeadlineSeconds: 1337 80 | 81 | commonLabels: 82 | my-common-label: my-common-label-value 83 | 84 | commonAnnotations: 85 | my-common-annotation: my-common-annotation-value 86 | 87 | podLabels: 88 | my-pod-label: my-pod-label-value 89 | 90 | podAnnotations: 91 | my-pod-annotation: my-pod-annotation-value 92 | -------------------------------------------------------------------------------- /zammad/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | 1. Get the application URL by running these commands: 2 | {{- if .Values.ingress.enabled }} 3 | {{- range $host := .Values.ingress.hosts }} 4 | {{- range .paths }} 5 | http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} 6 | {{- end }} 7 | {{- end }} 8 | {{- else if contains "NodePort" .Values.service.type }} 9 | export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "zammad.fullname" . }}) 10 | export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") 11 | echo http://$NODE_IP:$NODE_PORT 12 | {{- else if contains "LoadBalancer" .Values.service.type }} 13 | NOTE: It may take a few minutes for the LoadBalancer IP to be available. 14 | You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "zammad.fullname" . }}' 15 | export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "zammad.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") 16 | echo http://$SERVICE_IP:{{ .Values.service.port }} 17 | {{- else if contains "ClusterIP" .Values.service.type }} 18 | export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "zammad.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") 19 | echo "Visit http://127.0.0.1:8080 to use your application" 20 | kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:8080 21 | {{- end }} 22 | -------------------------------------------------------------------------------- /zammad/templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{/* vim: set filetype=mustache: */}} 2 | {{/* 3 | Expand the name of the chart. 4 | */}} 5 | {{- define "zammad.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 | If release name contains chart name it will be used as a full name. 13 | */}} 14 | {{- define "zammad.fullname" -}} 15 | {{- if .Values.fullnameOverride -}} 16 | {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} 17 | {{- else -}} 18 | {{- $name := default .Chart.Name .Values.nameOverride -}} 19 | {{- if contains $name .Release.Name -}} 20 | {{- .Release.Name | trunc 63 | trimSuffix "-" -}} 21 | {{- else -}} 22 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} 23 | {{- end -}} 24 | {{- end -}} 25 | {{- end -}} 26 | 27 | {{/* 28 | Create chart name and version as used by the chart label. 29 | */}} 30 | {{- define "zammad.chart" -}} 31 | {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} 32 | {{- end -}} 33 | 34 | {{/* 35 | Common labels 36 | */}} 37 | {{- define "zammad.labels" -}} 38 | helm.sh/chart: {{ include "zammad.chart" . }} 39 | {{ include "zammad.selectorLabels" . }} 40 | {{- if .Chart.AppVersion }} 41 | app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} 42 | {{- end }} 43 | app.kubernetes.io/managed-by: {{ .Release.Service }} 44 | {{- with .Values.commonLabels }} 45 | {{ toYaml . }} 46 | {{- end }} 47 | {{- end -}} 48 | 49 | {{/* 50 | Pod labels 51 | */}} 52 | {{- define "zammad.podLabels" -}} 53 | {{ include "zammad.labels" . }} 54 | {{- with .Values.podLabels }} 55 | {{ toYaml . }} 56 | {{- end }} 57 | {{- end -}} 58 | 59 | {{/* 60 | Selector labels 61 | */}} 62 | {{- define "zammad.selectorLabels" -}} 63 | app.kubernetes.io/name: {{ include "zammad.name" . }} 64 | app.kubernetes.io/instance: {{ .Release.Name }} 65 | {{- end -}} 66 | 67 | {{/* 68 | Common annotations 69 | */}} 70 | {{- define "zammad.annotations" -}} 71 | {{- with .Values.commonAnnotations }} 72 | {{ toYaml . }} 73 | {{- end }} 74 | {{- end -}} 75 | 76 | {{/* 77 | Pod annotations 78 | */}} 79 | {{- define "zammad.podAnnotations" -}} 80 | {{ include "zammad.annotations" . }} 81 | {{- with .Values.podAnnotations }} 82 | {{ toYaml . }} 83 | {{- end }} 84 | {{- end -}} 85 | 86 | {{/* 87 | Create the name of the service account to use 88 | */}} 89 | {{- define "zammad.serviceAccountName" -}} 90 | {{- if .Values.serviceAccount.create -}} 91 | {{ default (include "zammad.fullname" .) .Values.serviceAccount.name }} 92 | {{- else -}} 93 | {{ default "default" .Values.serviceAccount.name }} 94 | {{- end -}} 95 | {{- end -}} 96 | 97 | {{/* 98 | autowizard secret name 99 | */}} 100 | {{- define "zammad.autowizardSecretName" -}} 101 | {{- if .Values.secrets.autowizard.useExisting -}} 102 | {{ .Values.secrets.autowizard.secretName }} 103 | {{- else -}} 104 | {{ include "zammad.fullname" . }}-{{ .Values.secrets.autowizard.secretName }} 105 | {{- end -}} 106 | {{- end -}} 107 | 108 | {{/* 109 | elasticsearch secret name 110 | */}} 111 | {{- define "zammad.elasticsearchSecretName" -}} 112 | {{- if .Values.secrets.elasticsearch.useExisting -}} 113 | {{ .Values.secrets.elasticsearch.secretName }} 114 | {{- else -}} 115 | {{ include "zammad.fullname" . }}-{{ .Values.secrets.elasticsearch.secretName }} 116 | {{- end -}} 117 | {{- end -}} 118 | 119 | {{/* 120 | postgresql secret name 121 | */}} 122 | {{- define "zammad.postgresqlSecretName" -}} 123 | {{- if .Values.secrets.postgresql.useExisting -}} 124 | {{ .Values.secrets.postgresql.secretName }} 125 | {{- else -}} 126 | {{ include "zammad.fullname" . }}-{{ .Values.secrets.postgresql.secretName }} 127 | {{- end -}} 128 | {{- end -}} 129 | 130 | {{/* 131 | redis secret name 132 | */}} 133 | {{- define "zammad.redisSecretName" -}} 134 | {{- if .Values.secrets.redis.useExisting -}} 135 | {{ .Values.secrets.redis.secretName }} 136 | {{- else -}} 137 | {{ include "zammad.fullname" . }}-{{ .Values.secrets.redis.secretName }} 138 | {{- end -}} 139 | {{- end -}} 140 | 141 | {{/* 142 | S3 access URL 143 | */}} 144 | {{- define "zammad.env.S3_URL" -}} 145 | {{- with .Values.zammadConfig.minio.externalS3Url -}} 146 | - name: S3_URL 147 | value: {{ . | quote }} 148 | {{- else -}} 149 | {{- if .Values.zammadConfig.minio.enabled -}} 150 | {{- if .Values.minio.auth.existingSecret -}} 151 | - name: MINIO_ROOT_USER 152 | valueFrom: 153 | secretKeyRef: 154 | key: root-user 155 | name: {{ .Values.minio.auth.existingSecret }} 156 | - name: MINIO_ROOT_PASSWORD 157 | valueFrom: 158 | secretKeyRef: 159 | key: root-password 160 | name: {{ .Values.minio.auth.existingSecret }} 161 | - name: S3_URL 162 | value: "http://$(MINIO_ROOT_USER):$(MINIO_ROOT_PASSWORD)@{{ include "zammad.fullname" . }}-minio:9000/zammad?region=zammad&force_path_style=true" 163 | {{- else -}} 164 | - name: S3_URL 165 | value: "http://{{ .Values.minio.auth.rootUser }}:{{ .Values.minio.auth.rootPassword }}@{{ include "zammad.fullname" . }}-minio:9000/zammad?region=zammad&force_path_style=true" 166 | {{- end -}} 167 | {{- end -}} 168 | {{- end -}} 169 | {{- end -}} 170 | 171 | {{/* 172 | environment variables for the Zammad Rails stack 173 | */}} 174 | {{- define "zammad.env" -}} 175 | {{- if or .Values.zammadConfig.redis.pass .Values.secrets.redis.useExisting -}} 176 | - name: REDIS_PASSWORD 177 | valueFrom: 178 | secretKeyRef: 179 | name: {{ include "zammad.redisSecretName" . }} 180 | key: {{ .Values.secrets.redis.secretKey }} 181 | {{- end }} 182 | - name: MEMCACHE_SERVERS 183 | value: "{{ if .Values.zammadConfig.memcached.enabled }}{{ .Release.Name }}-memcached{{ else }}{{ .Values.zammadConfig.memcached.host }}{{ end }}:{{ .Values.zammadConfig.memcached.port }}" 184 | - name: RAILS_TRUSTED_PROXIES 185 | value: "{{ .Values.zammadConfig.railsserver.trustedProxies }}" 186 | - name: REDIS_URL 187 | value: "redis://:$(REDIS_PASSWORD)@{{ if .Values.zammadConfig.redis.enabled }}{{ .Release.Name }}-redis-master{{ else }}{{ .Values.zammadConfig.redis.host }}{{ end }}:{{ .Values.zammadConfig.redis.port }}" 188 | - name: POSTGRESQL_PASS 189 | valueFrom: 190 | secretKeyRef: 191 | name: {{ include "zammad.postgresqlSecretName" . }} 192 | key: {{ .Values.secrets.postgresql.secretKey }} 193 | - name: DATABASE_URL 194 | value: "postgres://{{ .Values.zammadConfig.postgresql.user }}:$(POSTGRESQL_PASS)@{{ if .Values.zammadConfig.postgresql.enabled }}{{ .Release.Name }}-postgresql{{ else }}{{ .Values.zammadConfig.postgresql.host }}{{ end }}:{{ .Values.zammadConfig.postgresql.port }}/{{ .Values.zammadConfig.postgresql.db }}?{{ .Values.zammadConfig.postgresql.options }}" 195 | {{ include "zammad.env.S3_URL" . }} 196 | - name: TMP # All zammad containers need the possibility to create temporary files, e.g. for file uploads or image resizing. 197 | value: {{ .Values.zammadConfig.railsserver.tmpdir }} 198 | {{- with .Values.extraEnv }} 199 | {{ toYaml . }} 200 | {{- end }} 201 | {{- if .Values.autoWizard.enabled }} 202 | - name: AUTOWIZARD_RELATIVE_PATH 203 | value: tmp/auto_wizard/auto_wizard.json 204 | {{- end }} 205 | {{- end -}} 206 | 207 | {{/* 208 | environment variable to let Rails fail during startup if migrations are pending 209 | */}} 210 | {{- define "zammad.env.failOnPendingMigrations" -}} 211 | # Let containers fail if migrations are pending. 212 | - name: RAILS_CHECK_PENDING_MIGRATIONS 213 | value: 'true' 214 | {{- end -}} 215 | 216 | {{/* 217 | volume mounts for the Zammad Rails stack 218 | */}} 219 | {{- define "zammad.volumeMounts" -}} 220 | - name: {{ include "zammad.fullname" . }}-tmp 221 | mountPath: /tmp 222 | - name: {{ include "zammad.fullname" . }}-tmp 223 | mountPath: /opt/zammad/tmp 224 | {{- if .Values.zammadConfig.storageVolume.enabled }} 225 | - name: {{ include "zammad.fullname" . }}-storage 226 | mountPath: /opt/zammad/storage 227 | {{- end -}} 228 | {{- if .Values.autoWizard.enabled }} 229 | - name: autowizard 230 | mountPath: "/opt/zammad/tmp/auto_wizard" 231 | {{- end }} 232 | {{- with .Values.zammadConfig.customVolumeMounts }} 233 | {{ toYaml . }} 234 | {{- end -}} 235 | {{- end -}} 236 | 237 | {{/* 238 | volumes for the Zammad Rails stack 239 | */}} 240 | {{- define "zammad.volumes" -}} 241 | - name: {{ include "zammad.fullname" . }}-tmp 242 | {{- toYaml .Values.zammadConfig.tmpDirVolume | nindent 2 }} 243 | {{- if .Values.zammadConfig.storageVolume.enabled }} 244 | {{- if .Values.zammadConfig.storageVolume.existingClaim }} 245 | - name: {{ include "zammad.fullname" . }}-storage 246 | persistentVolumeClaim: 247 | claimName: {{ .Values.zammadConfig.storageVolume.existingClaim | default (include "zammad.fullname" .) }} 248 | {{- else }} 249 | {{ fail "Please provide an existing PersistentVolumeClaim with ReadWriteMany access if you enable .Values.zammadConfig.storageVolume." }} 250 | {{- end -}} 251 | {{- end -}} 252 | {{- if .Values.autoWizard.enabled }} 253 | - name: autowizard 254 | secret: 255 | secretName: {{ include "zammad.autowizardSecretName" . }} 256 | items: 257 | - key: {{ .Values.secrets.autowizard.secretKey }} 258 | path: auto_wizard.json 259 | {{- end }} 260 | {{- with .Values.zammadConfig.customVolumes }} 261 | {{ toYaml . }} 262 | {{- end -}} 263 | {{- end -}} 264 | 265 | {{/* 266 | shared configuration for Zammad Pods 267 | */}} 268 | {{- define "zammad.podSpec" -}} 269 | {{- with .Values.image.imagePullSecrets }} 270 | imagePullSecrets: 271 | {{- toYaml . | nindent 2 }} 272 | {{- end }} 273 | {{- if .Values.serviceAccount.create }} 274 | serviceAccountName: {{ include "zammad.serviceAccountName" . }} 275 | {{- end }} 276 | {{- with .Values.nodeSelector }} 277 | nodeSelector: 278 | {{- toYaml . | nindent 2 }} 279 | {{- end }} 280 | {{- with .Values.affinity }} 281 | affinity: 282 | {{- toYaml . | nindent 2 }} 283 | {{- end }} 284 | {{- with .Values.tolerations }} 285 | tolerations: 286 | {{- toYaml . | nindent 2 }} 287 | {{- end }} 288 | {{- with .Values.securityContext }} 289 | securityContext: 290 | {{- toYaml . | nindent 2 }} 291 | {{- end }} 292 | {{- end -}} 293 | 294 | {{/* 295 | init containers for Zammad Pods 296 | */}} 297 | {{- define "zammad.podSpec.initContainers" -}} 298 | {{- if .Values.zammadConfig.initContainers.volumePermissions.enabled }} 299 | - name: zammad-volume-permissions 300 | image: "{{ .Values.zammadConfig.initContainers.volumePermissions.image.repository }}:{{ .Values.zammadConfig.initContainers.volumePermissions.image.tag }}" 301 | imagePullPolicy: {{ .Values.zammadConfig.initContainers.volumePermissions.image.pullPolicy }} 302 | command: 303 | {{- .Values.zammadConfig.initContainers.volumePermissions.command | toYaml | nindent 4 }} 304 | {{- with .Values.zammadConfig.initContainers.volumePermissions.resources }} 305 | resources: 306 | {{- toYaml . | nindent 4 }} 307 | {{- end }} 308 | {{- with .Values.zammadConfig.initContainers.volumePermissions.securityContext }} 309 | securityContext: 310 | {{- toYaml . | nindent 4 }} 311 | {{- end }} 312 | volumeMounts: 313 | {{- include "zammad.volumeMounts" . | nindent 4 }} 314 | {{- end }} 315 | {{- end -}} 316 | 317 | {{/* 318 | shared configuration for Zammad Deployment Pods 319 | */}} 320 | {{- define "zammad.podSpec.deployment" -}} 321 | {{ include "zammad.podSpec" . }} 322 | initContainers: 323 | {{ include "zammad.podSpec.initContainers" . | nindent 2 }} 324 | {{- end -}} 325 | 326 | {{/* 327 | shared configuration for Zammad containers 328 | */}} 329 | {{- define "zammad.containerSpec" -}} 330 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" 331 | imagePullPolicy: {{ .Values.image.pullPolicy }} 332 | {{- with .containerConfig.startupProbe }} 333 | startupProbe: 334 | {{- toYaml . | nindent 2 }} 335 | {{- end }} 336 | {{- with .containerConfig.livenessProbe }} 337 | livenessProbe: 338 | {{- toYaml . | nindent 2 }} 339 | {{- end }} 340 | {{- with .containerConfig.readinessProbe }} 341 | readinessProbe: 342 | {{- toYaml . | nindent 2 }} 343 | {{- end }} 344 | {{- with .containerConfig.resources }} 345 | resources: 346 | {{- toYaml . | nindent 2 }} 347 | {{- end }} 348 | {{- with .containerConfig.securityContext }} 349 | securityContext: 350 | {{- toYaml . | nindent 2 }} 351 | {{- end }} 352 | {{- end -}} 353 | -------------------------------------------------------------------------------- /zammad/templates/configmap-init.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: {{ include "zammad.fullname" . }}-init 5 | labels: 6 | {{- include "zammad.labels" . | nindent 4 }} 7 | annotations: 8 | {{- include "zammad.annotations" . | nindent 4 }} 9 | data: 10 | postgresql-init: |- 11 | #!/bin/bash 12 | set -e 13 | 14 | if ! (bundle exec rails r 'puts User.any?' 2> /dev/null | grep -q true); then 15 | bundle exec rake db:migrate db:seed 16 | else 17 | echo Executing migrations... 18 | bundle exec rake db:migrate 19 | 20 | echo Synchronizing locales and translations... 21 | bundle exec rails r "Locale.sync; Translation.sync" 22 | fi 23 | 24 | echo "postgresql init complete :)" 25 | postgresql-init-post: |- 26 | #!/bin/bash 27 | set -e 28 | 29 | # Run a rails command to ensure the database is up and running. 30 | bundle exec rails r "true" 31 | 32 | echo "init sequence complete :)" 33 | zammad-init: |- 34 | #!/bin/bash 35 | set -e 36 | 37 | {{- with .Values.zammadConfig.initContainers.zammad.customInit }} 38 | {{- . | nindent 4 }} 39 | {{- end }} 40 | 41 | echo "zammad init complete :)" 42 | {{ if .Values.zammadConfig.elasticsearch.initialisation }} 43 | elasticsearch-init: |- 44 | #!/bin/bash 45 | set -e 46 | 47 | ELASTICSEARCH_URL={{ .Values.zammadConfig.elasticsearch.schema }}://{{ if .Values.zammadConfig.elasticsearch.enabled }}{{ .Release.Name }}-elasticsearch{{ else }}{{ .Values.zammadConfig.elasticsearch.host }}{{ end }}:{{ .Values.zammadConfig.elasticsearch.port }} 48 | bundle exec rails r "Setting.set('es_url', '${ELASTICSEARCH_URL}')" 49 | 50 | ELASTICSEARCH_USER=${ELASTICSEARCH_USER:-{{ .Values.zammadConfig.elasticsearch.user }}} 51 | if [ -n "${ELASTICSEARCH_USER}" ] && [ -n "${ELASTICSEARCH_PASSWORD}" ]; then 52 | bundle exec rails r "Setting.set('es_user', '${ELASTICSEARCH_USER}'); Setting.set('es_password', '${ELASTICSEARCH_PASSWORD}')" 53 | fi 54 | 55 | {{ if .Values.zammadConfig.elasticsearch.reindex }} 56 | bundle exec rake zammad:searchindex:rebuild 57 | {{ else }} 58 | echo "Checking if an elasticsearch index already exists…" 59 | 60 | # Ensure ES connectivity, as SearchIndexBackend.index_exists? swallows internal errors. 61 | bundle exec rails r "SearchIndexBackend.version" 62 | 63 | if bundle exec rails r "SearchIndexBackend.index_exists?('Ticket') || exit(1)" 64 | then 65 | echo "Elasticsearch index exists, no automatic reindexing is needed." 66 | else 67 | echo "Elasticsearch index does not exist yet, create it now…" 68 | bundle exec rake zammad:searchindex:rebuild 69 | fi 70 | {{ end }} 71 | 72 | echo "elasticsearch init complete :)" 73 | {{ end }} 74 | -------------------------------------------------------------------------------- /zammad/templates/configmap-nginx.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: {{ include "zammad.fullname" . }}-nginx 5 | labels: 6 | {{- include "zammad.labels" . | nindent 4 }} 7 | annotations: 8 | {{- include "zammad.annotations" . | nindent 4 }} 9 | data: 10 | default: |- 11 | # 12 | # kubernetes nginx config for zammad 13 | # 14 | 15 | server_tokens off; 16 | 17 | upstream zammad-railsserver { 18 | server {{ include "zammad.fullname" . }}-railsserver:3000; 19 | } 20 | 21 | upstream zammad-websocket { 22 | server {{ include "zammad.fullname" . }}-websocket:6042; 23 | } 24 | 25 | server { 26 | listen 8080; 27 | 28 | server_name _; 29 | 30 | root /opt/zammad/public; 31 | 32 | client_body_temp_path /tmp 1 2; 33 | fastcgi_temp_path /tmp 1 2; 34 | proxy_temp_path /tmp 1 2; 35 | scgi_temp_path /tmp 1 2; 36 | uwsgi_temp_path /tmp 1 2; 37 | 38 | access_log /dev/stdout; 39 | error_log /dev/stderr; 40 | 41 | client_max_body_size {{ .Values.zammadConfig.nginx.clientMaxBodySize }}; 42 | 43 | {{- /* Trusted proxies */}} 44 | {{ if .Values.zammadConfig.nginx.trustedProxies }} 45 | {{ range .Values.zammadConfig.nginx.trustedProxies }} 46 | set_real_ip_from {{ . }}; 47 | {{- end }} 48 | real_ip_header X-Forwarded-For; 49 | real_ip_recursive on; 50 | {{- end }} 51 | 52 | {{- if .Values.zammadConfig.nginx.knowledgeBaseUrl }} 53 | {{ if hasPrefix "/" .Values.zammadConfig.nginx.knowledgeBaseUrl }} 54 | rewrite ^{{ .Values.zammadConfig.nginx.knowledgeBaseUrl }}(.*)$ /help$1 last; 55 | {{- else }} 56 | {{- $url := urlParse ( list "//" .Values.zammadConfig.nginx.knowledgeBaseUrl | join "" ) }} 57 | if ($host = {{ $url.host }} ) { 58 | rewrite ^/(api|assets)/(.*)$ /$1/$2 last; 59 | rewrite ^{{ $url.path }}(.*)$ /help$1 last; 60 | } 61 | {{- end }} 62 | {{- end }} 63 | 64 | location ~ ^/(assets/|robots.txt|humans.txt|favicon.ico) { 65 | expires max; 66 | } 67 | 68 | location /ws { 69 | proxy_http_version 1.1; 70 | proxy_set_header Upgrade $http_upgrade; 71 | proxy_set_header Connection "Upgrade"; 72 | proxy_set_header Host $http_host; 73 | proxy_set_header CLIENT_IP $remote_addr; 74 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 75 | {{- range .Values.zammadConfig.nginx.websocketExtraHeaders }} 76 | proxy_set_header {{ . }}; 77 | {{- end }} 78 | proxy_read_timeout 86400; 79 | proxy_pass http://zammad-websocket; 80 | } 81 | 82 | location /cable { 83 | proxy_http_version 1.1; 84 | proxy_set_header Upgrade $http_upgrade; 85 | proxy_set_header Connection "Upgrade"; 86 | proxy_set_header Host $http_host; 87 | proxy_set_header CLIENT_IP $remote_addr; 88 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 89 | proxy_read_timeout 86400; 90 | proxy_pass http://zammad-railsserver; 91 | } 92 | 93 | location / { 94 | proxy_http_version 1.1; 95 | {{- if .Values.zammadConfig.nginx.knowledgeBaseUrl }} 96 | proxy_set_header X-ORIGINAL-URL $request_uri; 97 | {{- end }} 98 | proxy_set_header Host $http_host; 99 | proxy_set_header CLIENT_IP $remote_addr; 100 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 101 | {{- range .Values.zammadConfig.nginx.extraHeaders }} 102 | proxy_set_header {{ . }}; 103 | {{- end }} 104 | proxy_read_timeout 180; 105 | proxy_pass http://zammad-railsserver; 106 | 107 | gzip on; 108 | gzip_types text/plain text/xml text/css image/svg+xml application/javascript application/x-javascript application/json application/xml; 109 | gzip_proxied any; 110 | } 111 | } 112 | nginx.conf: |- 113 | worker_processes auto; 114 | 115 | pid /tmp/nginx.pid; 116 | 117 | include /etc/nginx/modules-enabled/*.conf; 118 | 119 | events { 120 | worker_connections 768; 121 | } 122 | 123 | http { 124 | sendfile on; 125 | tcp_nopush on; 126 | types_hash_max_size 2048; 127 | 128 | include /etc/nginx/mime.types; 129 | default_type application/octet-stream; 130 | 131 | ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; 132 | ssl_prefer_server_ciphers on; 133 | 134 | access_log /dev/stdout; 135 | error_log /dev/stdout; 136 | 137 | gzip on; 138 | 139 | include /etc/nginx/conf.d/*.conf; 140 | include /etc/nginx/sites-enabled/*; 141 | } 142 | -------------------------------------------------------------------------------- /zammad/templates/cronjob-reindex.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: batch/v1 2 | kind: CronJob 3 | metadata: 4 | name: {{ include "zammad.fullname" . }}-cronjob-reindex 5 | labels: 6 | {{- include "zammad.labels" . | nindent 4 }} 7 | app.kubernetes.io/component: zammad-cronjob-reindex 8 | annotations: 9 | {{- include "zammad.annotations" . | nindent 4 }} 10 | {{- with .Values.zammadConfig.cronJob.reindex.annotations }} 11 | {{- toYaml . | nindent 4 }} 12 | {{- end }} 13 | spec: 14 | suspend: {{ .Values.zammadConfig.cronJob.reindex.suspend | toYaml }} 15 | schedule: {{ .Values.zammadConfig.cronJob.reindex.schedule | toYaml }} 16 | jobTemplate: 17 | spec: 18 | ttlSecondsAfterFinished: 300 19 | template: 20 | metadata: 21 | annotations: 22 | {{- include "zammad.podAnnotations" . | nindent 12 }} 23 | {{- with .Values.zammadConfig.cronJob.reindex.podAnnotations }} 24 | {{- toYaml . | nindent 12}} 25 | {{- end }} 26 | labels: 27 | {{- include "zammad.podLabels" . | nindent 12 }} 28 | app.kubernetes.io/component: zammad-init 29 | {{- with .Values.zammadConfig.cronJob.reindex.podLabels }} 30 | {{- toYaml . | nindent 12}} 31 | {{- end }} 32 | spec: 33 | {{- include "zammad.podSpec" . | nindent 10 }} 34 | {{- with .Values.zammadConfig.cronJob.reindex.podSpec }} 35 | {{- toYaml . | nindent 10}} 36 | {{- end }} 37 | restartPolicy: Never 38 | initContainers: 39 | {{- include "zammad.podSpec.initContainers" . | nindent 12 }} 40 | containers: 41 | - name: reindex 42 | {{- include "zammad.containerSpec" (merge (dict "containerConfig" .Values.zammadConfig.initContainers.postgresql) .) | nindent 14 }} 43 | command: 44 | - "bundle" 45 | - "exec" 46 | - "rake" 47 | - "zammad:searchindex:rebuild" 48 | env: 49 | {{- include "zammad.env" . | nindent 16 }} 50 | volumeMounts: 51 | {{- include "zammad.volumeMounts" . | nindent 16 }} 52 | volumes: 53 | {{- include "zammad.volumes" . | nindent 12 }} -------------------------------------------------------------------------------- /zammad/templates/deployment-nginx.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ include "zammad.fullname" . }}-nginx 5 | labels: 6 | {{- include "zammad.labels" . | nindent 4 }} 7 | app.kubernetes.io/component: zammad-nginx 8 | annotations: 9 | {{- include "zammad.annotations" . | nindent 4 }} 10 | spec: 11 | replicas: {{ .Values.zammadConfig.nginx.replicas }} 12 | selector: 13 | matchLabels: 14 | {{- include "zammad.selectorLabels" . | nindent 6 }} 15 | template: 16 | metadata: 17 | annotations: 18 | {{- include "zammad.podAnnotations" . | nindent 8 }} 19 | {{- with .Values.zammadConfig.nginx.podAnnotations }} 20 | {{- toYaml . | nindent 8}} 21 | {{- end }} 22 | labels: 23 | {{- include "zammad.podLabels" . | nindent 8 }} 24 | app.kubernetes.io/component: zammad-nginx 25 | {{- with .Values.zammadConfig.nginx.podLabels }} 26 | {{- toYaml . | nindent 8}} 27 | {{- end }} 28 | spec: 29 | {{- include "zammad.podSpec.deployment" . | nindent 6 }} 30 | containers: 31 | {{- with .Values.zammadConfig.nginx.sidecars }} 32 | {{- toYaml . | nindent 8}} 33 | {{- end }} 34 | - name: zammad-nginx 35 | {{- include "zammad.containerSpec" (merge (dict "containerConfig" .Values.zammadConfig.nginx) .) | nindent 10 }} 36 | command: 37 | - /usr/sbin/nginx 38 | - -g 39 | - 'daemon off;' 40 | env: 41 | {{- include "zammad.env" . | nindent 12 }} 42 | {{- include "zammad.env.failOnPendingMigrations" . | nindent 12 }} 43 | ports: 44 | - name: http 45 | containerPort: 8080 46 | volumeMounts: 47 | {{- include "zammad.volumeMounts" . | nindent 12 }} 48 | - name: {{ include "zammad.fullname" . }}-nginx 49 | mountPath: /etc/nginx/nginx.conf 50 | subPath: nginx.conf 51 | readOnly: true 52 | - name: {{ include "zammad.fullname" . }}-nginx 53 | mountPath: /etc/nginx/sites-enabled/default 54 | subPath: default 55 | readOnly: true 56 | - name: {{ include "zammad.fullname" . }}-tmp 57 | mountPath: /var/log/nginx 58 | volumes: 59 | {{- include "zammad.volumes" . | nindent 8 }} 60 | - name: {{ include "zammad.fullname" . }}-init 61 | configMap: 62 | name: {{ include "zammad.fullname" . }}-init 63 | defaultMode: 0755 64 | - name: {{ include "zammad.fullname" . }}-nginx 65 | configMap: 66 | name: {{ include "zammad.fullname" . }}-nginx 67 | -------------------------------------------------------------------------------- /zammad/templates/deployment-railsserver.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ include "zammad.fullname" . }}-railsserver 5 | labels: 6 | {{- include "zammad.labels" . | nindent 4 }} 7 | app.kubernetes.io/component: zammad-railsserver 8 | annotations: 9 | {{- include "zammad.annotations" . | nindent 4 }} 10 | spec: 11 | replicas: {{ .Values.zammadConfig.railsserver.replicas }} 12 | selector: 13 | matchLabels: 14 | {{- include "zammad.selectorLabels" . | nindent 6 }} 15 | template: 16 | metadata: 17 | annotations: 18 | {{- include "zammad.podAnnotations" . | nindent 8 }} 19 | {{- with .Values.zammadConfig.railsserver.podAnnotations }} 20 | {{- toYaml . | nindent 8}} 21 | {{- end }} 22 | labels: 23 | {{- include "zammad.podLabels" . | nindent 8 }} 24 | app.kubernetes.io/component: zammad-railsserver 25 | {{- with .Values.zammadConfig.railsserver.podLabels }} 26 | {{- toYaml . | nindent 8}} 27 | {{- end }} 28 | spec: 29 | {{- include "zammad.podSpec.deployment" . | nindent 6 }} 30 | containers: 31 | {{- with .Values.zammadConfig.railsserver.sidecars }} 32 | {{- toYaml . | nindent 8}} 33 | {{- end }} 34 | - name: zammad-railsserver 35 | {{- include "zammad.containerSpec" (merge (dict "containerConfig" .Values.zammadConfig.railsserver) .) | nindent 10 }} 36 | command: 37 | - "bundle" 38 | - "exec" 39 | - "puma" 40 | - "-b" 41 | - "tcp://[::]:3000" 42 | - "-w" 43 | - "{{ .Values.zammadConfig.railsserver.webConcurrency }}" 44 | - "-e" 45 | - "production" 46 | env: 47 | {{- include "zammad.env" . | nindent 12 }} 48 | {{- include "zammad.env.failOnPendingMigrations" . | nindent 12 }} 49 | ports: 50 | - name: railsserver 51 | containerPort: 3000 52 | volumeMounts: 53 | {{- include "zammad.volumeMounts" . | nindent 12 }} 54 | volumes: 55 | {{- include "zammad.volumes" . | nindent 8 }} 56 | -------------------------------------------------------------------------------- /zammad/templates/deployment-scheduler.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ include "zammad.fullname" . }}-scheduler 5 | labels: 6 | {{- include "zammad.labels" . | nindent 4 }} 7 | app.kubernetes.io/component: zammad-scheduler 8 | annotations: 9 | {{- include "zammad.annotations" . | nindent 4 }} 10 | checkov.io/skip1: CKV_K8S_8=Liveness Probe Should be Configured - not possible with scheduler 11 | checkov.io/skip2: CKV_K8S_9=Readiness Probe Should be Configured - not possible with scheduler 12 | spec: 13 | replicas: 1 # Not scalable, may only run once per cluster. 14 | strategy: 15 | type: Recreate 16 | selector: 17 | matchLabels: 18 | {{- include "zammad.selectorLabels" . | nindent 6 }} 19 | template: 20 | metadata: 21 | annotations: 22 | {{- include "zammad.podAnnotations" . | nindent 8 }} 23 | {{- with .Values.zammadConfig.scheduler.podAnnotations }} 24 | {{- toYaml . | nindent 8}} 25 | {{- end }} 26 | labels: 27 | {{- include "zammad.podLabels" . | nindent 8 }} 28 | app.kubernetes.io/component: zammad-scheduler 29 | {{- with .Values.zammadConfig.scheduler.podLabels }} 30 | {{- toYaml . | nindent 8}} 31 | {{- end }} 32 | spec: 33 | {{- include "zammad.podSpec.deployment" . | nindent 6 }} 34 | containers: 35 | {{- with .Values.zammadConfig.scheduler.sidecars }} 36 | {{- toYaml . | nindent 8}} 37 | {{- end }} 38 | - name: zammad-scheduler 39 | {{- include "zammad.containerSpec" (merge (dict "containerConfig" .Values.zammadConfig.scheduler) .) | nindent 10 }} 40 | command: 41 | - "bundle" 42 | - "exec" 43 | - "script/background-worker.rb" 44 | - "start" 45 | env: 46 | {{- include "zammad.env" . | nindent 12 }} 47 | {{- include "zammad.env.failOnPendingMigrations" . | nindent 12 }} 48 | volumeMounts: 49 | {{- include "zammad.volumeMounts" . | nindent 12 }} 50 | volumes: 51 | {{- include "zammad.volumes" . | nindent 8 }} 52 | -------------------------------------------------------------------------------- /zammad/templates/deployment-websocket.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ include "zammad.fullname" . }}-websocket 5 | labels: 6 | {{- include "zammad.labels" . | nindent 4 }} 7 | app.kubernetes.io/component: zammad-websocket 8 | annotations: 9 | {{- include "zammad.annotations" . | nindent 4 }} 10 | spec: 11 | replicas: 1 # Not scalable, may only run once per cluster. 12 | strategy: 13 | type: Recreate 14 | selector: 15 | matchLabels: 16 | {{- include "zammad.selectorLabels" . | nindent 6 }} 17 | template: 18 | metadata: 19 | annotations: 20 | {{- include "zammad.podAnnotations" . | nindent 8 }} 21 | {{- with .Values.zammadConfig.websocket.podAnnotations }} 22 | {{- toYaml . | nindent 8}} 23 | {{- end }} 24 | labels: 25 | {{- include "zammad.podLabels" . | nindent 8 }} 26 | app.kubernetes.io/component: zammad-websocket 27 | {{- with .Values.zammadConfig.websocket.podLabels }} 28 | {{- toYaml . | nindent 8}} 29 | {{- end }} 30 | spec: 31 | {{- include "zammad.podSpec.deployment" . | nindent 6 }} 32 | containers: 33 | {{- with .Values.zammadConfig.websocket.sidecars }} 34 | {{- toYaml . | nindent 8}} 35 | {{- end }} 36 | - name: zammad-websocket 37 | {{- include "zammad.containerSpec" (merge (dict "containerConfig" .Values.zammadConfig.websocket) .) | nindent 10 }} 38 | command: 39 | - "bundle" 40 | - "exec" 41 | - "script/websocket-server.rb" 42 | - "-b" 43 | - "0.0.0.0" 44 | - "-p" 45 | - "6042" 46 | - "start" 47 | env: 48 | {{- include "zammad.env" . | nindent 12 }} 49 | {{- include "zammad.env.failOnPendingMigrations" . | nindent 12 }} 50 | ports: 51 | - name: websocket 52 | containerPort: 6042 53 | volumeMounts: 54 | {{- include "zammad.volumeMounts" . | nindent 12 }} 55 | volumes: 56 | {{- include "zammad.volumes" . | nindent 8 }} 57 | -------------------------------------------------------------------------------- /zammad/templates/ingress.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.ingress.enabled -}} 2 | {{- $fullName := include "zammad.fullname" . -}} 3 | {{- $svcPort := .Values.service.port -}} 4 | {{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} 5 | {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} 6 | {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} 7 | {{- end }} 8 | {{- end }} 9 | {{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} 10 | apiVersion: networking.k8s.io/v1 11 | {{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} 12 | apiVersion: networking.k8s.io/v1beta1 13 | {{- else -}} 14 | apiVersion: extensions/v1beta1 15 | {{- end }} 16 | kind: Ingress 17 | metadata: 18 | name: {{ $fullName }} 19 | labels: 20 | {{- include "zammad.labels" . | nindent 4 }} 21 | annotations: 22 | {{- include "zammad.annotations" . | nindent 4 }} 23 | {{- with .Values.ingress.annotations }} 24 | {{- toYaml . | nindent 4 }} 25 | {{- end }} 26 | spec: 27 | {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} 28 | ingressClassName: {{ .Values.ingress.className }} 29 | {{- end }} 30 | {{- if .Values.ingress.tls }} 31 | tls: 32 | {{- range .Values.ingress.tls }} 33 | - hosts: 34 | {{- range .hosts }} 35 | - {{ . | quote }} 36 | {{- end }} 37 | secretName: {{ .secretName }} 38 | {{- end }} 39 | {{- end }} 40 | rules: 41 | {{- range .Values.ingress.hosts }} 42 | - host: {{ .host | quote }} 43 | http: 44 | paths: 45 | {{- range .paths }} 46 | - path: {{ .path }} 47 | {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} 48 | pathType: {{ .pathType }} 49 | {{- end }} 50 | backend: 51 | {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} 52 | service: 53 | name: {{ $fullName}}-nginx 54 | port: 55 | number: {{ $svcPort }} 56 | {{- else }} 57 | serviceName: {{ $fullName}}-nginx 58 | servicePort: {{ $svcPort }} 59 | {{- end }} 60 | {{- end }} 61 | {{- end }} 62 | {{- end }} 63 | -------------------------------------------------------------------------------- /zammad/templates/job-init.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: batch/v1 2 | kind: Job 3 | metadata: 4 | {{- if .Values.zammadConfig.initJob.randomName }} 5 | # Use a different job name on each run to ensure a new job always runs once. 6 | name: {{ include "zammad.fullname" . }}-init-{{ uuidv4 }} 7 | {{- else }} 8 | name: {{ include "zammad.fullname" . }}-init 9 | {{- end}} 10 | # Helm post-install/post-upgrade hooks cannot be used here, because 11 | # helm's --wait flag causes a deadlock: the job waits for all resources to be ready, 12 | # but the pods need the job to work properly. 13 | labels: 14 | {{- include "zammad.labels" . | nindent 4 }} 15 | app.kubernetes.io/component: zammad-init 16 | annotations: 17 | {{- include "zammad.annotations" . | nindent 4 }} 18 | {{- with .Values.zammadConfig.initJob.annotations }} 19 | {{- toYaml . | nindent 4 }} 20 | {{- end }} 21 | spec: 22 | ttlSecondsAfterFinished: 300 23 | template: 24 | metadata: 25 | annotations: 26 | {{- include "zammad.podAnnotations" . | nindent 8 }} 27 | {{- with .Values.zammadConfig.initJob.podAnnotations }} 28 | {{- toYaml . | nindent 8}} 29 | {{- end }} 30 | labels: 31 | {{- include "zammad.podLabels" . | nindent 8 }} 32 | app.kubernetes.io/component: zammad-init 33 | {{- with .Values.zammadConfig.initJob.podLabels }} 34 | {{- toYaml . | nindent 8}} 35 | {{- end }} 36 | spec: 37 | {{- include "zammad.podSpec" . | nindent 6 }} 38 | {{- with .Values.zammadConfig.initJob.podSpec }} 39 | {{- toYaml . | nindent 6}} 40 | {{- end }} 41 | restartPolicy: OnFailure 42 | initContainers: 43 | {{- with .Values.initContainers }} 44 | {{- toYaml . | nindent 8}} 45 | {{- end }} 46 | {{- include "zammad.podSpec.initContainers" . | nindent 8 }} 47 | - name: postgresql-init 48 | {{- include "zammad.containerSpec" (merge (dict "containerConfig" .Values.zammadConfig.initContainers.postgresql) .) | nindent 10 }} 49 | env: 50 | {{- include "zammad.env" . | nindent 12 }} 51 | volumeMounts: 52 | {{- include "zammad.volumeMounts" . | nindent 12 }} 53 | - name: {{ include "zammad.fullname" . }}-init 54 | mountPath: /docker-entrypoint.sh 55 | readOnly: true 56 | subPath: postgresql-init 57 | {{- if .Values.zammadConfig.initContainers.zammad.customInit }} 58 | - name: zammad-init 59 | {{- include "zammad.containerSpec" (merge (dict "containerConfig" .Values.zammadConfig.initContainers.zammad) .) | nindent 10 }} 60 | env: 61 | {{- include "zammad.env" . | nindent 12 }} 62 | {{- include "zammad.env.failOnPendingMigrations" . | nindent 12 }} 63 | volumeMounts: 64 | {{- include "zammad.volumeMounts" . | nindent 12 }} 65 | - name: {{ include "zammad.fullname" . }}-init 66 | mountPath: /docker-entrypoint.sh 67 | readOnly: true 68 | subPath: zammad-init 69 | {{- end }} 70 | {{- if .Values.zammadConfig.elasticsearch.initialisation }} 71 | - name: elasticsearch-init 72 | {{- include "zammad.containerSpec" (merge (dict "containerConfig" .Values.zammadConfig.initContainers.elasticsearch) .) | nindent 10 }} 73 | env: 74 | {{- include "zammad.env" . | nindent 12 }} 75 | {{- include "zammad.env.failOnPendingMigrations" . | nindent 12 }} 76 | {{- if or .Values.zammadConfig.elasticsearch.pass .Values.secrets.elasticsearch.useExisting }} 77 | - name: ELASTICSEARCH_PASSWORD 78 | valueFrom: 79 | secretKeyRef: 80 | name: {{ include "zammad.elasticsearchSecretName" . }} 81 | key: {{ .Values.secrets.elasticsearch.secretKey }} 82 | {{- end }} 83 | volumeMounts: 84 | {{- include "zammad.volumeMounts" . | nindent 12 }} 85 | - name: {{ include "zammad.fullname" . }}-init 86 | mountPath: /docker-entrypoint.sh 87 | readOnly: true 88 | subPath: elasticsearch-init 89 | {{- end }} 90 | containers: 91 | - name: postgresql-init-post 92 | {{- include "zammad.containerSpec" (merge (dict "containerConfig" .Values.zammadConfig.initContainers.postgresql) .) | nindent 10 }} 93 | env: 94 | {{- include "zammad.env" . | nindent 12 }} 95 | {{- include "zammad.env.failOnPendingMigrations" . | nindent 12 }} 96 | volumeMounts: 97 | {{- include "zammad.volumeMounts" . | nindent 12 }} 98 | - name: {{ include "zammad.fullname" . }}-init 99 | mountPath: /docker-entrypoint.sh 100 | readOnly: true 101 | subPath: postgresql-init-post 102 | volumes: 103 | {{- include "zammad.volumes" . | nindent 8 }} 104 | - name: {{ include "zammad.fullname" . }}-init 105 | configMap: 106 | name: {{ include "zammad.fullname" . }}-init 107 | defaultMode: 0755 108 | -------------------------------------------------------------------------------- /zammad/templates/secrets.yaml: -------------------------------------------------------------------------------- 1 | {{ if and .Values.autoWizard.enabled (not .Values.secrets.autowizard.useExisting) }} 2 | apiVersion: v1 3 | kind: Secret 4 | metadata: 5 | name: {{ include "zammad.autowizardSecretName" . }} 6 | labels: 7 | {{- include "zammad.labels" . | nindent 4 }} 8 | annotations: 9 | {{- include "zammad.annotations" . | nindent 4 }} 10 | type: Opaque 11 | data: 12 | {{ .Values.secrets.autowizard.secretKey }}: {{ .Values.autoWizard.config | b64enc | quote }} 13 | {{ end }} 14 | {{ if and .Values.zammadConfig.elasticsearch.pass (not .Values.secrets.elasticsearch.useExisting) }} 15 | --- 16 | apiVersion: v1 17 | kind: Secret 18 | metadata: 19 | name: {{ include "zammad.elasticsearchSecretName" . }} 20 | labels: 21 | {{- include "zammad.labels" . | nindent 4 }} 22 | annotations: 23 | {{- include "zammad.annotations" . | nindent 4 }} 24 | type: Opaque 25 | data: 26 | {{ .Values.secrets.elasticsearch.secretKey }}: {{ .Values.zammadConfig.elasticsearch.pass | b64enc | quote }} 27 | {{ end }} 28 | {{ if not .Values.secrets.postgresql.useExisting }} 29 | --- 30 | apiVersion: v1 31 | kind: Secret 32 | metadata: 33 | name: {{ include "zammad.postgresqlSecretName" . }} 34 | labels: 35 | {{- include "zammad.labels" . | nindent 4 }} 36 | annotations: 37 | {{- include "zammad.annotations" . | nindent 4 }} 38 | type: Opaque 39 | data: 40 | {{ .Values.secrets.postgresql.secretKey }}: {{ .Values.zammadConfig.postgresql.pass | b64enc | quote }} 41 | {{ end }} 42 | {{ if and .Values.zammadConfig.redis.pass (not .Values.secrets.redis.useExisting) }} 43 | --- 44 | apiVersion: v1 45 | kind: Secret 46 | metadata: 47 | name: {{ include "zammad.redisSecretName" . }} 48 | labels: 49 | {{- include "zammad.labels" . | nindent 4 }} 50 | annotations: 51 | {{- include "zammad.annotations" . | nindent 4 }} 52 | type: Opaque 53 | data: 54 | {{ .Values.secrets.redis.secretKey }}: {{ .Values.zammadConfig.redis.pass | b64enc | quote }} 55 | {{ end }} 56 | -------------------------------------------------------------------------------- /zammad/templates/service-nginx.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "zammad.fullname" . }}-nginx 5 | labels: 6 | {{- include "zammad.labels" . | nindent 4 }} 7 | annotations: 8 | {{- include "zammad.annotations" . | nindent 4 }} 9 | spec: 10 | type: {{ .Values.service.type }} 11 | ports: 12 | - port: {{ .Values.service.port }} 13 | targetPort: http 14 | protocol: TCP 15 | name: http 16 | selector: 17 | {{- include "zammad.selectorLabels" . | nindent 4 }} 18 | app.kubernetes.io/component: zammad-nginx 19 | -------------------------------------------------------------------------------- /zammad/templates/service-railsserver.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "zammad.fullname" . }}-railsserver 5 | labels: 6 | {{- include "zammad.labels" . | nindent 4 }} 7 | annotations: 8 | {{- include "zammad.annotations" . | nindent 4 }} 9 | spec: 10 | ports: 11 | - port: 3000 12 | targetPort: 3000 13 | protocol: TCP 14 | name: http 15 | selector: 16 | {{- include "zammad.selectorLabels" . | nindent 4 }} 17 | app.kubernetes.io/component: zammad-railsserver 18 | -------------------------------------------------------------------------------- /zammad/templates/service-websocket.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "zammad.fullname" . }}-websocket 5 | labels: 6 | {{- include "zammad.labels" . | nindent 4 }} 7 | annotations: 8 | {{- include "zammad.annotations" . | nindent 4 }} 9 | spec: 10 | ports: 11 | - port: 6042 12 | targetPort: 6042 13 | protocol: TCP 14 | name: http 15 | selector: 16 | {{- include "zammad.selectorLabels" . | nindent 4 }} 17 | app.kubernetes.io/component: zammad-websocket 18 | -------------------------------------------------------------------------------- /zammad/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceAccount.create -}} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: {{ include "zammad.serviceAccountName" . }} 6 | labels: 7 | {{- include "zammad.labels" . | nindent 4 }} 8 | annotations: 9 | {{- include "zammad.annotations" . | nindent 4 }} 10 | {{- with .Values.serviceAccount.annotations }} 11 | {{- toYaml . | nindent 4 }} 12 | {{- end }} 13 | {{- end }} 14 | -------------------------------------------------------------------------------- /zammad/templates/tests/run-tests.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: "{{ include "zammad.fullname" . }}-helm-test-rake-task" 5 | labels: 6 | {{- include "zammad.labels" . | nindent 4 }} 7 | annotations: 8 | "helm.sh/hook": test 9 | data: 10 | helm-test.rake: |- 11 | namespace :zammad do 12 | namespace :helm do 13 | desc 'Runs a set of Helm tests' 14 | task test: :environment do |_task, args| 15 | 16 | puts 'Checking if a Ruby Tempfile can be created…' 17 | Tempfile.create do |_f| 18 | puts ' Tempfile file was created successfully.' 19 | end 20 | 21 | puts 'Checking if file can be created directly in /opt/zammad/tmp…' 22 | File.write('/opt/zammad/tmp/test.txt', 'test content') 23 | puts ' File was created in /tmp successfully.' 24 | 25 | {{- if .Values.zammadConfig.storageVolume.enabled }} 26 | puts 'Checking if storage file can be created…' 27 | File.write('/opt/zammad/storage/test.txt', 'test content') 28 | puts ' Storage file was created successfully.' 29 | {{- else }} 30 | puts 'Storage volume not enabled, not testing it…' 31 | {{- end }} 32 | 33 | end 34 | end 35 | end 36 | --- 37 | apiVersion: v1 38 | kind: Pod 39 | metadata: 40 | name: "{{ include "zammad.fullname" . }}-run-helm-test-rake-task" 41 | labels: 42 | {{- include "zammad.labels" . | nindent 4 }} 43 | annotations: 44 | "helm.sh/hook": test 45 | spec: 46 | {{- include "zammad.podSpec.deployment" . | nindent 4 }} 47 | containers: 48 | - name: zammad-run-tests 49 | # Use securityContext etc. from railsserver to have identical setup. 50 | {{- include "zammad.containerSpec" (merge (dict "containerConfig" .Values.zammadConfig.railsserver) .) | nindent 8 }} 51 | command: ['bundle'] 52 | args: ['exec', 'rake', 'zammad:helm:test'] 53 | env: 54 | {{- include "zammad.env" . | nindent 12 }} 55 | {{- include "zammad.env.failOnPendingMigrations" . | nindent 12 }} 56 | volumeMounts: 57 | {{- include "zammad.volumeMounts" . | nindent 10 }} 58 | - name: helm-rake-test-volume 59 | mountPath: /opt/zammad/lib/tasks/helm 60 | readOnly: true 61 | volumes: 62 | {{- include "zammad.volumes" . | nindent 6 }} 63 | - name: helm-rake-test-volume 64 | configMap: 65 | name: "{{ include "zammad.fullname" . }}-helm-test-rake-task" 66 | restartPolicy: Never 67 | -------------------------------------------------------------------------------- /zammad/templates/tests/test-connection.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: "{{ include "zammad.fullname" . }}-test-connection" 5 | labels: 6 | {{- include "zammad.labels" . | nindent 4 }} 7 | annotations: 8 | "helm.sh/hook": test 9 | spec: 10 | containers: 11 | - name: wget 12 | image: busybox 13 | command: ['wget'] 14 | args: ['{{ include "zammad.fullname" . }}-nginx:{{ .Values.service.port }}'] 15 | restartPolicy: Never 16 | -------------------------------------------------------------------------------- /zammad/values.yaml: -------------------------------------------------------------------------------- 1 | image: 2 | repository: ghcr.io/zammad/zammad 3 | # If not set, appVersion field from Chart.yaml is used as default. 4 | # appVersion points to a fixed version. You are responsible to update this to newer patch level versions yourself. 5 | # Alternatively, you can also use floating versions that will give you automatic updates: 6 | # tag: "6.2" # all patchlevel updates 7 | # tag: "6" # including minor updates 8 | # tag: "latest" # all updates of stable versions, including major 9 | # tag: "develop" # bleeding-edge development version 10 | # If you want to use a floating version, you should also set pullPolicy: Always 11 | tag: "" 12 | pullPolicy: IfNotPresent 13 | imagePullSecrets: [] 14 | # - name: "image-pull-secret" 15 | 16 | service: 17 | type: ClusterIP 18 | port: 8080 19 | 20 | ingress: 21 | enabled: false 22 | className: "" 23 | annotations: {} 24 | # kubernetes.io/ingress.class: nginx 25 | # kubernetes.io/tls-acme: "true" 26 | hosts: 27 | - host: chart-example.local 28 | paths: 29 | - path: / 30 | pathType: ImplementationSpecific 31 | tls: [] 32 | # - secretName: chart-example-tls 33 | # hosts: 34 | # - chart-example.local 35 | 36 | # Please note that passwords for PostgreSQL, Redis and S3 may not 37 | # contain special characters which would require URL encoding. 38 | # See also https://github.com/zammad/zammad-helm/issues/251 39 | secrets: 40 | autowizard: 41 | useExisting: false 42 | secretKey: autowizard 43 | secretName: autowizard 44 | elasticsearch: 45 | useExisting: false 46 | secretKey: password 47 | secretName: elastic-credentials 48 | postgresql: 49 | useExisting: false 50 | secretKey: postgresql-pass 51 | secretName: postgresql-pass 52 | redis: 53 | useExisting: false 54 | secretKey: redis-password 55 | secretName: redis-pass 56 | 57 | securityContext: 58 | fsGroup: 1000 59 | # https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#configure-volume-permission-and-ownership-change-policy-for-pods 60 | fsGroupChangePolicy: Always 61 | runAsUser: 1000 62 | runAsNonRoot: true 63 | runAsGroup: 1000 64 | seccompProfile: 65 | type: RuntimeDefault 66 | 67 | zammadConfig: 68 | elasticsearch: 69 | # enable/disable elasticsearch chart dependency 70 | enabled: true 71 | # host env var is only used when zammadConfig.elasticsearch.enabled is false 72 | host: zammad-elasticsearch-master 73 | initialisation: true 74 | pass: "" 75 | port: 9200 76 | reindex: false 77 | schema: http 78 | user: "" 79 | 80 | memcached: 81 | # enable/disable memcached chart dependency 82 | enabled: true 83 | # host env var is only used when zammadConfig.memcached.enabled is false 84 | host: zammad-memcached 85 | port: 11211 86 | 87 | minio: 88 | # enable/disable minio chart dependency 89 | enabled: false 90 | 91 | # Uncomment this in case you want to use an external S3 service. 92 | # externalS3Url: https://user:pw@external-minio-service/bucket 93 | 94 | nginx: 95 | replicas: 1 96 | trustedProxies: [] 97 | extraHeaders: [] 98 | # - 'HeaderName "Header Value"' 99 | websocketExtraHeaders: [] 100 | # - 'HeaderName "Header Value"' 101 | # Maximum upload size 102 | clientMaxBodySize: 50M 103 | knowledgeBaseUrl: "" 104 | startupProbe: 105 | tcpSocket: 106 | port: 8080 107 | failureThreshold: 20 108 | periodSeconds: 4 109 | livenessProbe: 110 | tcpSocket: 111 | port: 8080 112 | failureThreshold: 5 113 | timeoutSeconds: 5 114 | readinessProbe: 115 | httpGet: 116 | path: / 117 | port: 8080 118 | failureThreshold: 5 119 | timeoutSeconds: 5 120 | resources: {} 121 | # requests: 122 | # cpu: 50m 123 | # memory: 32Mi 124 | # limits: 125 | # cpu: 100m 126 | # memory: 64Mi 127 | securityContext: 128 | allowPrivilegeEscalation: false 129 | capabilities: 130 | drop: 131 | - ALL 132 | readOnlyRootFilesystem: true 133 | privileged: false 134 | # can be used to add additional containers / sidecars 135 | sidecars: [] 136 | podLabels: {} 137 | # my-label: "value" 138 | podAnnotations: {} 139 | # my-annotation: "value" 140 | 141 | postgresql: 142 | # enable/disable postgresql chart dependency 143 | enabled: true 144 | # needs to be the same as the postgresql.auth.database 145 | db: zammad_production 146 | # host env var is only used when postgresql.enabled is false 147 | host: zammad-postgresql 148 | # needs to be the same as the postgresql.auth.password 149 | pass: "zammad" 150 | port: 5432 151 | # needs to be the same as the postgresql.auth.username 152 | user: zammad 153 | # additional connection options 154 | options: "pool=50" 155 | 156 | railsserver: 157 | replicas: 1 158 | startupProbe: 159 | tcpSocket: 160 | port: 3000 161 | failureThreshold: 20 162 | periodSeconds: 4 163 | livenessProbe: 164 | tcpSocket: 165 | port: 3000 166 | failureThreshold: 5 167 | timeoutSeconds: 5 168 | readinessProbe: 169 | httpGet: 170 | path: / 171 | port: 3000 172 | failureThreshold: 5 173 | timeoutSeconds: 5 174 | resources: {} 175 | # requests: 176 | # cpu: 100m 177 | # memory: 512Mi 178 | # limits: 179 | # cpu: 200m 180 | # memory: 1024Mi 181 | securityContext: 182 | allowPrivilegeEscalation: false 183 | capabilities: 184 | drop: 185 | - ALL 186 | readOnlyRootFilesystem: true 187 | privileged: false 188 | # can be used to add additional containers / sidecars 189 | sidecars: [] 190 | trustedProxies: "['127.0.0.1', '::1']" 191 | webConcurrency: 0 192 | # tmpdir will be used by all Zammad/Rails containers 193 | tmpdir: "/opt/zammad/tmp" 194 | podLabels: {} 195 | # my-label: "value" 196 | podAnnotations: {} 197 | # my-annotation: "value" 198 | 199 | redis: 200 | # enable/disable redis chart dependency 201 | enabled: true 202 | host: "zammad-redis-master" 203 | # needs to be the same as the redis.auth.password 204 | pass: zammad 205 | port: 6379 206 | 207 | scheduler: 208 | resources: {} 209 | # requests: 210 | # cpu: 100m 211 | # memory: 256Mi 212 | # limits: 213 | # cpu: 200m 214 | # memory: 512Mi 215 | securityContext: 216 | allowPrivilegeEscalation: false 217 | capabilities: 218 | drop: 219 | - ALL 220 | readOnlyRootFilesystem: true 221 | privileged: false 222 | # can be used to add additional containers / sidecars 223 | sidecars: [] 224 | podLabels: {} 225 | # my-label: "value" 226 | podAnnotations: {} 227 | # my-annotation: "value" 228 | 229 | storageVolume: 230 | # Enable this for 'File' based storage in Zammad. You must provide an externally managed 'extistingClaim' 231 | # with 'ReadWriteMany' permisssion in this case. 232 | enabled: false 233 | ## 234 | ## A manually managed Persistent Volume and Claim 235 | ## If defined, PVC must be created manually before volume will be bound 236 | ## The value is evaluated as a template, so, for example, the name can depend on .Release or .Chart 237 | ## 238 | # existingClaim: 239 | 240 | tmpDirVolume: 241 | emptyDir: 242 | sizeLimit: 100Mi 243 | # enable "medium: Memory" to Work around problems with world writable tmp dir permissions if volumePermissions.enabled is set to false 244 | # see: https://github.com/kubernetes/kubernetes/issues/76158 & https://github.com/kubernetes/kubernetes/issues/110835 245 | # medium: Memory 246 | 247 | # Custom volumes for all Zammad Pods. 248 | customVolumes: 249 | # - name: custom-volume 250 | # configMap: 251 | # name: my-config-map 252 | 253 | # Custom volumeMounts for all Zammad Pods. 254 | customVolumeMounts: 255 | # - name: custom-volume 256 | # mountPath: "/opt/zammad/config_map" 257 | # readOnly: true 258 | 259 | websocket: 260 | startupProbe: 261 | tcpSocket: 262 | port: 6042 263 | failureThreshold: 20 264 | periodSeconds: 4 265 | livenessProbe: 266 | tcpSocket: 267 | port: 6042 268 | failureThreshold: 10 269 | timeoutSeconds: 5 270 | readinessProbe: 271 | tcpSocket: 272 | port: 6042 273 | failureThreshold: 5 274 | timeoutSeconds: 5 275 | resources: {} 276 | # requests: 277 | # cpu: 100m 278 | # memory: 256Mi 279 | # limits: 280 | # cpu: 200m 281 | # memory: 512Mi 282 | securityContext: 283 | allowPrivilegeEscalation: false 284 | capabilities: 285 | drop: 286 | - ALL 287 | readOnlyRootFilesystem: true 288 | privileged: false 289 | # can be used to add additional containers / sidecars 290 | sidecars: [] 291 | podLabels: {} 292 | # my-label: "value" 293 | podAnnotations: {} 294 | # my-annotation: "value" 295 | 296 | initContainers: 297 | elasticsearch: 298 | resources: {} 299 | # requests: 300 | # cpu: 100m 301 | # memory: 256Mi 302 | # limits: 303 | # cpu: 200m 304 | # memory: 512Mi 305 | securityContext: 306 | allowPrivilegeEscalation: false 307 | capabilities: 308 | drop: 309 | - ALL 310 | readOnlyRootFilesystem: true 311 | privileged: false 312 | postgresql: 313 | resources: {} 314 | # requests: 315 | # cpu: 100m 316 | # memory: 256Mi 317 | # limits: 318 | # cpu: 200m 319 | # memory: 512Mi 320 | securityContext: 321 | allowPrivilegeEscalation: false 322 | capabilities: 323 | drop: 324 | - ALL 325 | readOnlyRootFilesystem: true 326 | privileged: false 327 | # VolumePermissions will be used by all Zammad Pods. 328 | # We need it to drop global write permission that comes with EmptyDir, otherwise 329 | # Ruby's Tempfile.create raises an error. 330 | volumePermissions: 331 | enabled: true 332 | image: 333 | repository: alpine 334 | tag: "3.21.3" 335 | pullPolicy: IfNotPresent 336 | command: 337 | - /bin/sh 338 | - -cx 339 | - | 340 | chmod 770 /opt/zammad/tmp 341 | resources: {} 342 | # requests: 343 | # cpu: 100m 344 | # memory: 256Mi 345 | # limits: 346 | # cpu: 200m 347 | # memory: 512Mi 348 | securityContext: 349 | readOnlyRootFilesystem: true 350 | capabilities: 351 | drop: 352 | - ALL 353 | privileged: true 354 | runAsNonRoot: false 355 | runAsUser: 0 356 | zammad: 357 | resources: {} 358 | # requests: 359 | # cpu: 100m 360 | # memory: 256Mi 361 | # limits: 362 | # cpu: 200m 363 | # memory: 512Mi 364 | securityContext: 365 | allowPrivilegeEscalation: false 366 | capabilities: 367 | drop: 368 | - ALL 369 | readOnlyRootFilesystem: true 370 | privileged: false 371 | customInit: "" 372 | # bundle exec rails runner '…' 373 | 374 | initJob: 375 | randomName: true 376 | annotations: {} 377 | # my-annotation: "value" 378 | podLabels: {} 379 | # my-label: "value" 380 | podAnnotations: {} 381 | # my-annotation: "value" 382 | podSpec: {} 383 | # my-podspec: "value" 384 | 385 | cronJob: 386 | reindex: 387 | # By default, this cronjob never runs. It can be used to create maintenance jobs with 388 | # kubectl create job my-reindex-job --from=cronjob/zammad-cronjob-reindex 389 | # You can change schedule and suspend to run it periodically. 390 | schedule: "@weekly" 391 | suspend: true 392 | annotations: {} 393 | # my-annotation: "value" 394 | podLabels: {} 395 | # my-label: "value" 396 | podAnnotations: {} 397 | # my-annotation: "value" 398 | podSpec: {} 399 | # my-podspec: "value" 400 | 401 | # additional environment vars added to all zammad services 402 | extraEnv: [] 403 | # - name: FOO_BAR 404 | # value: "foobar" 405 | 406 | # autowizard config 407 | # if a token is used the url must look like: http://zammad/#getting_started/auto_wizard/your_token_here 408 | autoWizard: 409 | enabled: false 410 | # string with the autowizard config as json 411 | # config: | 412 | # { 413 | # "Token": "secret_zammad_autowizard_token", 414 | # "TextModuleLocale": { 415 | # "Locale": "en-us" 416 | # }, 417 | # "Users": [ 418 | # { 419 | # "login": "email@example.org", 420 | # "firstname": "Zammad", 421 | # "lastname": "Admin", 422 | # "email": "email@example.org", 423 | # "organization": "ZammadTest", 424 | # "password": "..." 425 | # } 426 | # ], 427 | # "Settings": [ 428 | # { 429 | # "name": "product_name", 430 | # "value": "ZammadTestSystem" 431 | # }, 432 | # { 433 | # "name": "system_online_service", 434 | # "value": true 435 | # } 436 | # ], 437 | # "Organizations": [ 438 | # { 439 | # "name": "ZammadTest" 440 | # } 441 | # ] 442 | # } 443 | 444 | commonLabels: {} 445 | # my-label: "value" 446 | commonAnnotations: {} 447 | # my-annotation: "value" 448 | podLabels: {} 449 | # my-label: "value" 450 | podAnnotations: {} 451 | # my-annotation: "value" 452 | 453 | nodeSelector: {} 454 | tolerations: [] 455 | affinity: {} 456 | 457 | # service account configurations 458 | serviceAccount: 459 | # Specifies whether a service account should be created 460 | create: false 461 | # Annotations to add to the service account 462 | annotations: {} 463 | # The name of the service account to use. 464 | # If not set and create is true, a name is generated using the fullname template 465 | name: "" 466 | 467 | # can be used to add additional init containers 468 | initContainers: [] 469 | # - name: s3-restore 470 | # image: some-aws-s3-restore:latest 471 | # env: 472 | # - name: AWS_DEFAULT_REGION 473 | # value: "eu-central-1" 474 | # - name: AWS_ACCESS_KEY_ID 475 | # value: "xxxxxxxxxxxx" 476 | # - name: AWS_SECRET_ACCESS_KEY 477 | # value: "xxxxxxxxxxxx" 478 | # - name: SYNC_DIR 479 | # value: "/opt/zammad" 480 | # - name: AWS_SYNC_BUCKET 481 | # value: "some-backup-bucket" 482 | # volumeMounts: 483 | # - name: help-zammad 484 | # mountPath: /opt/zammad 485 | 486 | 487 | # dependency charts config 488 | 489 | # Settings for the elasticsearch subchart 490 | elasticsearch: 491 | clusterName: zammad 492 | coordinating: 493 | replicaCount: 0 494 | data: 495 | replicaCount: 0 496 | ingest: 497 | replicaCount: 0 498 | master: 499 | heapSize: 512m 500 | masterOnly: false 501 | replicaCount: 1 502 | resourcesPreset: medium 503 | resources: {} 504 | # requests: 505 | # cpu: 50m 506 | # memory: 512Mi 507 | # limits: 508 | # cpu: 100m 509 | # memory: 1024Mi 510 | 511 | # To use an existing Kubernetes secret containing the credentials, 512 | # remove the comments on the lines below and adjust them accordingly 513 | # 514 | # security: 515 | # existingSecret: elastic-credentials 516 | 517 | # settings for the memcached subchart 518 | memcached: 519 | replicaCount: 1 520 | resources: {} 521 | # requests: 522 | # cpu: 50m 523 | # memory: 64Mi 524 | # limits: 525 | # cpu: 100m 526 | # memory: 128Mi 527 | 528 | # settings for the minio subchart 529 | minio: 530 | auth: 531 | rootUser: zammadadmin 532 | rootPassword: zammadadmin 533 | 534 | # Use existing secret for credentials details (auth.rootUser and 535 | # auth.rootPassword will be ignored and picked up from this secret). 536 | # The secret has to contain the keys root-user and root-password) 537 | # existingSecret: minio-credentials 538 | 539 | defaultBuckets: zammad 540 | 541 | # You can use this to enable the web UI for debugging. 542 | disableWebUI: true 543 | 544 | # settings for the postgres subchart 545 | postgresql: 546 | auth: 547 | username: "zammad" 548 | replicationUsername: repl_user 549 | database: "zammad_production" 550 | 551 | # Passwords 552 | postgresPassword: "zammad" 553 | password: "zammad" 554 | replicationPassword: "zammad" 555 | 556 | # To avoid passwords in your values.yaml, you can comment out the 3 lines above 557 | # and use an existing Kubernetes secret. Remove the comments on the lines below 558 | # and adjust them accordingly 559 | # 560 | # existingSecret: postgresql-pass 561 | # secretKeys: 562 | # adminPasswordKey: postgresql-admin-password 563 | # userPasswordKey: postgresql-pass 564 | # replicationPasswordKey: postgresql-replication-password 565 | # 566 | primary: 567 | resources: {} 568 | # requests: 569 | # cpu: 250m 570 | # memory: 256Mi 571 | # limits: 572 | # cpu: 500m 573 | # memory: 512Mi 574 | 575 | # settings for the redis subchart 576 | redis: 577 | architecture: standalone 578 | auth: 579 | password: zammad 580 | # To avoid passwords in your values.yaml, you can comment out the line above 581 | # and use an existing Kubernetes secret. Remove the comments on the lines below 582 | # and adjust them accordingly 583 | # 584 | # existingSecret: redis-pass 585 | # existingSecretPasswordKey: redis-password 586 | master: 587 | resources: {} 588 | # limits: 589 | # cpu: 250m 590 | # memory: 256Mi 591 | # requests: 592 | # cpu: 250m 593 | # memory: 256Mi 594 | --------------------------------------------------------------------------------