Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b437fef

Browse files
csviriiocaneldependabot[bot]metacosmlburgazzoli
committedOct 28, 2021
Informer based CustomResourceEventSource and caching (#581)
feat: This is a major change and backbone of v2. We change also how the Resources are addressed both internally and from event source with CustomResourceID. Additional improvements also added. * chore: renaming vars named k8sClient to kubernetsClient * chore(deps): bump jandex-maven-plugin from 1.1.1 to 1.2.1 (#592) Bumps [jandex-maven-plugin](https://github.com/wildfly/jandex-maven-plugin) from 1.1.1 to 1.2.1. - [Release notes](https://github.com/wildfly/jandex-maven-plugin/releases) - [Commits](wildfly/jandex-maven-plugin@1.1.1...1.2.1) --- updated-dependencies: - dependency-name: org.jboss.jandex:jandex-maven-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps-dev): bump mockito-core from 3.12.4 to 4.0.0 (#591) Bumps [mockito-core](https://github.com/mockito/mockito) from 3.12.4 to 4.0.0. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](mockito/mockito@v3.12.4...v4.0.0) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * feature: Build PR on v2 * chore(ci): use Java 17 * chore(ci): use only Temurin distribution * chore: add generics to PostExecutionControl to reduce IDEs noise (#594) * chore: polish the junit5 extension (#593) * feat: Use informers as CustomResourceEventSource backbone and cache Co-authored-by: Ioannis Canellos <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Chris Laprun <[email protected]> Co-authored-by: Luca Burgazzoli <[email protected]>
1 parent f188473 commit b437fef

File tree

48 files changed

+579
-877
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+579
-877
lines changed
 

‎.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ target/
1010

1111
# VSCode
1212
.factorypath
13+
14+
.mvn/wrapper/maven-wrapper.jar

‎micrometer-support/src/main/java/io/javaoperatorsdk/operator/micrometer/MicrometerMetrics.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
import io.javaoperatorsdk.operator.Metrics;
77
import io.javaoperatorsdk.operator.processing.DefaultEventHandler.EventMonitor;
8+
import io.javaoperatorsdk.operator.processing.event.CustomResourceID;
89
import io.javaoperatorsdk.operator.processing.event.Event;
910
import io.micrometer.core.instrument.MeterRegistry;
1011
import io.micrometer.core.instrument.Timer;
@@ -15,12 +16,12 @@ public class MicrometerMetrics implements Metrics {
1516
private final MeterRegistry registry;
1617
private final EventMonitor monitor = new EventMonitor() {
1718
@Override
18-
public void processedEvent(String uid, Event event) {
19+
public void processedEvent(CustomResourceID uid, Event event) {
1920
incrementProcessedEventsNumber();
2021
}
2122

2223
@Override
23-
public void failedEvent(String uid, Event event) {
24+
public void failedEvent(CustomResourceID uid, Event event) {
2425
incrementControllerRetriesNumber();
2526
}
2627
};

0 commit comments

Comments
 (0)