Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 17:13
    shawkins commented #3616
  • 17:12
    sonarcloud[bot] commented #3616
  • 17:12
    sonarcloud[bot] commented #3616
  • 16:52
    shawkins synchronize #3616
  • 15:17
    Damans227 synchronize #3542
  • 13:37
    shawkins commented #3619
  • 13:16
    shawkins commented #3462
  • 10:05
    CWL-1688 opened #3622
  • Nov 27 21:50
  • Nov 27 12:40
    himanshumps opened #3621
  • Nov 27 09:09
    stale[bot] labeled #3355
  • Nov 27 09:09
    stale[bot] commented #3355
  • Nov 26 19:50
    sonarcloud[bot] commented #18
  • Nov 26 19:46
    sonarcloud[bot] commented #17
  • Nov 26 19:32
    sonarcloud[bot] commented #16
  • Nov 26 19:29
    sonarcloud[bot] commented #15
  • Nov 26 18:57
    sonarcloud[bot] commented #12
  • Nov 26 18:53
    sonarcloud[bot] commented #11
  • Nov 26 18:49
    sonarcloud[bot] commented #10
SapnaGirdhani1
@SapnaGirdhani1

Also there are few classes which shows compilation issues because of unimplemented interface methods. For example :

io.fabric8.kubernetes.api.model.GenericKubernetesResource class has missing "getMetadata()"

Is there anyone who has compiled and build this code ? I need some help on the same. Thanks!

5 replies
ho-yasla
@ho-yasla
hi
Do you have a question
ho-yasla
@ho-yasla
코드 사용
yaml = SerializationUtils.dumpAsYaml(pod);
Current output value.
metadata:
  annotations:
    k8s.v1.cni.cncf.io/network-status: "[{\n    \"name\": \"\",\n    \"interface\"\
      : \"eth0\",\n    \"ips\": [\n        \"11.111.1.11\"\n    ],\n    \"default\"\
      : true,\n    \"dns\": {}\n}]"
Expected output value
metadata:
  annotations: |-
      [{
          "name": "",
          "interface": "eth0",
          "ips": [
              "11.111.1.11"
          ],
          "default": true,
          "dns": {}
      }]
ho-yasla
@ho-yasla
Is there any way to get the expected output with a Jackson serializer?
ho-yasla
@ho-yasla
I solved the problem.
David Calap
@dcalap

Hi people, I want to create a KubernetesMockServer and test some scenarios for retry things.

The point is I want to create a configmap and after that, mock the first request to receive a 500 and after that receive a 200.

The issue is that I cannot create a configmap with a KubernetesMockServer because of the CRUD not enabled, and if I create it with KubernetesServer(false, true) then, I cannot create a expect in my @Test with the (KubernetesServer)server.expect for the 500 first request (because server.getMockServer() returns a MockWebServer, not a KubernetesMockServer which would be the expected )... Any clue?

4 replies
Marc Nuri
@manusa
Starting release process for Kubernetes Client 5.9.0
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