Giter Site home page Giter Site logo

rohankanojia / podsetoperatorinjava Goto Github PK

View Code? Open in Web Editor NEW
57.0 4.0 26.0 72 KB

Java Implementation of https://github.com/hrishin/podset-operator using Fabric8 Kubernetes Client

Home Page: https://github.com/fabric8io/kubernetes-client

License: Apache License 2.0

Java 100.00%
fabric8-kubernetes-client java kubernetes-operators

podsetoperatorinjava's Issues

Found a bug in the code in below code snippet

Comparing String with ==??
public void onUpdate(Pod oldPod, Pod newPod) { if (oldPod.getMetadata().getResourceVersion() == newPod.getMetadata().getResourceVersion()) { return; } handlePodObject(newPod);

debugging dont work

Problem

The java application starts very well

/Library/Java/JavaVirtualMachines/adoptopenjdk-11.0.1.jdk/Contents/Home/bin/java -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:50592,suspend=y,server=n -javaagent:/Users/dabou/Library/Caches/IntelliJIdea2019.2/captureAgent/debugger-agent.jar -Dfile.encoding=UTF-8 -classpath "/Users/dabou/Downloads/podsetoperatorinjava-master/target/classes:/Users/dabou/.m2/repository/io/fabric8/kubernetes-client/4.6.0/kubernetes-client-4.6.0.jar:/Users/dabou/.m2/repository/io/fabric8/kubernetes-model/4.6.0/kubernetes-model-4.6.0.jar:/Users/dabou/.m2/repository/io/fabric8/kubernetes-model-common/4.6.0/kubernetes-model-common-4.6.0.jar:/Users/dabou/.m2/repository/com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.9.9/jackson-module-jaxb-annotations-2.9.9.jar:/Users/dabou/.m2/repository/javax/annotation/javax.annotation-api/1.3.2/javax.annotation-api-1.3.2.jar:/Users/dabou/.m2/repository/javax/xml/bind/jaxb-api/2.3.0/jaxb-api-2.3.0.jar:/Users/dabou/.m2/repository/com/squareup/okhttp3/okhttp/3.12.0/okhttp-3.12.0.jar:/Users/dabou/.m2/repository/com/squareup/okio/okio/1.15.0/okio-1.15.0.jar:/Users/dabou/.m2/repository/com/squareup/okhttp3/logging-interceptor/3.12.0/logging-interceptor-3.12.0.jar:/Users/dabou/.m2/repository/org/slf4j/slf4j-api/1.7.26/slf4j-api-1.7.26.jar:/Users/dabou/.m2/repository/org/slf4j/jul-to-slf4j/1.7.26/jul-to-slf4j-1.7.26.jar:/Users/dabou/.m2/repository/com/fasterxml/jackson/dataformat/jackson-dataformat-yaml/2.9.9/jackson-dataformat-yaml-2.9.9.jar:/Users/dabou/.m2/repository/org/yaml/snakeyaml/1.23/snakeyaml-1.23.jar:/Users/dabou/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.9.9.3/jackson-databind-2.9.9.3.jar:/Users/dabou/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.9.0/jackson-annotations-2.9.0.jar:/Users/dabou/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.9.9/jackson-core-2.9.9.jar:/Users/dabou/.m2/repository/io/fabric8/zjsonpatch/0.3.0/zjsonpatch-0.3.0.jar:/Users/dabou/.m2/repository/com/github/mifmif/generex/1.0.2/generex-1.0.2.jar:/Users/dabou/.m2/repository/dk/brics/automaton/automaton/1.11-8/automaton-1.11-8.jar:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar" io.fabric8.podset.operator.PodSetOperatorMain
Connected to the target VM, address: '127.0.0.1:50592', transport: 'socket'
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Oct 07, 2019 7:05:13 PM io.fabric8.podset.operator.controller.PodSetController run
INFO: Starting PodSet controller
Oct 07, 2019 7:05:14 PM io.fabric8.podset.operator.controller.PodSetController run
INFO: trying to fetch item from workqueue...
Oct 07, 2019 7:05:14 PM io.fabric8.podset.operator.controller.PodSetController run
INFO: Work Queue is empty

but if we want to debug, then break points is not called when a CR is deployed on ocp3.11
Screenshot 2019-10-07 19 10 05

and logs report such information

io.fabric8.podset.operator.controller.PodSetController$1.onAdd()
Oct 07, 2019 7:05:49 PM io.fabric8.podset.operator.controller.PodSetController enqueuePodSet
INFO: enqueuePodSet(example-podset)
Oct 07, 2019 7:05:49 PM io.fabric8.podset.operator.controller.PodSetController enqueuePodSet
INFO: Going to enqueue key scoped/example-podset
Oct 07, 2019 7:05:49 PM io.fabric8.podset.operator.controller.PodSetController enqueuePodSet
INFO: Adding item to workqueue
Oct 07, 2019 7:05:49 PM io.fabric8.podset.operator.controller.PodSetController run
INFO: Got scoped/example-podset
Oct 07, 2019 7:05:49 PM io.fabric8.podset.operator.controller.PodSetController run
SEVERE: PodSet example-podset in workqueue no longer exists

Question: Do we have to perform a specific step to debug a java operator (= connected to an informer queue) ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.