I used this alret

```
        - alert: my alert
          expr: status{status="ERROR"}
          for: 30m
          labels:
            severity: WARNING   
          annotations:
            myData: "{{ $labels.myData }}"
            myData2: "{{ $labels.myData2 }}"

```

I got an error
ERROR - templates/: parse error in "prometheus/templates/alertmanager-prometheusRule.yaml": template: prometheus/templates/alertmanager-prometheusRule.yaml:419: undefined variable "$labels"

I saw the same issue in

[Prometheus Docker fails to start with `Template: (dynamic): parse: template: :10: undefined variable "$labels"`](https://stackoverflow.com/questions/55066196/prometheus-docker-fails-to-start-with-template-dynamic-parse-template-10)

but I didn't understand how to solve it

in the configuration I used this data

```
text: "{{ range .Alerts -}}{{ .Annotations.myData }}{{ .Annotations.myData2}}{{ end-}}"

```

The error is from helm lint