This repository contains Helm charts for deploying applications to Kubernetes.
- cert-manager - Certificate management for Kubernetes
- ingress-nginx - NGINX Ingress Controller
- kube-prometheus-stack - Prometheus monitoring stack
- n8n - Workflow automation platform
The repository uses GitHub Actions for continuous integration with reusable workflows:
-
Setup Environment (
.github/workflows/setup-environment.yml
)- Installs Helm and chart-testing tools
- Adds required Helm repositories
- Configurable parameters for version, tools, and git fetch depth
-
Validate Chart (
.github/workflows/validate-chart.yml
)- Validates individual charts
- Performs linting and template testing
- Handles dependencies and custom values files
-
Test Charts with CT (
.github/workflows/test-charts-ct.yml
)- Advanced testing using chart-testing (ct) tool
- Supports lint, install, or both test types
- Configurable via ct.yaml
- Setup - Sets up the environment using reusable workflow
- Validate Charts - Basic chart structure validation
- Lint and Test Charts - Individual chart validation using reusable workflow
- Chart Testing - Advanced testing using reusable workflow
- ✅ Chart.yaml structure validation
- ✅ Helm chart linting
- ✅ Template rendering with default values
- ✅ Template rendering with custom values files
- ✅ Dependency management
- ✅ Chart-testing (ct) validation
The CI runs on:
- Push to
main
ormaster
branches - Pull requests to
main
ormaster
branches - Only when files in
helm/**
are modified
For detailed development setup instructions, see DEVELOPMENT.md.
- Helm 3.18.4+
- chart-testing (ct) tool
- kubectl (for testing)
- pre-commit (for code quality)
# Clone the repository
git clone <repository-url>
cd charts
# Install chart-testing
# Install Go first (see above)
go install github.com/helm/chart-testing/v3/ct@latest
# Add to PATH if not already there
if ! grep -q "$HOME/go/bin" ~/.bashrc; then
echo 'export PATH=$PATH:$HOME/go/bin' >> ~/.bashrc
source ~/.bashrc
fi
# Verify installation
ct version
# Add required Helm repositories
helm repo add jetstack https://charts.jetstack.io
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo add grafana https://grafana.github.io/helm-charts
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update
# Test a specific chart
cd charts/cert-manager
helm lint .
helm template test-release . --debug --dry-run
# Test all charts with ct
ct lint --all --config .github/ct.yaml
ct install --all --config .github/ct.yaml
Each chart follows the standard Helm chart structure:
helm/chart-name/
├── Chart.yaml # Chart metadata
├── values.yaml # Default values
├── templates/ # Kubernetes templates
├── charts/ # Dependencies (if any)
└── Chart.lock # Locked dependencies
- Always validate locally before pushing
- Update dependencies when adding new ones
- Test with multiple values files if they exist
- Follow Helm best practices for chart structure
- Reusable workflows - Common tasks are modularized
- Conditional execution - Jobs only run when needed
- Clear error messages - Easy to understand failures
- Matrix testing - Test each chart individually
- Graceful failures - Don't fail the entire pipeline for one chart
- DRY principle - No code duplication across workflows
You can call these workflows from other repositories or workflows:
jobs:
setup:
uses: ./.github/workflows/setup-environment.yml
with:
helm-version: '3.14.0'
install-ct: true
validate:
uses: ./.github/workflows/validate-chart.yml
with:
chart-name: my-chart
chart-path: helm/my-chart
test:
uses: ./.github/workflows/test-charts-ct.yml
with:
config-file: .github/ct.yaml
test-type: both
- Chart.lock missing - Run
helm dependency update
- Template validation fails - Check values files and templates
- Dependencies not found - Verify Chart.yaml dependencies
- ct command not found - Install chart-testing tool
# Check chart structure
helm lint .
# Validate templates
helm template test-release . --debug --dry-run
# Check dependencies
helm dependency list
helm dependency update
# Test with ct
ct lint --config .github/ct.yaml
ct install --config .github/ct.yaml
- Fork the repository
- Create a feature branch
- Make your changes
- Test locally with the commands above
- Push and create a pull request
The CI pipeline will automatically test your changes.
For issues and questions related to specific charts, please refer to the individual chart documentation in their respective directories.
For CI/CD issues, check the GitHub Actions logs and ensure all prerequisites are met.