codecentric / helm-charts

A curated set of Helm charts brought to you by codecentric
Apache License 2.0
617 stars 607 forks source link

KeycloakX 2.4.3 - ServiceMonitor template is broken #783

Open ShaunPTK opened 2 months ago

ShaunPTK commented 2 months ago

When attempting to template the ServiceMonitor resource, Helm throws an error:

Error: YAML parse error on keycloakx/templates/servicemonitor.yaml: error converting YAML to JSON: yaml: invalid map key: map[interface {}]interface {}{".Values.http.internalPort":interface {}(nil)}
helm.go:84: [debug] error converting YAML to JSON: yaml: invalid map key: map[interface {}]interface {}{".Values.http.internalPort":interface {}(nil)}

The following is rendered in the output YAML for the ServiceMonitor, which fails validation

  endpoints:
    - port: {{ .Values.http.internalPort }}
      path: "/auth/metrics"
      interval: 10s
      scrapeTimeout: 10s

The template is incorrect at this line: https://github.com/codecentric/helm-charts/blob/5422beaff9da2828ce58680907baa419b96ac08d/charts/keycloakx/templates/servicemonitor.yaml#L35

This should read -

   - port: {{ tpl .port $ }}

Corrected output:

  endpoints:
    - port: http-internal
      path: "/auth/metrics"
      interval: 10s
      scrapeTimeout: 10s
github-actions[bot] commented 1 week ago

This issue has been marked as stale because it has been open for 30 days with no activity. It will be automatically closed in 10 days if no further activity occurs.