From 9da5f721c73addfdbc70e48e326d9caf044fce86 Mon Sep 17 00:00:00 2001 From: Alex Lebens Date: Fri, 6 Jun 2025 14:47:34 -0500 Subject: [PATCH] fix missing values --- charts/gitea-actions/Chart.yaml | 4 +-- charts/gitea-actions/README.md | 5 ++-- charts/gitea-actions/templates/_helpers.tpl | 33 ++++----------------- charts/gitea-actions/values.yaml | 3 +- 4 files changed, 12 insertions(+), 33 deletions(-) diff --git a/charts/gitea-actions/Chart.yaml b/charts/gitea-actions/Chart.yaml index 1245b44..8720bb1 100644 --- a/charts/gitea-actions/Chart.yaml +++ b/charts/gitea-actions/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: gitea-actions -version: 0.1.2 +version: 0.2.0 description: Gitea Actions keywords: - cicd @@ -12,4 +12,4 @@ sources: maintainers: - name: alexlebens icon: https://avatars.githubusercontent.com/u/100373852?s=48&v=4 -appVersion: 0.261.3 +appVersion: 0.2.11 diff --git a/charts/gitea-actions/README.md b/charts/gitea-actions/README.md index 311a1f3..1a97186 100644 --- a/charts/gitea-actions/README.md +++ b/charts/gitea-actions/README.md @@ -1,6 +1,6 @@ # gitea-actions -![Version: 0.1.2](https://img.shields.io/badge/Version-0.1.2-informational?style=flat-square) ![AppVersion: 0.261.3](https://img.shields.io/badge/AppVersion-0.261.3-informational?style=flat-square) +![Version: 0.2.0](https://img.shields.io/badge/Version-0.2.0-informational?style=flat-square) ![AppVersion: 0.2.11](https://img.shields.io/badge/AppVersion-0.2.11-informational?style=flat-square) Gitea Actions @@ -19,7 +19,7 @@ Gitea Actions | Key | Type | Default | Description | |-----|------|---------|-------------| -| enabled | bool | `false` | | +| enabled | bool | `true` | | | existingSecret | string | `""` | | | existingSecretKey | string | `""` | | | giteaRootURL | string | `""` | | @@ -45,6 +45,7 @@ Gitea Actions | statefulset.labels | object | `{}` | | | statefulset.nodeSelector | object | `{}` | | | statefulset.persistence.size | string | `"1Gi"` | | +| statefulset.persistence.storageClass | string | `""` | | | statefulset.replicas | int | `1` | | | statefulset.resources | object | `{}` | | | statefulset.tolerations | list | `[]` | | diff --git a/charts/gitea-actions/templates/_helpers.tpl b/charts/gitea-actions/templates/_helpers.tpl index eb11460..ec8af83 100644 --- a/charts/gitea-actions/templates/_helpers.tpl +++ b/charts/gitea-actions/templates/_helpers.tpl @@ -33,34 +33,11 @@ Create chart name and version as used by the chart label. {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} {{- end -}} -{{/* -Create image name and tag used by the deployment. -*/}} -{{- define "gitea.actions.image" -}} -{{- $fullOverride := .Values.image.fullOverride | default "" -}} -{{- $registry := .Values.global.imageRegistry | default .Values.image.registry -}} -{{- $repository := .Values.image.repository -}} -{{- $separator := ":" -}} -{{- $tag := .Values.image.tag | default .Chart.AppVersion | toString -}} -{{- $rootless := ternary "-rootless" "" (.Values.image.rootless) -}} -{{- $digest := "" -}} -{{- if .Values.image.digest }} - {{- $digest = (printf "@%s" (.Values.image.digest | toString)) -}} -{{- end -}} -{{- if $fullOverride }} - {{- printf "%s" $fullOverride -}} -{{- else if $registry }} - {{- printf "%s/%s%s%s%s%s" $registry $repository $separator $tag $rootless $digest -}} -{{- else -}} - {{- printf "%s%s%s%s%s" $repository $separator $tag $rootless $digest -}} -{{- end -}} -{{- end -}} - {{/* Storage Class */}} {{- define "gitea.actions.persistence.storageClass" -}} -{{- $storageClass := (tpl ( default "" .Values.persistence.storageClass) .) | default (tpl ( default "" .Values.global.storageClass) .) }} +{{- $storageClass := (tpl ( default "" .Values.statefulset.persistence.storageClass) .) | default (tpl ( default "" .Values.global.storageClass) .) }} {{- if $storageClass }} storageClassName: {{ $storageClass | quote }} {{- end }} @@ -73,8 +50,8 @@ Common labels helm.sh/chart: {{ include "gitea.actions.chart" . }} app: {{ include "gitea.actions.name" . }} {{ include "gitea.actions.selectorLabels" . }} -app.kubernetes.io/version: {{ .Values.image.tag | default .Chart.AppVersion | quote }} -version: {{ .Values.image.tag | default .Chart.AppVersion | quote }} +app.kubernetes.io/version: {{ .Values.statefulset.actRunner.tag | default .Chart.AppVersion | quote }} +version: {{ .Values.statefulset.actRunner.tag | default .Chart.AppVersion | quote }} app.kubernetes.io/managed-by: {{ .Release.Service }} {{- end -}} @@ -82,8 +59,8 @@ app.kubernetes.io/managed-by: {{ .Release.Service }} helm.sh/chart: {{ include "gitea.actions.chart" . }} app: {{ include "gitea.actions.name" . }}-act-runner {{ include "gitea.actions.selectorLabels.actRunner" . }} -app.kubernetes.io/version: {{ .Values.image.tag | default .Chart.AppVersion | quote }} -version: {{ .Values.image.tag | default .Chart.AppVersion | quote }} +app.kubernetes.io/version: {{ .Values.statefulset.actRunner.tag | default .Chart.AppVersion | quote }} +version: {{ .Values.statefulset.actRunner.tag | default .Chart.AppVersion | quote }} app.kubernetes.io/managed-by: {{ .Release.Service }} {{- end -}} diff --git a/charts/gitea-actions/values.yaml b/charts/gitea-actions/values.yaml index 2f8a723..7d53f00 100644 --- a/charts/gitea-actions/values.yaml +++ b/charts/gitea-actions/values.yaml @@ -37,7 +37,7 @@ ## @param existingSecret Secret that contains the token ## @param existingSecretKey Secret key ## @param giteaRootURL URL the act_runner registers and connect with -enabled: false +enabled: true statefulset: replicas: 1 annotations: {} @@ -75,6 +75,7 @@ statefulset: # value: "1" persistence: + storageClass: "" size: 1Gi init: