Skip to content

Commit 1707118

Browse files
committed
github: Add chart lint and test action.
1 parent d2bce62 commit 1707118

File tree

3 files changed

+120
-22
lines changed

3 files changed

+120
-22
lines changed

.github/workflows/helm-test.yaml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
name: Helm lint and test
3+
4+
on:
5+
pull_request:
6+
branches:
7+
- main
8+
9+
jobs:
10+
lint-test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v5
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Set up Helm
19+
uses: azure/[email protected]
20+
with:
21+
version: v3.17.0
22+
23+
- uses: actions/[email protected]
24+
with:
25+
python-version: "3.x"
26+
check-latest: true
27+
28+
- name: Run helm-docs
29+
uses: losisin/helm-docs-github-action@v1
30+
with:
31+
fail-on-diff: true
32+
33+
- name: Set up chart-testing
34+
uses: helm/[email protected]
35+
with:
36+
version: 3.14.0
37+
yamllint_version: 1.37.1
38+
yamale_version: 6.0.0
39+
40+
- name: Set up helm repos
41+
run: |
42+
helm repo add groundhog2k https://groundhog2k.github.io/helm-charts/
43+
44+
- name: Run chart-testing (list-changed)
45+
id: list-changed
46+
run: |
47+
changed=$(ct list-changed --chart-dirs kubernetes/chart --target-branch ${{ github.event.repository.default_branch }})
48+
if [[ -n "$changed" ]]; then
49+
echo "changed=true" >> "$GITHUB_OUTPUT"
50+
fi
51+
52+
- name: Run chart-testing (lint)
53+
if: steps.list-changed.outputs.changed == 'true'
54+
run: ct lint --chart-dirs kubernetes/chart --target-branch ${{ github.event.repository.default_branch }} --lint-conf lintconf.yaml --github-groups
55+
56+
- name: Create kind cluster
57+
if: steps.list-changed.outputs.changed == 'true'
58+
uses: helm/kind-action@v1
59+
60+
- name: Run chart-testing (install)
61+
if: steps.list-changed.outputs.changed == 'true'
62+
run: ct install --chart-dirs kubernetes/chart --target-branch ${{ github.event.repository.default_branch }} --github-groups

kubernetes/chart/zulip/README.md

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -85,22 +85,26 @@ Now you're ready to follow [the installation instructions above](#installation).
8585
| livenessProbe.periodSeconds | int | `10` | |
8686
| livenessProbe.successThreshold | int | `1` | |
8787
| livenessProbe.timeoutSeconds | int | `5` | |
88+
| memcached.image.registry | string | `"docker.io"` | |
89+
| memcached.image.repository | string | `"memcached"` | |
90+
| memcached.image.tag | string | `"alpine"` | |
8891
| memcached.memcachedUsername | string | `"zulip@localhost"` | |
8992
| nameOverride | string | `""` | |
9093
| nodeSelector | object | `{}` | |
9194
| podAnnotations | object | `{}` | |
9295
| podLabels | object | `{}` | |
9396
| podSecurityContext | object | `{}` | |
9497
| postSetup.scripts | object | `{}` | |
95-
| postgresql.auth.database | string | `"zulip"` | |
96-
| postgresql.auth.username | string | `"zulip"` | |
97-
| postgresql.image.repository | string | `"zulip/zulip-postgresql"` | |
98+
| postgresql.image.registry | string | `"zulip"` | |
99+
| postgresql.image.repository | string | `"zulip-postgresql"` | |
98100
| postgresql.image.tag | int | `14` | |
99-
| postgresql.primary.containerSecurityContext.runAsUser | int | `0` | |
100-
| rabbitmq.auth.username | string | `"zulip"` | |
101-
| rabbitmq.persistence.enabled | bool | `false` | |
102-
| redis.architecture | string | `"standalone"` | |
103-
| redis.master.persistence.enabled | bool | `false` | |
101+
| postgresql.securityContext.readOnlyRootFilesystem | bool | `false` | |
102+
| postgresql.securityContext.runAsGroup | int | `70` | |
103+
| postgresql.securityContext.runAsUser | int | `70` | |
104+
| postgresql.userDatabase.name.value | string | `"zulip"` | |
105+
| postgresql.userDatabase.user.value | string | `"zulip"` | |
106+
| rabbitmq.authentication.user.value | string | `"zulip"` | |
107+
| redis | object | `{}` | |
104108
| resources | object | `{}` | |
105109
| securityContext | object | `{}` | |
106110
| service.port | int | `80` | |
@@ -159,22 +163,26 @@ SECRETS_email_password:
159163
160164
### Dependencies
161165
162-
The chart uses Memcached, RabbitMQ and Redis helm charts defined in
163-
the Bitnami Helm repository. Most of these are configured following their
164-
default settings, but you can check
165-
https://github.com/bitnami/charts/tree/master/bitnami/ for more configuration
166-
options of the subcharts.
167-
168-
For PostgreSQL the chart also uses the Bitnami chart to install it on the
169-
Kubernetes cluster. However, in this case we use Zulip's
170-
[zulip-postgresql](https://hub.docker.com/r/zulip/zulip-postgresql) docker
171-
image, because it contains the Postgresql plugins that are needed to run Zulip.
166+
The chart uses PostgreSQL, RabbitMQ and Redis helm charts defined in
167+
the groundhog2k Helm repository. Most of these are configured
168+
following their default settings, but you can check
169+
https://github.com/groundhog2k/helm-charts/tree/master/charts/ for
170+
more configuration options of these subcharts. The PostgreSQL
171+
subchart uses the
172+
[zulip-postgresql](https://hub.docker.com/r/zulip/zulip-postgresql)
173+
docker image, because it contains the Postgresql plugins that are
174+
needed to run Zulip.
175+
176+
For Memcached, the chart uses the Bitnami subcharts, but configured
177+
with the stock docker.io memcached image. See [Bitnami's
178+
documentation](https://artifacthub.io/packages/helm/bitnami/memcached)
179+
for this subchart.
172180
173181
## Requirements
174182
175183
| Repository | Name | Version |
176184
|------------|------|---------|
177-
| oci://registry-1.docker.io/bitnamicharts | memcached | 7.4.16 |
178-
| oci://registry-1.docker.io/bitnamicharts | postgresql | 15.5.32 |
179-
| oci://registry-1.docker.io/bitnamicharts | rabbitmq | 14.7.0 |
180-
| oci://registry-1.docker.io/bitnamicharts | redis | 20.1.4 |
185+
| https://groundhog2k.github.io/helm-charts/ | postgresql(postgres) | 1.5.11 |
186+
| https://groundhog2k.github.io/helm-charts/ | rabbitmq | 2.2.0 |
187+
| https://groundhog2k.github.io/helm-charts/ | redis | 2.1.7 |
188+
| oci://registry-1.docker.io/bitnamicharts | memcached | 7.9.7 |
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
zulip:
3+
password: set-secure-zulip-password
4+
environment:
5+
SETTING_ZULIP_ADMINISTRATOR: "[email protected]"
6+
SETTING_EXTERNAL_HOST: zulip.example.net
7+
ZULIP_AUTH_BACKENDS: "EmailAuthBackend"
8+
9+
memcached:
10+
memcachedPassword: set-secure-memcached-password
11+
12+
rabbitmq:
13+
authentication:
14+
password:
15+
value: set-secure-rabbitmq-password
16+
erlangCookie:
17+
value: set-secure-cookie-password
18+
19+
redis:
20+
password: set-secure-redis-password
21+
22+
postgresql:
23+
settings:
24+
superuserPassword:
25+
value: set-secure-postgresql-postgres-password
26+
userDatabase:
27+
password:
28+
value: set-secure-postgresql-zulip-password

0 commit comments

Comments
 (0)