2424import oracle .weblogic .domain .DomainSpec ;
2525import oracle .weblogic .domain .ManagedServer ;
2626import oracle .weblogic .domain .Model ;
27+ import oracle .weblogic .domain .ProbeTuning ;
2728import oracle .weblogic .domain .ServerPod ;
2829import oracle .weblogic .kubernetes .actions .impl .primitive .Command ;
2930import oracle .weblogic .kubernetes .actions .impl .primitive .CommandParams ;
@@ -218,7 +219,7 @@ public static void createDomainResource(
218219 String encryptionSecretName ,
219220 String configmapName ) {
220221 List <String > securityList = new ArrayList <>();
221-
222+
222223 // create the domain CR
223224 DomainResource domain = new DomainResource ()
224225 .apiVersion (DOMAIN_API_VERSION )
@@ -240,10 +241,21 @@ public static void createDomainResource(
240241 .serverPod (new ServerPod ()
241242 .addEnvItem (new V1EnvVar ()
242243 .name ("JAVA_OPTIONS" )
243- .value ("-Dweblogic.StdoutDebugEnabled=false " ))
244+ .value ("-Dweblogic.security.SSL.ignoreHostnameVerification=true -Xms1024m -Xmx1024m " ))
244245 .addEnvItem (new V1EnvVar ()
245246 .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 )))
247259 .adminServer (new AdminServer ()
248260 .adminService (new AdminService ()
249261 .addChannelsItem (new Channel ()
@@ -286,6 +298,21 @@ public static void createDomainResource(
286298 + "for %s in namespace %s" , domainUid , domNamespace ));
287299 }
288300
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+
289316 /**
290317 * Verify the server MBEAN configuration through rest API.
291318 * @param managedServer name of the managed server
@@ -297,7 +324,7 @@ public static boolean checkManagedServerConfiguration(String managedServer,
297324 StringBuffer checkCluster = new StringBuffer (KUBERNETES_CLI + " exec -n "
298325 + domainNamespace + " " + adminServerPodName )
299326 .append (" -- /bin/bash -c \" " )
300- .append ("curl --user " )
327+ .append ("curl --connect-timeout 10 --max-time 20 -- user " )
301328 .append (ADMIN_USERNAME_DEFAULT + ":" + ADMIN_PASSWORD_DEFAULT )
302329 .append (" http://" + adminServerPodName + ":7001" )
303330 .append ("/management/tenant-monitoring/servers/" )
0 commit comments