Compare commits

...

18 Commits
v1.0.0 ... main

Author SHA1 Message Date
d07f097cfd Merge pull request 'streamelined pipeline' (#13) from pipeline2 into main
All checks were successful
Package and publish helm chart / package-helm (push) Successful in 13s
Reviewed-on: #13
2024-11-12 09:46:41 +00:00
a6f96f67b5 streamelined pipeline
All checks were successful
Package and publish helm chart / package-helm (push) Successful in 16s
2024-11-12 10:46:03 +01:00
5ba9984415 Merge pull request 'lint and only build on main' (#12) from pipeline into main
All checks were successful
Lint and Test Charts / lint-test (push) Successful in 8s
Reviewed-on: #12
2024-11-12 09:29:56 +00:00
2b2c082b58 lint and only build on main 2024-11-12 10:25:02 +01:00
4d6bd42402 Merge pull request 'added volumes to statefulset' (#11) from volumes_statefulset into main
All checks were successful
Lint and Test Charts / lint-test (push) Successful in 9s
Reviewed-on: #11
2024-11-12 09:20:52 +00:00
770ad32c08 added volumes to statefulset 2024-11-12 10:20:21 +01:00
b74e67f3ca Merge pull request 'changed token variable' (#10) from fix_pipeline into main
All checks were successful
Lint and Test Charts / lint-test (push) Successful in 7s
Reviewed-on: #10
2024-11-11 14:52:15 +00:00
Jonas Forsberg
9bd4849df7 changed token variable 2024-11-11 15:51:48 +01:00
6885f46027 Merge pull request 'added helm back' (#9) from fix_build into main
All checks were successful
Lint and Test Charts / lint-test (push) Successful in 8s
Package and publish helm chart / package-helm (push) Successful in 13s
Reviewed-on: #9
2024-11-11 10:02:17 +00:00
Jonas Forsberg
0d9a47f208 added helm back 2024-11-11 11:01:57 +01:00
e211d43dc7 Merge pull request 'fix_stateful' (#8) from fix_stateful into main
All checks were successful
Lint and Test Charts / lint-test (push) Successful in 10s
Reviewed-on: #8
fixes #7
2024-11-11 09:55:52 +00:00
Jonas Forsberg
224c1ccd2f changed to gitea helm repo
Some checks failed
Package and publish helm chart / package-helm (push) Failing after 11s
2024-11-11 10:55:03 +01:00
Jonas Forsberg
f924f986a9 fixed volumeMounts for statefulset 2024-11-11 09:38:40 +01:00
2ae5f80aa4 Merge pull request 'fixed verion tag' (#6) from version_fix into main
All checks were successful
Lint and Test Charts / lint-test (push) Successful in 7s
Package and publish helm chart / package-helm (push) Successful in 15s
Reviewed-on: #6
2024-10-22 14:15:06 +00:00
Jonas Forsberg
db1b814416 fixed verion tag 2024-10-22 16:14:33 +02:00
8753852318 Merge pull request 'fixed namespace' (#5) from deployment-ns into main
All checks were successful
Lint and Test Charts / lint-test (push) Successful in 8s
Package and publish helm chart / package-helm (push) Successful in 14s
Reviewed-on: #5
2024-10-22 14:08:47 +00:00
Jonas Forsberg
fef72ffc1a fixed namespace 2024-10-22 16:08:06 +02:00
35fbb3534e Merge pull request 'deployment' (#3) from deployment into main
All checks were successful
Lint and Test Charts / lint-test (push) Successful in 9s
Reviewed-on: #3
2024-10-22 12:30:56 +00:00
7 changed files with 25 additions and 40 deletions

View File

@ -1,26 +0,0 @@
name: Lint and Test Charts
on:
push:
branches:
- main
jobs:
lint-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@v4.2.0
with:
version: v3.14.4
- name: Lint the helm package
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
helm lint ./

View File

@ -2,9 +2,7 @@ name: Package and publish helm chart
on: on:
push: push:
# Pattern matched against refs/tags
tags:
- '**' # Push events to every tag including hierarchical tags like v1.0/beta
jobs: jobs:
package-helm: package-helm:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -29,18 +27,19 @@ jobs:
with: with:
cmd: yq .version Chart.yaml cmd: yq .version Chart.yaml
- name: Run helm lint on all changed charts
shell: bash
run: |
helm dependency build
helm lint .
- name: build helm package - name: build helm package
if: gitea.ref == 'refs/heads/main'
shell: bash shell: bash
env: env:
REPO_PASSWORD: ${{ secrets.REPO_PASSWORD }} PACKAGE_TOKEN: ${{ secrets.PACKAGE_TOKEN }}
REPO_USERNAME: ${{ secrets.REPO_USERNAME }}
REPO_HOST: ${{ secrets.REPO_HOST }}
CHART_NAME: ${{ steps.chart_name.outputs.result }} CHART_NAME: ${{ steps.chart_name.outputs.result }}
CHART_VERSION: ${{ steps.chart_version.outputs.result }} CHART_VERSION: ${{ steps.chart_version.outputs.result }}
run: | run: |
REPO_PATH=$(git rev-parse --show-toplevel) helm package .
mkdir /tmp/build 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
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

1
.gitignore vendored
View File

@ -5,6 +5,7 @@ bin/*
.project .project
/.bin /.bin
/_test/secrets/*.json /_test/secrets/*.json
*.tgz
# OSX leaves these everywhere on SMB shares # OSX leaves these everywhere on SMB shares
._* ._*

View File

@ -3,7 +3,7 @@ apiVersion: v2
name: lib name: lib
description: Common functions for my helm charts at home description: Common functions for my helm charts at home
type: library type: library
version: 1.0.0 version: 1.0.4
kubeVersion: ">=1.27.0" kubeVersion: ">=1.27.0"
home: git.rre.nu home: git.rre.nu
sources: sources:

View File

@ -4,6 +4,7 @@ apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: {{ include "lib.fullname" . }} name: {{ include "lib.fullname" . }}
namespace: {{ .Values.namespace }}
labels: labels:
{{- include "lib.labels" . | nindent 4 }} {{- include "lib.labels" . | nindent 4 }}
spec: spec:

View File

@ -36,6 +36,10 @@ spec:
{{- toYaml .Values.controller.podSecurityContext | nindent 8 }} {{- toYaml .Values.controller.podSecurityContext | nindent 8 }}
containers: containers:
{{- include "lib.parts.container" . | nindent 8 -}} {{- include "lib.parts.container" . | nindent 8 -}}
{{- with .Values.volumes }}
volumes:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.nodeSelector }} {{- with .Values.nodeSelector }}
nodeSelector: nodeSelector:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}

View File

@ -40,8 +40,14 @@ create the environment varable list
resources: resources:
{{- toYaml . | nindent 4 }} {{- toYaml . | nindent 4 }}
{{- end }} {{- end }}
{{- with .Values.volumeMounts }} {{- if or .Values.volumeMounts .Values.volumeClaimTemplates }}
volumeMounts: volumeMounts:
{{- end }}
{{- with .Values.volumeMounts }}
{{- toYaml . | nindent 4 }} {{- toYaml . | nindent 4 }}
{{- end }} {{- end }}
{{- range $v := .Values.volumeClaimTemplates }}
- name: {{ $v.name }}
mountPath: {{ $v.mountPath }}
{{- end }}
{{- end }} {{- end }}