Skip to content

Commit 6ec6bc6

Browse files
authored
Update dependencies and rework all charts (#10)
1 parent fb50438 commit 6ec6bc6

24 files changed

+647
-365
lines changed

.github/tests/meilisearch.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
meilisearch:
2+
enabled: true
3+
4+
internalDatabase:
5+
enabled: false
6+
7+
mariadb:
8+
enabled: true
9+
10+
monica:
11+
extraEnv:
12+
- name: QUEUE_CONNECTION
13+
value: database
14+
- name: SCOUT_DRIVER
15+
value: meilisearch
16+
- name: SCOUT_QUEUE
17+
value: "true"
18+
19+
queue:
20+
enabled: true

.github/tests/redis.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
redis:
2+
enabled: true
3+
architecture: standalone
4+
master:
5+
persistence:
6+
enabled: false
7+
8+
internalDatabase:
9+
enabled: false
10+
11+
mariadb:
12+
enabled: true
13+
14+
memcached:
15+
enabled: true
16+
17+
monica:
18+
extraEnv:
19+
- name: QUEUE_CONNECTION
20+
value: redis
21+
- name: CACHE_STORE
22+
value: memcached
23+
24+
cronjob:
25+
enabled: true
26+
27+
queue:
28+
enabled: true

.github/workflows/docs.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Helm docs
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
jobs:
8+
release:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
14+
- name: Run helm-docs
15+
uses: losisin/helm-docs-github-action@v1
16+
17+
- name: Check if there is any file update needed
18+
run: |
19+
status=$(git status --porcelain)
20+
if [ -n "$status" ]; then
21+
echo -e "Waiting modifications:\n$status"
22+
echo "::error::Changes waiting. Please run 'helm-docs' prior to your next commit."
23+
exit -1
24+
fi

.github/workflows/release.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,5 @@ jobs:
4343
4444
- name: Run chart-releaser
4545
uses: helm/chart-releaser-action@v1
46-
with:
47-
charts_repo_url: https://monicahq.github.io/helm
4846
env:
4947
CR_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/tests.yml

Lines changed: 38 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ on:
44
types: [opened, synchronize, reopened]
55

66
env:
7-
helm: v3.6.3
8-
python-version: 3.7
7+
helm: v3.16.2
8+
python-version: 3.x
99

1010
jobs:
1111
linter:
@@ -17,34 +17,59 @@ jobs:
1717
fetch-depth: 0
1818

1919
- name: Set up Helm
20-
uses: azure/setup-helm@v3
20+
uses: azure/setup-helm@v4
2121
with:
2222
version: ${{ env.helm }}
2323

24-
- uses: actions/setup-python@v4
24+
- uses: actions/setup-python@v5
2525
with:
2626
python-version: ${{ env.python-version }}
2727

2828
- name: Set up chart-testing
2929
uses: helm/chart-testing-action@v2
3030

3131
- name: Run chart-testing (lint)
32-
run: ct lint --config ct.yaml
32+
run: ct lint --config ct.yaml --target-branch ${{ github.event.repository.default_branch }}
3333

3434
helm-tests:
3535
runs-on: ubuntu-latest
36+
name: Helm tests (${{ matrix.test_cases.name }})
37+
38+
strategy:
39+
fail-fast: false
40+
matrix:
41+
test_cases:
42+
# test the plain helm chart with nothing changed
43+
- name: Default - no custom values
44+
45+
# test the helm chart with postgresql subchart enabled
46+
- name: PostgreSQL enabled
47+
helm_args: '--set=internalDatabase.enabled=false --set=postgresql.enabled=true'
48+
49+
# test the helm chart with mariadb subchart enabled
50+
- name: Mariadb enabled
51+
helm_args: '--set=internalDatabase.enabled=false --set=mariadb.enabled=true'
52+
53+
# test the helm chart with redis, queue and more
54+
- name: Redis and queue enabled
55+
file: redis.yaml
56+
57+
# test the helm chart with meilisearch
58+
- name: Meilisearch and queue enabled
59+
file: meilisearch.yaml
60+
3661
steps:
3762
- name: Checkout
3863
uses: actions/checkout@v4
3964
with:
4065
fetch-depth: 0
4166

4267
- name: Set up Helm
43-
uses: azure/setup-helm@v3
68+
uses: azure/setup-helm@v4
4469
with:
4570
version: ${{ env.helm }}
4671

47-
- uses: actions/setup-python@v4
72+
- uses: actions/setup-python@v5
4873
with:
4974
python-version: ${{ env.python-version }}
5075

@@ -54,7 +79,7 @@ jobs:
5479
- name: Run chart-testing (list-changed)
5580
id: list-changed
5681
run: |
57-
changed=$(ct list-changed --config ct.yaml)
82+
changed=$(ct list-changed --config ct.yaml --target-branch ${{ github.event.repository.default_branch }})
5883
if [[ -n "$changed" ]]; then
5984
echo "changed=true" >> $GITHUB_OUTPUT
6085
fi
@@ -63,5 +88,9 @@ jobs:
6388
uses: helm/kind-action@v1
6489
if: steps.list-changed.outputs.changed == 'true'
6590

91+
- name: Cp test case file
92+
if: matrix.test_cases.file != ''
93+
run: cp .github/tests/${{ matrix.test_cases.file }} charts/monica/ci/test-values.yaml
94+
6695
- name: Run chart-testing (install)
67-
run: ct install --config ct.yaml
96+
run: ct install --config ct.yaml --helm-extra-args '--timeout 600s' --target-branch ${{ github.event.repository.default_branch }} --helm-extra-set-args "--set=image.repository=ghcr.io/monicahq/monica-next --set=image.tag=main ${{ matrix.test_cases.helm_args }}"

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
repos:
2+
- repo: https://github.com/norwoodj/helm-docs
3+
rev: v1.14.2
4+
hooks:
5+
- id: helm-docs

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ the exclusion of warranty; and each file should have at least the
628628
"copyright" line and a pointer to where the full notice is found.
629629

630630
The software is called Monica and is a personal relationship management system.
631-
Copyright (C) 2016-2022 asbiin
631+
Copyright (C) 2016-2024 asbiin
632632

633633
This program is free software: you can redistribute it and/or modify
634634
it under the terms of the GNU Affero General Public License as

charts/monica/Chart.lock

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
dependencies:
22
- name: postgresql
3-
repository: https://charts.bitnami.com/bitnami
4-
version: 11.6.26
3+
repository: oci://registry-1.docker.io/bitnamicharts
4+
version: 16.0.3
55
- name: mariadb
6-
repository: https://charts.bitnami.com/bitnami
7-
version: 11.0.14
6+
repository: oci://registry-1.docker.io/bitnamicharts
7+
version: 19.1.0
88
- name: redis
9-
repository: https://charts.bitnami.com/bitnami
10-
version: 16.12.3
9+
repository: oci://registry-1.docker.io/bitnamicharts
10+
version: 20.2.1
1111
- name: memcached
12-
repository: https://charts.bitnami.com/bitnami
13-
version: 6.3.2
12+
repository: oci://registry-1.docker.io/bitnamicharts
13+
version: 7.5.1
1414
- name: meilisearch
1515
repository: https://meilisearch.github.io/meilisearch-kubernetes
16-
version: 0.1.44
17-
digest: sha256:b8d4730508ccfcd8a121dc1f729468f476114c7bc3da8b8e4309d4b60849a88d
18-
generated: "2022-12-23T18:39:53.1775839+01:00"
16+
version: 0.10.1
17+
digest: sha256:3fb70271b7f30bc1a3072252b987b1941e768d3eb7bc26aefd0e18c9eaf7b841
18+
generated: "2024-10-19T23:24:58.299202579+02:00"

charts/monica/Chart.yaml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,38 @@ apiVersion: v2
22
name: monica
33
description: A Helm chart for Kubernetes to install Monica
44
type: application
5-
version: 1.0.6
6-
appVersion: "1.0.0"
5+
version: 1.0.7
6+
appVersion: "5.0.0"
77
icon: https://www.monicahq.com/favicon.ico
88
maintainers:
99
- name: MonicaHQ
1010
url: https://github.com/monicahq/monica
11+
- name: asbiin
12+
1113
keywords:
1214
- crm
1315
kubeVersion: ">=1.16.0-0"
1416
sources:
15-
- https://github.com/monicahq/monica
16-
- https://hub.docker.com/_/monica
17+
- https://github.com/monicahq/helm
18+
- https://github.com/monicahq/docker
1719
dependencies:
1820
- name: postgresql
19-
version: 11.6.*
20-
repository: https://charts.bitnami.com/bitnami
21+
version: 16.0.*
22+
repository: oci://registry-1.docker.io/bitnamicharts
2123
condition: postgresql.enabled
2224
- name: mariadb
23-
version: 11.0.*
24-
repository: https://charts.bitnami.com/bitnami
25+
version: 19.1.*
26+
repository: oci://registry-1.docker.io/bitnamicharts
2527
condition: mariadb.enabled
2628
- name: redis
27-
version: 16.12.*
28-
repository: https://charts.bitnami.com/bitnami
29+
version: 20.2.*
30+
repository: oci://registry-1.docker.io/bitnamicharts
2931
condition: redis.enabled
3032
- name: memcached
31-
version: 6.3.*
32-
repository: https://charts.bitnami.com/bitnami
33+
version: 7.5.*
34+
repository: oci://registry-1.docker.io/bitnamicharts
3335
condition: memcached.enabled
3436
- name: meilisearch
35-
version: 0.1.*
37+
version: 0.10.*
3638
repository: https://meilisearch.github.io/meilisearch-kubernetes
3739
condition: meilisearch.enabled

0 commit comments

Comments
 (0)