Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 10:47
    stale[bot] closed #4223
  • 10:47
    stale[bot] closed #4195
  • Oct 01 02:09
  • Sep 30 20:03
    shawkins milestoned #4472
  • Sep 30 20:03
    shawkins opened #4472
  • Sep 30 15:21
    honnix commented #4443
  • Sep 30 14:55
    shawkins milestoned #4471
  • Sep 30 14:55
    shawkins opened #4471
  • Sep 30 14:49
    shawkins commented #4469
  • Sep 30 14:18
    sonarcloud[bot] commented #4469
  • Sep 30 13:55
    shawkins synchronize #4469
  • Sep 30 13:45
    DobromirM opened #4470
  • Sep 30 13:41
  • Sep 30 13:30
    shawkins review_requested #4469
  • Sep 30 13:30
    shawkins review_requested #4469
  • Sep 30 13:30
    shawkins opened #4469
  • Sep 30 12:52
    sonarcloud[bot] commented #4464
  • Sep 30 12:52
    sonarcloud[bot] commented #4464
  • Sep 30 12:46
    manusa closed #4454
Marc Nuri
@manusa
Yes, IIRC that should be the recommended approach now. I'm not completely sure that the label filtering applies. @shawkins?
Steven Hawkins
@shawkins
Yes labels and any other context apply as well - the inform is just piggy-backing on the list and watch operations at the given context
Rafael Guillen
@rguillens
Thanks folks!
paulgeiger-eng
@paulgeiger-eng

Hi,

My team is facing a new issue after uptaking 5.4.0 that we have not seen with previous versions. The problem comes when we have a SharedInformer for a class where the CRD has been loaded in the cluster but no actual CRD resources have been created.

We have some code to get the list of resources in a workspace from the informer cache:

final var indexer = resourceInformer.getIndexer();
final var resourcesListOptional = Optional.ofNullable(indexer.byIndex(Cache.NAMESPACE_INDEX, namespace));

This existing code is now with 5.4.0 producing an exception:

Caused by: java.lang.NullPointerException
at io.fabric8.kubernetes.client.informers.cache.Cache.byIndex(Cache.java:291)

Note that the byIndex method does a check for existence of indexName in "indexers" but does not do an equivalent check in "indices". There seems to be an assumption that indices would have the same keys as indexers and in the constructor they are both initialized with the same key "namespace". However in our scenario I am observing that indexers still contains the "namespace" key but indices is an empty map. Hence we get the null pointer exception on line 291.

I have observed that when the informer is starting the Cache::replace method is being called with an empty list parameter. Then on line 157 it sets indices to a new/empty map. Since there are no items there is no additional initialization performed on indices. The call stack looks like:

Cache::replace (157)
ProcessorStore::replace (90)
Reflector::listSyncAndWatch (83)
Controller::run (93)

It appears that we don't have any mechanism to check for this condition since the Cache indices property is private.

Would anyone please suggest a check, work-around, or fix?

Rohan Kumar
@rohanKanojia
Do you think your issue is this one ? fabric8io/kubernetes-client#3272
Marc Nuri
@manusa
Starting release process for 5.6.0
Rohan Kumar
@rohanKanojia
:+1:
paulgeiger-eng
@paulgeiger-eng
Hi @rohanKanojia. It looks like the issue you mentioned is the same issue we are facing. We will try taking up the 5.5.0 or it looks like 5.6.0 is about to be released so maybe we'll go directly to that one.
Rohan Kumar
@rohanKanojia
5.6.0 got released yesterday
Yes, maybe you can try it out and provide feedback :-)
emrealpogunc
@emrealpogunc
Hello everyone, Im having an issue with fabric8 atm. Can someone please check it out? fabric8io/kubernetes-client#3352 I dont know if this is allowed, if not I can delete this message.
I'm using Ubuntu btw.
Rohan Kumar
@rohanKanojia
Do you have some simple reproducer project which we can try out?
I havent really used fabric8 with Eclipse.. I usually build a maven project and load as a maven project in IntelliJ
emrealpogunc
@emrealpogunc
Will give intellij a shot ^_^ Thank you so much for the recommendation.
Rohan Kumar
@rohanKanojia
I think it might also be possible to build maven project and load in Eclipse as maven project
emrealpogunc
@emrealpogunc
I tried intellij and did just like you've said(build and load as a maven project) and right now everything seems fine. I think I've found some of your tutorials and articles on the web and I'm trying to learn through them atm. Thank you once againπŸ‘
Rohan Kumar
@rohanKanojia
my tutorials?
emrealpogunc
@emrealpogunc
https://developers.redhat.com/blog/2020/05/20/getting-started-with-the-fabric8-kubernetes-java-client# by tutorials I meant this article in particular, I might have misused the term "tutorial" a bit, apologies If I caused an inconvenience.
Rohan Kumar
@rohanKanojia
oh, I see.
No need to apologize.
emrealpogunc
@emrealpogunc
I get exited when I'm talking with you talented people so I might apologize or thank for unnecessary reasons (I know it's silly but I can't help myself :D)
Rohan Kumar
@rohanKanojia
:-) ohk, I see. It's normal for everyone who is new to some group.
emrealpogunc
@emrealpogunc
It's good to know that I'm not alone with such behavior :D also I have a question, while I don't have any tasks atm(I'm an intern) , I want to study fabric8, What do you think is the most important part of using fabric8 (Java sdk specifically) ? What skill is a necessity for your job? Im fairly new to the professional side of software engineering so I was wondering these topics ^_^
Rohan Kumar
@rohanKanojia
If you're working around Kubernetes and Java. I'll suggest reading about basic kubernetes concepts from Kubernetes documentation
We also have a cheatsheet for managing different kubernetes resources from fabric8 https://github.com/fabric8io/kubernetes-client/blob/master/doc/CHEATSHEET.md
I think writing Kubernetes Operators can be also something interesting to learn
there is Java Operator SDK as well which uses fabric8 internally : https://github.com/java-operator-sdk/java-operator-sdk
emrealpogunc
@emrealpogunc
Thank you so much Im going to study all of them, once again I'm really appreciated πŸ˜πŸ‘πŸ‘πŸ‘
Sachin Mittal
@sjmittal
Folks I had a doubts regarding waitUntilReady on a pod resource
when does it actually returns a pod, when all the containers are in running state or if any one container is in ready state ?
5 replies
is there any api which actually checks if a particular container is ready or not ?
2 replies
Mohd Uzair
@MUzairS15
@sjmittal When all the containers are in running state, pod gets ready.
Kubelet does thr readiness check and tells if pod is running and accessible or not
Pls correct me if I am wrong.
emrealpogunc
@emrealpogunc
Hi everyone, I'm having an issue and wanted to know the reason behind it. I created a github issue so it's easier to read and fathom the problem. Thank you all so much fabric8io/kubernetes-client#3356
Rohan Kumar
@rohanKanojia
hello
Did you create a custom resource after running operator
kubectl apply -f src/main/resources/cr.yaml
I had also created a video regarding this https://www.youtube.com/watch?v=uxR7Mfpn9HI . If you go to the end of the video. You might see it in action(audio is not great quality but you might be able to get some idea)
emrealpogunc
@emrealpogunc
Thanks to your answer sir, I fixed the issue! I also replied to your answer via GitHub as well. Thank you so much!
Jakub Cechacek
@jcechace

@rohanKanojia Hi... here with the same project again. https://github.com/jcechace/apicurio-model-generator

It's becoming gradually more important for us to generate this model for current revisions of apicurio. THe issue is that my understanding of that project (and gomodules in general) is on the low side. Would you be willing to schedule a call with me and go over the project? For example I'd very much like to understand the versioning as changing the version of github.com/fabric8io/kubernetes-client/generator to comment matching the v5.6.0 release tag breakes the project and so on.

Rohan Kumar
@rohanKanojia
Hi, I'll look into this. I'll check if the model can be easily updated to 5.6.0. Maybe a call might not be required at all
Jakub Cechacek
@jcechace
@rohanKanojia v1.0.0 is the right branch if you want to have a look .
Rohan Kumar
@rohanKanojia
cool, I'll try looking into this after work
Jakub Cechacek
@jcechace
@rohanKanojia probably the most desirable thing is to generate POJOs which would extend CustomResource so I don't have to load yaml CRDs in my code (as that's deprecated and requires me to actually get hold of those descriptors).
thank you
Rohan Kumar
@rohanKanojia
I realized the reason why we had to add a hack for replacing javaType with existingJavaType was due to a hardcoded check added in generator during JSONSchema2Pojo upgrade
I have created an issue for this fabric8io/kubernetes-client#3372