spaship / operator

SPAship Operator
https://spaship.io/operator/
Apache License 2.0
1 stars 2 forks source link

Use Informers instead of watchers #13

Closed lkrzyzanek closed 3 years ago

lkrzyzanek commented 3 years ago

To prevent problem too old resource version based on suggestion https://stackoverflow.com/questions/61409596/kubernetes-too-old-resource-version use informers.

Stacktrace:

2021-02-09 14:31:37,212 ERROR [io.web.ope.con.WebsiteController] (OkHttp https://172.30.0.1/...) onClose: io.fabric8.kubernetes.client.WatcherException: too old resource version: 1182359 (1182896)
    at io.fabric8.kubernetes.client.dsl.internal.WatchConnectionManager$1.onMessage(WatchConnectionManager.java:224)
    at okhttp3.internal.ws.RealWebSocket.onReadMessage(RealWebSocket.java:322)
    at okhttp3.internal.ws.WebSocketReader.readMessageFrame(WebSocketReader.java:219)
    at okhttp3.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.java:105)
    at okhttp3.internal.ws.RealWebSocket.loopReader(RealWebSocket.java:273)
    at okhttp3.internal.ws.RealWebSocket$1.onResponse(RealWebSocket.java:209)
    at okhttp3.RealCall$AsyncCall.execute(RealCall.java:174)
    at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: io.fabric8.kubernetes.client.KubernetesClientException: too old resource version: 1182359 (1182896)
    ... 11 more
lkrzyzanek commented 3 years ago

https://github.com/rohanKanojia/podsetoperatorinjava/blob/master/src/main/java/io/fabric8/podset/operator/controller/PodSetController.java