286 Commits
Author SHA1 Message Date
907ce911f7 enable sha mechanism for kafka authentication (#173)
Co-authored-by: Jean-Baptiste GINTRAND <jean-baptiste.gintrand@forterro.com>
2024-05-14 00:27:38 +03:00
2668c4309d Bump golang.org/x/crypto from 0.14.0 to 0.17.0 (#149)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.14.0 to 0.17.0.
- [Commits](https://github.com/golang/crypto/compare/v0.14.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
v1.7
2024-02-23 08:26:23 +03:00
Ronak NathaniandGitHub d7ba03a966 Improves leader election so that we don't lose events (#153)
Currently, when a replica loses its leadership, a new leader isn't elected until leaseDuration seconds.
Here, that is 15s. The max time till we get a new leader is leaseDuration (15s) + retryPeriod (2s) = 17s.

This commit updates the shutdown process such that if the leader replica is sent a shutdown signal,
it sleeps for leaseDuration seconds. This allows the leader replica to continue to export events until
a new leader is elected. And a new leader is elected only if lease hasn't been renewed and leaseDuration expires.

In addition to this, leader election now uses the leases object instead of configMaps and leases. The clusterRole
is also updated to allow writing to the leases object.

For use cases where no event loss is tolerable, users should use maxEventAgeSeconds to > 1.
2024-02-23 08:26:06 +03:00
Ronak NathaniandGitHub 0376ea250c Adds a makefile to ease builds/tests locally and adds a dockerignore file for faster docker builds (#154)
The makefile is for convenience purposes and the dockerignore file reduces the context to be passed
to Docker daemon.
2024-02-23 08:23:14 +03:00
c1455c01fb fix: support to set kafka version (#146)
Co-authored-by: sph <shepenghui@corp.netease.com>
v1.6.1
2023-11-21 16:30:45 +03:00
Branko ToicandGitHub ff7498c5cc feat(loki): add support for custom headers (#142)
add custom headers support in Loki sink, and documentation in README

fix: #141
v1.6
2023-11-18 01:00:56 +03:00
Ronak NathaniandGitHub f48d5bf9ba Add owner references to EnhancedEvent, consolidate calls to apiserver, make cache size configurable and add metrics for reads (#144)
* Adds ownerReferences to the exported events

This commit uses the same approach as labels and annotations and adds ownerReferences to the EnhancedEvent struct.
The flow is as follows:
* use an LRU cache to store the ownerReferences with object UID as the key
* if the object doesn't exist in cache, look up using dynamic client and store it in cache
* if the object exists in cache, return the value from cache

* Reduce the number of GetObject calls by using a single cache to store all labels, annotations and ownerReferences

Currently, every time there's an event, the events exporter runs GetObject for metadata like labels and annotations
independently. This results in the same object being looked up multiple times for different pieces of the metadata.
These number of calls grow as we want to look up additional information about the object like ownerReferences.
So, in this change, a struct called `ObjectMetadata` is created to capture all the pieces of information that need to be added
to the EnhancedEvent. And every time there's an event, the object is fetched from the kube-apiserver if it's not in the cache already
and all pieces of metadata require only 1 call. The metadata is cached so repeated events about the same object don't
result in more calls.

Additionally, UID + ResourceVersion is used the cacheKey so if the object changes, it's looked up again.

One more change here is introduction of a `deleted` field in the `EnhancedEvent.InvolvedObject` to capture whether the object
is deleted. This helps receivers identify whether a resource is deleted and create rules for it when needed.

Tests are added for these updates and the mock functions are moved to the test files.

* Make the cache size configurable

* Add metrics for number of reads served from cache and kube-apiserver respectively

* Add `deleted` field to the involvedObject in EnhancedEvent to identify whether the resource is being deleted
2023-11-18 01:00:27 +03:00
t3miandGitHub b892cb20df feat: add build_info metric (#121)
Signed-off-by: t3mi <t3mi@users.noreply.github.com>
v1.5
2023-10-25 14:57:39 +03:00
4df1af5f2b Add Headers into the ElasticsearchConfig. (#131)
Co-authored-by: tian.zhiqiang3 <tian.zhiqiang3@neolink.com>
2023-10-25 14:50:43 +03:00
428f35b3e7 Bump golang.org/x/net from 0.10.0 to 0.17.0 (#133)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.10.0 to 0.17.0.
- [Commits](https://github.com/golang/net/compare/v0.10.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-25 14:50:26 +03:00
Ivan KovnatskyandGitHub 727557f597 Remove namespace configuration from deployment (#123)
* Remove namespace configuration from deployment

* Add kubectl command to create namespace to readme
2023-09-07 08:50:34 +03:00
triangularcoverandGitHub f39d8dc5e0 Update README.md (#122)
Fix minor typo
2023-09-07 08:50:03 +03:00
Boris PetersenandGitHub bbcbeeb385 Introduce omitLookup config flag (#115)
This flag wraps the Label and Annotation lookup to prevent API
throttling

Signed-off-by: Boris Petersen <boris.petersen@dkb.de>
v1.4
2023-08-04 19:48:46 +03:00
Manuel RügerandGitHub 9e7f84ba16 Use exporter-toolkit (#71)
This adds support for TLS configuration on the http metrics endpoint
as well as support for a landing page.
2023-07-27 11:11:31 +03:00
b336183798 Support kubernetes 1.27 (#111)
Co-authored-by: Serge <Serge@gmail>
v1.3
2023-07-24 09:33:07 +03:00
Kazuki SudaandGitHub 8b324e8ae0 sink/slack: Use GetString for color (#112)
Signed-off-by: Kazuki Suda <kazuki.suda@gmail.com>
2023-07-23 17:03:08 +03:00
Mustafa Akın 166ee6e3df Damn yaml 2023-07-21 11:42:33 +03:00
Mustafa Akın fe1fd7cccc Added example for secret expansion, updated to go 1.20 v1.2 2023-07-21 11:31:05 +03:00
Mustafa Akın 0ded9ab7ab Remove Helm release chart 2023-07-21 11:16:11 +03:00
Mustafa Akın b7c8bc195d Helm removed, a link added to Bitnami 2023-07-21 11:14:58 +03:00
Mustafa Akın 1a307b5464 rbac fix kubernetes-event-exporter-0.4.2 2023-07-21 11:05:49 +03:00
Mustafa Akın b8cb5b53b4 helm chart update kubernetes-event-exporter-0.4.1 2023-07-21 11:00:41 +03:00
Mustafa Akın 0482cc5aa9 add service monitor config 2023-07-21 10:54:42 +03:00
Mustafa Akın 381a75a421 try to fix helm kubernetes-event-exporter-0.4.0 2023-07-21 10:48:17 +03:00
Mustafa Akın 1532ef0128 Merge branch 'nlamirault-feat/servicemonitor' 2023-07-21 10:24:12 +03:00
Mustafa Akın 97b325609d Merge branch 'feat/servicemonitor' of https://github.com/nlamirault/kubernetes-event-exporter into nlamirault-feat/servicemonitor 2023-07-21 10:23:55 +03:00
Mustafa Akın 8f201cbbd0 Fixed failed config reading test 2023-07-21 10:20:00 +03:00
Hoshea JiangandGitHub 90a96d8721 Support setting the kubeconfig via flag and env variable (#42)
* Support setting the kubeconfig via configuration

* support KUBECONFIG env variable and flag
2023-07-21 10:14:15 +03:00
Jan-Otto KröpkeandGitHub 9ee0ba03a4 Chart enchantments (#97) kubernetes-event-exporter-0.3.0 2023-07-21 10:10:34 +03:00
876fbd3a0d Fix "template: kubernetes-event-exporter/templates/_helpers.tpl:14:14: executing "kubernetes-event-exporter.fullname" at <.Values.fullnameOverride>: nil pointer evaluating interface {}.fullnameOverride" while try to install helm charts (#108)
Co-authored-by: YuriYin <yincc8@chinatelecom.cn>
2023-07-21 10:08:23 +03:00
shadowofmooandGitHub 4f2e057f5f Update README.md (#99)
helm v3 doesn't support 'helm update' command
2023-07-06 21:55:24 +03:00
Mustafa AkınandGitHub 7ec9b6b842 Revert "fixed kafka sinker initialization failure when the TLS certificate is invalid" (#103) 2023-07-06 21:22:33 +03:00
Mustafa Akın da61f6c342 Merge branch 'yanmxa-br_kafka_error' 2023-07-06 21:17:37 +03:00
Mustafa Akın 4ee63104eb Merge branch 'br_kafka_error' of https://github.com/yanmxa/kubernetes-event-exporter into yanmxa-br_kafka_error 2023-07-06 21:17:32 +03:00
Mustafa AkınandGitHub ae366454e3 Revert "@timestamp handling from https://github.com/opsgenie/kubernetes-event-exporter/pull/165 (#92)" (#102)
This reverts commit c572daa48a.
2023-07-06 21:15:09 +03:00
Juha YlitaloandGitHub c572daa48a @timestamp handling from https://github.com/opsgenie/kubernetes-event-exporter/pull/165 (#92) 2023-07-06 21:14:15 +03:00
Mustafa Akın 5814d29c16 Merge branch 'Yleisradio-ineffectual_err' 2023-07-06 20:34:50 +03:00
Mustafa Akın ff36eee2d0 Merge branch 'ineffectual_err' of https://github.com/Yleisradio/kubernetes-event-exporter into Yleisradio-ineffectual_err 2023-07-06 20:34:47 +03:00
Mustafa Akın f8f0f010ec Merge branch 'xonvanetta-master' 2023-07-06 20:33:21 +03:00
Mustafa Akın 3ae9db7c7a Merge branch 'master' of https://github.com/xonvanetta/kubernetes-event-exporter into xonvanetta-master 2023-07-06 20:33:15 +03:00
680b4e29e3 add loki receiver (#50)
* add loki output

* update README for loki

---------

Co-authored-by: navid.shariaty <navid.shariaty@snapp.cab>
2023-07-06 20:31:54 +03:00
Mustafa Akın 03ac677507 Merge branch 'Evedel-migrate-yaml-library-to-expose-config-errors-easier' 2023-07-06 20:30:53 +03:00
Mustafa Akın 65f6d73cca Merge branch 'migrate-yaml-library-to-expose-config-errors-easier' of https://github.com/Evedel/kubernetes-event-exporter into Evedel-migrate-yaml-library-to-expose-config-errors-easier 2023-07-06 20:30:45 +03:00
Mustafa Akın 74077bebff Merge branch 'master' of github.com:resmoio/kubernetes-event-exporter 2023-07-06 19:42:00 +03:00
Mustafa Akın 600b2cfbb8 Merge branch 'minchao-teams-rate-limited' 2023-07-06 19:41:49 +03:00
Mustafa Akın 34ca68c7fd Merge branch 'teams-rate-limited' of https://github.com/minchao/kubernetes-event-exporter into minchao-teams-rate-limited 2023-07-06 19:41:47 +03:00
Kazuki SudaandGitHub b7a82d3028 Adopt Pod Security Admission "restricted" policy (#100) 2023-07-06 19:38:20 +03:00
Manuel RügerandGitHub 811ab9b6c9 go.mod: Update masterminds/sprig to v3 (#72) 2023-07-06 18:38:57 +03:00
Nicolas LamiraultandGitHub 64db91f26b New probes and Kubernetes Service resource (#82)
* Add: Healthy and Ready handlers

Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>

* Update: new probes

Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>

* Add: Service resource

Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>

---------

Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>
kubernetes-event-exporter-0.2.0
2023-07-06 18:38:01 +03:00
Juha YlitaloandGitHub e1070dc954 "io/ioutil" has been deprecated (#85)
As of Go 1.16, the same functionality is now provided by package io or package os
2023-07-06 18:36:15 +03:00