* add valid alertmanagerconfig
* update validation check for global alertmanagerconfig object
* add validation marker
* add e2e test for amcfg
* fix depedency issues
* add sanitization logic & monitorv1duration field
* update tests with monitorv1duration field logic
* validate and update fields
* update import dependencies
* update unnecessary groupwait conversion
* update generated files and formatting
* update error handling && refine methods
* nonemptyduration validation for groupwait
* retrigger CI
* update validation for groupwait
* remove toplevel route validation for intervals
* simplify handling of zero durations
Zero durations are converted to empty strings which makes use of the
default value defined at a higher level in the routing tree.
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* Fix generated file
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* Fix test compilation
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
---------
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
Co-authored-by: Simon Pasquier <spasquie@redhat.com>
Change ClientURL and Href fields in PagerDutyConfig, PagerDutyImageConfig,
and PagerDutyLinkConfig from *URL to *string to support Go templates.
Related-to #8315
Signed-off-by: Jayapriya Pai <slashpai9@gmail.com>
* api: update variable type
to match the type of optional and add more validation
* am-validation: add url validation and test case
to semantically verify URL
* alertmanager: move test case to operator
to validate at the correct part
* validation: update validation method and error message
for a clear validation and clean code
* validation: update validationSnsConfig method
to let the compiler guess variable type
* validation: update import order
to fix golang lint check
* trigger ci
* alertmanager: update pushover variables, add validations and update conversion method
to have more strict validations
* validation: add url validation for pushover config
to cover more use case of validation
* amcfg: update test case
to fix var error
* change type to url, remove operator check and add semantic validation
* update conversion config
* trigger ci
* change url to pointer and regenerate files
* add empty string test case
* update test case
* update url
* update back url validation in operator
* trigger ci
* remove url validation from operator
* trigger ci
* add exclusion of empty string
* fix typo
* add e2e test case for url
* alertmanager: update optional var type to *string and add minlength validation
to have stricter validation
* validation: update url validation
to use the new method validatURLPtr
* alertmanager: change href to URL and add validation
to cover more cases
* alertmanager: update type
to add more validation
* validation: fix issue
wrong type
* Change to deref for shorter implementation
* alertmanager: fix typo
to address the variable type issue
* validation: update url validation
to use the new method
This commit removes the `dispatchStartDelay` field from the Alertmanager
CRD and uses instead the `minReadySeconds` value as the default
duration to delay the first flush of aggregation groups.
When Kubernetes performs pod updates (due to spec updates or pod
eviction),`minReadySeconds` defines how long a statefulset's pod should
be ready before kube-controller-manager can proceed with the next pod
update. The main use case of `minReadySeconds` is to ensure that
Prometheus has resent all alerts before updating the next pod hence it
makes sense for Alertmanager to wait the same amount of time before
sending alert notifications. Users who want to use another value for
`--dispatch.start-delay` can customize it using the
`.spec.additionalArgs` field.
The removal of `dispatchStartDelay` is possible because the field hasn't
been made available in any public release.
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* update to url type
* update generated files
* update e2e test cases
* trigger ci
* update url validation method
* trigger ci
* validation: update validation method
make the url validation shorter
This commit introduces a new `updateStrategy` field for
statefulset-based workloads (Prometheus, PrometheusAgent, Alertmanager
and ThanosRuler). While for now, there's a 1:1 mapping with StatefulSet
strategies, it paves the way to the introduction of custom strategies
which may be required to streamline operations in case of broken updates
(similar to the scenario explained in
https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#forced-rollback).
Closes #5435
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
This commit introduces a new `podManagementPolicy` field for
statefulset-based workloads (Prometheus, PrometheusAgent, Alertmanager
and ThanosRuler). While the default will still be `Parallel`, users have
expressed the need to use `OrderedReady` in specific situations.
Closes #2753
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
This commit also clarifies the meaning of the 'url' field in the Prober
spec which isn't a "true" URL.
Signed-off-by: Simon Pasquier <spasquie@redhat.com>