Helm Charts
Helm Charts
Kubernetes package management for the Control Plane
Helm is used for packaging, versioning, and deploying the Control Plane components to Kubernetes clusters.
Kubernetes package manager
Helm provides a standardized way to package and deploy Control Plane components, handling complex dependencies and configurations through a template-based approach.
Overviewâ
Helm is the package manager for Kubernetes. The Control Plane uses Helm to:
đĻ Package Components
Bundle applications, dependencies, and configurations as reusable charts.
âī¸ Manage Configuration
Centralize and parameterize application settings through values files.
đ Simplify Deployment
Streamline the process of deploying complex applications to Kubernetes.
đ Version Control
Track application versions and changes through chart versioning.
âŠī¸ Handle Rollbacks
Quickly revert to previous versions if issues arise during updates.
đ Manage Dependencies
Handle relationships between components and third-party services.
Chart Structureâ
Standardized structure
The Control Plane follows a consistent Helm chart structure across all components, making maintenance and updates more predictable.
The Control Plane components follow a standard Helm chart structure:
common-server/helm
âââ Chart.yaml # Chart metadata
âââ values.yaml # Default values
âââ templates/ # Kubernetes manifests templates
âââ _helpers.tpl # Template helpers
âââ deployment.yaml # Deployment template
âââ service.yaml # Service template
âââ configmap.yaml # ConfigMap template
âââ ingress.yaml # Ingress template
âââ servicemonitor.yaml # Prometheus ServiceMonitor
âââ rbac/ # RBAC templates
âââ binding.yaml
âââ clusterrole.yaml
âââ serviceaccount.yaml
Directory Structure Explainedâ
Chart.yaml
Contains metadata about the chart including:
- Chart name and version
- Application version
- Description and maintainer information
- Dependencies on other charts
- Keywords for searchability
values.yaml
Default configuration values for the chart:
- Image references and versions
- Resource limits and requests
- Service and ingress configurations
- Feature flags and toggles
- Environment-specific settings
templates/
Directory containing template files:
- Kubernetes resource definitions
- Dynamic templates with Go templating
- Helper functions in _helpers.tpl
- NOTES.txt for post-install instructions
- Tests for chart validation
Additional Files
Other important files in Control Plane charts:
- README.md for documentation
- NOTES.txt for usage instructions
- LICENSE for license information
- requirements.yaml (for v2 charts)
- values.schema.json for value validation
Chart Versioning Strategyâ
Semantic versioning
The Control Plane uses semantic versioning (MAJOR.MINOR.PATCH) for all Helm charts, with careful separation of chart version and app version.
Chart Version
The version field in Chart.yaml follows these principles:
- MAJOR: Breaking changes to values schema or templates
- MINOR: New features and backwards-compatible changes
- PATCH: Bug fixes and minor template improvements
- Always incremented when chart contents change
App Version
The appVersion field in Chart.yaml follows these principles:
- Represents the version of the application being deployed
- Independent of the chart version
- May change without chart version change (for image updates)
- Used as the default tag for container images
Configuration Categoriesâ
đĻ Deployment Configuration
Settings for the Deployment resource, including replica count, update strategy, and pod specifications.
đŧī¸ Container Images
Image repository, tag, and pull policy settings for consistency across environments.
đ Networking
Service, ingress, and network policy configurations for connectivity.
âī¸ Resources
CPU, memory, and storage resource requests and limits to ensure proper scheduling.
đ§Š Dependencies
Configuration for dependent services like databases and message queues.
đ Observability
Settings for monitoring, logging, and tracing integration.
Best Practicesâ
Helm best practices
The Control Plane follows these best practices for Helm charts to ensure maintainability and reliability.
Configuration
Best practices for values and configuration:
- Parameterize all configurable values
- Provide sensible defaults for all parameters
- Document each value in values.yaml
- Group related values logically
- Use consistent naming conventions
Templates
Best practices for templates:
- Use conditionals for optional features
- Leverage helper functions for common patterns
- Maintain consistent indentation
- Validate templates with
helm lint
- Add comments for complex logic
Documentation
Best practices for chart documentation:
- Include NOTES.txt with usage instructions
- Maintain a comprehensive README.md
- Document all values with descriptions
- Provide usage examples
- Include upgrade notes for breaking changes
Versioning and Distribution
Best practices for chart release:
- Follow semantic versioning
- Include a changelog
- Sign charts for verification
- Use a chart repository for distribution
- Test charts in CI/CD pipeline
Control Plane Specific Practicesâ
Control Plane standards
Beyond general Helm best practices, the Control Plane follows specific standards for consistency across all components.
đˇī¸ Standardized Labels
All resources use consistent labeling for improved organization and filtering.
đ Security Context
Non-root users and read-only file systems are used wherever possible.
đ Monitoring Integration
ServiceMonitor resources for automatic Prometheus integration.
đ Resource Management
All containers have explicit resource requests and limits.
đŠē Health Checks
Comprehensive readiness and liveness probes for all services.
đ Secret Management
Secure handling of secrets with external references where appropriate.
Related Resourcesâ
Kustomize
Learn about Kustomize for managing Kubernetes configurations.
Infrastructure
Explore the overall infrastructure components of the Control Plane.