The latest version of the chart doesn't add a targetPort for both the service and deployment resources when PrometheusMetrics is enabled because the template is looking for enabled but not Enabled (which is case sensitive). The following will trigger the port to be added but of course, will fail the config parsing:
PrometheusMetrics:
Enabled: true
enabled: true
Snippet of the helm diff output for the Service resource after setting enabled: true:
Versions
Chart: 2.1.0 Helm: 3.11.2 Kubernetes cluster: 1.23
Steps to reproduce
The latest version of the chart doesn't add a targetPort for both the service and deployment resources when PrometheusMetrics is enabled because the template is looking for enabled but not Enabled (which is case sensitive). The following will trigger the port to be added but of course, will fail the config parsing:
Snippet of the helm diff output for the Service resource after setting enabled: true:
Additional context Only workaround is to fork the Chart and fix it with on both service and deployment templates: