1
0
mirror of https://github.com/coreos/prometheus-operator.git synced 2026-02-05 06:45:27 +01:00

631 Commits

Author SHA1 Message Date
Simon Pasquier
c2dd54ae9d chore: bump Kubernetes modules to v0.29.0 (#6184)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2023-12-22 10:23:43 +00:00
Simon Pasquier
a143c8da5d feat: enable config reload via signal
This commit adds the option to reload Prometheus configuration using
signal instead of the /-/reload endpoint.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2023-11-27 11:17:10 +01:00
Arthur Silva Sens
0a2b02340a Fully enable depguard (#6103)
Signed-off-by: Arthur Silva Sens <arthur.sens@coralogix.com>
2023-11-17 13:28:48 -03:00
Simon Pasquier
89c2ce975c chore: update ServiceMonitor documentation
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2023-11-16 16:50:37 +01:00
Jayapriya Pai
399b6bdea8 feat: support remaining roles in kubernetesSD
add service, pod, endpoints, endpointslice and ingress roles
to KubernetesSDConfigs in ScrapeConfig CRD

Fixes #6086

Signed-off-by: Jayapriya Pai <slashpai9@gmail.com>
2023-11-14 19:24:13 +05:30
Simon Pasquier
fca0075e71 Merge pull request #6053 from slashpai/node-discovery
feat: support Selectors field in kubernetes SD
2023-11-03 11:12:29 +01:00
Jayapriya Pai
c2fe7a81fb feat: support Selectors field in kubernetes SD
Related-to #5711

Signed-off-by: Jayapriya Pai <slashpai9@gmail.com>
2023-11-03 07:06:11 +05:30
Arthur Silva Sens
53aa2346fe Enable depguard in more test framework files
Signed-off-by: Arthur Silva Sens <arthur.sens@coralogix.com>
2023-10-25 17:33:18 -03:00
Arthur Silva Sens
921158afe3 Enable depguard in tests/framework/framework.go
Signed-off-by: Arthur Silva Sens <arthur.sens@coralogix.com>
2023-10-25 16:52:43 -03:00
Simon Pasquier
8944ea9033 chore: add e2e test for config reloader resources
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2023-10-16 13:30:10 +02:00
Simon Pasquier
c34ffb98c8 chore: fix e2e tests compilation
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2023-10-13 16:09:26 +02:00
Simon Pasquier
cd1a6305a0 Merge pull request #5983 from Pati93/test-alertmanager-config-matcher-strategy-field
test(e2e-alertmanager): add alertmanager e2e test
2023-10-13 15:00:15 +02:00
Arthur Silva Sens
da57db9366 Enable depguard in e2e tests
Signed-off-by: Arthur Silva Sens <arthur.sens@coralogix.com>
2023-10-10 14:20:06 -03:00
Patrick Niederlöhner
7d042dfdce test(e2e-alertmanager): add alertmanager e2e test
Added a e2e test for alertmanager field "AlertmanagerConfigMatcherStrategy"

Fixes #5705
Signed-off-by: Patrick Niederlöhner <16616161+Pati93@users.noreply.github.com>
2023-10-09 15:19:10 +02:00
Simon Pasquier
29fb4ebd91 Merge pull request #5792 from infracloudio/check-storageclassname
Fixes #4108 | Add logic to check if provided storage class exist
2023-09-25 16:57:36 +02:00
Chirayu Kapoor
7f9bdca5d3 Check if operator has access to storageclass | Add logic to verify if storageclass exist | Add e2e test for invalid storageclass | RBAC to access storageclass
Signed-off-by: Chirayu Kapoor <chirayu.kapoor@suse.com>
2023-09-25 17:39:33 +05:30
Arthur Silva Sens
69aae7d7d8 Fix prometheus upgrade tests (#5926)
Signed-off-by: Arthur Silva Sens <arthur.sens@coralogix.com>
2023-09-22 14:19:11 +00:00
Simon Pasquier
7f06be09f1 fix: detect changes without list/watch perms on namespaces
This change implements a poll-based namespace lister/watcher when the
operator's service account isn't granted the list & watch permissions on
all namespaces. Instead of sending a watch request, the controller will
get every configured namespace every 15 seconds and sends the expected
watch events when a namespace is added/updated/deleted.

It still requires the service account to be granted the get permission
on the configured namespaces.

Closes #3847

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2023-09-21 11:23:17 +02:00
Simon Pasquier
e274af7fbc fix: reconcile on namespace changes
When the operator was configured to select only a limited number of
namespaces, it would not watch for namespace changes. It means that the
operator may not reconcile when a namespace label is added/removed
(affecting which objects should be selected or not).

This change enables the operator to use a privileged namespace
lister/watcher whenever the service account has the needed permissions.

**IMPORTANT:** it also requires Kubernetes >= 1.22 to be effective but
the operator will degrade to the suboptimal implementation without watch
if this condition isn't met.

Closes #3847

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2023-09-21 09:18:59 +02:00
Simon Pasquier
cd748b1483 fix: update status even without statefulset
The controllers aren't able to create the statefulsets if the input spec
contains invalid fields (like missing secret/configmap key references).

In this case, they should still update the object's status to reflect
the issue to the end-users.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2023-09-05 15:51:33 +02:00
Jayapriya Pai
4c6e75d59a feat: Add dns_sd_configs to ScrapeConfig
Fixes #5862

Signed-off-by: Jayapriya Pai <slashpai9@gmail.com>
2023-09-01 17:56:56 +05:30
Jayapriya Pai
b31117d7a8 fix: Fix KuberenetesSDConfigs in ScrapeConfig
Fixes #5870

Signed-off-by: Jayapriya Pai <slashpai9@gmail.com>
2023-08-31 13:32:34 +05:30
Arthur Silva Sens
30af207204 Run PrometheusVersionUpgrade tests separately (#5732)
As our compatibility matrix grows, the tests assuring we can upgrade one Prometheus version to the next are taking up to 1~2h to complete. We aim to accelerate our e2e tests that are required to pass on Pull Requests by moving this test to a separate CI, that runs once a day.

Signed-off-by: Arthur Silva Sens <arthur.sens@coralogix.com>
2023-08-29 10:41:51 -03:00
Simon Pasquier
436caf2ca4 Merge pull request #5834 from simonpasquier/fix-alertmananager-tests-for-0.26
Fix Alertmanager e2e tests for v0.26.0
2023-08-23 13:52:06 +02:00
Simon Pasquier
03cd78e557 chore: use ptr.To() function
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2023-08-23 10:55:49 +02:00
Simon Pasquier
bfef11585f Fix Alertmanager e2e tests for v0.26.0
The webhook URL is now a secret field and can't be used to verify that
the loaded Alertmanager configuration is up-to-date.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2023-08-22 17:05:35 +02:00
Simon Pasquier
f7edae17a9 Merge pull request #5804 from simonpasquier/fix-5421
fix: support text-only email configs
2023-08-22 14:22:04 +02:00
Arthur Silva Sens
64b621f7b9 Get status less frequently to avoid rate limits (#5823)
Signed-off-by: Arthur Silva Sens <arthur.sens@coralogix.com>
2023-08-21 10:28:06 +01:00
Hélia Barroso
cfc5b0f348 fix minor issue with endpoint bearertoken (#5752)
SecretBearenTokens are now pointers.

---------

Signed-off-by: Hélia Barroso <helia_barroso@hotmail.com>
Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com>
2023-08-20 15:02:44 -03:00
Simon Pasquier
c72c87e434 fix: support text-only email configs
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2023-08-10 17:54:45 +02:00
Frank Kloeker
bfb0d07193 Webex Feature/API (#5305)
* Add Webex configs to AlertmanagerConfig CRD

---------

Signed-off-by: Frank Kloeker <f.kloeker@telekom.de>
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
Co-authored-by: Bruno Bressi <bruno.bressi@telekom.de>
Co-authored-by: Bruno Bressi <52347078+puffitos@users.noreply.github.com>
Co-authored-by: Simon Pasquier <spasquie@redhat.com>
2023-08-02 09:34:16 -03:00
Arthur Silva Sens
5457c2546c Merge pull request #5675 from slashpai/node-discovery
feat: Add support to do kubernetes node monitoring
2023-07-07 17:16:47 -03:00
Jayapriya Pai
8bf6c9025d pkg/apis: Add kubernetes node monitoring to ScrapeConfig
Related-to #5711

Signed-off-by: Jayapriya Pai <slashpai9@gmail.com>
2023-07-07 16:11:53 +05:30
l646505418
8d169a6b12 alertmanager: add etc/alertmanager/config (#5727)
support config reload when template files are modified

fix #5708
2023-07-05 14:36:09 +00:00
Philip Gough
492190eb05 chore: update e2e tests to Kubernetes v1.27.3 (#5680)
* ci: Update to kube 1.27.3 and remove feature gate on minReadySeconds for sts

* test:e2e: Remove gate for minReadySeconds tests

* Bubble up Pod Phase in error for running and ready check

* test: Add retry to WaitForPodsReady if Phase is Completed
2023-06-20 09:31:41 +01:00
Simon Pasquier
dc36aac8d8 chore: remove RulerStatus() function (#5702)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2023-06-19 13:26:22 +00:00
Simon Pasquier
8382fa3809 chore: fix double import in Alertmanager e2e tests
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2023-06-16 08:44:08 +02:00
voidman
6d97e187c8 feat(alertmanager): support smtp config in alertmanagerConfiguration (#5649)
* feat(alertmanager): support smtp config in alertmanagerConfiguration

Co-authored-by: Simon Pasquier <spasquie@redhat.com>

* docs: generated files changes of smtp config of alertmanagerConfiguration

---------

Co-authored-by: Simon Pasquier <spasquie@redhat.com>
2023-06-15 15:05:54 +02:00
Simon Pasquier
12580d663a chore: fix imports order
The commit also enables the gci linter in the golangci-lint
configuration.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2023-06-15 10:03:42 +02:00
Jayapriya Pai
60e262595c pkg/apis/monitoring: Rename to NonEmptyDuration 2023-06-13 16:28:10 +05:30
Jayapriya Pai
efc51b678d Add e2e test for keep_firing_for
Signed-off-by: Jayapriya Pai <slashpai9@gmail.com>
2023-06-12 12:09:03 +05:30
Simon Pasquier
91bf2091c7 chore: update golangci-lint to v1.53.1 (#5633)
* chore: update golangci-lint to v1.53.1

* chore: resolve new linter errors

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2023-06-06 14:47:01 +02:00
Simon Pasquier
4c565f088d chore: fix e2e tests
The new ScrapeConfig e2e tests (#5575) deployed the operator + admission
webhook + webhook configurations without cleaning the wehhook
configurations after the tests completed. The end result was that some
of the following tests were failing because the admission service wasn't
present anymore (e.g. the creation of PrometheusRules failed).

In practice, the admission webhook is not required for the ScrapeConfig
tests, hence this change deploys only the operator.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2023-05-31 11:51:25 +02:00
Guillaume Hérail
822cf9348c test: Add ScrapeConfig end to end tests (#5575)
Co-authored-by: Joao Marcal <joao.marcal12@gmail.com>
2023-05-25 17:37:24 +02:00
Simon Pasquier
2b5d2b4e40 chore: remove obsolete code
This change addresses a few TODOs that waited on v0.65.x being
available.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2023-05-22 17:13:23 +02:00
Arthur Silva Sens
a487750b37 Test name colision between Prometheus Server and Agent (#5582)
Signed-off-by: GitHub <noreply@github.com>
2023-05-22 09:49:45 +01:00
Arthur Silva Sens
e1ed82c75b Merge pull request #5535 from xiu/5527
fix: Alertmanager and Prometheus don't pick up new certificates after renewal
2023-05-18 15:14:48 -03:00
Guillaume Hérail
bf1a52b392 fix: Alertmanager and Prometheus don't pick up new certificates after renewal
The fix is to not use `subPath` when mounting web certificates. As per
[Kubernetes' documentation][1], mounts using subPath will not get updates. This
commit changes it to full mounts. Prometheus and Alertmanager use
[exporter-toolkit][2] which reloads the certs for every query.

This commit also extends Prometheus' and Alertmanager's stateful tests to check
prometheus-config-reloader arguments.

References:
* https://github.com/prometheus-operator/prometheus-operator/issues/5527
* https://github.com/prometheus-operator/prometheus-operator/pull/5535#discussion_r1194940482

[1]: https://kubernetes.io/docs/concepts/configuration/secret/#using-secrets-as-files-from-a-pod
[2]: https://github.com/prometheus/exporter-toolkit

Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com>
Co-authored-by: JoaoBraveCoding <jmarcal@redhat.com>
Co-authored-by: Simon Pasquier <spasquie@redhat.com>
2023-05-18 19:15:36 +02:00
Arthur Silva Sens
ba8e4d6a43 (tests/fix): Available and Reconciled conditions are not overriden on every loop
Signed-off-by: GitHub <noreply@github.com>
2023-05-12 21:50:07 +00:00
Arthur Silva Sens
f6405d3bf7 Test PrometheusAgent creation and deletion
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
2023-05-07 21:00:50 +00:00