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

15 Commits

Author SHA1 Message Date
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
M Viswanath Sai
baf40889d1 Chore: rename internal/util package to sortutil (#7719)
* rename internal/util -> internal/sortutil
2025-07-22 14:40:33 +05:30
dongjiang
91af9515bf chore: Update golangci-lint to v1.62.0 (#7101)
---------

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>
Co-authored-by: Simon Pasquier <spasquie@redhat.com>
2024-11-13 15:48:14 +01:00
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
dongjiang
d1fb419659 chore: optimize maps order function (#7001)
---------

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>
2024-10-11 17:31:54 +02: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
41923207e4 disable logs for unknow and none levels 2024-07-23 13:47:58 -03:00
perebaj
7b7b3a6476 replace go kit log 2024-07-17 16:54:03 -03:00
Jonathan
88192aa25d Chore: new logging interface with slog (#6743) 2024-07-17 09:50:52 -03: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
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
Simon Pasquier
5e9eed43e4 chore: reduce code duplication in components
* Share parsing for the logging flags across all binaries.
* Refactor and share the web server implementation between the operator
  and the admission webhook.
* Refactor controller configuration structs to include only the required
  parameters.
* Parse label and field selector arguments early instead of doing it in
  each controller.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2023-11-16 14:42:28 +01:00
Simon Pasquier
2655bad36d fix: set verbosity log level only for debug
client-go functions can avoid costly logging evaluations by using this
pattern:

```
if klog.V(2).Enabled() { klog.Info("log this") }
```

With this change, the klog verbosity is set to zero (except at debug log
level where it is 6) to ensure that the performance optimization is
preserved.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2023-10-09 14:10:18 +02:00
Ben Kochie
edf499e8a2 Add a filter for non-running pods (#5049)
Add a boolean option to PodMetricsEndpoint to filter out non-running
phases.
* Enable by default.

Fixes: https://github.com/prometheus-operator/prometheus-operator/issues/4816

Signed-off-by: SuperQ <superq@gmail.com>
2022-09-28 17:39:29 +01:00
Philip Gough
e9861e7bdb Consolidate logging setup into a standalone package (#4445)
* internal: add a package to consolidate logging setup

* cmd:operator: Setup logger via internal package

* cmd:reloader: Setup logger via internal package
2021-12-13 11:09:57 +01:00