Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 19:55
    shawkins opened #3625
  • 18:44
    shawkins commented #3616
  • 18:02
    shawkins commented #3617
  • 17:12
    stale[bot] closed #3425
  • 16:37
    metacosm review_requested #3616
  • 16:04
    manusa review_requested #3601
  • 16:03
    manusa review_requested #3601
  • 16:03
    manusa review_requested #3601
  • 15:58
    sonarcloud[bot] commented #3549
  • 15:58
    sonarcloud[bot] commented #3549
  • 15:36
    shawkins synchronize #3549
  • 15:23
    sonarcloud[bot] commented #3549
  • 15:23
    sonarcloud[bot] commented #3549
  • 15:02
    shawkins synchronize #3549
  • 13:59
    manusa commented #3624
  • 13:05
    shawkins commented #3624
  • 12:01
    manusa commented #3619
  • 11:56
    sonarcloud[bot] commented #3619
  • 11:56
    sonarcloud[bot] commented #3619
  • 11:33
    manusa unlabeled #3619
Hannes Hofmann
@hanneshofmann
Hi, we are using Kubernetes Client 4.9.2 (with Kubernetes 1.20.5). We are experiencing that our event watcher is not notified in very rare situations. I already checked the closed and open issues in GitHub but I couldn't find anything related. Are you guys aware about this kind of issue? The only thing I know is that the missing events are in etcd and are available when using the Kubernetes API directly (e.g. with kubectl/curl).
Steven Hawkins
@shawkins
@hanneshofmann the only situation I'm aware of is a kubernetes bug with Service watches: kubernetes/kubernetes#102464
3 replies
David Calap
@dcalap
Is there a way to keep the same port for kubernetes mock server? Looks like is changing the port on every test and we are facing issues because of that.
David Calap
@dcalap
this newwill override the one created with the EnableKubernetesMockClientannotation?
because we are using that in our tests
Marc Nuri
@manusa
Yes, the annotation is not compatible with that.
We are working on some improvements for the MockWebserver. Maybe you can create an issue to improve the JUnit5 annotations too so that you can select the port.
(I think I wasn't clear, don't use the annotation if you manually start the mockserver as in the provided example.)
David Calap
@dcalap
Sure thing, thanks for the info!
Another question. we are using the kubernetesMock in different test cases and we need to check the getLastRequest() but looks like once is conusmed in one of the test cases the next time we try to get the body is blocked forever, like if the buffer is not there anymore, do you know what could be?
Marc Nuri
@manusa
Yes, this is the current behavior. It's part of the current set of improvements we're working on
With the current behavior, you need to persist that request yourself.
David Calap
@dcalap
what do you mean with persist?
Marc Nuri
@manusa
save in a local variable, etc.
David Calap
@dcalap
cool, thx!
Marc Nuri
@manusa
Basically you can just get the last request once, given the way it's implemented. If you need to assert several things on that request, then you should persist it.
If you are performing latter operations, then you will need to refactor the test.
Once the current PR refactor is ready and released, then it won't be necessary.
David Calap
@dcalap
any ETA of the new release?
Marc Nuri
@manusa
For the Mock Server we'll try to make it to 5.10
but there's still work to do
Hannes Hofmann
@hanneshofmann
Hi! While upgrading from kubernetes-client 4.9.2 to 5.9.0 (in an OSGi-based application), we are facing fabric8io/kubernetes-client#3500. Are there any idea how to address this? I was thinking about exporting the specific package but this seems to me wrong as it's named "internal". :)
Marc Nuri
@manusa
We haven't had time to investigate this yet
We don't really understand what might be going on, since there should be an integration test verifying that OSGi works
Hannes Hofmann
@hanneshofmann
I see, thanks for your response. I might tinker around a bit and might leave a comment in the ticket, if I find something interesting.
Marc Nuri
@manusa
That would be good, thanks.
Hannes Hofmann
@hanneshofmann
I am not sure what the integration tests OSGi do, but I suspect the ClassNotFoundException is only thrown at runtime (not at bundle wiring) when certain methods of the KubernetesClient are used. As said above, to avoid noise here, I will add findings in the ticket.
8 replies
heesuk-ahn
@heesuk-ahn

Hi all,

In fabric 8 kubernetes client, when Reflector receives a watch event, it seems to pass the event to the SyncerStore.
In client-go, it seems to be put in a queue called DeltaFIFO.

Can I understand that the abstraction is different without DeltaFIFO in fabric 8 kubernetes client?

3 replies
heesuk-ahn
@heesuk-ahn

https://github.com/fabric8io/kubernetes-client/blob/8ed9692a97d9ca40784c43c66b056f76fb795481/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/cache/ProcessorStore.java#L105-L109

The above Processor store resync method only seems to trigger the Update notification once again.
I understood The resync plays back all the events held in the informer cache.
Does this logic have any purpose other than giving the controller one more notification?

Steven Hawkins
@shawkins
@heesuk-ahn yes the deltafifo was removed from the fabric8 client
1 reply
Niel Madlani
@Niel90

Hello,

Is there are way to list all pods for a jenkins instance and see which ones are down by using https://github.com/fabric8io/kubernetes-client ?

For example, if I run the following command "kubectl get pod --all-namespaces -o wide" I will get "Namespace", "NAME", "Status" etc. I want to get all pods/agents which STATUS is set to "Error"

Niel Madlani
@Niel90
I thought "PodList podList = client.pods().inAnyNamespace().list();" would do that for me, but it seems like it is looking for something in .kubeconfig file if I understand correct?
Rohan Kumar
@rohanKanojia
What do you mean?
Is code executing within a Pod(Jenkins Pod) ?
If this is the case, Fabric8 Kubernetes Client would check mounted ServiceAccount for API token.
You just need to make sure that your Serviceaccount has cluster wide permission to access pods
Niel Madlani
@Niel90
image.png
Well if I run the following command "kubectl get pod --all-namespaces -o wide" in ubuntu terminal i get a list of pods (as mentioned before). Like this:
I would like to get the same type of list using the fabric8
2 replies
I will check out ServiceAccount and see what it does
heesuk-ahn
@heesuk-ahn

It is said that kubernetes uses level-trigger, but in fact, watch or informer api is an edge trigger rather than a level trigger, isn't it?

If an event is lost due to a network issue, the watch or informer api loses the new desired state.

If we use the polling method, It can be thought of as a level trigger but I think that the event-driven method as a watch or informer is close to an eade trigger.

Orsák Maroš
@see-quick
Hi guys, I have open PR related to the WebSocket timeout, which was with the fixed value 10 seconds (which is FPOV small). It would be better to be configurable like this..
fabric8io/kubernetes-client#3559
can you take a look on that?
@iocanel @rohanKanojia ^^
Yikun Jiang
@Yikun

I try to add the extension for volcano, but I meet the issue: panic: Not able to set api version for volcano.sh/apis/pkg/apis/scheduling/v1beta1/Queue Complete code and log are in [1].
Could you give some idea on it?

[1] Yikun/kubernetes-client#1

Hannes Hofmann
@hanneshofmann
Hi, since upgrading from 4.9.2 to 5.9.0 I observed that one of our unit tests is failing. It looks to me that field selectors are not considered on the Event API when we are using KubernetesServer in unit tests. Are there any known issues regarding this (I couldn't find any but maybe I have missed something)? Otherwise I would try to raise an issue on GitHub including a small reproduction example.
1 reply
Marc Nuri
@manusa
Starting release process for Kubernetes Client 5.10.0
Marc Nuri
@manusa
Starting release process for Kubernetes Client 5.10.1