Hide Forgot
Description of problem: Tested with PR https://github.com/openshift/cluster-monitoring-operator/pull/1567 lauched cluster-bot cluster: launch 4.11-ci,openshift/cluster-monitoring-operator#1567 set "repeatInterval: 12hours" in AlertmanagerConfig which value is wrong, it reported error "repeatInterval 5m does not match required regex: ^(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?$", but it is actually "repeatInterval: 12hours" steps: # oc new-project test; # oc -n test create -f - << EOF apiVersion: monitoring.coreos.com/v1alpha1 kind: AlertmanagerConfig metadata: name: invalid-test-config labels: alertmanagerConfig: example spec: route: groupBy: ['job'] groupWait: 30s groupInterval: 5m repeatInterval: 12hours receiver: webhook receivers: - name: webhook webhookConfigs: - url: 'https://example.com' sendResolved: true httpConfig: followRedirects: true - name: wechat-example wechatConfigs: - apiURL: https://wechatserver:8080/ corpID: wechat-corpid apiSecret: name: wechat-config key: apiSecret EOF The "alertmanagerconfigs" is invalid: : repeatInterval 5m does not match required regex: ^(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?$ # oc explain AlertmanagerConfig.spec.route.repeatInterval KIND: AlertmanagerConfig VERSION: monitoring.coreos.com/v1alpha1 FIELD: repeatInterval <string> DESCRIPTION: How long to wait before repeating the last notification. Must match the regular expression`^(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?$` Example: "4h" Version-Release number of selected component (if applicable): tested with PR How reproducible: always Steps to Reproduce: 1. see the description 2. 3. Actual results: Expected results: Additional info:
It will be fixed when upstream releases v0.56.0 (planned for 2022/4/20) and we bring it downstream.
tested with 4.11.0-0.nightly-2022-04-27-234931, followed the steps in Comment 0, error now is expected: The "alertmanagerconfigs" is invalid: : repeatInterval 12hours does not match required regex: ^(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?$
Downstream Prometheus operator is based on v0.57.0 which includes the fix.
tested with 4.11.0-0.nightly-2022-06-11-054027, followed the steps in Comment 0, it throws out error for the correct invalid filed value: The "alertmanagerconfigs" is invalid: : repeatInterval 12hours does not match required regex: ^(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?$ # oc -n openshift-monitoring logs -c prometheus-operator prometheus-operator-7bb758d69f-m2pxm level=info ts=2022-06-14T03:27:18.303314722Z caller=main.go:220 msg="Starting Prometheus Operator" version="(version=0.57.0, branch=rhaos-4.11-rhel-8, revision=d7887f2)"
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Important: OpenShift Container Platform 4.11.0 bug fix and security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:5069