Chart name and version
chart: victoria-metrics-alert
version: v0.48.0
Describe the bug
This is related to #2398.
I reproduced this with the latest released victoria-metrics-alert chart (v0.48.0) and the current helm-converter from the Operator master branch (4797937241b23fdc9f6e31e1ecee91f2f02c9c0a).
The Helm chart still supports the legacy VMAlert keys below, as documented in VictoriaMetrics/helm-charts#2765:
server.notifier.alertmanager -> server.notifier
server.remote.read -> server.remoteRead
server.remote.write -> server.remoteWrite
bearer.token -> bearerToken
However, the following command generates a VMAlert with spec.notifier: {}:
go run ./cmd/helm-converter \
-chart victoria-metrics-alert \
-input reproducer-values.yaml \
-output converted.yaml \
-name legacy-vmalert \
-namespace monitoring
Applying this manifest is rejected by the Operator webhook:
Error from server (Forbidden): admission webhook "vmalerts.operator.victoriametrics.com" denied the request: incorrect cr.spec.notifier syntax: notifier.url and notifier.selector cannot be empty at the same time, provide at least one setting
The source has an empty server.notifier.alertmanager.url. Helm does not configure --notifier.url for it, so the converter should omit spec.notifier instead of emitting an empty object.
The converter also silently omits these values from the same source:
- datasource bearer token
- remote.read URL and bearer token
- remote.write URL
- license.secret.name and license.secret.key
license.forceOffline is preserved under extraArgs, but the license Secret reference is missing from spec.license.
Expected behavior: the converter should translate these legacy aliases, including generated Secret references for authentication and spec.license.keyRef; or reject unsupported legacy values explicitly. It must not generate an invalid VMAlert manifest.
Attached files:
converted.yaml
reproducer-values.yaml
Chart name and version
chart: victoria-metrics-alert
version: v0.48.0
Describe the bug
This is related to #2398.
I reproduced this with the latest released
victoria-metrics-alertchart (v0.48.0) and the currenthelm-converterfrom the Operator master branch (4797937241b23fdc9f6e31e1ecee91f2f02c9c0a).The Helm chart still supports the legacy VMAlert keys below, as documented in VictoriaMetrics/helm-charts#2765:
However, the following command generates a
VMAlertwithspec.notifier: {}:Applying this manifest is rejected by the Operator webhook:
The source has an empty
server.notifier.alertmanager.url. Helm does not configure--notifier.urlfor it, so the converter should omitspec.notifierinstead of emitting an empty object.The converter also silently omits these values from the same source:
license.forceOfflineis preserved underextraArgs, but the license Secret reference is missing fromspec.license.Expected behavior: the converter should translate these legacy aliases, including generated Secret references for authentication and
spec.license.keyRef; or reject unsupported legacy values explicitly. It must not generate an invalid VMAlert manifest.Attached files:
converted.yaml
reproducer-values.yaml