Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prometheus rules has the wrong data type #885

Closed
mgriffin13 opened this issue May 11, 2023 · 1 comment
Closed

Prometheus rules has the wrong data type #885

mgriffin13 opened this issue May 11, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@mgriffin13
Copy link

Describe the bug
When attempting to inject Prometheus rules via my overrides-values.yaml file, I get a warning.

coalesce.go:220: warning: cannot overwrite table with non table for vault.serverTelemetry.prometheusRules.rules (map[])

To Reproduce
Steps to reproduce the behavior:

  1. Create override-values.yml file
  2. Execute helm installation command with --values override-values.yml
  3. See error at command line

Expected behavior
Helm to execute without warnings or errors.

Environment

$ helm version
version.BuildInfo{Version:"v3.10.3", GitCommit:"835b7334cfe2e5e27870ab3ed4135f136eecc704", GitTreeState:"clean", GoVersion:"go1.18.9"}

override-values.yml

# Configure Prometheus
serverTelemetry:
  serviceMonitor:
    enabled: true

  prometheusRules:
    enabled: true
    rules:
      - alert: vault-HighResponseTime
        annotations:
          message: The response time of Vault is over 500ms on average over the last 5 minutes.
        expr: vault_core_handle_request{quantile="0.5", namespace="mynamespace"} > 500
        for: 5m
        labels:
          severity: warning
      - alert: vault-HighResponseTime
        annotations:
          message: The response time of Vault is over 1s on average over the last 5 minutes.
        expr: vault_core_handle_request{quantile="0.5", namespace="mynamespace"} > 1000
        for: 5m
        labels:
          severity: critical

Additional context
I believe the bug is at https://github.com/hashicorp/vault-helm/blob/main/values.yaml#L1201, where rules: {} is defined as a map, but the examples show a list data structure.

@mgriffin13 mgriffin13 added the bug Something isn't working label May 11, 2023
@tvoran
Copy link
Member

tvoran commented Jun 17, 2023

Thanks, this was fixed in #886, and will be included in the next release (hopefully soon).

@tvoran tvoran closed this as completed Jun 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants