Skip to content

Invalid AlertmanagerConfig passes validation and results in 'group_interval cannot be zero' errors #6594

@leonardo-zorzi

Description

@leonardo-zorzi

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

Description

AlertmanagerConfig CR with group_interval set to 0 passes validation and results in errors on the alertmanager instances itself.
ts=2024-05-15T12:04:48.725Z caller=coordinator.go:118 level=error component=configuration msg="Loading configuration file failed" file=/etc/alertmanager/config_out/alertmanager.env.yaml err="group_interval cannot be zero"

Steps to Reproduce

spec:
  route:
      groupBy: [ "..." ]
      groupWait: 0s
      groupInterval: 0s
      repeatInterval: 24h
      receiver: "a_receiver"
      routes:
        - matchers:
            - name: "alertname"
              value: "InfoInhibitor"
          receiver: "null"

I run the Operator on v0.67.1 (unfortunately the latest kube-prometheus) but the current master CRD seems to references still the same regex.

Expected Result

CR fails validation.

Actual Result

CR passed validation and gets added to the final config file.

Prometheus Operator Version

v0.67.1

Kubernetes Version

1.27

Kubernetes Cluster Type

GKE

How did you deploy Prometheus-Operator?

Other (please comment)

Manifests

kube-prometheus jsonnet

prometheus-operator log output

`ts=2024-05-15T12:04:48.725Z caller=coordinator.go:118 level=error component=configuration msg="Loading configuration file failed" file=/etc/alertmanager/config_out/alertmanager.env.yaml err="group_interval cannot be zero"`

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions