24
24
import oracle .weblogic .domain .DomainSpec ;
25
25
import oracle .weblogic .domain .ManagedServer ;
26
26
import oracle .weblogic .domain .Model ;
27
+ import oracle .weblogic .domain .ProbeTuning ;
27
28
import oracle .weblogic .domain .ServerPod ;
28
29
import oracle .weblogic .kubernetes .actions .impl .primitive .Command ;
29
30
import oracle .weblogic .kubernetes .actions .impl .primitive .CommandParams ;
@@ -218,7 +219,7 @@ public static void createDomainResource(
218
219
String encryptionSecretName ,
219
220
String configmapName ) {
220
221
List <String > securityList = new ArrayList <>();
221
-
222
+
222
223
// create the domain CR
223
224
DomainResource domain = new DomainResource ()
224
225
.apiVersion (DOMAIN_API_VERSION )
@@ -240,10 +241,21 @@ public static void createDomainResource(
240
241
.serverPod (new ServerPod ()
241
242
.addEnvItem (new V1EnvVar ()
242
243
.name ("JAVA_OPTIONS" )
243
- .value ("-Dweblogic.StdoutDebugEnabled=false " ))
244
+ .value ("-Dweblogic.security.SSL.ignoreHostnameVerification=true -Xms1024m -Xmx1024m " ))
244
245
.addEnvItem (new V1EnvVar ()
245
246
.name ("USER_MEM_ARGS" )
246
- .value ("-Djava.security.egd=file:/dev/./urandom " )))
247
+ .value ("-Djava.security.egd=file:/dev/./urandom " ))
248
+ .addEnvItem (new V1EnvVar ()
249
+ .name ("MEM_ARGS" )
250
+ .value ("-Xms1024m -Xmx1024m" ))
251
+ .livenessProbe (new ProbeTuning ()
252
+ .initialDelaySeconds (300 )
253
+ .periodSeconds (30 )
254
+ .failureThreshold (3 ))
255
+ .readinessProbe (new ProbeTuning ()
256
+ .initialDelaySeconds (300 )
257
+ .periodSeconds (30 )
258
+ .failureThreshold (3 )))
247
259
.adminServer (new AdminServer ()
248
260
.adminService (new AdminService ()
249
261
.addChannelsItem (new Channel ()
@@ -286,6 +298,21 @@ public static void createDomainResource(
286
298
+ "for %s in namespace %s" , domainUid , domNamespace ));
287
299
}
288
300
301
+ /**
302
+ * Verify the server MBEAN configuration through rest API.
303
+ * @param managedServer name of the managed server
304
+ * @param domainNamespace domain namespace
305
+ * @param adminServerPodName name of the admin server
306
+ * @return true if MBEAN is found otherwise false
307
+ **/
308
+ public static Callable <Boolean > isManagedServerConfiguration (String managedServer ,
309
+ String domainNamespace ,
310
+ String adminServerPodName ) {
311
+ return () -> {
312
+ return checkManagedServerConfiguration (managedServer , domainNamespace , adminServerPodName );
313
+ };
314
+ }
315
+
289
316
/**
290
317
* Verify the server MBEAN configuration through rest API.
291
318
* @param managedServer name of the managed server
@@ -297,7 +324,7 @@ public static boolean checkManagedServerConfiguration(String managedServer,
297
324
StringBuffer checkCluster = new StringBuffer (KUBERNETES_CLI + " exec -n "
298
325
+ domainNamespace + " " + adminServerPodName )
299
326
.append (" -- /bin/bash -c \" " )
300
- .append ("curl --user " )
327
+ .append ("curl --connect-timeout 10 --max-time 20 -- user " )
301
328
.append (ADMIN_USERNAME_DEFAULT + ":" + ADMIN_PASSWORD_DEFAULT )
302
329
.append (" http://" + adminServerPodName + ":7001" )
303
330
.append ("/management/tenant-monitoring/servers/" )
0 commit comments