From f924f986a9a2dcd1020d45479a8bbe1a5e8def0f Mon Sep 17 00:00:00 2001 From: Jonas Forsberg Date: Mon, 11 Nov 2024 09:38:40 +0100 Subject: [PATCH 1/2] fixed volumeMounts for statefulset --- .gitignore | 1 + Chart.yaml | 2 +- templates/parts/_containers.tpl | 8 +++++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 92a43e0..1254b16 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ bin/* .project /.bin /_test/secrets/*.json +*.tgz # OSX leaves these everywhere on SMB shares ._* diff --git a/Chart.yaml b/Chart.yaml index e2cadb9..a68f376 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -3,7 +3,7 @@ apiVersion: v2 name: lib description: Common functions for my helm charts at home type: library -version: 1.0.2 +version: 1.0.3 kubeVersion: ">=1.27.0" home: git.rre.nu sources: diff --git a/templates/parts/_containers.tpl b/templates/parts/_containers.tpl index 423192a..00bc644 100644 --- a/templates/parts/_containers.tpl +++ b/templates/parts/_containers.tpl @@ -40,8 +40,14 @@ create the environment varable list resources: {{- toYaml . | nindent 4 }} {{- end }} - {{- with .Values.volumeMounts }} + {{- if or .Values.volumeMounts .Values.volumeClaimTemplates }} volumeMounts: + {{- end }} + {{- with .Values.volumeMounts }} {{- toYaml . | nindent 4 }} {{- end }} + {{- range $v := .Values.volumeClaimTemplates }} + - name: {{ $v.name }} + mountPath: {{ $v.mountPath }} + {{- end }} {{- end }} From 224c1ccd2fe5df6292a913150c69c21f8a2665e7 Mon Sep 17 00:00:00 2001 From: Jonas Forsberg Date: Mon, 11 Nov 2024 10:55:03 +0100 Subject: [PATCH 2/2] changed to gitea helm repo --- .gitea/workflows/buildPush.yaml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.gitea/workflows/buildPush.yaml b/.gitea/workflows/buildPush.yaml index f7a83d6..4929500 100644 --- a/.gitea/workflows/buildPush.yaml +++ b/.gitea/workflows/buildPush.yaml @@ -12,11 +12,6 @@ jobs: - uses: actions/checkout@v3 name: Check out code - - name: Set up Helm - uses: azure/setup-helm@v4.2.0 - with: - version: v3.14.4 - - name: Get package name id: chart_name uses: mikefarah/yq@master @@ -32,15 +27,11 @@ jobs: - name: build helm package shell: bash env: - REPO_PASSWORD: ${{ secrets.REPO_PASSWORD }} - REPO_USERNAME: ${{ secrets.REPO_USERNAME }} - REPO_HOST: ${{ secrets.REPO_HOST }} + PACKAGE_TOKEN: ${{ secrets.REPO_HOST }} CHART_NAME: ${{ steps.chart_name.outputs.result }} CHART_VERSION: ${{ steps.chart_version.outputs.result }} run: | REPO_PATH=$(git rev-parse --show-toplevel) mkdir /tmp/build cd /tmp/build - helm package $REPO_PATH - helm registry login --username $REPO_USERNAME --password $REPO_PASSWORD $REPO_HOST - helm push ${CHART_NAME}-${CHART_VERSION}.tgz oci://$REPO_HOST/helm + curl -H "Authorization: token $PACKAGE_TOKEN" -X POST --upload-file $CHART_NAME-$CHART_VERSION.tgz https://git.rre.nu/api/packages/jonas/helm/api/charts