Skip to content

Commit

Permalink
Add kubecmd client and executor (#15)
Browse files Browse the repository at this point in the history
* Add kubecmd client and executor

Signed-off-by: David Kornel <kornys@outlook.com>
  • Loading branch information
kornys authored Feb 22, 2024
1 parent 1c31a92 commit 9954773
Show file tree
Hide file tree
Showing 30 changed files with 1,398 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/*
* Copyright Skodjob authors.
* License: Apache License 2.0 (see the file LICENSE or http://apache.org/licenses/LICENSE-2.0.html).
*/
package io.skodjob.testframe.clients;

import io.fabric8.kubernetes.client.Config;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Copyright Skodjob authors.
* License: Apache License 2.0 (see the file LICENSE or http://apache.org/licenses/LICENSE-2.0.html).
*/
package io.skodjob.testframe.clients;


import io.skodjob.testframe.executor.ExecResult;

public class KubeClusterException extends RuntimeException {
public final ExecResult result;

public KubeClusterException(ExecResult result, String s) {
super(s);
this.result = result;
}

public KubeClusterException(Throwable cause) {
super(cause);
this.result = null;
}

public static class NotFound extends KubeClusterException {

public NotFound(ExecResult result, String s) {
super(result, s);
}
}

public static class AlreadyExists extends KubeClusterException {

public AlreadyExists(ExecResult result, String s) {
super(result, s);
}
}

public static class InvalidResource extends KubeClusterException {

public InvalidResource(ExecResult result, String s) {
super(result, s);
}
}
}
Loading

0 comments on commit 9954773

Please sign in to comment.