@@ -204,6 +204,8 @@ class ItParameterizedDomain {
204
204
private static String miiDomainNegativeNamespace = null ;
205
205
private static String miiImage = null ;
206
206
private static String encryptionSecretName = "encryptionsecret" ;
207
+ private static Map <String , Quantity > resourceRequest = new HashMap <>();
208
+ private static Map <String , Quantity > resourceLimit = new HashMap <>();
207
209
208
210
private String curlCmd = null ;
209
211
@@ -264,6 +266,11 @@ public static void initAll(@Namespaces(6) List<String> namespaces) {
264
266
nodeportshttp = getServiceNodePort (nginxNamespace , nginxServiceName , "http" );
265
267
logger .info ("NGINX http node port: {0}" , nodeportshttp );
266
268
269
+ // set resource request and limit
270
+ resourceRequest .put ("cpu" , new Quantity ("250m" ));
271
+ resourceRequest .put ("memory" , new Quantity ("768Mi" ));
272
+ resourceLimit .put ("cpu" , new Quantity ("2" ));
273
+ resourceLimit .put ("memory" , new Quantity ("2Gi" ));
267
274
268
275
// create model in image domain with multiple clusters
269
276
miiDomain = createMiiDomainWithMultiClusters (miiDomainUid , miiDomainNamespace );
@@ -926,7 +933,10 @@ private static Domain createMiiDomainWithMultiClusters(String domainUid, String
926
933
.value ("-Dweblogic.StdoutDebugEnabled=false" ))
927
934
.addEnvItem (new V1EnvVar ()
928
935
.name ("USER_MEM_ARGS" )
929
- .value ("-Djava.security.egd=file:/dev/./urandom " )))
936
+ .value ("-Djava.security.egd=file:/dev/./urandom " ))
937
+ .resources (new V1ResourceRequirements ()
938
+ .requests (resourceRequest )
939
+ .limits (resourceLimit )))
930
940
.adminServer (new AdminServer ()
931
941
.serverStartState ("RUNNING" )
932
942
.adminService (new AdminService ()
@@ -1089,7 +1099,10 @@ private static Domain createDomainOnPvUsingWdt(String domainNamespace) {
1089
1099
.claimName (pvcName )))
1090
1100
.addVolumeMountsItem (new V1VolumeMount ()
1091
1101
.mountPath ("/u01/shared" )
1092
- .name (pvName )))
1102
+ .name (pvName ))
1103
+ .resources (new V1ResourceRequirements ()
1104
+ .limits (resourceLimit )
1105
+ .requests (resourceRequest )))
1093
1106
.adminServer (new AdminServer ()
1094
1107
.serverStartState ("RUNNING" )
1095
1108
.adminService (new AdminService ()
@@ -1427,8 +1440,8 @@ private static Domain createAndVerifyDomainInImageUsingWdt(String domainNamespac
1427
1440
.name ("USER_MEM_ARGS" )
1428
1441
.value ("-Djava.security.egd=file:/dev/./urandom " ))
1429
1442
.resources (new V1ResourceRequirements ()
1430
- .limits (new HashMap <>() )
1431
- .requests (new HashMap <>() )))
1443
+ .limits (resourceLimit )
1444
+ .requests (resourceRequest )))
1432
1445
.adminServer (new AdminServer ()
1433
1446
.serverStartState ("RUNNING" )
1434
1447
.adminService (new AdminService ()
0 commit comments