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

326 Commits

Author SHA1 Message Date
Arpit Srivastava
a57c10d6b7 Merge pull request #8350 from Arpit529Srivastava/kubelet-cmd-flag
feat: add flag to disable insecure kubelet metrics port
2026-02-04 11:16:48 +01:00
Arpit Srivastava
b877445c6d Add crd print subcommand to output embedded CRDs (#8251)
* feat: embed CRD manifests in operator

Signed-off-by: arpit529srivastava <arpitsrivastava529@gmail.com>

* replace sort with slices package

Signed-off-by: arpit529srivastava <arpitsrivastava529@gmail.com>

* refactor: use flag.NArg() for crds and start commands

Signed-off-by: arpit529srivastava <arpitsrivastava529@gmail.com>

* refactor: move crds to cmd/crds and add --help info

Signed-off-by: arpit529srivastava <arpitsrivastava529@gmail.com>

* feat: add full-crds command

Signed-off-by: arpit529srivastava <arpitsrivastava529@gmail.com>

---------

Signed-off-by: arpit529srivastava <arpitsrivastava529@gmail.com>
2026-01-13 20:49:03 +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
Simon Pasquier
c96c4978b5 Merge remote-tracking branch 'origin/release-0.86' into merge-release-0.86
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2025-11-07 14:56:04 +01:00
Simon Pasquier
ce2b016682 Fix operator's permissions on events
Pull requests #7867 and #7953 switched from the core Events API to the
new `events.k8s.io` API group but we forgot to update the RBAC
permissions of the prometheus-operator Service Account and the
verification which happens during the startup.

Closes #8076

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2025-11-06 15:47:55 +01: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
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
dongheeJeong
40f4ebf50f feat: add configurable sync period for kubelet endpoints controller (#7762)
* feat: add configurable sync period for kubelet endpoints controller

Add --kubelet-sync-period flag to allow customization of how often
the kubelet endpoints controller syncs with the Kubernetes API.
Default remains 3 minutes to maintain backward compatibility.

---------

Co-authored-by: Donghee Jeong <danny253@naver.com>
Co-authored-by: 정동희 <danny253@neowiz.com>
2025-08-04 09:49:06 +02:00
Simon Pasquier
5fb77b48b2 Add --watch-referenced-objects-in-all-namespaces CLI argument
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2025-08-01 10:26:44 +02:00
Marek Slabicki
adf64aaa6e feat: add startupProbe to config-reloader
This is for GitHub issue #7494.

Adds startup probe to the config-reloader sidecar for Prometheus containers.

Only takes affect if the --enable-config-reloader-probes flag is set on the
prometheus-operator pod for the config-reloader container.
2025-06-04 03:10:34 -07:00
dongjiang
0e44c2cd20 chore: Upgrade Go version to v1.24 (#7338)
Signed-off-by: dongjiang <dongjiang1989@126.com>
2025-04-01 10:01:34 +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
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
408e8ebd6e chore: Optimize go runtime metrics (#7081)
* optimize go runtime metrics


---------

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>
2024-11-08 10:53:37 +01:00
Pranshu Srivastava
f5218e1620 enhancement: allow toggling custom config deprecation behaviour (#6955)
* enhancement: allow toggling custom config deprecation behaviour

---------

Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
2024-11-07 16:26:31 +00:00
Simon Pasquier
5cdab7933f chore: optimize build layers
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2024-11-06 10:26:28 +01:00
Simon Pasquier
c7e2bd7ff3 fix: pass GOARCH variable to the build stage
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2024-11-04 17:18:45 +01:00
Simon Pasquier
e27dc7b52c fix: pass the GOARCH variable to the build command
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2024-11-04 15:34:25 +01:00
Simon Pasquier
fcf21f1d78 fix: fix image builds for non-amd64 architectures
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2024-11-04 14:06:19 +01:00
Simon Pasquier
6c4545572a chore: refactor pkg/prometheus/promcfg.go
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2024-10-30 09:00:48 +01:00
Jan Fajerski
79d4b56eb4 Dockerfile: drop double quotes around ARG default values
Afaiu the spec is unclear whether to quote this or not. In this case
here is certainly not requires and works fine without. Additionally,
there is some tooling which does not treat quotes values correctly and
generates image links like
`quay.io/prometheus/golang-builder:\"1.23\"-base`.

Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
2024-10-17 13:24:31 +02:00
Jan Fajerski
46a4ea0b76 build: move build step to Dockerfiles
Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
2024-09-27 09:24:23 +02:00
Jayapriya Pai
c846674a17 feat: add experimental Prometheus 3 support (#6940)
* feat: add experimental Prometheus 3 support

Fixes #6939

Signed-off-by: Jayapriya Pai <slashpai9@gmail.com>
2024-09-18 18:33:32 +05:30
Simon Pasquier
8518981b50 feat: support EndpointSlice for the kubelet controller (#6882)
* feat: support EndpointSlice for the kubelet controller

This change adds support for managing `EndpointSlice` objects for the
kubelet service. The controller can manage either one of `Endpoints` and
`EndpointSlice` or both.

The migration path can be:
1. Configure the operator to manage both objects in the kubelet
   controller.
2. Verify that the generated `EndpointSlice` objects are correct.
3. Configure the Prometheus object to use the `EndpointSlice` role
   instead of `Endpoints`.
1. Configure the operator to manage only `Endpoints` objects in the
   kubelet controller.

The removal of the legacy `Endpoints` object is left to the user.

---------

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2024-09-17 08:53:31 +02:00
perebaj
1eb9fd96ce Update exporter toolkit to v0.13.0 2024-09-10 10:35:36 -03:00
Simon Pasquier
5ce21508d6 chore: redirect klog to slog
PR #6890 removed the final bits from go-kit/log in the operator code
base but forgot to redirect the klog logs to the new slog logger.
`ResourceReconciler` has a dependency on klog because it uses
`utilruntime.HandleError()` when it fails to sync a resource. As a
consequence, the operator didn't log reconciliation failures anymore.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2024-09-03 14:46:31 +02:00
perebaj
a40ef97244 replace goKitLogger in controller and namespace denylist 2024-08-29 17:33:39 -03:00
perebaj
47ae005e7e replace goKitLogger in rules and server 2024-08-29 12:17:31 -03:00
Jonathan
0cf01e5485 replace goKitLogger in operators (#6881)
* replace goKitLogger in operators

* remove goKitLogger from alertmanager operator

* remove goKitLogger from main
2024-08-28 09:49:42 +02:00
Simon Pasquier
4140711e72 chore: simplify kubelet controller constructor
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2024-08-26 10:37:35 +02:00
Jonathan
aa74b0d377 chore: replace gokitlog in the resource reconciler (#6819) 2024-08-08 09:43:11 -03:00
Jonathan
e84c86213c chore: replace go kit log in prometheus package (#6807) 2024-08-07 11:32:21 -03:00
perebaj
e1e9b6fddc replacing gokit-log prometheusagent package 2024-07-30 09:59:12 -03:00
Simon Pasquier
365809896c chore: simplify controller constructors
This change introduces functional options for all 4 controllers
(previously only Prometheus used them).

It also reduces code duplication regarding API version checks.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2024-07-25 09:33:42 +02:00
Qian_Xiao
9cdd5aec94 cmd: Add secret label selector to filter secrets to watch (#6731)
* cmd: Add secret label selector to filter secrets to watch

This commit adds a flag for secret label selector so user can use label to filter secrets that prometheus-operator watches. This reduces calls to kube-apiserver.

Fixes Exclude irrelevant certs/tls secrets watch in monitoring namespace #6610
2024-07-24 11:09:53 +02:00
Jonathan
b63f72b47b replace go kit log admission pkg (#6768) 2024-07-23 14:50:51 -03:00
perebaj
7b7b3a6476 replace go kit log 2024-07-17 16:54:03 -03:00
Ha Anh Vu
fd70f5c0c8 Check DaemonSet RBAC permissions for Prometheus Agent's DaemonSet mode (#6720)
* Check DaemonSet RBAC permissions for Prometheus Agent's DaemonSet mode
2024-07-03 12:14:23 +00:00
Pranshu Srivastava
0002aace2d reloader: don't fail on envvar expansion errors
Refer: https://github.com/thanos-io/thanos/pull/7429
Fixes: https://github.com/prometheus-operator/prometheus-operator/issues/6136
Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
2024-07-02 20:33:43 +05:30
Simon Pasquier
704206b716 feat: add prometheus_operator_feature_gate_info metric
This change also moves the feature gates to the operator config struct.
It means that after a feature gate is enabled/disabled, the operator
will reconcile the managed Prometheus resources which should be the
right thing to do.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2024-06-07 08:39:23 +02:00
dongjiang
d5d08c58df feat(env): Add automatic memory limit handling (#6591)
* add auto GOMEMLIMIT

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>


---------

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>
Co-authored-by: Simon Pasquier <spasquie@redhat.com>
2024-05-30 09:13:48 +02:00
Ha Anh Vu
d67afdd68b Add feature gate for Prometheus Agent's DaemonSet deployment (#6626)
* Add feature gate for Prometheus Agent's DaemonSet deployment
2024-05-29 16:07:45 +02:00
Nicolas Takashi
2f6f31063e [CHORE] allowing kubeconfig as parameter (#6623)
Signed-off-by: Nicolas Takashi <nicolas.tcs@hotmail.com>
2024-05-29 13:24:48 +00:00
Arthur Silva Sens
5488b9f494 Use functional options pattern for Prometheus Controller
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
2024-05-28 17:16:10 -03:00
Simon Pasquier
98c18408cb feat: add automatic GOMAXPROCS to admission webhook
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2024-05-21 12:16:06 +02:00
Arthur Silva Sens
6b1caac3f1 Add structure for feature flags
Signed-off-by: Arthur Silva Sens <arthur.sens@coralogix.com>
2024-05-16 17:27:26 -03:00
dongjiang
bac5d117fc feat(env): auto set GOMAXPROCS by go.uber.org/automaxprocs (#6576)
---------

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>
2024-05-16 11:17:58 +02:00
Simon Pasquier
80792a70e0 feat: add go_sync_mutex_wait_total_seconds_total metric
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2024-05-13 14:03:15 +02:00
Simon Pasquier
99c6ab2ca2 feat: add Go runtime scheduler metrics
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2024-05-03 14:53:55 +02:00
Tushar
14b3afba33 DELETE: removed the po-lint code and doc part (#6474)
* DELETE: removed the po-lint code and doc part as it is replaced by kubeconform #4099

Signed-off-by: Tushar Jain <jain0735@gmail.com>

* removed the po-lint part from the Readme

Signed-off-by: Tushar Jain <jain0735@gmail.com>

* removed po-lint from the makefile and dockerfile

Signed-off-by: Tushar Jain <jain0735@gmail.com>

---------

Signed-off-by: Tushar Jain <jain0735@gmail.com>
2024-04-11 11:33:56 -03:00