Search in sources :

Example 1 with OpenShiftListener

use of com.github.isdream.cwatcher.listeners.OpenShiftListener in project watchdog by isdream.

the class OpenshiftListenerTest method main.

public static void main(String[] args) {
    // Configure config = new Parser().parse("config/podWatcher.yaml");
    Configure config = null;
    try {
        config = new Parser().parse("config/podWatcher.yaml");
        OpenShiftClient client = getClient("https", "master.example.com", "8443", "NaD95GPF8rIpbphyCyep--pJQH7t3pzBBV9aXQE77O4");
        Listener listener = new OpenShiftListener();
        listener.start(client, config);
        Thread.sleep(600000);
    } catch (FileNotFoundException e) {
        e.printStackTrace();
    } catch (Exception e) {
        e.printStackTrace();
    }
}
Also used : OpenShiftListener(com.github.isdream.cwatcher.listeners.OpenShiftListener) OpenShiftListener(com.github.isdream.cwatcher.listeners.OpenShiftListener) DefaultOpenShiftClient(io.fabric8.openshift.client.DefaultOpenShiftClient) OpenShiftClient(io.fabric8.openshift.client.OpenShiftClient) FileNotFoundException(java.io.FileNotFoundException) FileNotFoundException(java.io.FileNotFoundException)

Aggregations

OpenShiftListener (com.github.isdream.cwatcher.listeners.OpenShiftListener)1 DefaultOpenShiftClient (io.fabric8.openshift.client.DefaultOpenShiftClient)1 OpenShiftClient (io.fabric8.openshift.client.OpenShiftClient)1 FileNotFoundException (java.io.FileNotFoundException)1