|
| 1 | +--- |
| 2 | +title: Migrating from v4.4 to v4.5 |
| 3 | +description: Migrating from v4.4 to v4.5 |
| 4 | +layout: docs |
| 5 | +permalink: /docs/v4-5-migration |
| 6 | +--- |
| 7 | + |
| 8 | +# Migrating from v4.4 to v4.5 |
| 9 | + |
| 10 | +Version 4.5 introduces improvements related to event handling for Dependent Resources, more precisely the |
| 11 | +[caching and event handling](https://javaoperatorsdk.io/docs/dependent-resources#caching-and-event-handling-in-kubernetesdependentresource) |
| 12 | +features. As a result the Kubernetes resources managed using |
| 13 | +[KubernetesDependentResource](https://github.com/java-operator-sdk/java-operator-sdk/blob/73b1d8db926a24502c3a70da34f6bcac4f66b4eb/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/source/informer/InformerEventSource.java#L72-L72) |
| 14 | +or its subclasses, will add an annotation recording the resource's version whenever JOSDK updates or creates such |
| 15 | +resources. This can be turned off using a |
| 16 | +[feature flag](https://github.com/java-operator-sdk/java-operator-sdk/blob/73b1d8db926a24502c3a70da34f6bcac4f66b4eb/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/config/ConfigurationService.java#L375-L375) |
| 17 | +if causes some issues in your use case. |
| 18 | + |
| 19 | +Using this feature, JOSDK now tracks versions of cached resources. It also uses, by default, that information to prevent |
| 20 | +unneeded reconciliations that could occur when, depending on the timing of operations, an outdated resource would happen |
| 21 | +to be in the cache. This relies on the fact that versions (as recorded by the `metadata.resourceVersion` field) are |
| 22 | +currently implemented as monotonically increasing integers (though they should be considered as opaque and their |
| 23 | +interpretation discouraged). Note that, while this helps preventing unneeded reconciliations, things would eventually |
| 24 | +reach consistency even in the absence of this feature. Also, if this interpreting of the resource versions causes |
| 25 | +issues, you can turn the feature off using the |
| 26 | +[following feature flag](https://github.com/java-operator-sdk/java-operator-sdk/blob/73b1d8db926a24502c3a70da34f6bcac4f66b4eb/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/config/ConfigurationService.java#L390-L390). |
0 commit comments