- _helpers.tpl: required guard on image.tag — silent empty deploys can no longer happen; helm fails fast with a clear message. - configmap-nginx: HTTPS fastcgi param uses if_not_empty, so PHP only sees HTTPS when X-Forwarded-Proto is actually present. - deployment-app: add startupProbe with 100s budget so first-boot cache warmup doesn't trip liveness. - deployment-horizon: failureThreshold=5 on the horizon:status probe; transient Valkey blips no longer cause restart loops. - job-migrate: mount oauth-keys so seeders that touch Passport clients don't silently fail. - statefulset-valkey: replace separate password Secret with a requirePassword toggle that reads REDIS_PASSWORD from the main chart Secret (same Secret app/horizon/scheduler already mount). Liveness probe authenticates with the password when set. - values-us-prod: enable valkey.requirePassword. - README: add REDIS_PASSWORD to bootstrap procedure. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
65 lines
2.2 KiB
Smarty
65 lines
2.2 KiB
Smarty
{{/* Common name helpers */}}
|
|
{{- define "ezscale-website.name" -}}
|
|
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
|
{{- end -}}
|
|
|
|
{{- define "ezscale-website.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 "ezscale-website.labels" -}}
|
|
app.kubernetes.io/name: {{ include "ezscale-website.name" . }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
helm.sh/chart: {{ printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" }}
|
|
{{- end -}}
|
|
|
|
{{- define "ezscale-website.selectorLabels" -}}
|
|
app.kubernetes.io/name: {{ include "ezscale-website.name" . }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
{{- end -}}
|
|
|
|
{{/*
|
|
Image reference for a given role (app/horizon/scheduler).
|
|
Usage: {{ include "ezscale-website.image" (dict "ctx" . "role" "app") }}
|
|
*/}}
|
|
{{- define "ezscale-website.image" -}}
|
|
{{- $ctx := .ctx -}}
|
|
{{- $tag := required "image.tag is required (set via --set image.tag=vX.Y.Z)" $ctx.Values.image.tag -}}
|
|
{{- printf "%s/%s:%s-%s" $ctx.Values.image.registry $ctx.Values.image.repository .role $tag -}}
|
|
{{- end -}}
|
|
|
|
{{/* Secret name (existing or generated) */}}
|
|
{{- define "ezscale-website.secretName" -}}
|
|
{{- if .Values.secret.create -}}
|
|
{{- include "ezscale-website.fullname" . -}}-secrets
|
|
{{- else -}}
|
|
{{- .Values.secret.existingSecretName -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
{{/* DB host — points at in-cluster MariaDB or external one */}}
|
|
{{- define "ezscale-website.dbHost" -}}
|
|
{{- if .Values.mariadb.enabled -}}
|
|
{{ include "ezscale-website.fullname" . }}-mariadb
|
|
{{- else -}}
|
|
{{- $ref := .Values.mariadb.externalRef -}}
|
|
{{- printf "%s.%s.svc.cluster.local" $ref.name $ref.namespace -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
{{/* Redis host */}}
|
|
{{- define "ezscale-website.redisHost" -}}
|
|
{{ include "ezscale-website.fullname" . }}-valkey
|
|
{{- end -}}
|