File tree Expand file tree Collapse file tree 5 files changed +18
-16
lines changed
main/java/io/javaoperatorsdk/operator/sample
test/java/io/javaoperatorsdk/operator/sample Expand file tree Collapse file tree 5 files changed +18
-16
lines changed Original file line number Diff line number Diff line change 7
7
<parent >
8
8
<groupId >io.javaoperatorsdk</groupId >
9
9
<artifactId >java-operator-sdk</artifactId >
10
- <version >1.9.11-SNAPSHOT</version >
11
- <relativePath >../pom.xml</relativePath >
10
+ <version >1.9.12-SNAPSHOT</version >
12
11
</parent >
13
12
14
13
<artifactId >sample-operators</artifactId >
Original file line number Diff line number Diff line change 7
7
<parent >
8
8
<groupId >io.javaoperatorsdk</groupId >
9
9
<artifactId >sample-operators</artifactId >
10
- <version >1.9.11-SNAPSHOT</version >
11
- <relativePath >../pom.xml</relativePath >
10
+ <version >1.9.12-SNAPSHOT</version >
12
11
</parent >
13
12
14
13
<artifactId >sample-tomcat-operator</artifactId >
Original file line number Diff line number Diff line change 1
1
package io .javaoperatorsdk .operator .sample ;
2
2
3
+ import org .apache .commons .lang3 .builder .ToStringBuilder ;
4
+ import org .apache .commons .lang3 .builder .ToStringStyle ;
5
+
3
6
import io .fabric8 .kubernetes .api .model .Namespaced ;
4
7
import io .fabric8 .kubernetes .client .CustomResource ;
5
8
import io .fabric8 .kubernetes .model .annotation .Group ;
6
9
import io .fabric8 .kubernetes .model .annotation .Version ;
7
- import org .apache .commons .lang3 .builder .ToStringBuilder ;
8
- import org .apache .commons .lang3 .builder .ToStringStyle ;
9
10
10
11
@ Group ("tomcatoperator.io" )
11
12
@ Version ("v1" )
12
13
public class Tomcat extends CustomResource <TomcatSpec , TomcatStatus > implements Namespaced {
13
14
14
- public String toString () {
15
- return ToStringBuilder .reflectionToString (this , ToStringStyle .JSON_STYLE );
16
- }
15
+ public String toString () {
16
+ return ToStringBuilder .reflectionToString (this , ToStringStyle .JSON_STYLE );
17
+ }
17
18
}
Original file line number Diff line number Diff line change 1
1
package io .javaoperatorsdk .operator .sample ;
2
2
3
+ import org .apache .commons .lang3 .builder .ToStringBuilder ;
4
+ import org .apache .commons .lang3 .builder .ToStringStyle ;
5
+
3
6
import io .fabric8 .kubernetes .api .model .Namespaced ;
4
7
import io .fabric8 .kubernetes .client .CustomResource ;
5
8
import io .fabric8 .kubernetes .model .annotation .Group ;
6
9
import io .fabric8 .kubernetes .model .annotation .Version ;
7
- import org .apache .commons .lang3 .builder .ToStringBuilder ;
8
- import org .apache .commons .lang3 .builder .ToStringStyle ;
9
10
10
11
/**
11
12
* Represents a web application deployed in a Tomcat deployment
14
15
@ Version ("v1" )
15
16
public class Webapp extends CustomResource <WebappSpec , WebappStatus > implements Namespaced {
16
17
17
- public String toString () {
18
- return ToStringBuilder .reflectionToString (this , ToStringStyle .JSON_STYLE );
19
- }
18
+ public String toString () {
19
+ return ToStringBuilder .reflectionToString (this , ToStringStyle .JSON_STYLE );
20
+ }
20
21
}
Original file line number Diff line number Diff line change @@ -66,7 +66,8 @@ public void test() {
66
66
if (testNs != null ) {
67
67
// We perform a pre-run cleanup instead of a post-run cleanup. This is to help with debugging
68
68
// test results when running against a persistent cluster. The test namespace would stay
69
- // after the test run so we can check what's there, but it would be cleaned up during the next test run.
69
+ // after the test run so we can check what's there, but it would be cleaned up during the next
70
+ // test run.
70
71
log .info ("Cleanup: deleting test namespace {}" , TEST_NS );
71
72
client .namespaces ().delete (testNs );
72
73
await ().atMost (5 , MINUTES )
@@ -112,7 +113,8 @@ public void test() {
112
113
log .info ("Waiting for curl Pod to finish running" );
113
114
await ("wait-for-curl-pod-run" ).atMost (2 , MINUTES )
114
115
.until (() -> {
115
- String phase = client .pods ().inNamespace (TEST_NS ).withName ("curl" ).get ().getStatus ().getPhase ();
116
+ String phase =
117
+ client .pods ().inNamespace (TEST_NS ).withName ("curl" ).get ().getStatus ().getPhase ();
116
118
return phase .equals ("Succeeded" ) || phase .equals ("Failed" );
117
119
});
118
120
You can’t perform that action at this time.
0 commit comments