Skip to content

Commit 53f8c51

Browse files
committed
github: Add chart lint and test action.
1 parent 1a62e9e commit 53f8c51

File tree

3 files changed

+102
-1
lines changed

3 files changed

+102
-1
lines changed

.github/workflows/helm-test.yaml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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: Run chart-testing (list-changed)
41+
id: list-changed
42+
run: |
43+
changed=$(ct list-changed --chart-dirs kubernetes/chart --target-branch ${{ github.event.repository.default_branch }})
44+
if [[ -n "$changed" ]]; then
45+
echo "changed=true" >> "$GITHUB_OUTPUT"
46+
fi
47+
48+
- name: Run chart-testing (lint)
49+
if: steps.list-changed.outputs.changed == 'true'
50+
run: ct lint --chart-dirs kubernetes/chart --target-branch ${{ github.event.repository.default_branch }} --lint-conf lintconf.yaml --github-groups
51+
52+
- name: Create kind cluster
53+
if: steps.list-changed.outputs.changed == 'true'
54+
uses: helm/kind-action@v1
55+
56+
- name: Run chart-testing (install)
57+
if: steps.list-changed.outputs.changed == 'true'
58+
run: ct install --chart-dirs kubernetes/chart --target-branch ${{ github.event.repository.default_branch }} --github-groups
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
zulip:
3+
password: set-secure-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-password
11+
image:
12+
registry: docker.io
13+
repository: memcached
14+
tag: alpine
15+
16+
rabbitmq:
17+
auth:
18+
password: set-secure-password
19+
erlangCookie: set-secure-password
20+
image:
21+
registry: docker.io
22+
repository: rabbitmq
23+
tag: 4.1
24+
25+
redis:
26+
auth:
27+
password: set-secure-password
28+
image:
29+
registry: docker.io
30+
repository: redis
31+
tag: alpine
32+
33+
postgresql:
34+
auth:
35+
# # postgres admin user password
36+
postgresqlPassword: set-secure-password
37+
# # postgres zulip user password
38+
password: set-secure-password
39+
primary:
40+
containerSecurityContext:
41+
runAsUser: 70
42+
runAsGroup: 70
43+
readOnlyRootFilesystem: false

kubernetes/chart/zulip/templates/_helpers.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ include all env variables for Zulip pods
7171
- name: DB_HOST_PORT
7272
value: "{{ template "postgresql.v1.service.port" .Subcharts.postgresql }}"
7373
- name: DB_USER
74-
value: "postgres"
74+
value: "zulip"
7575
- name: SETTING_MEMCACHED_LOCATION
7676
value: "{{ template "common.names.fullname" .Subcharts.memcached }}:11211"
7777
- name: SETTING_RABBITMQ_HOST

0 commit comments

Comments
 (0)