Adding a Helm Chart to the Platform¶
This guide explains how to add a new Helm chart to the Local Developer Platform. The platform uses ArgoCD ApplicationSets to automatically discover and deploy Helm charts from the platform-apps/ directory.
How It Works¶
graph LR
A[Create Chart Directory] --> B[Add Required Files]
B --> C[Git Commit]
C --> D[ArgoCD Discovers Chart]
D --> E[Application Deployed]
E --> F[Visible in Backstage]
- You create a chart directory with the required files
- ArgoCD's ApplicationSet automatically discovers charts by scanning for
values.yamlfiles - The chart is deployed to a namespace matching its category directory
- The component appears in Backstage's service catalog
Directory Structure¶
All platform applications live under platform-apps/ organized by category:
platform-apps/
├── auth/ # Authelia, LLDAP
├── devtools/ # kagent
├── networking/ # Traefik
├── observability/ # metrics-server
├── orchestration/ # ArgoCD, Crossplane, Kargo, KEDA
├── pki/ # cert-manager, trust-manager
├── portal/ # Backstage
├── secrets/ # External Secrets, Reloader, Replicator
├── storage/ # CloudNativePG
└── vcs/ # Gitea, Gitea Actions
Namespace Mapping
The category directory name becomes the Kubernetes namespace. For example, a chart at platform-apps/storage/redis/ will be deployed to the storage namespace.
Required Files¶
Each Helm chart directory must contain these files:
platform-apps/<category>/<chart-name>/
├── Chart.yaml # Helm chart metadata and dependencies
├── values.yaml # Configuration values
├── catalog-info.yaml # Backstage component registration
└── templates/ # Optional: Custom Kubernetes manifests
Step-by-Step Guide¶
Step 1: Create the Chart Directory¶
Choose the appropriate category for your application and create the directory:
Example: Adding Redis to the storage category:
Step 2: Create Chart.yaml¶
The Chart.yaml defines your chart metadata and declares the upstream Helm chart as a dependency.
apiVersion: v2
name: redis
description: Redis in-memory data store
version: 1.0.0
type: application
dependencies:
- name: redis
version: 20.6.0
repository: https://charts.bitnami.com/bitnami
Finding Chart Information
Use Artifact Hub to find Helm charts and their repository URLs.
Key Fields:
| Field | Description |
|---|---|
name |
Your chart name (should match directory name) |
version |
Your wrapper chart version (typically 1.0.0) |
dependencies[].name |
Upstream chart name |
dependencies[].version |
Upstream chart version |
dependencies[].repository |
Helm repository URL |
Step 3: Create values.yaml¶
The values.yaml configures the upstream chart. Values must be nested under the dependency chart name.
# Values are nested under the upstream chart name
redis:
architecture: standalone
auth:
enabled: true
password: "your-password" # Use External Secrets in production
master:
persistence:
enabled: true
size: 1Gi
metrics:
enabled: true
Value Nesting
All values must be nested under the upstream chart name (e.g., redis:). This is how Helm passes values to dependency charts.
Step 4: Create catalog-info.yaml¶
Register your component in Backstage's service catalog:
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: redis
description: Redis in-memory data store for caching and message queuing
tags:
- database
- cache
spec:
type: service
lifecycle: production
owner: maintainers
system: storage
dependsOn:
- component:default/cert-manager
Component Types:
| Type | Use Case |
|---|---|
service |
Backend services and APIs |
website |
Web applications with UI |
library |
Shared libraries |
infrastructure |
Infrastructure components |
System Values:
The system field should match your category directory (auth,
networking, orchestration, portal, storage, vcs, ...).
Step 5: Add Custom Templates (Optional)¶
If you need additional Kubernetes resources beyond what the upstream chart provides, add them to a templates/ directory:
apiVersion: external-secrets.io/v1
kind: ExternalSecret
metadata:
name: redis-auth
namespace: {{ .Release.Namespace }}
spec:
refreshInterval: 1h
secretStoreRef:
name: cluster-secret-store
kind: ClusterSecretStore
target:
name: redis-auth
data:
- secretKey: redis-password
remoteRef:
key: redis
property: password
Common Template Use Cases:
- External Secrets for credential management
- Post-install Jobs with Helm hooks
- Custom RBAC (ServiceAccount, Role, RoleBinding)
- ConfigMaps for additional configuration
- Ingress routes (if not handled by upstream chart)
Step 6: Commit¶
The commit is enough: ArgoCD deploys from the committed HEAD of this
checkout (see GitOps flow) and
creates the Application within seconds. Push to share the change, not to
deploy it.
Verification¶
Check ArgoCD¶
- Open ArgoCD UI
- Look for a new Application named after your chart
- Verify the sync status is "Healthy" and "Synced"
Check Backstage¶
- Open Backstage
- Navigate to the Catalog
- Search for your component name
- Verify it appears with correct metadata
Check Kubernetes¶
# Verify the namespace exists
kubectl get namespace <category>
# Check deployed resources
kubectl get all -n <category> -l app.kubernetes.io/name=<chart-name>
# Check pod logs
kubectl logs -n <category> -l app.kubernetes.io/name=<chart-name>
Complete Example¶
Here's a complete example adding Valkey (Redis-compatible) to the platform:
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: valkey
description: Valkey high-performance key-value store
tags:
- database
- cache
- redis-compatible
links:
- url: https://valkey.io
title: Valkey Documentation
spec:
type: service
lifecycle: production
owner: maintainers
system: storage
dependsOn:
- component:default/external-secrets
apiVersion: external-secrets.io/v1
kind: ExternalSecret
metadata:
name: valkey-auth
namespace: {{ .Release.Namespace }}
spec:
refreshInterval: 24h
secretStoreRef:
name: cluster-secret-store
kind: ClusterSecretStore
target:
name: valkey-auth
dataFrom:
- sourceRef:
generatorRef:
apiVersion: generators.external-secrets.io/v1alpha1
kind: Password
name: valkey-password-generator
---
apiVersion: generators.external-secrets.io/v1alpha1
kind: Password
metadata:
name: valkey-password-generator
namespace: {{ .Release.Namespace }}
spec:
length: 32
digits: 8
symbols: 0
noUpper: false
allowRepeat: true
Best Practices¶
Security¶
- Never commit secrets to
values.yaml- use External Secrets - Follow least-privilege for RBAC (use
RolenotClusterRolewhen possible) - Enable TLS for ingress routes
Resource Management¶
- Always set resource requests and limits
- Enable persistence for stateful applications
- Configure appropriate replica counts for HA
Observability¶
- Expose metrics endpoints where the chart offers them and annotate the pods
with
prometheus.io/scrape: "true"andprometheus.io/port: "<port>"(plusprometheus.io/pathif it is not/metrics); VictoriaMetrics picks them up on its next scrape and they show in Perses and vmui - Logs need nothing: victoria-logs-collector tails every container on every node into VictoriaLogs
- Add meaningful labels and annotations
Dependencies¶
- Declare dependencies in
catalog-info.yamlfor visibility - Ensure dependent services are deployed first (ArgoCD handles this via sync waves if needed)
Databases and generated secrets¶
On a laptop a database takes minutes to initialise, and Reloader restarts a
pod whenever a secret it mounts changes. Backstage, Gitea and the 3-tier-app
template follow three rules:
- Wait for the database in an init container. A backend that crashes
until the database answers gets a longer restart backoff each time. Use a
busyboxinit container runningtimeout 600 sh -c 'until nc -z <host> <port>; do sleep 5; done'; aPostgresDatabaseclaim's primary is<name>-rw. Charts withoutinitContainersusually have a pre-script hook (Gitea'sinitPreScript). The kubelet pulls an image only when it starts that container, so a large app image is worth pulling in a first init container (command: ["node", "--version"]or similar) so the pull overlaps the database start-up. - Secrets a pod hashes or copies at start-up must exist before the pod
does. Within one chart, put the producer a sync wave ahead of the
consumer:
argocd.argoproj.io/sync-wave: "-1"onoidc.ldpClients and generator-backed ExternalSecrets. Across charts the waves do the ordering, with one exception: Authelia (wave 4) hashes every OIDC client secret in an init container, and Gitea, Backstage and Perses create theirs later. Reloader runs withreloadOnCreate, so a client secret appearing inauthrolls Authelia and the hash is redone; name the secret in Authelia'ssecret.reloader.stakater.com/reloadannotation and itshash_secretlist. - Generated secrets are generated once:
refreshPolicy: CreatedOnceon generator-backed ExternalSecrets, and pin any password a bundled subchart would randomise per render. Otherwise every resync rotates the value and restarts the consumer.
Troubleshooting¶
Chart Not Appearing in ArgoCD¶
- Verify
values.yamlexists in the chart directory - Check the ApplicationSet logs:
Sync Failures¶
- Check the ArgoCD Application events
- Look for Helm errors:
Component Not in Backstage¶
- Verify
catalog-info.yamlsyntax is valid - Check Backstage catalog refresh (may take a few minutes)
- Ensure the
spec.systemmatches a valid system
Next Steps¶
- Architecture Overview - Understand how components interact