Compare commits
18 Commits
Author | SHA1 | Date | |
---|---|---|---|
d07f097cfd | |||
a6f96f67b5 | |||
5ba9984415 | |||
2b2c082b58 | |||
4d6bd42402 | |||
770ad32c08 | |||
b74e67f3ca | |||
|
9bd4849df7 | ||
6885f46027 | |||
|
0d9a47f208 | ||
e211d43dc7 | |||
|
224c1ccd2f | ||
|
f924f986a9 | ||
2ae5f80aa4 | |||
|
db1b814416 | ||
8753852318 | |||
|
fef72ffc1a | ||
35fbb3534e |
@ -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 ./
|
@ -2,9 +2,7 @@ name: Package and publish helm chart
|
||||
|
||||
on:
|
||||
push:
|
||||
# Pattern matched against refs/tags
|
||||
tags:
|
||||
- '**' # Push events to every tag including hierarchical tags like v1.0/beta
|
||||
|
||||
jobs:
|
||||
package-helm:
|
||||
runs-on: ubuntu-latest
|
||||
@ -29,18 +27,19 @@ jobs:
|
||||
with:
|
||||
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
|
||||
if: gitea.ref == 'refs/heads/main'
|
||||
shell: bash
|
||||
env:
|
||||
REPO_PASSWORD: ${{ secrets.REPO_PASSWORD }}
|
||||
REPO_USERNAME: ${{ secrets.REPO_USERNAME }}
|
||||
REPO_HOST: ${{ secrets.REPO_HOST }}
|
||||
PACKAGE_TOKEN: ${{ secrets.PACKAGE_TOKEN }}
|
||||
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
|
||||
helm package .
|
||||
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
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,6 +5,7 @@ bin/*
|
||||
.project
|
||||
/.bin
|
||||
/_test/secrets/*.json
|
||||
*.tgz
|
||||
|
||||
# OSX leaves these everywhere on SMB shares
|
||||
._*
|
||||
|
@ -3,7 +3,7 @@ apiVersion: v2
|
||||
name: lib
|
||||
description: Common functions for my helm charts at home
|
||||
type: library
|
||||
version: 1.0.0
|
||||
version: 1.0.4
|
||||
kubeVersion: ">=1.27.0"
|
||||
home: git.rre.nu
|
||||
sources:
|
||||
|
@ -4,6 +4,7 @@ apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "lib.fullname" . }}
|
||||
namespace: {{ .Values.namespace }}
|
||||
labels:
|
||||
{{- include "lib.labels" . | nindent 4 }}
|
||||
spec:
|
||||
|
@ -36,6 +36,10 @@ spec:
|
||||
{{- toYaml .Values.controller.podSecurityContext | nindent 8 }}
|
||||
containers:
|
||||
{{- include "lib.parts.container" . | nindent 8 -}}
|
||||
{{- with .Values.volumes }}
|
||||
volumes:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
|
@ -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 }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user