From 2cedaa4ce84e14dde5d06480c537b715dfe4525c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=B5=B7?= <10402852@qq.com> Date: Thu, 26 Sep 2024 09:22:00 +0800 Subject: [PATCH] 'commit' --- dsBase/pom.xml | 2 +- dsBuild/pom.xml | 52 ++++++++++++------------------ dsBuild/src/main/java/Example.java | 31 ++++++++++++++++++ 3 files changed, 53 insertions(+), 32 deletions(-) create mode 100644 dsBuild/src/main/java/Example.java diff --git a/dsBase/pom.xml b/dsBase/pom.xml index 4de0d3b8..a635646e 100644 --- a/dsBase/pom.xml +++ b/dsBase/pom.xml @@ -31,8 +31,8 @@ + - com.jfinal diff --git a/dsBuild/pom.xml b/dsBuild/pom.xml index 7cc1e6d9..9ce4a7c7 100644 --- a/dsBuild/pom.xml +++ b/dsBuild/pom.xml @@ -15,22 +15,9 @@ UTF-8 21 21 + 5.11.0 + 3.3.4 - - - - ali-maven - http://maven.aliyun.com/nexus/content/groups/public - - true - - - true - always - fail - - - @@ -64,14 +51,6 @@ ${mysql.version} - - - - ch.qos.logback - logback-classic - 1.5.6 - - @@ -163,9 +142,6 @@ jsch 0.2.19 - - - ch.qos.logback logback-classic @@ -185,22 +161,24 @@ io.kubernetes client-java-api - 20.0.0 + 21.0.1 + io.kubernetes client-java - 20.0.0 + 21.0.1 + io.kubernetes client-java-extended - 20.0.0 + 21.0.1 io.kubernetes client-java-proto - 20.0.0 + 21.0.1 commons-cli @@ -217,7 +195,19 @@ client-java-prometheus-operator-models 10.0.1 - + + + org.junit.jupiter + junit-jupiter + ${junit-jupiter.version} + test + + + org.wiremock + wiremock + 3.9.1 + test + diff --git a/dsBuild/src/main/java/Example.java b/dsBuild/src/main/java/Example.java new file mode 100644 index 00000000..32386cc9 --- /dev/null +++ b/dsBuild/src/main/java/Example.java @@ -0,0 +1,31 @@ + +import io.kubernetes.client.openapi.ApiClient; +import io.kubernetes.client.openapi.ApiException; +import io.kubernetes.client.openapi.Configuration; +import io.kubernetes.client.openapi.apis.CoreV1Api; +import io.kubernetes.client.openapi.models.V1Pod; +import io.kubernetes.client.openapi.models.V1PodList; +import io.kubernetes.client.util.Config; +import java.io.IOException; + +/** + * A simple example of how to use the Java API + * + *

Easiest way to run this: mvn exec:java + * -Dexec.mainClass="io.kubernetes.client.examples.Example" + * + *

From inside $REPO_DIR/examples + */ +public class Example { + public static void main(String[] args) throws IOException, ApiException { + ApiClient client = Config.defaultClient(); + Configuration.setDefaultApiClient(client); + + CoreV1Api api = new CoreV1Api(); + V1PodList list = api.listPodForAllNamespaces() + .execute(); + for (V1Pod item : list.getItems()) { + System.out.println(item.getMetadata().getName()); + } + } +} \ No newline at end of file