Nelm is a Helm 4 alternative. It is a Kubernetes deployment tool that manages Helm Charts and deploys them to Kubernetes. The Nelm goal is to provide a modern a
Nelm is a Helm 4 alternative. It is a Kubernetes deployment tool that manages Helm Charts and deploys them to Kubernetes. The Nelm goal is to provide a modern a
Nelm is a Helm 4 alternative. It is a Kubernetes deployment tool that manages Helm Charts and deploys them to Kubernetes. It is also the deployment engine of werf. Nelm does everything that Helm does, but better, and even quite some on top of it. Nelm is based on an improved and partially rewritten Helm codebase, to introduce:
terraform plan-like capabilities with two-stage deployment support;The Nelm goal is to provide a modern alternative to Helm, with long-standing issues fixed and many new major features introduced. Nelm moves fast, but our focus remains on Helm Chart and Release compatibility, to ease the migration from Helm.
Nelm is production-ready: as the werf deployment engine, it was battle-tested across thousands of projects for years.
werf.io/weight annotationwerf.io/deploy-dependency- annotationwerf.io/delete-dependency- annotation.external-dependency.werf.io/resource annotation.external-dependency.werf.io/name annotationwerf.io/ownership annotationwerf.io/deploy-on annotationwerf.io/delete-policy annotationwerf.io/resource-policy annotationwerf.io/delete-propagation annotationwerf.io/track-termination-mode annotationwerf.io/fail-mode annotationwerf.io/failures-allowed-per-replica annotationwerf.io/no-activity-timeout annotationwerf.io/sensitive annotationwerf.io/sensitive-paths annotationwerf.io/log-regex annotationwerf.io/log-regex-for- annotationwerf.io/log-regex-skip annotationwerf.io/log-regex-skip-for- annotationwerf.io/skip-logs annotationwerf.io/skip-logs-for-containers annotationwerf.io/show-logs-only-for-number-of-replicas annotationwerf.io/show-logs-only-for-containers annotationwerf.io/show-service-messages annotationwerf_secret_file functiondump_debug functionprintf_debug functioninclude_debug functiontpl_debug functionNELM_FEAT_PREVIEW_V2 environment variableNELM_FEAT_REMOTE_CHARTS environment variableNELM_FEAT_NATIVE_RELEASE_LIST environment variableNELM_FEAT_NATIVE_RELEASE_UNINSTALL environment variableNELM_FEAT_PERIODIC_STACK_TRACES environment variableNELM_FEAT_FIELD_SENSITIVE environment variableNELM_FEAT_CLEAN_NULL_FIELDS environment variableNELM_FEAT_MORE_DETAILED_EXIT_CODE_FOR_PLAN environment variableFollow instructions on GitHub Releases.
Create a directory for a new chart:
mkdir mychart
cd mychartCreate Chart.yaml with the following content:
apiVersion: v2
name: mychart
version: 1.0.0
dependencies:
- name: cert-manager
version: 1.13.3
repository: https://charts.jetstack.ioGenerate Chart.lock:
nelm chart dependency downloadCreate values.yaml with the following content:
cert-manager:
installCRDs: true
startupapicheck:
enabled: falseDeploy the first release:
nelm release install -n myproject -r myprojectPlan the second release with an increased number of replicas, where only a single field in a single Deployment will be updated:
nelm release plan install -n myproject -r myproject --set cert-manager.replicaCount=2Deploy the second release, where only the Deployment will be updated:
nelm release install -n myproject -r myproject --set cert-manager.replicaCount=2…Nelm is built upon the Helm codebase with some parts of Helm reimplemented. It is backward-compatible with Helm Charts and Helm Releases.
Helm Charts can be deployed by Nelm with no changes. All the obscure Helm Chart features, such as lookup functions, are supported.
To store release information, Nelm uses Helm Releases. You can deploy the same release with Helm and Nelm interchangeably, and it will work just fine. No migration needed from/to Helm.
Nelm has a different CLI layout, flags and environment variables, but we largely support all the same features as Helm.
Helm plugins support is not planned due to technical difficulties with the Helm plugins API. Instead, we intend to implement functionality of the most useful plugins natively, like we already did with nelm release plan install and nelm chart secret.
Generally, the migration from Helm to Nelm should be as simple as changing Helm commands to Nelm commands in your CI, for example:
| Helm command | Nelm command equivalent |
|---|---|
helm upgrade --install --atomic --wait -n myns myrls ./chart |
nelm release install --auto-rollback -n myns -r myrls ./chart |
helm uninstall -n myns myrls |
nelm release uninstall -n myns -r myrls |
helm template ./chart |
nelm chart render ./chart |
helm dependency build |
nelm chart dependency download |
The resource deployment subsystem of Helm is rewritten from scratch in Nelm. During the deployment, Nelm builds the Directed Acyclic Graph (DAG) of all operations we want to perform in the cluster to do the release, then the DAG is executed. The DAG allowed us to implement advanced resource ordering capabilities, such as:
werf.io/weight annotation: similar to helm.sh/hook-weight, but also works for non-hook resources. Resources with the same weight deployed in parallel.werf.io/deploy-dependency- annotation: do not deploy the annotated resource until the dependency is present or ready. This is the most powerful and effective way to enforce deployment order in Nelm..external-dependency.werf.io/resource annotation: do not deploy the annotated resource until the dependency is ready. The dependency can be an external, non-release resource, e.g. a resource created by a third-party operator.Helm doesn't offer any resource lifecycle capabilities, except helm.sh/resource-policy: keep and helm.sh/hook-delete-policy for Hooks. On top of these, Nelm offers the following:
werf.io/delete-policy annotation. Inspired by helm.sh/hook-delete-policy, but works for any resource. Set before-creation to always recreate the resource, before-creation-if-immutable to only recreate if the resource is immutable, succeeded or failed to delete the resource on success or failure. werf.io/ownership annotation. anyone allows to get Hook-like behavior for regular resources: don't delete the resource if it is removed from the Chart or when the whole release is removed, and never check or apply release annotations.werf.io/deploy-on annotation. Inspired by helm.sh/hook. Render and deploy the resource only on install/upgrade/rollback/uninstall in a pre/main/post stage.werf.io/resource-policy annotation. Inspired by helm.sh/resource-policy, but adds more options: set skip-create, skip-update, skip-recreate or skip-delete to skip the corresponding operation.These annotations make Helm Hooks obsolete: regular resources can do all the same things now.
Nelm has powerful resource tracking built from the ground up, much more advanced than what Helm has:
During the deployment, Nelm finds Pods of deploying resources and periodically prints their container logs. With annotation werf.io/show-service-messages: "true", resource events are also printed. Can be configured with CLI flags and annotations.
nelm release plan install shows exactly what's going to happen in the cluster on the next release. It shows diffs between the current and to-be resource versions, utilizing robust dry-run Kubernetes Server-Side Apply capabilities.
To ensure that these exact changes will be applied during the release install, you can utilize a two-stage deployment workflow:
No open issues yet, or sync has not completed.