## Description Add complete Helm chart for deploying the CV application to Kubernetes. The chart includes all necessary resources for a production-ready deployment with persistent storage and configurable authentication modes. ## Type of Change - [x] `feat` - New feature (minor version bump) ## Breaking Changes - [ ] This is a breaking change (major version bump) **If breaking, describe the migration path:** ## Checklist - [x] Commit messages follow [Conventional Commits](CONTRIBUTING.md#commit-guidelines) - [x] Lint passes (`npm run lint`) - N/A for Helm charts - [x] Build succeeds (`npm run build`) - N/A for Helm charts - [x] Tests pass (`npm run test:run`) - N/A for Helm charts - [ ] API documentation updated (if applicable) ## Testing - `helm lint` passes on the chart - `helm template test-release helm/cv-app/` renders 214 lines of valid Kubernetes manifests - Verified all template helpers function correctly - Tested conditional rendering (persistence enabled/disabled, simple/keycloak auth modes) ## Screenshots (if applicable) N/A ## Related Issues Implements the Helm chart design from `docs/plans/2026-02-23-helm-chart-design.md` Co-authored-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev> Reviewed-on: #1
43 lines
1.3 KiB
Smarty
43 lines
1.3 KiB
Smarty
{{- define "cv-app.name" -}}
|
|
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
|
{{- end }}
|
|
|
|
{{- define "cv-app.fullname" -}}
|
|
{{- if .Values.fullnameOverride }}
|
|
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
|
{{- else }}
|
|
{{- $name := default .Chart.Name .Values.nameOverride }}
|
|
{{- if contains $name .Release.Name }}
|
|
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
|
|
{{- else }}
|
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
|
|
{{- define "cv-app.chart" -}}
|
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
|
{{- end }}
|
|
|
|
{{- define "cv-app.labels" -}}
|
|
helm.sh/chart: {{ include "cv-app.chart" . }}
|
|
{{ include "cv-app.selectorLabels" . }}
|
|
{{- if .Chart.AppVersion }}
|
|
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
|
{{- end }}
|
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
{{- end }}
|
|
|
|
{{- define "cv-app.selectorLabels" -}}
|
|
app.kubernetes.io/name: {{ include "cv-app.name" . }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
{{- end }}
|
|
|
|
{{- define "cv-app.serviceAccountName" -}}
|
|
{{- if .Values.serviceAccount.create }}
|
|
{{- default (include "cv-app.fullname" .) .Values.serviceAccount.name }}
|
|
{{- else }}
|
|
{{- default "default" .Values.serviceAccount.name }}
|
|
{{- end }}
|
|
{{- end }}
|