This guide is for developers and maintainers of the Kernel Module Management Helm Charts repository.
For end users: See QUICKSTART.md for installation, or default/README.md for complete chart documentation.
.
βββ sync_script.sh # Automated sync with upstream KMM
βββ README.md # Repository landing page
βββ QUICKSTART.md # End-user quick start guide
βββ USAGE.md # This file (maintainer guide)
βββ index.yaml # Helm repository index
βββ default/ # Helm chart for KMM operator
β βββ Chart.yaml # Chart metadata
β βββ values.yaml # Default configuration values
β βββ README.md # Chart documentation
β βββ templates/ # Kubernetes templates (split by kind)
β β βββ _helpers.tpl # Helm template helpers
β β βββ clusterrole.yaml # RBAC ClusterRole
β β βββ deployment.yaml # Operator deployments
β β βββ ... # Other resource types
β βββ crds/ # CustomResourceDefinitions (5 CRDs)
βββ .github/
βββ workflows/
βββ lint-test.yml # CI/CD pipeline
The sync_script.sh automates synchronization with upstream KMM releases.
./sync_script.sh <VERSION> [CHART_DIR]
# Example
./sync_script.sh v2.6.0 default
config/default/crds/ directory (named by metadata.name)appVersion# Install kustomize
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash
sudo mv kustomize /usr/local/bin/
# Install yq v4+
sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64
sudo chmod +x /usr/local/bin/yq
git diff default/Chart.yaml version if neededvalues.yaml (check upstream Makefile for correct tags)helm lint default && helm template test default# 1. Edit files
vim default/values.yaml
vim default/templates/deployment.yaml
# 2. Validate
helm lint default
# 3. Test rendering
helm template test default --debug
# 4. Test in cluster
kind create cluster --name kmm-dev
helm install kmm default --namespace kmm-operator-system --create-namespace
kubectl get pods -n kmm-operator-system
# 5. Cleanup
helm uninstall kmm --namespace kmm-operator-system
kind delete cluster --name kmm-dev
# Test global registry override
helm template test default \
--set global.imageRegistry=my-registry.io | grep "image:"
# Verify all 5 images render correctly
helm template test default | grep -E "image: (gcr|quay)"
# Edit default/Chart.yaml
version: 2.6.0
appVersion: "2.6.0"
helm package ./default
# Creates: kernel-module-management-2.6.0.tgz
helm repo index . --url https://github.com/davtech/kernel-module-management-helm/releases/download/v2.6.0/
# Commit
git add default/Chart.yaml index.yaml
git commit -m "chore: bump chart version to v2.6.0"
git push
# Create GitHub release
gh release create v2.6.0 \
./kernel-module-management-2.6.0.tgz \
--title "v2.6.0 - KMM Helm Chart" \
--notes-file release-notes.md \
--latest
curl -s https://davtech.github.io/kernel-module-management-helm/index.yaml | grep version
# Lint chart
helm lint default
# Render all templates
helm template test default
# Render specific template
helm template test default --show-only templates/deployment.yaml
# With custom values
helm template test default -f test-values.yaml
# Create test cluster
kind create cluster --name kmm-test
# Install chart
helm install kmm default --namespace kmm-operator-system --create-namespace
# Verify
kubectl get pods -n kmm-operator-system
kubectl logs -n kmm-operator-system -l control-plane=controller --tail=100
# Test with Module CR
kubectl apply -f - <<EOF
apiVersion: kmm.sigs.x-k8s.io/v1beta1
kind: Module
metadata:
name: test-module
spec:
moduleLoader:
container:
modprobe:
moduleName: test
EOF
# Cleanup
helm uninstall kmm --namespace kmm-operator-system
kind delete cluster --name kmm-test
kustomize build fails:
# Verify config directory exists in upstream
git clone https://github.com/kubernetes-sigs/kernel-module-management.git
cd kernel-module-management && git checkout v2.6.0
ls -la config/default/
Wrong image tags after sync:
# Check upstream Makefile for correct image tags
curl -sL https://raw.githubusercontent.com/kubernetes-sigs/kernel-module-management/v2.6.0/Makefile | grep IMAGE_TAG
# Check template syntax
helm template test default --debug 2>&1 | grep -i error
# Validate YAML
yamllint default/values.yaml
main./sync_script.sh vX.Y.Z defaultChart.yaml versionhelm lint defaulthelm package defaulthelm repo index .This repository contains Helm charts for the Kernel Module Management (KMM) operator.
.
βββ sync_script.sh # Automated sync script for upstream updates
βββ README.md # Project documentation
βββ USAGE.md # This file - usage guide
βββ default/ # Default installation variant (Helm chart)
βββ default-hub/ # Hub installation variant (future Helm chart)
helm install kmm-operator ./default \
--namespace kmm-operator-system \
--create-namespace
Create a custom-values.yaml file:
# custom-values.yaml
controllerManager:
replicas: 2
resources:
limits:
cpu: 1000m
memory: 512Mi
requests:
cpu: 100m
memory: 128Mi
logLevel: 3 # Increase log verbosity
kmodManager:
resources:
limits:
cpu: 1000m
memory: 512Mi
Install with custom values:
helm install kmm-operator ./default \
--namespace kmm-operator-system \
--create-namespace \
-f custom-values.yaml
| Parameter | Description | Default |
|---|---|---|
controllerManager.replicas |
Number of operator replicas | 1 |
controllerManager.image.tag |
Operator image tag | v2.6.0 |
controllerManager.resources |
Resource limits/requests | See values.yaml |
controllerManager.logLevel |
Log verbosity (0-5) | 2 |
kmodManager.image.tag |
Kmod worker image tag | v2.6.0 |
webhook.enabled |
Enable admission webhooks | true |
global.imageRegistry |
Override image registry | "" |
For a complete list of parameters, see the chart README.
This repository supports multiple installation variants:
Standard installation with the KMM operator managing kernel modules directly.
Directory: default/
Hub-based installation for multi-cluster management scenarios.
Directory: default-hub/ (to be created)
helm upgrade kmm-operator ./default \
--namespace kmm-operator-system
Use the automated sync script to update the chart with a new upstream version:
./sync_script.sh v2.6.0 default
What the script does:
crds/ directory (named by CRD name)Chart.yaml with new appVersionAfter syncing:
git diff default/helm lint and helm templateversion in Chart.yaml if needed# Sync default variant to v2.6.0
./sync_script.sh v2.6.0 default
# Review changes
git diff default/
# Test the chart
helm lint default
helm template test default
# Update Chart.yaml version manually
# Then commit
git add default/
git commit -m "Update default chart to upstream v2.6.0"
helm uninstall kmm-operator --namespace kmm-operator-system
Note: CRDs are not automatically removed by Helm. To remove them:
kubectl delete crd modules.kmm.sigs.x-k8s.io
kubectl delete crd modulebuildsignconfigs.kmm.sigs.x-k8s.io
kubectl delete crd moduleimagesconfigs.kmm.sigs.x-k8s.io
kubectl delete crd nodemodulesconfigs.kmm.sigs.x-k8s.io
kubectl delete crd preflightvalidations.kmm.sigs.x-k8s.io
The sync_script.sh requires the following tools:
Install required tools:
# Install kustomize
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash
sudo mv kustomize /usr/local/bin/
# Install yq
sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64
sudo chmod +x /usr/local/bin/yq
Lint the chart:
helm lint default
Dry-run installation:
helm install kmm-operator ./default \
--namespace kmm-operator-system \
--dry-run --debug
Template rendering:
helm template test ./default > rendered.yaml
default/ - Default installation variant (this IS the Helm chart)
Chart.yaml - Chart metadata (name, version, appVersion)values.yaml - Default configuration valuestemplates/ - Kubernetes resource templates (split by kind)
_helpers.tpl - Helm template helper functionsnamespace.yaml - Namespace resourcesserviceaccount.yaml - ServiceAccount resourcesrole.yaml / rolebinding.yaml - RBAC Role resourcesclusterrole.yaml / clusterrolebinding.yaml - RBAC ClusterRole resourcesservice.yaml - Service resourcesdeployment.yaml - Deployment resourcescertificate.yaml / issuer.yaml - cert-manager resourcesvalidatingwebhookconfiguration.yaml - Webhook configurationcrds/ - CustomResourceDefinitions (applied first, named by CRD name)README.md - Chart-specific documentationTo add a new installation variant (e.g., default-hub):
mkdir -p default-hub/{templates,crds}
cp default/{Chart.yaml,values.yaml,.helmignore,README.md} default-hub/
cp default/templates/_helpers.tpl default-hub/templates/
Modify Chart.yaml: Update the name and description to reflect the variant.
./sync_script.sh v2.6.0 default-hub
If helm lint shows errors, check:
Problem: Script fails to clone repository
# Solution: Check tag exists
git ls-remote --tags https://github.com/kubernetes-sigs/kernel-module-management.git | grep v2.6.0
Problem: kustomize build fails
# Solution: Verify config directory exists in upstream
# Check available variants at: https://github.com/kubernetes-sigs/kernel-module-management/tree/main/config
Problem: yq not found
# Solution: Ensure yq is installed and in PATH
which yq
yq --version
kubectl logs -n kmm-operator-system -l control-plane=controller-manager --tail=100
kubectl get crds | grep kmm
Contributions are welcome! Please:
helm lint and helm templateThis repository follows the same license as the upstream KMM project (Apache 2.0).
O chart foi validado com sucesso:
# Lint passou sem erros
helm lint ./default
# β
1 chart(s) linted, 0 chart(s) failed
# Template renderiza corretamente
helm template test ./default
# β
Templates gerados com sucesso
# Criar um cluster local (kind, minikube, etc)
kind create cluster --name kmm-test
# Instalar o chart
helm install kmm-operator ./default
# Verificar os recursos
kubectl get all -n kube-system | grep kmm
kubectl get crds | grep kmm
Ajustar valores conforme necessΓ‘rio no values.yaml
Criar pipelines CI/CD para automatizar testes e deployment
Para questΓ΅es ou problemas:
kubectl logs -n kube-system deployment/kmm-operator