Helm
Helm is the recommended way to run Spendemon on Kubernetes.
The chart lives in: https://github.com/FabioTavernini/spendemon/tree/main/charts/spendemon
Install
helm upgrade --install spendemon \
oci://ghcr.io/fabiotavernini/charts/spendemon \
--values ./values.yaml
Example values.yaml
image:
tag: latest
ingress:
enabled: true
className: nginx
hosts:
- host: spendemon.example.com
paths:
- path: /
pathType: Prefix
settings:
clusters:
- name: prod-eu
prometheusUrl: http://prometheus-operated.monitoring.svc:9090
- name: staging-us
prometheusUrl: http://prometheus-operated.monitoring.svc:9090
costs:
cpuCore: 12.5
memoryGb: 1.8
storageGb: 0.12
ha:
enabled: true
sharednamespaces:
- kube-system
- monitoring
oidc:
enabled: true
nextAuthUrl: https://spendemon.example.com
adminGroup: platform-admins
viewerGroup: engineering
extraScopes:
- groups
secretRef:
name: oidc-secret
What the chart configures
The chart exposes these major value groups:
image: repository, tag, pull policy, and optional image pull secretservice: service type and portingress: optional KubernetesIngressgateway: optional Gateway APIHTTPRouteresources: pod requests and limitspersistence: PVC size, storage class, and mount path forsettings.yamlsettings: the runtime config rendered intosettings.yaml
The default values file is here: https://github.com/FabioTavernini/spendemon/blob/main/charts/spendemon/values.yaml
Runtime settings vs Helm values
There are two slightly different configuration layers:
- Helm values use
settings.ha.enabled - the generated runtime file uses
HA.enabled
The same applies to OIDC helpers:
- Helm values include
settings.oidc.nextAuthUrlandsettings.oidc.secretRef - the runtime
settings.yamlonly stores the app-facing OIDC fields such asissuer,clientId,clientSecret,adminGroup,viewerGroup,debug, andextraScopes
See Settings for the runtime file format.
OIDC secret wiring
When settings.oidc.enabled is true, the chart expects a Kubernetes secret with:
- issuer
- client ID
- client secret
NEXTAUTH_SECRET
Example:
kubectl create secret generic oidc-secret \
--from-literal=issuer='https://id.example.com/realms/spendemon' \
--from-literal=clientId='spendemon' \
--from-literal=clientSecret='replace-me' \
--from-literal=nextauthSecret='replace-with-a-long-random-string'
Important persistence behavior
The chart stores settings.yaml on a PVC and seeds it from the rendered template only when the file does not already exist.
That means:
- the first install creates the initial file from chart values
- later edits through the Spendemon UI persist on the PVC
- changing Helm values does not overwrite an existing
settings.yamlautomatically
If you want the chart-rendered settings to take effect again, recreate the persisted file or the PVC for that release.