Skip to content

Commit 29d573c

Browse files
committed
reworked watch and certs
1 parent add2e7f commit 29d573c

File tree

11 files changed

+782
-121
lines changed

11 files changed

+782
-121
lines changed

.factorypath

Lines changed: 43 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,54 @@
11
<factorypath>
2-
<factorypathentry kind="VARJAR" id="M2_REPO/joda-time/joda-time/2.10.5/joda-time-2.10.5.jar" enabled="true" runInBatchMode="false"/>
3-
<factorypathentry kind="VARJAR" id="M2_REPO/org/bouncycastle/bcprov-jdk15on/1.64/bcprov-jdk15on-1.64.jar" enabled="true" runInBatchMode="false"/>
4-
<factorypathentry kind="VARJAR" id="M2_REPO/org/bouncycastle/bcprov-ext-jdk15on/1.64/bcprov-ext-jdk15on-1.64.jar" enabled="true" runInBatchMode="false"/>
5-
<factorypathentry kind="VARJAR" id="M2_REPO/org/bouncycastle/bcpkix-jdk15on/1.64/bcpkix-jdk15on-1.64.jar" enabled="true" runInBatchMode="false"/>
6-
<factorypathentry kind="VARJAR" id="M2_REPO/commons-codec/commons-codec/1.14/commons-codec-1.14.jar" enabled="true" runInBatchMode="false"/>
2+
<factorypathentry kind="VARJAR" id="M2_REPO/joda-time/joda-time/2.10.6/joda-time-2.10.6.jar" enabled="true" runInBatchMode="false"/>
3+
<factorypathentry kind="VARJAR" id="M2_REPO/org/bouncycastle/bcprov-jdk15on/1.66/bcprov-jdk15on-1.66.jar" enabled="true" runInBatchMode="false"/>
4+
<factorypathentry kind="VARJAR" id="M2_REPO/org/bouncycastle/bcprov-ext-jdk15on/1.66/bcprov-ext-jdk15on-1.66.jar" enabled="true" runInBatchMode="false"/>
5+
<factorypathentry kind="VARJAR" id="M2_REPO/org/bouncycastle/bcpkix-jdk15on/1.66/bcpkix-jdk15on-1.66.jar" enabled="true" runInBatchMode="false"/>
6+
<factorypathentry kind="VARJAR" id="M2_REPO/commons-codec/commons-codec/1.15/commons-codec-1.15.jar" enabled="true" runInBatchMode="false"/>
77
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/httpcomponents/httpclient/4.5.12/httpclient-4.5.12.jar" enabled="true" runInBatchMode="false"/>
88
<factorypathentry kind="VARJAR" id="M2_REPO/commons-logging/commons-logging/1.2/commons-logging-1.2.jar" enabled="true" runInBatchMode="false"/>
99
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/httpcomponents/httpcore/4.4.13/httpcore-4.4.13.jar" enabled="true" runInBatchMode="false"/>
1010
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/httpcomponents/httpmime/4.5.12/httpmime-4.5.12.jar" enabled="true" runInBatchMode="false"/>
11-
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-databind/2.10.3/jackson-databind-2.10.3.jar" enabled="true" runInBatchMode="false"/>
12-
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-annotations/2.10.3/jackson-annotations-2.10.3.jar" enabled="true" runInBatchMode="false"/>
13-
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-core/2.10.3/jackson-core-2.10.3.jar" enabled="true" runInBatchMode="false"/>
14-
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/dataformat/jackson-dataformat-yaml/2.10.3/jackson-dataformat-yaml-2.10.3.jar" enabled="true" runInBatchMode="false"/>
15-
<factorypathentry kind="VARJAR" id="M2_REPO/org/yaml/snakeyaml/1.24/snakeyaml-1.24.jar" enabled="true" runInBatchMode="false"/>
11+
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-databind/2.11.2/jackson-databind-2.11.2.jar" enabled="true" runInBatchMode="false"/>
12+
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-annotations/2.11.2/jackson-annotations-2.11.2.jar" enabled="true" runInBatchMode="false"/>
13+
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/core/jackson-core/2.11.2/jackson-core-2.11.2.jar" enabled="true" runInBatchMode="false"/>
14+
<factorypathentry kind="VARJAR" id="M2_REPO/com/fasterxml/jackson/dataformat/jackson-dataformat-yaml/2.11.2/jackson-dataformat-yaml-2.11.2.jar" enabled="true" runInBatchMode="false"/>
15+
<factorypathentry kind="VARJAR" id="M2_REPO/org/yaml/snakeyaml/1.26/snakeyaml-1.26.jar" enabled="true" runInBatchMode="false"/>
1616
<factorypathentry kind="VARJAR" id="M2_REPO/commons-cli/commons-cli/1.4/commons-cli-1.4.jar" enabled="true" runInBatchMode="false"/>
17-
<factorypathentry kind="VARJAR" id="M2_REPO/org/mariadb/jdbc/mariadb-java-client/2.5.4/mariadb-java-client-2.5.4.jar" enabled="true" runInBatchMode="false"/>
18-
<factorypathentry kind="VARJAR" id="M2_REPO/mysql/mysql-connector-java/8.0.19/mysql-connector-java-8.0.19.jar" enabled="true" runInBatchMode="false"/>
19-
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/protobuf/protobuf-java/3.6.1/protobuf-java-3.6.1.jar" enabled="true" runInBatchMode="false"/>
20-
<factorypathentry kind="VARJAR" id="M2_REPO/com/microsoft/sqlserver/mssql-jdbc/8.2.1.jre8/mssql-jdbc-8.2.1.jre8.jar" enabled="true" runInBatchMode="false"/>
21-
<factorypathentry kind="VARJAR" id="M2_REPO/commons-io/commons-io/2.6/commons-io-2.6.jar" enabled="true" runInBatchMode="false"/>
17+
<factorypathentry kind="VARJAR" id="M2_REPO/org/mariadb/jdbc/mariadb-java-client/2.7.0/mariadb-java-client-2.7.0.jar" enabled="true" runInBatchMode="false"/>
18+
<factorypathentry kind="VARJAR" id="M2_REPO/mysql/mysql-connector-java/8.0.21/mysql-connector-java-8.0.21.jar" enabled="true" runInBatchMode="false"/>
19+
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/protobuf/protobuf-java/3.11.4/protobuf-java-3.11.4.jar" enabled="true" runInBatchMode="false"/>
20+
<factorypathentry kind="VARJAR" id="M2_REPO/com/microsoft/sqlserver/mssql-jdbc/8.4.1.jre8/mssql-jdbc-8.4.1.jre8.jar" enabled="true" runInBatchMode="false"/>
21+
<factorypathentry kind="VARJAR" id="M2_REPO/commons-io/commons-io/2.8.0/commons-io-2.8.0.jar" enabled="true" runInBatchMode="false"/>
2222
<factorypathentry kind="VARJAR" id="M2_REPO/com/googlecode/json-simple/json-simple/1.1.1/json-simple-1.1.1.jar" enabled="true" runInBatchMode="false"/>
23-
<factorypathentry kind="VARJAR" id="M2_REPO/org/postgresql/postgresql/42.2.11/postgresql-42.2.11.jar" enabled="true" runInBatchMode="false"/>
24-
<factorypathentry kind="VARJAR" id="M2_REPO/io/kubernetes/client-java/8.0.0/client-java-8.0.0.jar" enabled="true" runInBatchMode="false"/>
25-
<factorypathentry kind="VARJAR" id="M2_REPO/io/kubernetes/client-java-api/8.0.0/client-java-api-8.0.0.jar" enabled="true" runInBatchMode="false"/>
26-
<factorypathentry kind="VARJAR" id="M2_REPO/io/sundr/builder-annotations/0.21.0/builder-annotations-0.21.0.jar" enabled="true" runInBatchMode="false"/>
27-
<factorypathentry kind="VARJAR" id="M2_REPO/io/sundr/sundr-core/0.21.0/sundr-core-0.21.0.jar" enabled="true" runInBatchMode="false"/>
28-
<factorypathentry kind="VARJAR" id="M2_REPO/io/sundr/sundr-codegen/0.21.0/sundr-codegen-0.21.0.jar" enabled="true" runInBatchMode="false"/>
29-
<factorypathentry kind="VARJAR" id="M2_REPO/io/sundr/resourcecify-annotations/0.21.0/resourcecify-annotations-0.21.0.jar" enabled="true" runInBatchMode="false"/>
23+
<factorypathentry kind="VARJAR" id="M2_REPO/org/postgresql/postgresql/42.2.16.jre7/postgresql-42.2.16.jre7.jar" enabled="true" runInBatchMode="false"/>
24+
<factorypathentry kind="VARJAR" id="M2_REPO/io/kubernetes/client-java/10.0.0/client-java-10.0.0.jar" enabled="true" runInBatchMode="false"/>
25+
<factorypathentry kind="VARJAR" id="M2_REPO/io/prometheus/simpleclient/0.9.0/simpleclient-0.9.0.jar" enabled="true" runInBatchMode="false"/>
26+
<factorypathentry kind="VARJAR" id="M2_REPO/io/prometheus/simpleclient_httpserver/0.9.0/simpleclient_httpserver-0.9.0.jar" enabled="true" runInBatchMode="false"/>
27+
<factorypathentry kind="VARJAR" id="M2_REPO/io/prometheus/simpleclient_common/0.9.0/simpleclient_common-0.9.0.jar" enabled="true" runInBatchMode="false"/>
28+
<factorypathentry kind="VARJAR" id="M2_REPO/io/kubernetes/client-java-api/10.0.0/client-java-api-10.0.0.jar" enabled="true" runInBatchMode="false"/>
29+
<factorypathentry kind="VARJAR" id="M2_REPO/io/sundr/builder-annotations/0.22.0/builder-annotations-0.22.0.jar" enabled="true" runInBatchMode="false"/>
30+
<factorypathentry kind="VARJAR" id="M2_REPO/io/sundr/sundr-core/0.22.0/sundr-core-0.22.0.jar" enabled="true" runInBatchMode="false"/>
31+
<factorypathentry kind="VARJAR" id="M2_REPO/io/sundr/sundr-codegen/0.22.0/sundr-codegen-0.22.0.jar" enabled="true" runInBatchMode="false"/>
32+
<factorypathentry kind="VARJAR" id="M2_REPO/io/sundr/resourcecify-annotations/0.22.0/resourcecify-annotations-0.22.0.jar" enabled="true" runInBatchMode="false"/>
3033
<factorypathentry kind="VARJAR" id="M2_REPO/javax/annotation/javax.annotation-api/1.3.2/javax.annotation-api-1.3.2.jar" enabled="true" runInBatchMode="false"/>
31-
<factorypathentry kind="VARJAR" id="M2_REPO/io/swagger/swagger-annotations/1.5.22/swagger-annotations-1.5.22.jar" enabled="true" runInBatchMode="false"/>
32-
<factorypathentry kind="VARJAR" id="M2_REPO/com/squareup/okhttp3/okhttp/3.14.3/okhttp-3.14.3.jar" enabled="true" runInBatchMode="false"/>
34+
<factorypathentry kind="VARJAR" id="M2_REPO/io/swagger/swagger-annotations/1.6.2/swagger-annotations-1.6.2.jar" enabled="true" runInBatchMode="false"/>
35+
<factorypathentry kind="VARJAR" id="M2_REPO/com/squareup/okhttp3/okhttp/3.14.9/okhttp-3.14.9.jar" enabled="true" runInBatchMode="false"/>
3336
<factorypathentry kind="VARJAR" id="M2_REPO/com/squareup/okio/okio/1.17.2/okio-1.17.2.jar" enabled="true" runInBatchMode="false"/>
34-
<factorypathentry kind="VARJAR" id="M2_REPO/com/squareup/okhttp3/logging-interceptor/3.14.3/logging-interceptor-3.14.3.jar" enabled="true" runInBatchMode="false"/>
35-
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/code/gson/gson/2.8.0/gson-2.8.0.jar" enabled="true" runInBatchMode="false"/>
36-
<factorypathentry kind="VARJAR" id="M2_REPO/io/gsonfire/gson-fire/1.8.3/gson-fire-1.8.3.jar" enabled="true" runInBatchMode="false"/>
37-
<factorypathentry kind="VARJAR" id="M2_REPO/org/joda/joda-convert/1.2/joda-convert-1.2.jar" enabled="true" runInBatchMode="false"/>
37+
<factorypathentry kind="VARJAR" id="M2_REPO/com/squareup/okhttp3/logging-interceptor/3.14.9/logging-interceptor-3.14.9.jar" enabled="true" runInBatchMode="false"/>
38+
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/code/gson/gson/2.8.6/gson-2.8.6.jar" enabled="true" runInBatchMode="false"/>
39+
<factorypathentry kind="VARJAR" id="M2_REPO/io/gsonfire/gson-fire/1.8.4/gson-fire-1.8.4.jar" enabled="true" runInBatchMode="false"/>
40+
<factorypathentry kind="VARJAR" id="M2_REPO/org/joda/joda-convert/2.2.1/joda-convert-2.2.1.jar" enabled="true" runInBatchMode="false"/>
3841
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar" enabled="true" runInBatchMode="false"/>
39-
<factorypathentry kind="VARJAR" id="M2_REPO/io/kubernetes/client-java-proto/8.0.0/client-java-proto-8.0.0.jar" enabled="true" runInBatchMode="false"/>
40-
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-compress/1.19/commons-compress-1.19.jar" enabled="true" runInBatchMode="false"/>
41-
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-lang3/3.7/commons-lang3-3.7.jar" enabled="true" runInBatchMode="false"/>
42-
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/guava/guava/25.1-jre/guava-25.1-jre.jar" enabled="true" runInBatchMode="false"/>
43-
<factorypathentry kind="VARJAR" id="M2_REPO/org/checkerframework/checker-qual/2.0.0/checker-qual-2.0.0.jar" enabled="true" runInBatchMode="false"/>
44-
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/errorprone/error_prone_annotations/2.1.3/error_prone_annotations-2.1.3.jar" enabled="true" runInBatchMode="false"/>
45-
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1.jar" enabled="true" runInBatchMode="false"/>
46-
<factorypathentry kind="VARJAR" id="M2_REPO/org/codehaus/mojo/animal-sniffer-annotations/1.14/animal-sniffer-annotations-1.14.jar" enabled="true" runInBatchMode="false"/>
47-
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar" enabled="true" runInBatchMode="false"/>
48-
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-collections4/4.1/commons-collections4-4.1.jar" enabled="true" runInBatchMode="false"/>
49-
<factorypathentry kind="VARJAR" id="M2_REPO/org/bitbucket/b_c/jose4j/0.7.0/jose4j-0.7.0.jar" enabled="true" runInBatchMode="false"/>
42+
<factorypathentry kind="VARJAR" id="M2_REPO/io/kubernetes/client-java-proto/10.0.0/client-java-proto-10.0.0.jar" enabled="true" runInBatchMode="false"/>
43+
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-compress/1.20/commons-compress-1.20.jar" enabled="true" runInBatchMode="false"/>
44+
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-lang3/3.11/commons-lang3-3.11.jar" enabled="true" runInBatchMode="false"/>
45+
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/guava/guava/29.0-jre/guava-29.0-jre.jar" enabled="true" runInBatchMode="false"/>
46+
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar" enabled="true" runInBatchMode="false"/>
47+
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar" enabled="true" runInBatchMode="false"/>
48+
<factorypathentry kind="VARJAR" id="M2_REPO/org/checkerframework/checker-qual/2.11.1/checker-qual-2.11.1.jar" enabled="true" runInBatchMode="false"/>
49+
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/errorprone/error_prone_annotations/2.3.4/error_prone_annotations-2.3.4.jar" enabled="true" runInBatchMode="false"/>
50+
<factorypathentry kind="VARJAR" id="M2_REPO/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar" enabled="true" runInBatchMode="false"/>
51+
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/slf4j-api/1.7.30/slf4j-api-1.7.30.jar" enabled="true" runInBatchMode="false"/>
52+
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/commons/commons-collections4/4.4/commons-collections4-4.4.jar" enabled="true" runInBatchMode="false"/>
53+
<factorypathentry kind="VARJAR" id="M2_REPO/org/bitbucket/b_c/jose4j/0.7.2/jose4j-0.7.2.jar" enabled="true" runInBatchMode="false"/>
5054
</factorypath>

pom.xml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<modelVersion>4.0.0</modelVersion>
1111
<groupId>com.tremolosecurity.kubernetes</groupId>
1212
<artifactId>javascript-operator</artifactId>
13-
<version>1.0.0</version>
13+
<version>1.1.0</version>
1414
<name>javascript-operator</name>
1515
<packaging>jar</packaging>
1616

@@ -19,24 +19,24 @@
1919
<commons-collections.version>3.2.2</commons-collections.version>
2020
<commons-cli.version>1.4</commons-cli.version>
2121
<xerces.version>2.12.0</xerces.version>
22-
<bcprov-jdk15on.version>1.64</bcprov-jdk15on.version>
23-
<bcprov-ext-jdk15on.version>1.64</bcprov-ext-jdk15on.version>
22+
<bcprov-jdk15on.version>1.66</bcprov-jdk15on.version>
23+
<bcprov-ext-jdk15on.version>1.66</bcprov-ext-jdk15on.version>
2424
<log4j.version>2.11.0</log4j.version>
2525
<bcpkix-jdk15on.version>1.64</bcpkix-jdk15on.version>
2626
<xmlsec.version>2.0.5</xmlsec.version>
27-
<joda-time.version>2.10.5</joda-time.version>
28-
<commons-codec.version>1.14</commons-codec.version>
27+
<joda-time.version>2.10.6</joda-time.version>
28+
<commons-codec.version>1.15</commons-codec.version>
2929
<httpclient.version>4.5.12</httpclient.version>
3030
<httpcore.version>4.4.13</httpcore.version>
3131
<httpmime.version>4.5.12</httpmime.version>
32-
<jackson.version>2.10.3</jackson.version>
32+
<jackson.version>2.11.2</jackson.version>
3333
<commons-cli.version>1.4</commons-cli.version>
34-
<mariadb.version>2.5.4</mariadb.version>
35-
<mysql.version>8.0.19</mysql.version>
36-
<mssql.version>8.2.1.jre8</mssql.version>
37-
<commonsio.version>2.6</commonsio.version>
38-
<postgres.version>42.2.11</postgres.version>
39-
<k8sapi.version>8.0.0</k8sapi.version>
34+
<mariadb.version>2.7.0</mariadb.version>
35+
<mysql.version>8.0.21</mysql.version>
36+
<mssql.version>8.4.1.jre8</mssql.version>
37+
<commonsio.version>2.8.0</commonsio.version>
38+
<postgres.version>42.2.16.jre7</postgres.version>
39+
<k8sapi.version>10.0.0</k8sapi.version>
4040
</properties>
4141

4242
<repositories>

src/main/docker/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:18.04
1+
FROM ubuntu:20.04
22

33
MAINTAINER Tremolo Security, Inc. - Docker <[email protected]>
44

@@ -20,4 +20,4 @@ RUN apt-get update;apt-get -y install openjdk-8-jdk-headless curl apt-transport-
2020

2121
USER 431
2222

23-
CMD ["/usr/bin/java", "-jar", "/usr/local/artifactdeploy/artifact-deploy.jar"]
23+
CMD ["/usr/bin/java", "-jar", "/usr/local/artifactdeploy/artifact-deploy.jar"]

src/main/java/com/tremolosecurity/kubernetes/artifacts/run/Controller.java

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import java.util.HashMap;
2929
import java.util.List;
3030
import java.util.Map;
31+
import java.util.StringTokenizer;
3132
import java.util.stream.Collectors;
3233

3334
import javax.script.ScriptContext;
@@ -105,6 +106,14 @@ public void run() {
105106
jsPath = loadOption(cmd, "jsPath", options);
106107

107108
String apiGroup = loadOption(cmd, "apiGroup", options);
109+
110+
StringTokenizer toker = new StringTokenizer(apiGroup,",",false);
111+
List<String> apiGroups = new ArrayList<String>();
112+
113+
while (toker.hasMoreTokens()) {
114+
apiGroups.add(toker.nextToken());
115+
}
116+
108117

109118

110119

@@ -134,7 +143,7 @@ public void run() {
134143
k8s.setEngine(null);
135144

136145

137-
runWatch(apiGroup, namespace, objectType, k8s);
146+
runWatch(apiGroups, namespace, objectType, k8s);
138147
while (stillWatching) {
139148
Thread.sleep(1000);
140149
}
@@ -166,16 +175,26 @@ public static ScriptEngine initializeJS(String jsPath, String namespace, K8sUtil
166175
return engine;
167176
}
168177

169-
private static void runWatch(String apiGroup, String namespace, String objectType, K8sUtils k8s)
178+
private static void runWatch(List<String> apiGroups, String namespace, String objectType, K8sUtils k8s)
170179
throws Exception, ParseException {
171-
String uri = "/apis/" + apiGroup + "/namespaces/" + namespace + "/" + objectType;
172-
173-
uri = findResourceVersion(k8s, uri);
180+
181+
for (String apiGroup : apiGroups) {
182+
String uri = "/apis/" + apiGroup + "/namespaces/" + namespace + "/" + objectType;
183+
RunWatch runWatch = new RunWatch(k8s,uri,"on_watch");
184+
if (runWatch.isRightVersion()) {
185+
System.out.println("Using version '" + apiGroup + "'");
186+
watches.add(runWatch);
187+
new Thread(runWatch).start();
188+
break;
189+
} else {
190+
System.out.println("Unknown version '" + apiGroup + "'");
191+
}
192+
}
193+
//uri = findResourceVersion(k8s, uri);
174194
//k8s.watchURI(uri,"on_watch");
175195

176-
RunWatch runWatch = new RunWatch(k8s,uri,"on_watch");
177-
watches.add(runWatch);
178-
new Thread(runWatch).start();
196+
197+
179198
}
180199

181200
public static String findResourceVersion(K8sUtils k8s, String uri) throws Exception, ParseException {
@@ -187,7 +206,7 @@ public static String findResourceVersion(K8sUtils k8s, String uri) throws Except
187206
System.out.println(resourceVersion);
188207

189208
//uri = uri + "?watch=true&resourceVersion=" + resourceVersion + "&fieldSelector=metadata.name=" + objectName;
190-
uri = uri + "?watch=true&resourceVersion=" + resourceVersion;
209+
uri = uri + "?watch=true&resourceVersion=" + resourceVersion + "&timeoutSeconds=30";
191210
return uri;
192211
}
193212

0 commit comments

Comments
 (0)