Erstellen eines Chart packages
All checks were successful
Build Helm Chart / helm-package (push) Successful in 3s

This commit is contained in:
Marko Oldenburg 2024-09-18 17:04:02 +02:00
parent d7a10faf7c
commit bd07e88308
5 changed files with 61 additions and 30 deletions

View File

@ -0,0 +1,44 @@
name: "Build Helm Chart"
on:
push:
branches:
- main
paths:
- "Chart.yaml"
pull_request:
branches:
- main
paths:
- "Chart.yaml"
jobs:
helm-package:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set Helm Chart App Name and Version
id: get_version
run: |
APP_NAME=$(grep -oP '(?<=^name: ).*' Chart.yaml)
echo "Helm Chart App Name: $APP_NAME"
echo "::set-output name=app::$APP_NAME"
CHART_VERSION=$(grep -oP '(?<=^version: ).*' Chart.yaml)
echo "Helm Chart version: $CHART_VERSION"
echo "::set-output name=tag::$CHART_VERSION"
- name: Setup Helm
run: |
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
helm version
- name: Package Helm Chart
run: |
helm lint .
helm package .
- name: Upload Helm Package to repo
run: |
#curl --user ${{ secrets.USER }}:${{ secrets.TOKEN }} -X POST --upload-file ./${{ steps.get_version.outputs.app }}-${{ steps.get_version.outputs.tag }}.tgz ${{ vars.HELMREGISTRY }}/api/packages/${{ vars.OWNER }}/helm/api/charts

View File

@ -2,7 +2,7 @@ apiVersion: v2
maintainers:
- name: Marko Oldenburg
email: fhemdevelopment@cooltux.net
url: https://git.cooltux.net/kubernetes/helm-charts
url: https://git.cooltux.net/FHEM/fhem-docker_helm-chart
name: fhem
description: FHEM (TM) is a GPL'd perl server for house automation. It is used to automate some common tasks in the household like switching lamps / shutters / heating / etc. and to log events like temperature / humidity / power consumption.
home: https://fhem.de
@ -20,5 +20,5 @@ annotations:
category: Houseautomation
licenses: GPL'd
type: application
version: 0.4.9
appVersion: "3.3.1-bullseye"
version: 4.0.5
appVersion: "4.0.5-bullseye"

View File

@ -56,14 +56,6 @@ spec:
resources:
{{- toYaml .Values.resources | nindent 12 }}
env:
- name: APT_PKGS
value: {{ default "" .Values.aptPkgs | quote }}
- name: CPAN_PKGS
value: {{ default "" .Values.cpanPkgs | quote }}
- name: PIP_PKGS
value: {{ default "" .Values.pipPkgs | quote }}
- name: NPM_PKGS
value: {{ default "" .Values.npmPkgs | quote }}
- name: LOGFILE
value: {{ default "./log/fhem-%Y-%m-%d.log" .Values.logfile | quote }}
- name: TELNETPORT
@ -85,7 +77,9 @@ spec:
- name: I2C_GID
value: {{ default "6003" .Values.i2cGID | quote }}
- name: TIMEOUT
value: {{ default "" .Values.timeout | quote }}
value: {{ default "10" .Values.timeout | quote }}
- name: TIMEOUT_STARTING
value: {{ default "60" .Values.timeout | quote }}
- name: LANG
value: {{ default "en_US.UTF-8" .Values.lang | quote }}
- name: LANGUAGE
@ -111,7 +105,7 @@ spec:
- name: TZ
value: {{ default "Europe/Berlin" .Values.timezone | quote }}
- name: CONFIGTYPE
value: {{ default "" .Values.configtype | quote }}
value: {{ default "fhem.cfg.demo" .Values.configtype | quote }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}

View File

@ -5,9 +5,8 @@ metadata:
name: {{ include "fhem.fullname" . }}
labels:
{{- include "fhem.labels" . | nindent 4 }}
annotations:
volume.beta.kubernetes.io/storage-class: {{ .Values.persistence.storageClass | quote }}
spec:
storageClassName: {{ .Values.persistence.storageClass | quote }}
accessModes:
{{- if not (empty .Values.persistence.accessModes) }}
{{- range .Values.persistence.accessModes }}

View File

@ -10,7 +10,7 @@ replicaCount: 1
updateStrategy: RollingUpdate
image:
repository: fhem/fhem-minimal
repository: ghcr.io/fhem/fhem-minimal-docker
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""
@ -20,14 +20,6 @@ nameOverride: ""
fullnameOverride: ""
### Tweak container settings using environment variables
## Debian APT packages: "App::Name1 App::Name2"
aptPkgs: ""
## Perl CPAN modules: "package1 package2"
cpanPkgs: ""
## Python PIP packages: "package1 package2"
pipPkgs: ""
## Node.js NPM packages: "package1 package2"
npmPkgs: ""
## Change FHEM logfile format: To set a different logfile path and format (default is ./log/fhem-%Y-%m-%d.log):
logfile: ""
## Change FHEM local Telnet port for health check and container restart handling: To set a different Telnet port for local connection during health check and container restart (default is 7072):
@ -50,6 +42,9 @@ gpioGID: ""
i2cGID: ""
## Change shutdown timeout: To set a different setting for the timer during FHEM shutdown handling, you may add this environment variable: 10
timeout: ""
## Set FHEM startup timeout: Set a Timeout, how long the docker container waits until the FHEM process will finished starting. If the timeout is over, and FHEM is not started, the container is stopped. You will see an error like this in the container log, if starting wasn't finished early enough: ERROR: Fatal: No message from FHEM since 60 seconds that server has started.
## If you have a slow system and a module which blocks FHEM to be ready adjust this to a higher value.
timeout_starting: ""
## Set locale: For maximum compatibility, standard locale is set to US english with some refinements towards the European standards and German defaults. This may be changed according to your needs (also see Debian Wiki for more information):
lang: ""
language: ""
@ -66,12 +61,12 @@ lcTime: ""
timezone: ""
## Using configDB: Should you be using FHEM config type configDB, you need to change the FHEM configuration source for correct startup by setting the following environment variable: configDB
## fhem.cfg.demo for Democonfig
configtype: "fhem.cfg.demo"
configtype: ""
### ENDE Container environment variables
serviceAccount:
# Specifies whether a service account should be created
create: true
create: false
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
@ -126,7 +121,7 @@ service:
## @param service.type Kubernetes Service type
## For minikube, set this to NodePort, elsewhere use LoadBalancer
##
type: LoadBalancer # LoadBalancer
type: NodePort # LoadBalancer, ClusterIP
## @param service.loadBalancerIP Use serviceLoadBalancerIP to request a specific static IP, otherwise leave blank
##
loadBalancerIP: ""
@ -134,7 +129,7 @@ service:
## @param service.ports.https Service HTTPS port
##
ports:
fhemweb: 80
fhemweb: 8083
##
## @param service.nodePorts [object] Use nodePorts to request some specific ports when using NodePort
## nodePorts:
@ -173,7 +168,7 @@ ingress:
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- host:
- host: # Hostname
paths:
- path: /
pathType: ImplementationSpecific
@ -183,7 +178,6 @@ ingress:
# - chart-example.local
resources:
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following