Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 07:00
    sonarcloud[bot] commented #4242
  • 06:34
    rohanKanojia review_requested #4242
  • 06:34
    rohanKanojia review_requested #4242
  • 06:01
    hong-il edited #4242
  • 06:01
    hong-il edited #4242
  • 06:00
    hong-il edited #4242
  • 05:56
    hong-il edited #4242
  • 05:56
    hong-il edited #4242
  • 05:55
    hong-il edited #4242
  • 05:22
    hong-il opened #4242
  • 02:52
    kissky8023 starred fabric8io/kubernetes-client
  • Jun 29 22:24
    stale[bot] labeled #3805
  • Jun 29 22:24
    stale[bot] commented #3805
  • Jun 29 14:34
    shawkins milestoned #4241
  • Jun 29 14:07
    shawkins opened #4241
  • Jun 29 13:49
    wayneminton starred fabric8io/kubernetes-client
  • Jun 29 13:01
    shawkins commented #4232
  • Jun 29 13:00
    sonarcloud[bot] commented #4232
  • Jun 29 13:00
    sonarcloud[bot] commented #4232
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
so if I remove the hack and use latest generator, it works if I rename package to io.fabric8.apicurio.registry.operator.api.model. rohanKanojia/apicurio-model-generator@8b6ad96
I'll probably create a PR to your repository once above issue gets fixed
Rohan Kumar
@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).

I think we can do it by providing a manual ApicurioRegistry and ApicurioRegistryList which will extend CustomResource

we can add a delete task to maven-antrun-plugin to delete generated ApicurioRegistry class and use hand written class which will extend CustomResource
Jakub Cechacek
@jcechace

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).

I think we can do it by providing a manual ApicurioRegistry and ApicurioRegistryList which will extend CustomResource

Loading the yaml descriptor seems cleaner in that case. Writing the classes doesn't really seem as a good option and thus I think this method shouldn't be deprecated -- the majority of CR/Ds one is going to encounter are not going to be written in java.

Rohan Kumar
@rohanKanojia
I think you're right
I also think this method should not be deprecated. It will come handy when you're trying to use same pojo for different customresource versions fabric8io/kubernetes-client#2738
I think we should create a new issue to start this discussion again
Rohan Kumar
@rohanKanojia

the majority of CR/Ds one is going to encounter are not going to be written in java.

I think I see more and more people interested in writing operators in java these days

Red Hat is also investing some resources in java operator sdk
Jakub Cechacek
@jcechace
Yes but we should strive for general usability :)

@rohanKanojia
btw did you ever see this? Without touching my cluster the client starting spitting this at me

Caused by: io.fabric8.kubernetes.client.WatcherException: too old resource version: 48308901 (48321468)

5.2.1 client

Jakub Cechacek
@jcechace
Ok I supsect some micro release update in the cluster broke something. Updating to 5.5 fixed it
Rohan Kumar
@rohanKanojia
Hmm, yes. I have seen this
If you use SharedIndexInformers, client would automatically handle 410
Jakub Cechacek
@jcechace
strangely in. my case this was happening across multiple executions so no watch should have persisted .. nevertheless update fixed and I want to thank you for removing InterruptedException from waits :)
Much cleaner
Rohan Kumar
@rohanKanojia
no need to thank me, @shawkins improved this
Jonathan Block
@blockjon
(newbie question) I'm learning Kotlin and when I use this kubernetes-client in a coroutine, my program hangs and I'm not sure why. I posted some details here fabric8io/kubernetes-client#3382 I wouldn't be surprised if the answer is obvious but this is my 3rd day of Kotlin so I'm currently stumped
Rohan Kumar
@rohanKanojia
is your kotlin coroutine doing something else?
I don't know kotlin but I think it might be okhttp
Jakub Cechacek
@jcechace
Migth want to wrap the call in runBlocking
Jakub Cechacek
@jcechace
@rohanKanojia is there a way to use the client for the equivalent of oc apply -f <folder or file>?
Rohan Kumar
@rohanKanojia
could you please try client.load(getClass().getResourceAsStream("/file.yml")).inNamespace("foo").createOrReplace()
this won't work if there are custom resources present in file
Jakub Cechacek
@jcechace
Will give it a try, it's for future work. I'm just planning some improvements for our project
will it work with multiple resources in the same file?
Rohan Kumar
@rohanKanojia
I think so
Jonathan Block
@blockjon
@rohanKanojia I was able to determine is that the coroutine hangs for exactly 5 minutes when I use this kubernetes-client library. Using a custom config and okHttpClient didnt seem to have an effect.
Jonathan Block
@blockjon
@rohanKanojia Mystery solved "Clear the connection pool with evictAll(). Note that the connection pool’s daemon thread may not exit immediately." - https://square.github.io/okhttp/4.x/okhttp/okhttp3/-ok-http-client/#shutdown-isnt-necessary
Rohan Kumar
@rohanKanojia
cool
Do you think we can add a FAQ regarding this to https://github.com/fabric8io/kubernetes-client/blob/master/doc/FAQ.md ?
Marc Nuri
@manusa
Starting release process for v5.7.0
Rohan Kumar
@rohanKanojia
:+1:
vamseeds
@vamseeds

Hi Guys!
I see io.fabric8.kubernetes.client.dsl.internal.core.v1.PodTemplateOperationsImpl has been removed in v5.7.0 and I don't see any info relating to this removal in changelog .
is io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperationsImpl replacement for above class ?

my previous usage (v5.4.0):

new PodTemplateOperationsImpl(
                k8sClient.getHttpClient(),
                k8sClient.getConfiguration());

current usage(v5.7.0):

new HasMetadataOperationsImpl<>(
                k8sClient.getHttpClient(),
                k8sClient.getConfiguration(), ResourceDefinitionContext.fromResourceType(PodTemplate.class), PodTemplate.class, PodTemplateList.class);
Kamal khanna
@KamalSinghKhanna
hey! new here
I am trying to run mvn clean install but it is showing the error
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test (default-test) on project kubernetes-client: There are test failures.
[ERROR]
[ERROR] Please refer to /home/kamal/Desktop/Java-project/kubernetes-client/kubernetes-client/target/surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :kubernetes-client
how to fix it?