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

370 Commits

Author SHA1 Message Date
Simon Pasquier
a4cd83d34d Merge pull request #8343 from simonpasquier/fix-8312
Restore statefulset's labels if create fails with AlreadyExists
2026-02-04 11:54:47 +01:00
Simon Pasquier
5e26cd163d Add CreateStatefulSetOrPatchLabels() to k8sutil package
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2026-02-04 10:17:05 +01:00
Hélia Barroso
9572c47cc8 feat: bump am to latest
Signed-off-by: Hélia Barroso <helia_barroso@hotmail.com>
2026-02-02 14:38:16 +00:00
Simon Pasquier
e9c8048f71 chore: refactor sync() methods in controllers
This commit aligns all controllers to follow the same pattern when
dealing with non-existing and paused objects. It also ensures consistent
logging.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2026-01-27 17:22:31 +01:00
Yashika0724
ebe89b8d03 fix: add missing return after meta.Accessor errors in OnUpdate
Signed-off-by: Yashika0724 <ssyashika1311@gmail.com>
2026-01-27 10:30:29 +05:30
Sanchit2662
5ccca6a9c3 fix: use update-in-place for PrometheusRule ConfigMaps
Signed-off-by: Sanchit2662 <sanchit2662@gmail.com>
2026-01-17 21:58:10 +05:30
Arpit Srivastava
23d83751aa Merge pull request #8236 from Arpit529Srivastava/feat-issue-5681
feat: report deprecated field usage in reconciled condition
2026-01-14 16:50:57 +01:00
Hélia Barroso
f40fdd7d8b chore: bump am to 0.30.1
Signed-off-by: Hélia Barroso <helia_barroso@hotmail.com>
2026-01-13 10:28:24 +00:00
Hélia Barroso
e0d02b23ec chore: bump prometheus 3.9.1
Signed-off-by: Hélia Barroso <helia_barroso@hotmail.com>
2026-01-07 20:57:54 +00:00
Hélia Barroso
dd55c9cda6 chore: update prometheus version to 3.9.0
Signed-off-by: Hélia Barroso <helia_barroso@hotmail.com>
2026-01-07 11:12:06 +00:00
Simon Pasquier
fe13a42b2b feat: enable native histograms in operator metrics
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2026-01-05 14:10:18 +01:00
Simon Pasquier
9db1527060 feat: use minReadySeconds as default first delay
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>
2026-01-05 12:05:37 +01:00
Simon Pasquier
19febac62b feat: expose update strategy for workloads
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>
2025-12-23 14:31:34 +01:00
dongjiang1989
8b72a7125d update prometheus version
Signed-off-by: dongjiang1989 <dongjiang1989@126.com>
2025-12-17 17:42:36 +08:00
Hélia Barroso
1068825df5 chore: update alertmanager version to 0.30
Signed-off-by: Hélia Barroso <helia_barroso@hotmail.com>
2025-12-15 23:52:50 +00:00
Hélia Barroso
37fc762264 chore: update prometheus version
Signed-off-by: Hélia Barroso <helia_barroso@hotmail.com>
2025-12-03 10:50:45 +00:00
Simon Pasquier
907a64b812 Merge pull request #8137 from Jakob3xD/jh/thanos-ruler-group-labels
pkg/operator/rules: enable support for groupLabels and query offset for Thanos
2025-12-03 10:40:54 +01:00
Jakob Hahn
debce711ef pkg/operator/rules: add test for Thanos offset and groupLabels
Signed-off-by: Jakob Hahn <jakob.hahn@hetzner.com>
2025-12-02 16:44:03 +01:00
Jakob Hahn
d28cabaec2 pkg/operator/rules: enable support for groupLabels and query offset for thanos
Signed-off-by: Jakob Hahn <jakob.hahn@hetzner.com>
2025-12-02 11:21:48 +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
83ed01170f Merge pull request #8062 from kubeservice-stack/update-thanos-v0.40.1
chore: Update thanos version to v0.40.1 and golang version to 1.25
2025-11-24 21:35:15 +01:00
dongjiang
9ab0ffd0d7 chore: add modernize lint (#8094)
* add modernize lint
* fix github action
Signed-off-by: dongjiang1989 <dongjiang1989@126.com>
2025-11-13 12:02:09 +05:30
Jayapriya Pai
38601823f1 Merge pull request #8073 from heliapb/feat/bump_am 2025-11-05 18:12:26 +05:30
Hélia Barroso
f9af87d313 chore: update alertmanager version
Signed-off-by: Hélia Barroso <helia_barroso@hotmail.com>
2025-11-05 09:47:11 +00:00
dongjiang
1ee0d60a69 update promtheus version
Signed-off-by: dongjiang <dongjiang1989@126.com>
2025-11-03 09:41:10 +08:00
Y@&h
760c83bdeb Merge pull request #8045 from yp969803/issue8044
Return correct values of keys, for selected prometheusRule map
2025-10-29 11:24:26 +01:00
dongjiang
056374cd88 update prometheus version
Signed-off-by: dongjiang <dongjiang1989@126.com>
2025-10-21 13:17:52 +08:00
Y@&h
2de92eb6b5 Merge pull request #8038 from yp969803/issue8037
Change promethsuRule selection map key to namespace/name
2025-10-16 17:12:33 +02:00
Simon Pasquier
79fb2e3486 Merge pull request #8010 from simonpasquier/fix-5085-2
feat: avoid statefulset's rollout due to new rule configmaps
2025-10-16 13:05:43 +02:00
Jayapriya Pai
1ad5aed0f2 Merge pull request #8033 from heliapb/feat/promversion 2025-10-15 21:13:32 +05:30
Hélia Barroso
6821e52e7f chore: update prometheus to 3.7.0
Signed-off-by: Hélia Barroso <helia_barroso@hotmail.com>
2025-10-15 13:00:12 +01: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
Simon Pasquier
2c160ddd69 chore: check operator's permissions on status
This commit ensures that the operator's Service Account has the expected
permissions to manage status subresources when the
`StatusForConfigurationResources` feature gate is enabled.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2025-10-15 11:04:12 +02:00
Simon Pasquier
abc8f760e3 fix: use update instead of patch
On first reconciliation of the status subresource, the patch semantics
don't allow to ensure that a second concurrent patch operation doesn't
overwrite the first change. Using Update with ResourceVersion (aka
optimistic locking), we make sure that the second operation would fail
(and be retried).

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2025-10-14 14:01:59 +02:00
Simon Pasquier
772eefb11f Merge pull request #8027 from prometheus-operator/release-0.86
Merge release 0.86 back into main
2025-10-13 17:15:20 +02:00
Simon Pasquier
36d8f244c9 fix: format Kubernetes events properly
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2025-10-10 13:59:29 +02:00
Y@&h
4ca908cb21 PrometheusRule status update after reconcillation from prometheus (#8005) 2025-10-10 10:12:41 +00:00
Y@&h
e8d1c3c4ca Merge pull request #8004 from yp969803/issue8003
Move config-res status subresource utils to a more higher level pkg from prometheus
2025-10-08 17:55:03 +02:00
Simon Pasquier
3d47e0e778 chore: remove code duplication in rule management
This commit moves the rule management functionality which is shared
between Prometheus and ThanosRuler controllers to a shared package.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2025-10-08 12:35:43 +02:00
Simon Pasquier
d2d70585ab chore: code clean-up
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2025-10-07 17:07:15 +02:00
Jayapriya Pai
cc19d0e3fc feat: add support for UTF8 labels and rules (#7637)
for admission webhook default is legacy validation

Assissted-By: Cursor
Signed-off-by: Jayapriya Pai <slashpai9@gmail.com>
Co-authored-by: Simon Pasquier <spasquie@redhat.com>
2025-10-06 15:03:21 +05:30
Y@&h
e289f399a9 refactor: clarify finalizer sync return values in finalizer and operator (#7942) 2025-10-02 12:08:04 +02:00
Simon Pasquier
a357fbb1ad chore: inject related object into all events
This is a follow-up of #7867 which refactors the event handling to
always inject the related object.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2025-09-26 15:51:43 +02:00
dongjiang
e51ae42888 chore: change the record api to the new events api (#7867)
---------

Signed-off-by: dongjiang <dongjiang1989@126.com>
2025-09-26 10:27:04 +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
Simon Pasquier
10038f81e2 feat: update prometheus to latest (#7940)
Signed-off-by: Hélia Barroso <helia_barroso@hotmail.com>
2025-09-22 11:23:22 +02:00
Hélia Barroso
f3044e56ed feat: update prometheus to latest
Signed-off-by: Hélia Barroso <helia_barroso@hotmail.com>
2025-09-22 09:42:27 +01:00
Simon Pasquier
b13fafecdd Merge pull request #7939 from simonpasquier/consistent-app-labels-2
feat: add "managed by" label to all managed resources
2025-09-19 09:47:48 +02:00
Suresh Krishnan V
d4e452964a Merge pull request #7904 from sureshkrishnan-v/fix/init-reloader-portname
fix(config-reloader): use distinct port name for init container to av…
2025-09-19 09:35:35 +02:00
Simon Pasquier
293c29574e feat: add "managed by" label to all managed resources
This is a follow-up of #7786 which was only targeting workload resources
such as statefulsets, daemonsets and pods. With this commit, all
resources managed by the operator will be labelled with the
`app.kubernetes.io/managed-by: prometheus-operator` label.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2025-09-18 17:34:54 +02:00