From 05d75cad630b314e41083c74149a997cb3f44895 Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Thu, 4 Jan 2024 10:01:08 +0100 Subject: [PATCH 1/2] Fix backwards compatibility for k8s 1.24 --- templates/poddisruptionbudget.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/templates/poddisruptionbudget.yaml b/templates/poddisruptionbudget.yaml index f526e63..5a551d3 100644 --- a/templates/poddisruptionbudget.yaml +++ b/templates/poddisruptionbudget.yaml @@ -1,5 +1,9 @@ {{- if .Values.podDisruptionBudget -}} +{{- if .Capabilities.APIVersions.Has "policy/v1" -}} apiVersion: policy/v1 +{{- else}} +apiVersion: policy/v1beta1 +{{- end }} kind: PodDisruptionBudget metadata: name: {{ template "docker-registry.fullname" . }} From a1b77cb212af6ef4c0f847a926aaf9fbe51664de Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Thu, 4 Jan 2024 10:09:33 +0100 Subject: [PATCH 2/2] Publish helm chart as release asset --- .github/workflows/healm_publish.yaml | 29 ++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/healm_publish.yaml diff --git a/.github/workflows/healm_publish.yaml b/.github/workflows/healm_publish.yaml new file mode 100644 index 0000000..26c557e --- /dev/null +++ b/.github/workflows/healm_publish.yaml @@ -0,0 +1,29 @@ +name: helm-publish + +on: + release: + types: [prereleased, released] + +env: + HELM_CHARTS_PATH: "." + +jobs: + upload-helm-charts: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - uses: azure/setup-helm@v1 + + - name: Package helm charts + run: helm package . + working-directory: ${{ env.HELM_CHARTS_PATH }} + + - name: Rename helm chart archives + run: for filename in *.tgz; do mv "$filename" "helm-chart-$filename"; done + working-directory: ${{ env.HELM_CHARTS_PATH }} + + - uses: softprops/action-gh-release@v1 + with: + files: ${{ env.HELM_CHARTS_PATH }}/*.tgz