Skip to content

Commit

Permalink
Update mysql subchart to v10, postgresql subchart to v15, add better …
Browse files Browse the repository at this point in the history
…ci testing (#85)

* Update mysql Docker tag to v10

* update coturn chart version for major mysql bump

* testing postgresql instead of sqlite with coturn

* upgrading postgresql a major verison since this will be a major version for mysql as well

* do a helm dep update for getting charts maybe

* update helm template postgresql.primary to postrgresql.v1.primary, also add extra ci jobs for different databases

* add mysql test and remove helm dep update

* fix more issues with bitnami named templates in helm

* fix plain test job

* disable default database configmap

* fix mysql test with mysql.enabled

* add volume for sqllite

* fix mysql fullname

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: jessebot <jessebot@linux.com>
  • Loading branch information
renovate[bot] and jessebot authored Mar 27, 2024
1 parent 6311587 commit 6a2fcd1
Show file tree
Hide file tree
Showing 11 changed files with 171 additions and 62 deletions.
150 changes: 150 additions & 0 deletions .github/workflows/lint-and-test-chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
name: Lint Charts

on:
pull_request:
paths:
- 'charts/**'

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: "0"

- name: Install Helm
uses: azure/setup-helm@v4

- name: Add dependency chart repos
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.6.1

- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }})
if [[ -n "$changed" ]]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
fi
- name: Run chart-testing (lint)
id: lint
if: steps.list-changed.outputs.changed == 'true'
run: ct lint --target-branch ${{ github.event.repository.default_branch }}

test:
name: Test Chart
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: "0"

- name: Install Helm
uses: azure/setup-helm@v4

- name: Add dependency chart repos
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.6.1

- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }})
if [[ -n "$changed" ]]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
fi
- name: Create kind cluster
uses: helm/kind-action@v1.9.0
if: steps.list-changed.outputs.changed == 'true'

- name: Run chart install test
id: install
if: steps.list-changed.outputs.changed == 'true'
run: |
ct install --target-branch ${{ github.event.repository.default_branch }}
test-postgresql:
name: Test Chart with PostgreSQL
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: "0"

- name: Install Helm
uses: azure/setup-helm@v4

- name: Add dependency chart repos
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.6.1

- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }})
if [[ -n "$changed" ]]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
fi
- name: Create kind cluster
uses: helm/kind-action@v1.9.0
if: steps.list-changed.outputs.changed == 'true'

- name: Run chart install test with PostgreSQL
id: install
if: steps.list-changed.outputs.changed == 'true'
run: |
ct install --target-branch ${{ github.event.repository.default_branch }} --helm-extra-set-args "--set=postgresql.enabled=true --set=postgresql.global.postgresql.auth.password=testing12345678"
test-mysql:
name: Test Chart with MySQL
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: "0"

- name: Install Helm
uses: azure/setup-helm@v4

- name: Add dependency chart repos
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.6.1

- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }})
if [[ -n "$changed" ]]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
fi
- name: Create kind cluster
uses: helm/kind-action@v1.9.0
if: steps.list-changed.outputs.changed == 'true'

- name: Run chart install test with MySQL
id: install
if: steps.list-changed.outputs.changed == 'true'
run: |
ct install --target-branch ${{ github.event.repository.default_branch }} --helm-extra-set-args "--set=mysql.enabled=true --set=mysql.auth.password=testing12345678"
49 changes: 0 additions & 49 deletions .github/workflows/lint.yaml

This file was deleted.

8 changes: 4 additions & 4 deletions charts/coturn/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
dependencies:
- name: postgresql
repository: oci://registry-1.docker.io/bitnamicharts
version: 12.12.10
version: 15.1.4
- name: mysql
repository: oci://registry-1.docker.io/bitnamicharts
version: 9.23.0
digest: sha256:102ccf3fc259df23f941d18e283a8f4c36bb0618e4e0a02532e804589ba067b2
generated: "2024-03-27T10:06:57.562909967Z"
version: 10.1.0
digest: sha256:a60b40b982497a287b33a639cb4416e1687a25323fb291b9754337a2d0a96e0a
generated: "2024-03-27T12:12:51.984853928+01:00"
6 changes: 3 additions & 3 deletions charts/coturn/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: coturn
type: application
description: A Helm chart to deploy coturn
home: "https://github.com/small-hack/coturn-chart"
version: 4.6.0
version: 5.0.0

# renovate: image=coturn/coturn
appVersion: 4.6.2
Expand All @@ -17,10 +17,10 @@ maintainers:

dependencies:
- name: postgresql
version: 12.12.10
version: 15.1.4
repository: oci://registry-1.docker.io/bitnamicharts
condition: postgresql.enabled
- name: mysql
version: 9.23.0
version: 10.1.0
repository: oci://registry-1.docker.io/bitnamicharts
condition: mysql.enabled
6 changes: 3 additions & 3 deletions charts/coturn/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# coturn

![Version: 4.6.0](https://img.shields.io/badge/Version-4.6.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 4.6.2](https://img.shields.io/badge/AppVersion-4.6.2-informational?style=flat-square)
![Version: 5.0.0](https://img.shields.io/badge/Version-5.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 4.6.2](https://img.shields.io/badge/AppVersion-4.6.2-informational?style=flat-square)

A Helm chart to deploy coturn

Expand All @@ -20,8 +20,8 @@ A Helm chart to deploy coturn

| Repository | Name | Version |
|------------|------|---------|
| oci://registry-1.docker.io/bitnamicharts | mysql | 9.23.0 |
| oci://registry-1.docker.io/bitnamicharts | postgresql | 12.12.10 |
| oci://registry-1.docker.io/bitnamicharts | mysql | 10.1.0 |
| oci://registry-1.docker.io/bitnamicharts | postgresql | 15.1.4 |

## Values

Expand Down
Binary file added charts/coturn/charts/mysql-10.1.0.tgz
Binary file not shown.
Binary file removed charts/coturn/charts/mysql-9.16.1.tgz
Binary file not shown.
Binary file removed charts/coturn/charts/postgresql-12.9.0.tgz
Binary file not shown.
Binary file added charts/coturn/charts/postgresql-15.1.4.tgz
Binary file not shown.
12 changes: 10 additions & 2 deletions charts/coturn/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ spec:
name: {{ include "database.secretName" . }}
key: {{ .Values.externalDatabase.secretKeys.hostname }}
{{ else }}
value: {{ template "postgresql.primary.fullname" .Subcharts.postgresql }}
value: {{ template "postgresql.v1.primary.fullname" .Subcharts.postgresql }}
{{- end }}
command:
- "sh"
Expand Down Expand Up @@ -115,7 +115,7 @@ spec:
name: {{ include "database.secretName" . }}
key: {{ .Values.externalDatabase.secretKeys.hostname }}
{{ else if .Values.postgresql.enabled }}
value: {{ template "postgresql.primary.fullname" .Subcharts.postgresql }}
value: {{ template "postgresql.v1.primary.fullname" .Subcharts.postgresql }}
{{ else if .Values.mysql.enabled }}
value: {{ template "mysql.primary.fullname" .Subcharts.mysql }}
{{- end }}
Expand Down Expand Up @@ -209,6 +209,10 @@ spec:
{{- end }}
- name: var-tmp
mountPath: /var/tmp
{{- if and (not .Values.externalDatabase.enabled) (not .Values.postgresql.enabled) (not .Values.mysql.enabled) }}
- name: sqllite
mountPath: /var/db
{{- end }}
{{- with .Values.resources }}
resources:
{{- toYaml . | nindent 12 }}
Expand All @@ -234,3 +238,7 @@ spec:
{{- end }}
- name: var-tmp
emptyDir: {}
{{- if and (not .Values.externalDatabase.enabled) (not .Values.postgresql.enabled) (not .Values.mysql.enabled) }}
- name: sqllite
emptyDir: {}
{{- end }}
2 changes: 1 addition & 1 deletion charts/coturn/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ postgresql:
primary:
initdb:
# -- ConfigMap with scripts to be run at first boot
scriptsConfigMap: initdb-scripts-config
scriptsConfigMap: ""


# MySQL chart configuration
Expand Down

0 comments on commit 6a2fcd1

Please sign in to comment.