Closed vadeg closed 1 year ago
I can not reproduce this issue anymore in version 5.2.0.
Not sure how exactly did you update your resource. When retrieving the current resource via KubernetesClient
and then using the patch()
method, it all works fine for me.
This looks as following in my test:
val myResources = kubernetesClient.resources(MyResource::class.java)
myResources.load(ClassPathResource("test-resource.yaml").inputStream).create()
await atMost Duration.ofSeconds(5) until {
myResources.withName("my-resource").get().status?.observedGeneration == 1L
}
val resource = myResources.withName("my-resource").get()
resource.spec.version = "1.3.3"
myResources.resource(resource).patch()
await atMost Duration.ofSeconds(5) until {
myResources.withName("my-resource").get().status?.observedGeneration == 2L
}
great, thank you @m-kay , probably was fixed in fabric8 client, will close the issue!
Create the following integration test
On the last step controller will not get the resource update / delete event. This happens because of two things:
generation
metadata property to decide what to do with resource event. There is a function called CustomResourceEventSource.skipBecauseOfGeneration, which rejects events with a generation lower or equal to existing one.generation
property.Only if to set
@Controller(generationAwareEventProcessing = false)
then update events will reach out to controller. I think the MockServer should be updated to be in sync with a default Controller settings.