diff --git a/.github/config.js b/.github/config.js new file mode 100644 index 0000000..a4ec97f --- /dev/null +++ b/.github/config.js @@ -0,0 +1,41 @@ +module.exports = { + branchPrefix: 'test-renovate/', + username: 'renovate-release', + gitAuthor: 'Renovate Bot ', + platform: 'github', + includeForks: true, + dryRun: 'null', + repositories: ['jessebot/mastodon-helm-chart'], + extends: ['config:base'], + allowPostUpgradeCommandTemplating: true, + allowedPostUpgradeCommands: ['^.*'], + regexManagers: [ + { + fileMatch: ['(^|/)Chart\\.yaml$'], + matchStrings: [ + '#\\s?renovate: image=(?.*?)\\s?appVersion:\\s?\\"?(?[\\w+\\.\\-]*)', + ], + datasourceTemplate: 'docker', + }, + ], + packageRules: [ + { + matchManagers: ['helm-requirements', 'helm-values', 'regex'], + postUpgradeTasks: { + commands: [ + `version=$(grep '^version:' {{{parentDir}}}/Chart.yaml | awk '{print $2}') + major=$(echo $version | cut -d. -f1) + minor=$(echo $version | cut -d. -f2) + patch=$(echo $version | cut -d. -f3) + minor=$(expr $minor + 1) + echo "Replacing $version with $major.$minor.$patch" + sed -i "s/^version:.*/version: $\{major\}.$\{minor\}.$\{patch\}/g" {{{parentDir}}}/Chart.yaml + cat {{{parentDir}}}/Chart.yaml + `, + ], + }, + fileFilters: ['**/Chart.yaml'], + executionMode: 'branch', + }, + ], +}; diff --git a/.github/renovate.json b/.github/renovate.json deleted file mode 100644 index 2eb070f..0000000 --- a/.github/renovate.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "repositories": [ - "jessebot/mastodon-helm-chart" - ], - "regexManagers": [ - { - "datasourceTemplate": "docker", - "fileMatch": ["(^|/)Chart\\.yaml$"], - "matchStrings": [ - "#\\s?renovate: image=(?.*?)\\s?appVersion:\\s?\\\"?(?[\\w+\\.\\-]*)\"" - ] - } - ] -} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7460f98..e421b2d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,11 +5,8 @@ on: push: branches: - main - paths-ignore: - - '.github/**' - - 'charts/**/README.md' - - 'LICENSE' - - 'README.md' + paths: + - 'charts/**' jobs: release: diff --git a/.github/workflows/renovate.yaml b/.github/workflows/renovate.yaml index 3f4e153..78f87db 100644 --- a/.github/workflows/renovate.yaml +++ b/.github/workflows/renovate.yaml @@ -11,7 +11,7 @@ jobs: - name: Checkout uses: actions/checkout@v3 - name: Self-hosted Renovate - uses: renovatebot/github-action@v39.0.1 + uses: renovatebot/github-action@v39.0.5 with: token: ${{ secrets.RENOVATE_TOKEN }} - configurationFile: .github/renovate.json + configurationFile: .github/config.js diff --git a/README.md b/README.md index 74ede9c..bbc766a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ -# Introduction +# Mastodon Helm Chart + This is a fork of the official mastodon helm chart for installing Mastodon on a Kubernetes cluster. I'll maintain this at least till some of the security features PRs are merged in the upstream repo. The basic usage is: @@ -8,7 +9,8 @@ This is a fork of the official mastodon helm chart for installing Mastodon on a This chart is tested with k8s 1.26+ and helm 3.6.0+. -⚠️ I just became aware of the bitnami mastodon chart [here](https://github.com/bitnami/charts/tree/main/bitnami/mastodon) so I may publicly archive this repo in the near future. Feel free to take what you need though :) +> [!Note] +> I just became aware of the bitnami mastodon chart [here](https://github.com/bitnami/charts/tree/main/bitnami/mastodon) so I may publicly archive this repo in the near future. Feel free to take what you need though :) ## Known caveats for this chart Currently in chart version `4.1.0`, you need to run postgresql and redis helm charts independently of this one. This is because there's a helm hook job called db-migrate that I can't figure out how to make run after the dependency charts are fully installed, but before everything else. If you know the answer to this, please open an issue/pr here and let me know! diff --git a/charts/mastodon/Chart.lock b/charts/mastodon/Chart.lock index 77d2ca7..bea9bd4 100644 --- a/charts/mastodon/Chart.lock +++ b/charts/mastodon/Chart.lock @@ -4,9 +4,9 @@ dependencies: version: 12.8.1 - name: elasticsearch repository: oci://registry-1.docker.io/bitnamicharts - version: 19.10.1 + version: 19.10.6 - name: redis repository: oci://registry-1.docker.io/bitnamicharts - version: 17.11.6 -digest: sha256:e1bdb12c1d1724ca84d449b3fd887c4ece1aa1e1777c798cc7b1934241849111 -generated: "2023-08-08T23:06:59.889263599Z" + version: 17.14.6 +digest: sha256:0024eb03fecdc4a25396353f648a0173dd103da20e553621256dd4ba44e9c5f6 +generated: "2023-08-07T11:06:23.843699963Z" diff --git a/charts/mastodon/Chart.yaml b/charts/mastodon/Chart.yaml index bc92646..29b172d 100644 --- a/charts/mastodon/Chart.yaml +++ b/charts/mastodon/Chart.yaml @@ -26,10 +26,10 @@ dependencies: repository: oci://registry-1.docker.io/bitnamicharts condition: postgresql.enabled - name: elasticsearch - version: 19.10.1 + version: 19.10.6 repository: oci://registry-1.docker.io/bitnamicharts condition: elasticsearch.enabled - name: redis - version: 17.11.6 + version: 17.14.6 repository: oci://registry-1.docker.io/bitnamicharts condition: redis.enabled diff --git a/charts/mastodon/README.md b/charts/mastodon/README.md index 77bf4e1..b1d6deb 100644 --- a/charts/mastodon/README.md +++ b/charts/mastodon/README.md @@ -1,6 +1,6 @@ # mastodon -![Version: 4.1.0](https://img.shields.io/badge/Version-4.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v4.1.4](https://img.shields.io/badge/AppVersion-v4.1.4-informational?style=flat-square) +![Version: 4.2.0](https://img.shields.io/badge/Version-4.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v4.1.4](https://img.shields.io/badge/AppVersion-v4.1.4-informational?style=flat-square) Mastodon is a free, open-source social network server based on ActivityPub. @@ -8,7 +8,7 @@ Mastodon is a free, open-source social network server based on ActivityPub. | Repository | Name | Version | |------------|------|---------| -| oci://registry-1.docker.io/bitnamicharts | elasticsearch | 19.10.1 | +| oci://registry-1.docker.io/bitnamicharts | elasticsearch | 19.10.6 | | oci://registry-1.docker.io/bitnamicharts | postgresql | 12.6.0 | | oci://registry-1.docker.io/bitnamicharts | redis | 17.11.6 | diff --git a/charts/mastodon/values.yaml b/charts/mastodon/values.yaml index 788e351..4f50535 100644 --- a/charts/mastodon/values.yaml +++ b/charts/mastodon/values.yaml @@ -248,7 +248,7 @@ ingress: hosts: - mastodon.local -# -- https://github.com/bitnami/charts/tree/master/bitnami/elasticsearch#parameters +# -- https://github.com/bitnami/charts/tree/main/bitnami/elasticsearch#parameters elasticsearch: # `false` will disable full-text search # @@ -261,7 +261,7 @@ elasticsearch: image: tag: 7 -# https://github.com/bitnami/charts/tree/master/bitnami/postgresql#parameters +# https://github.com/bitnami/charts/tree/main/bitnami/postgresql#parameters postgresql: # -- disable if you want to use an existing db; in which case the values below # must match those of that external postgres instance @@ -273,7 +273,7 @@ postgresql: username: mastodon # you must set a password; the password generated by the postgresql chart will # be rotated on each upgrade: - # https://github.com/bitnami/charts/tree/master/bitnami/postgresql#upgrade + # https://github.com/bitnami/charts/tree/main/bitnami/postgresql#upgrade password: "" # Set the password for the "postgres" admin user # set this to the same value as above if you've previously installed @@ -283,7 +283,7 @@ postgresql: # with a key of password set to the password you want existingSecret: "" -# https://github.com/bitnami/charts/tree/master/bitnami/redis#parameters +# https://github.com/bitnami/charts/tree/main/bitnami/redis#parameters redis: # disable if you want to use an existing redis instance; in which case the # values below must match those of that external redis instance