Chart Structure
All Helm charts in this repository follow a standard structure:Chart.yaml Metadata
TheChart.yaml file defines the chart’s metadata:
Key Fields
- apiVersion: Always
v2for Helm 3 charts - name: Chart name (must match the directory name)
- version: Chart version following Semantic Versioning
- appVersion: Version of the packaged application
- type:
application(deployable) orlibrary(shared templates) - home: Link to the project homepage
- description: Brief description of what the chart deploys
Template Patterns
Standard Resource Naming
All resources use thefullname helper for consistent naming:
Labels
Standard labels are applied to all resources:Conditional Resource Creation
Optional resources use conditionals:Image Configuration
Images are configured with fallback toappVersion:
Resource Requests and Limits
Resources are configurable but empty by default:Helper Functions (_helpers.tpl)
The_helpers.tpl file contains reusable template functions that ensure consistency across templates.
Standard Helpers
Every chart includes these helper functions:Chart Name
nameOverride.
Full Name
Chart Label
helm.sh/chart label value.
Common Labels
Selector Labels
ServiceAccount Name
Using Helpers
Helpers are invoked with theinclude function:
nindent function indents the output by the specified number of spaces.
Best Practices
1. Make Everything Configurable
Expose configuration throughvalues.yaml:
2. Provide Sensible Defaults
Defaults should work for most use cases:3. Use Resource Limits Conservatively
Leave resources undefined by default to support resource-constrained environments:4. Support Custom Environment Variables
Allow users to inject custom environment variables:5. Support Volumes and VolumeMounts
Allow users to add custom volumes:6. Include Monitoring Resources
Support Prometheus monitoring:7. Support Multiple Ingress Controllers
Provide both traditional Ingress and Gateway API HTTPRoute:8. Follow Naming Conventions
All helper functions should be namespaced with the chart name:9. Document Everything
Add comments to values.yaml explaining each parameter:10. Truncate Resource Names
Kubernetes has a 63-character limit for many resource names:Common Deployment Pattern
Here’s a typical deployment template structure:Next Steps
- Review Common Parameters for standard configuration options
- See Chart Development for creating new charts
- Check Contributing Guidelines for submission requirements