refactor(helm): improve chart consistency (#1401)

This commit is contained in:
Thibault Martin
2026-05-20 10:14:07 -07:00
committed by GitHub
parent 398b1fa590
commit e46305e082
3 changed files with 10 additions and 30 deletions
+4 -16
View File
@@ -1,24 +1,12 @@
apiVersion: v2
name: grimmory
description: A Helm chart for [Grimmory](https://github.com/grimmory-tools/grimmory)
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "v0.38.2"
# The app version is set to v0.0.0 in the Github repository and is bumped
# dynamically by the CI on release
appVersion: "v0.0.0"
dependencies:
- name: mariadb
version: 0.16.0
+2 -11
View File
@@ -79,7 +79,6 @@ spec:
ports:
- name: http
containerPort: {{ .Values.service.port }}
#protocol: TCP
env:
- name: DATABASE_HOST
{{- if and .Values.externalDatabase.enabled .Values.externalDatabase.existingSecret.enabled .Values.externalDatabase.existingSecret.hostnameKey }}
@@ -165,20 +164,12 @@ spec:
{{- if .Values.persistence.dataVolume.enabled }}
- name: data
persistentVolumeClaim:
claimName: {{ if .Values.persistence.dataVolume.existingClaim }}
{{- .Values.persistence.dataVolume.existingClaim }}
{{ else }}
{{- include "grimmory.fullname" . }}-data
{{- end }}
claimName: {{ .Values.persistence.dataVolume.existingClaim | default (printf "%s-data" (include "grimmory.fullname" .)) }}
{{- end }}
{{- if .Values.persistence.booksVolume.enabled }}
- name: books
persistentVolumeClaim:
claimName: {{ if .Values.persistence.booksVolume.existingClaim }}
{{- .Values.persistence.booksVolume.existingClaim }}
{{ else }}
{{- include "grimmory.fullname" . }}-books
{{- end }}
claimName: {{ .Values.persistence.booksVolume.existingClaim | default (printf "%s-books" (include "grimmory.fullname" .)) }}
{{- end }}
{{- with .Values.extraVolumes }}
{{- toYaml . | nindent 8 }}
+4 -3
View File
@@ -1,11 +1,12 @@
{{- if (and .Values.persistence.dataVolume.enabled (not .Values.persistence.dataVolume.existingClaim)) }}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
annotations:
helm.sh/resource-policy: keep
labels:
app.kubernetes.io/name: {{ include "grimmory.fullname" . }}
{{- include "grimmory.labels" . | nindent 4 }}
name: {{ include "grimmory.fullname" . }}-data
spec:
accessModes:
@@ -14,15 +15,15 @@ spec:
requests:
storage: {{ .Values.persistence.dataVolume.size }}
{{- end }}
---
{{- if (and .Values.persistence.booksVolume.enabled (not .Values.persistence.booksVolume.existingClaim)) }}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
annotations:
helm.sh/resource-policy: keep
labels:
app.kubernetes.io/name: {{ include "grimmory.fullname" . }}
{{- include "grimmory.labels" . | nindent 4 }}
name: {{ include "grimmory.fullname" . }}-books
spec:
accessModes: