Simon Pasquier
dd0a792438
Add end-to-end tests for Alertmanager and ThanosRuler
...
Signed-off-by: Simon Pasquier <spasquie@redhat.com >
2026-02-04 10:18:57 +01:00
Simon Pasquier
f61936b22d
test: add test for #8312
...
Signed-off-by: Simon Pasquier <spasquie@redhat.com >
2026-02-04 10:17:05 +01:00
Simon Pasquier
4fc65465fa
chore: unify HTTP configuration for ServiceMonitor CRD ( #8139 )
...
* chore: unify HTTP configuration for ServiceMonitor CRD
Signed-off-by: Simon Pasquier <spasquie@redhat.com >
* test: fix Alertmanager unit tests
Signed-off-by: Simon Pasquier <spasquie@redhat.com >
* test: fix Prometheus unit tests
Signed-off-by: Simon Pasquier <spasquie@redhat.com >
* test: fix e2e tests
Signed-off-by: Simon Pasquier <spasquie@redhat.com >
* test: fix pkg/apis/monitoring tests
Signed-off-by: Simon Pasquier <spasquie@redhat.com >
---------
Signed-off-by: Simon Pasquier <spasquie@redhat.com >
2025-12-19 13:11:51 +01:00
Simon Pasquier
24d828c680
feat: add new NoSelectedResources reason
...
This commit introduces the `NoSelectedResources` reason for the
`Reconciled` condition when a workload object selects no resources
(valid or invalid). It should make it easier to detect when resource
selectors are null or match no resource.
The `Alertmanager` resource is the exception because the configuration
may be provided only via a reference to a Secret key.
Signed-off-by: Simon Pasquier <spasquie@redhat.com >
2025-12-01 11:44:43 +01:00
dongjiang
fcc78c7e07
change sort to slices package
...
Signed-off-by: dongjiang <dongjiang1989@126.com >
2025-11-04 16:28:38 +08:00
Y@&h
84231e573f
add finalizer syncer for Thanos Ruler ( #8060 )
2025-11-03 13:45:33 +01:00
Y@&h
0ecdf47862
Cleanup of bindings for PrometheusRules in prometheus ( #8024 )
2025-10-17 17:25:49 +02:00
Simon Pasquier
80553769d5
feat: avoid statefulset's rollout due to new rule configmaps
...
This commit avoids the situation where the operator would update the
StatefulSet because the concatenation of configured rules exceeds the
maximum ConfigMap size. To alleviate the issue, the operator now
configures the StatefulSet to always mount 3 "rule" ConfigMaps with
"optional: true". When the operator generates an additional ConfigMap,
it will get mounted automatically into the pod and the config-reloader
sidecar will detect and apply the new configuration. When the
number of "concrete" ConfigMaps decreases, the operation is also
non-disruptive.
The number has been chosen arbitrarily and it could change in the future
but 3 seems a good choice (original reports were complaining about the
number of ConfigMaps fluctuating between 1 and 2).
The change applies both to Prometheus and ThanosRuler.
Closes #5085
Signed-off-by: Simon Pasquier <spasquie@redhat.com >
2025-10-15 11:04:23 +02:00
Y@&h
4ca908cb21
PrometheusRule status update after reconcillation from prometheus ( #8005 )
2025-10-10 10:12:41 +00:00
dongjiang
1936e40708
feat: Remove binding from Probe's status when workload deletd or invalid Ref ( #7980 )
...
---------
Signed-off-by: dongjiang <dongjiang1989@126.com >
2025-10-06 12:20:26 +02:00
Y@&h
ca51ba7f8f
ScrapeConfig status update at reconcillation ( #7964 )
2025-10-02 12:06:46 +02:00
dongjiang
3ff38ebe62
chore: Update golangci-lint version to v2.5.0 ( #7949 )
...
---------
Signed-off-by: dongjiang <dongjiang1989@126.com >
2025-09-25 14:11:04 +02:00
dongjiang
4f2b3121a8
feat: update probe status subresource on Prometheus reconciliations ( #7934 )
...
---------
Signed-off-by: dongjiang <dongjiang1989@126.com >
Co-authored-by: Simon Pasquier <spasquie@redhat.com >
2025-09-24 10:41:43 +02:00
Y@&h
7a2bb75866
Remove binding from PodMonitor's status when workload deletd or invalid Ref ( #7936 )
...
* feat: PodMonitor binding removal
* feat: tests for binding removals from podMon status
2025-09-23 07:41:58 +00:00
Hélia Barroso
69076602c7
feat: add spell check workflow ( #7909 )
...
* feat: add spell check workflow
Signed-off-by: Hélia Barroso <helia_barroso@hotmail.com >
* fix: test names
Signed-off-by: Hélia Barroso <helia_barroso@hotmail.com >
---------
Signed-off-by: Hélia Barroso <helia_barroso@hotmail.com >
2025-09-22 14:29:59 +02:00
Simon Pasquier
471d4a7df7
chore: collect Kubernetes resources on failed test
...
Signed-off-by: Simon Pasquier <spasquie@redhat.com >
2025-09-18 15:03:49 +02:00
Y@&h
50a1645ea7
Update PodMonitor's status subresource on Prometheus reconciliations ( #7929 )
2025-09-17 15:52:10 +02:00
Simon Pasquier
26889776b4
test: collect all custom resources on failed test
...
Signed-off-by: Simon Pasquier <spasquie@redhat.com >
2025-09-17 14:29:41 +02:00
Simon Pasquier
8568c904a0
chore: log ServiceMonitor resources in e2e tests
...
Signed-off-by: Simon Pasquier <spasquie@redhat.com >
2025-09-08 14:59:40 +02:00
Simon Pasquier
c5c52f9617
chore: add e2e test for lazy status updates ( #7852 )
...
This commit extends the existing end-to-end test on the ServiceMonitor
status to ensure that the operator only updates the status when a change
actually happened.
Signed-off-by: Simon Pasquier <spasquie@redhat.com >
2025-09-02 09:16:18 +02:00
Simon Pasquier
13319b5587
chore: add e2e test for lazy status updates
...
This commit extends the existing end-to-end test on the ServiceMonitor
status to ensure that the operator only updates the status when a change
actually happened.
Signed-off-by: Simon Pasquier <spasquie@redhat.com >
2025-09-01 15:21:38 +02:00
Hélia Barroso
cacffa596c
feat: Apply modernize analyzer to the codebase ( #7854 )
...
Signed-off-by: Hélia Barroso <helia_barroso@hotmail.com >
2025-09-01 11:33:41 +02:00
Y@&h
3110665544
Remove invaldBindings from smon status ( #7836 )
2025-08-27 16:44:09 +02:00
Simon Pasquier
d5d98817ac
chore: refactor WaitForConfigResourceCondition()
...
Signed-off-by: Simon Pasquier <spasquie@redhat.com >
2025-08-21 10:22:10 +02:00
Y@&h
8bbbc2012e
Merge pull request #7793 from yp969803/issue7791
...
add ServiceMonitor status subresource e2e test
2025-08-21 09:41:20 +02:00
Simon Pasquier
fc4bab09f7
chore: use consts for well-know labels/annotations
...
Signed-off-by: Simon Pasquier <spasquie@redhat.com >
2025-08-07 10:33:26 +02:00
github-actions[bot]
cad3199a4d
Merge pull request #7721 from prometheus-operator/dependabot/go_modules/github.com/prometheus/prometheus-0.305.0
...
build(deps): bump github.com/prometheus/prometheus from 0.304.2 to 0.305.0
2025-08-07 12:47:21 +05:30
Simon Pasquier
4d7dde5f90
chore: simplify pvc tests
...
Signed-off-by: Simon Pasquier <spasquie@redhat.com >
2025-08-04 08:50:03 +02:00
Simon Pasquier
cc891e490d
chore: fix test framework after Prometheus update
...
Signed-off-by: Simon Pasquier <spasquie@redhat.com >
2025-07-31 17:13:28 +02:00
Hélia Barroso
8f27c97327
fix: validatingwebhook
...
Signed-off-by: Hélia Barroso <helia_barroso@hotmail.com >
2025-07-31 10:41:12 +01:00
Simon Pasquier
34b82db925
chore: update k8s dependencies to v0.33.0
...
Signed-off-by: Simon Pasquier <spasquie@redhat.com >
2025-05-14 13:42:53 +02:00
Simon Pasquier
12c0669629
fix: enable remote-write for Ruler only when set
...
Closes #7492
Signed-off-by: Simon Pasquier <spasquie@redhat.com >
2025-05-06 14:35:43 +02:00
Jayapriya Pai
1eda48dba1
fix: e2e test framework helper
...
Signed-off-by: Jayapriya Pai <slashpai9@gmail.com >
2025-04-16 10:45:42 +05:30
Simon Pasquier
865b1d4673
test: fix testThanosRulerStateless
...
Signed-off-by: Simon Pasquier <spasquie@redhat.com >
2025-04-11 17:41:16 +02:00
dongjiang
5a8daae34b
chore: Upgrade golangci-lint to v2 and golangci-lint-action to v7.0.0 ( #7430 )
...
---------
Signed-off-by: dongjiang <dongjiang1989@126.com >
Co-authored-by: Simon Pasquier <spasquie@redhat.com >
2025-03-31 09:51:44 +02:00
Simon Pasquier
036a56054c
fix: unblock feature-gates CI
...
Signed-off-by: Simon Pasquier <spasquie@redhat.com >
2025-03-14 15:02:51 +01:00
Sky Singh
8a4cadd574
test : modify the test to use an empty protocol string (which defaults to HTTP)
...
Signed-off-by: Akash Singh <akash.singh@vance.tech >
Signed-off-by: Sky Singh <akashsingh2210670@gmail.com >
2025-02-20 19:20:21 +05:30
Simon Pasquier
bae76143b2
chore: add e2e tests on operator metrics
...
Signed-off-by: Simon Pasquier <spasquie@redhat.com >
2025-02-17 20:27:59 +01:00
dongjiang
6cfb80cfbb
chore: Update golangci-lint to v1.63.4 ( #7250 )
...
* update golangci-lint to v1.63.4
Signed-off-by: dongjiang <dongjiang1989@126.com >
2025-01-09 15:51:33 +05:30
Simon Pasquier
11249283c2
chore: reduce code duplication in agent controller
...
Signed-off-by: Simon Pasquier <spasquie@redhat.com >
2024-12-24 17:10:46 +01:00
Simon Pasquier
3212ad9148
chore: improve documentation of web TLS configuration
...
Signed-off-by: Simon Pasquier <spasquie@redhat.com >
2024-12-20 14:42:44 +01:00
Jayapriya Pai
2826f866f6
chore: add test for Prometheus v2
...
Signed-off-by: Jayapriya Pai <slashpai9@gmail.com >
2024-12-04 09:55:46 +05:30
dongjiang
20cc1a0125
feat: Support portNumber in addition of port name for PodMonitor CRD ( #7150 )
...
---------
Signed-off-by: dongjiang <dongjiang1989@126.com >
2024-11-29 14:12:17 +01:00
Simon Pasquier
e8db5dd39a
chore: allow to save e2e diagnostics to disk
...
When the E2E_DIAGNOSTIC_DIRECTORY environment variable is set, the test
framework will save all collected information (logs, events, resources,
...) to this directory.
Related to #6973
Signed-off-by: Simon Pasquier <spasquie@redhat.com >
2024-10-30 15:20:13 +01:00
Simon Pasquier
7ac474a3b8
chore: refactor shared functions in pkg/prometeus
...
Signed-off-by: Simon Pasquier <spasquie@redhat.com >
2024-10-24 18:00:59 +02:00
Simon Pasquier
aa58fe3f4c
feat: add support for Remote Write v2.0
...
This change includes the following:
* New `messageVersion` field to the remote write configuration to select
between v1 and v2 message formats.
* New `remoteWriteReceiverMessageVersions` to select which message
format(s) to accept when the remote receiver is configured.
* Stricter validation for the remote write's URL (not breaking since an
empty URL value would already fail the Prometheus configuration
loading)
Signed-off-by: Simon Pasquier <spasquie@redhat.com >
2024-10-23 10:51:21 +02:00
Jayapriya Pai
f187d4211f
chore: add e2e test label for namespaces
...
Signed-off-by: Jayapriya Pai <slashpai9@gmail.com >
2024-10-01 21:28:34 +05:30
Jayapriya Pai
e05d22d0b2
Merge pull request #6959 from slashpai/prom3
...
.github/workflow: Fix prometheus 3 tests
2024-09-25 18:19:33 +05:30
Simon Pasquier
255238205b
test: improve e2e test troubleshooting
...
This change gathers and dumps useful information when an end-to-end test
fails.
Signed-off-by: Simon Pasquier <spasquie@redhat.com >
2024-09-25 11:17:45 +02:00
Jayapriya Pai
c61034952d
chore: Fix prometheus 3 tests
...
Update workflow and e2e tests for Prometheus 3
Related-to #6942
Signed-off-by: Jayapriya Pai <slashpai9@gmail.com >
2024-09-25 12:27:55 +05:30