Helm to Operator Converter #
The helm-converter is a CLI tool designed to help with the migration process from Helm charts to their corresponding VictoriaMetrics Operator Custom Resources (CRs).
It takes your existing Helm values.yaml file and generates the equivalent Operator Custom Resource YAML manifest. This manifest is not a 1:1 replacement, but it takes care of the bulk of the conversion work.
Supported Helm Charts #
Currently, the helm-converter tool supports the following Helm charts:
victoria-metrics-singlevictoria-metrics-clustervictoria-metrics-agentvictoria-metrics-alertvictoria-metrics-anomalyvictoria-metrics-authvictoria-logs-singlevictoria-logs-clustervictoria-logs-collectorvictoria-traces-singlevictoria-traces-cluster
Infrastructure components deployed by charts like victoria-metrics-gateway or victoria-logs-multilevel are currently excluded as they rely on native Kubernetes resources rather than dedicated Operator CRDs.
Usage #
go run ./cmd/helm-converter -chart <helm-chart-name> -input <path-to-helm-values.yaml> -output <path-to-output-cr.yaml> [options]
Flags #
-input(Required): The path to your input Helmvalues.yamlfile.-output(Required): The path where the generated Operator CR manifest will be saved.-chart(Optional): The name of the Helm chart corresponding to the input values. Defaults tovictoria-metrics-single.-name(Optional): The metadata name for the generated Custom Resource. Defaults to the chart name.-namespace(Optional): The metadata namespace for the generated Custom Resource. Defaults todefault.
Example #
Assume you have a cluster-values.yaml from a victoria-metrics-cluster Helm deployment:
vmselect:
replicaCount: 2
image:
repository: victoriametrics/vmselect
tag: v1.100.0
Run the converter:
go run ./cmd/helm-converter -input cluster-values.yaml -output vmcluster-cr.yaml -chart victoria-metrics-cluster -name my-vmcluster -namespace monitoring
The resulting vmcluster-cr.yaml will contain the equivalent VMCluster Custom Resource:
apiVersion: operator.victoriametrics.com/v1beta1
kind: VMCluster
metadata:
name: my-vmcluster
namespace: monitoring
spec:
vmselect:
image:
repository: victoriametrics/vmselect
tag: v1.100.0
replicaCount: 2
Notes #
The tool maps the majority of critical parameters, including Replicas, Images, Resource Requests/Limits, Affinity, NodeSelectors, Tolerations, ExtraArgs/ExtraEnvs, PersistentVolumes, and specific behavioral flags.
Limitations #
Helm converter manifests are not 1:1
Some configurations are currently excluded from automated mapping:
- Ingress and ServiceMonitors: Secondary standalone objects sometimes managed by the Helm charts (like raw
Ingressobjects or defaultServiceMonitordefinitions) are not processed. The Operator typically assumes you manageIngressresources externally or defineVMServiceScrapelogic independently. - Autoscaling and PDBs: Fields defining
hpa(HorizontalPodAutoscaler),vpa(VerticalPodAutoscaler), andpodDisruptionBudgetare not automatically translated to their embedded Operator CR equivalents at this time. These manifests need to be created manually in case the operator’s CR doesn’t provide a way to define those. fullnameand templating: Operator doesn’t support redefining object names withfullname, so resources managed by the operator may have different names.