Skip to content

Commit 4053478

Browse files
committed
Merge remote-tracking branch 'origin/main' into owls_91862
2 parents 20b82c2 + eff284d commit 4053478

File tree

109 files changed

+1998
-2600
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+1998
-2600
lines changed

documentation/domains/Domain.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
"description": "Customization affecting the generation of Pods for WebLogic Server instances.",
2222
"$ref": "#/definitions/ServerPod"
2323
},
24+
"adminChannelPortForwardingEnabled": {
25+
"description": "When this flag is enabled, the operator updates the domain\u0027s WebLogic configuration for its Administration Server to have an admin protocol NetworkAccessPoint with a \u0027localhost\u0027 address for each existing admin protocol capable port. This allows external Administration Console and WLST \u0027T3\u0027 access when using the \u0027kubectl port-forward\u0027 pattern. Defaults to true.",
26+
"type": "boolean"
27+
},
2428
"serverStartPolicy": {
2529
"description": "The strategy for deciding whether to start a WebLogic Server instance. Legal values are ALWAYS, NEVER, or IF_NEEDED. Defaults to IF_NEEDED. More info: https://oracle.github.io/weblogic-kubernetes-operator/userguide/managing-domains/domain-lifecycle/startup/#starting-and-stopping-servers.",
2630
"type": "string",

documentation/domains/Domain.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ The current status of the operation of the WebLogic domain. Updated automaticall
6666

6767
| Name | Type | Description |
6868
| --- | --- | --- |
69+
| `adminChannelPortForwardingEnabled` | Boolean | When this flag is enabled, the operator updates the domain's WebLogic configuration for its Administration Server to have an admin protocol NetworkAccessPoint with a 'localhost' address for each existing admin protocol capable port. This allows external Administration Console and WLST 'T3' access when using the 'kubectl port-forward' pattern. Defaults to true. |
6970
| `adminService` | [Admin Service](#admin-service) | Customization affecting the generation of a NodePort Service for the Administration Server used to expose specific channels or network access points outside the Kubernetes cluster. See also `domains.spec.adminServer.serverService` for configuration affecting the generation of the ClusterIP Service. |
7071
| `restartVersion` | string | Changes to this field cause the operator to restart WebLogic Server instances. More info: https://oracle.github.io/weblogic-kubernetes-operator/userguide/managing-domains/domain-lifecycle/startup/#restarting-servers. |
7172
| `serverPod` | [Server Pod](#server-pod) | Customization affecting the generation of Pods for WebLogic Server instances. |

documentation/domains/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -942,6 +942,10 @@
942942
"description": "Customization affecting the generation of Pods for WebLogic Server instances.",
943943
"$ref": "#/definitions/ServerPod"
944944
},
945+
"adminChannelPortForwardingEnabled": {
946+
"description": "When this flag is enabled, the operator updates the domain\u0027s WebLogic configuration for its Administration Server to have an admin protocol NetworkAccessPoint with a \u0027localhost\u0027 address for each existing admin protocol capable port. This allows external Administration Console and WLST \u0027T3\u0027 access when using the \u0027kubectl port-forward\u0027 pattern. Defaults to true.",
947+
"type": "boolean"
948+
},
945949
"serverStartPolicy": {
946950
"description": "The strategy for deciding whether to start a WebLogic Server instance. Legal values are ALWAYS, NEVER, or IF_NEEDED. Defaults to IF_NEEDED. More info: https://oracle.github.io/weblogic-kubernetes-operator/userguide/managing-domains/domain-lifecycle/startup/#starting-and-stopping-servers.",
947951
"type": "string",

integration-tests/pom.xml

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,12 +296,54 @@
296296
<includes-failsafe>
297297
**/ItT3Channel,
298298
**/ItDedicatedMode,
299-
**/ItOpUpgradeFmwDomainInPV,
299+
**/ItOperatorFmwUpgrade,
300300
**/ItOperatorWlsUpgrade,
301301
**/ItFmwDynamicDomainInPV,
302-
**/ItFmwDomainInPVUsingWDT
302+
**/ItFmwDomainInPVUsingWDT,
303+
**/ItMiiSampleFmwMain
303304
</includes-failsafe>
304305
</properties>
305306
</profile>
307+
<profile>
308+
<id>wko-olcne-cert</id>
309+
<properties>
310+
<skipITs>false</skipITs>
311+
<includes-failsafe>
312+
**/ItCoherenceTests,
313+
**/ItConfigDistributionStrategy,
314+
**/ItCrossDomainTransaction,
315+
**/ItElasticLogging,
316+
**/ItElasticLoggingFluentd,
317+
**/ItExternalRmiTunneling,
318+
**/ItInitContainers,
319+
**/ItIntrospectVersion,
320+
**/ItIstioCrossDomainTransaction,
321+
**/ItIstioDomainInImage,
322+
**/ItIstioDomainInPV,
323+
**/ItIstioMiiDomain,
324+
**/ItIstioTwoDomainsInImage,
325+
**/ItKubernetesEvents,
326+
**/ItManageNameSpace,
327+
**/ItMiiDomain,
328+
**/ItMiiDomainModelInPV,
329+
**/ItMiiDynamicUpdate,
330+
**/ItMiiMultiModel,
331+
**/ItMiiSample,
332+
**/ItMiiUpdateDomainConfig,
333+
**/ItMonitoringExporter,
334+
**/ItOperatorRestart,
335+
**/ItParameterizedDomain,
336+
**/ItPodTemplates,
337+
**/ItPodsRestart,
338+
**/ItPodsShutdownOption,
339+
**/ItProductionSecureMode,
340+
**/ItWlsSamples,
341+
**/ItServerStartPolicy,
342+
**/ItSessionMigration,
343+
**/ItSystemResOverrides,
344+
**/ItUsabilityOperatorHelmChart
345+
</includes-failsafe>
346+
</properties>
347+
</profile>
306348
</profiles>
307349
</project>

integration-tests/src/test/java/oracle/weblogic/kubernetes/ItCoherenceTests.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,11 @@
3030
import oracle.weblogic.kubernetes.logging.LoggingFacade;
3131
import oracle.weblogic.kubernetes.utils.ExecResult;
3232
import oracle.weblogic.kubernetes.utils.FileUtils;
33-
import org.awaitility.core.ConditionFactory;
3433
import org.junit.jupiter.api.BeforeAll;
3534
import org.junit.jupiter.api.DisplayName;
3635
import org.junit.jupiter.api.Tag;
3736
import org.junit.jupiter.api.Test;
3837

39-
import static java.util.concurrent.TimeUnit.MINUTES;
40-
import static java.util.concurrent.TimeUnit.SECONDS;
4138
import static oracle.weblogic.kubernetes.TestConstants.DOMAIN_API_VERSION;
4239
import static oracle.weblogic.kubernetes.TestConstants.OCIR_SECRET_NAME;
4340
import static oracle.weblogic.kubernetes.actions.ActionConstants.APP_DIR;
@@ -56,7 +53,6 @@
5653
import static oracle.weblogic.kubernetes.utils.PodUtils.setPodAntiAffinity;
5754
import static oracle.weblogic.kubernetes.utils.SecretUtils.createSecretWithUsernamePassword;
5855
import static oracle.weblogic.kubernetes.utils.ThreadSafeLogger.getLogger;
59-
import static org.awaitility.Awaitility.with;
6056
import static org.junit.jupiter.api.Assertions.assertAll;
6157
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
6258
import static org.junit.jupiter.api.Assertions.assertNotNull;
@@ -93,7 +89,6 @@ class ItCoherenceTests {
9389

9490
private static String opNamespace = null;
9591
private static String domainNamespace = null;
96-
private static ConditionFactory withStandardRetryPolicy = null;
9792
private static Map<String, Object> secretNameMap;
9893
private static LoggingFacade logger = null;
9994

@@ -106,10 +101,6 @@ class ItCoherenceTests {
106101
@BeforeAll
107102
public static void init(@Namespaces(2) List<String> namespaces) {
108103
logger = getLogger();
109-
// create standard, reusable retry/backoff policy
110-
withStandardRetryPolicy = with().pollDelay(2, SECONDS)
111-
.and().with().pollInterval(10, SECONDS)
112-
.atMost(5, MINUTES).await();
113104

114105
// get a new unique opNamespace
115106
logger.info("Assigning a unique namespace for Operator");

integration-tests/src/test/java/oracle/weblogic/kubernetes/ItConfigDistributionStrategy.java

Lines changed: 35 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
import oracle.weblogic.kubernetes.logging.LoggingFacade;
4949
import oracle.weblogic.kubernetes.utils.ExecResult;
5050
import oracle.weblogic.kubernetes.utils.OracleHttpClient;
51-
import org.awaitility.core.ConditionFactory;
5251
import org.junit.jupiter.api.AfterEach;
5352
import org.junit.jupiter.api.BeforeAll;
5453
import org.junit.jupiter.api.BeforeEach;
@@ -60,8 +59,6 @@
6059
import org.junit.jupiter.api.TestMethodOrder;
6160

6261
import static io.kubernetes.client.util.Yaml.dump;
63-
import static java.util.concurrent.TimeUnit.MINUTES;
64-
import static java.util.concurrent.TimeUnit.SECONDS;
6562
import static oracle.weblogic.kubernetes.TestConstants.ADMIN_PASSWORD_DEFAULT;
6663
import static oracle.weblogic.kubernetes.TestConstants.ADMIN_USERNAME_DEFAULT;
6764
import static oracle.weblogic.kubernetes.TestConstants.BASE_IMAGES_REPO_SECRET;
@@ -88,6 +85,8 @@
8885
import static oracle.weblogic.kubernetes.utils.CommonTestUtils.checkServiceExists;
8986
import static oracle.weblogic.kubernetes.utils.CommonTestUtils.getHostAndPort;
9087
import static oracle.weblogic.kubernetes.utils.CommonTestUtils.getNextFreePort;
88+
import static oracle.weblogic.kubernetes.utils.CommonTestUtils.testUntil;
89+
import static oracle.weblogic.kubernetes.utils.CommonTestUtils.withLongRetryPolicy;
9190
import static oracle.weblogic.kubernetes.utils.ConfigMapUtils.createConfigMapForDomainCreation;
9291
import static oracle.weblogic.kubernetes.utils.ConfigMapUtils.createConfigMapFromFiles;
9392
import static oracle.weblogic.kubernetes.utils.DeployUtil.deployUsingWlst;
@@ -110,7 +109,6 @@
110109
import static oracle.weblogic.kubernetes.utils.SecretUtils.createSecretWithUsernamePassword;
111110
import static oracle.weblogic.kubernetes.utils.ThreadSafeLogger.getLogger;
112111
import static oracle.weblogic.kubernetes.utils.WLSTUtils.executeWLSTScript;
113-
import static org.awaitility.Awaitility.with;
114112
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
115113
import static org.junit.jupiter.api.Assertions.assertEquals;
116114
import static org.junit.jupiter.api.Assertions.assertFalse;
@@ -159,11 +157,6 @@ class ItConfigDistributionStrategy {
159157
String dsSecret = domainUid.concat("-mysql-secret");
160158
String adminSvcExtHost = null;
161159

162-
// create standard, reusable retry/backoff policy
163-
private static final ConditionFactory withStandardRetryPolicy
164-
= with().pollDelay(2, SECONDS)
165-
.and().with().pollInterval(10, SECONDS)
166-
.atMost(15, MINUTES).await();
167160
private static LoggingFacade logger = null;
168161

169162
/**
@@ -272,16 +265,14 @@ public void afterEach() {
272265
String baseUri = "http://" + hostAndPort + "/clusterview/";
273266
String serverListUri = "ClusterViewServlet?user=" + ADMIN_USERNAME_DEFAULT + "&password=" + ADMIN_PASSWORD_DEFAULT;
274267

275-
withStandardRetryPolicy
276-
.conditionEvaluationListener(
277-
condition -> logger.info("Waiting for clusterview app in admin server is accessible after restart"
278-
+ "(elapsed time {0} ms, remaining time {1} ms)",
279-
condition.getElapsedTimeInMS(),
280-
condition.getRemainingTimeInMS()))
281-
.until((Callable<Boolean>) () -> {
268+
testUntil(
269+
withLongRetryPolicy,
270+
() -> {
282271
HttpResponse<String> response = assertDoesNotThrow(() -> OracleHttpClient.get(baseUri + serverListUri, true));
283272
return response.statusCode() == 200;
284-
});
273+
},
274+
logger,
275+
"clusterview app in admin server is accessible after restart");
285276
}
286277

287278
/**
@@ -326,14 +317,12 @@ void testDefaultOverride() {
326317
verifyIntrospectorRuns();
327318
verifyPodsStateNotChanged();
328319

329-
//wait until config is updated upto 5 minutes
330-
withStandardRetryPolicy
331-
.conditionEvaluationListener(
332-
condition -> logger.info("Waiting for server configuration to be updated"
333-
+ "(elapsed time {0} ms, remaining time {1} ms)",
334-
condition.getElapsedTimeInMS(),
335-
condition.getRemainingTimeInMS()))
336-
.until(configUpdated("100000000"));
320+
//wait until config is updated upto 15 minutes
321+
testUntil(
322+
withLongRetryPolicy,
323+
configUpdated("100000000"),
324+
logger,
325+
"server configuration to be updated");
337326

338327
verifyConfigXMLOverride(true);
339328
verifyResourceJDBC0Override(true);
@@ -383,28 +372,25 @@ void testModifiedOverrideContent() {
383372
verifyIntrospectorRuns();
384373
verifyPodsStateNotChanged();
385374

386-
//wait until config is updated upto 5 minutes
387-
withStandardRetryPolicy
388-
.conditionEvaluationListener(
389-
condition -> logger.info("Waiting for server configuration to be updated"
390-
+ "(elapsed time {0} ms, remaining time {1} ms)",
391-
condition.getElapsedTimeInMS(),
392-
condition.getRemainingTimeInMS()))
393-
.until(configUpdated("100000000"));
375+
//wait until config is updated upto 15 minutes
376+
testUntil(
377+
withLongRetryPolicy,
378+
configUpdated("100000000"),
379+
logger,
380+
"server configuration to be updated");
394381

395382
verifyConfigXMLOverride(true);
396383
verifyResourceJDBC0Override(true);
397384

398385
logger.info("Deleting the old override configmap {0}", overridecm);
399386
deleteConfigMap(overridecm, domainNamespace);
400387

401-
withStandardRetryPolicy.conditionEvaluationListener(
402-
condition -> logger.info("Waiting for configmap {0} to be deleted. Elapsed time{1}, remaining time {2}",
403-
overridecm, condition.getElapsedTimeInMS(), condition.getRemainingTimeInMS())).until(() -> {
404-
return listConfigMaps(domainNamespace).getItems().stream().noneMatch((cm)
405-
-> (cm.getMetadata().getName().equals(overridecm)));
406-
});
407-
388+
testUntil(
389+
withLongRetryPolicy,
390+
() -> listConfigMaps(domainNamespace).getItems().stream().noneMatch((cm)
391+
-> (cm.getMetadata().getName().equals(overridecm))),
392+
logger,
393+
"configmap {0} to be deleted.");
408394

409395
Path srcOverrideFile = Paths.get(RESOURCE_DIR, "configfiles/configoverridesset1/config1.xml");
410396
Path dstOverrideFile = Paths.get(WORK_DIR, "config.xml");
@@ -435,17 +421,14 @@ void testModifiedOverrideContent() {
435421
verifyIntrospectorRuns();
436422
verifyPodsStateNotChanged();
437423

438-
//wait until config is updated upto 5 minutes
439-
withStandardRetryPolicy
440-
.conditionEvaluationListener(
441-
condition -> logger.info("Waiting for server configuration to be updated"
442-
+ "(elapsed time {0} ms, remaining time {1} ms)",
443-
condition.getElapsedTimeInMS(),
444-
condition.getRemainingTimeInMS()))
445-
.until(configUpdated("99999999"));
424+
//wait until config is updated upto 15 minutes
425+
testUntil(
426+
withLongRetryPolicy,
427+
configUpdated("99999999"),
428+
logger,
429+
"server configuration to be updated");
446430

447431
verifyResourceJDBC0Override(true);
448-
449432
}
450433

451434
/**
@@ -505,13 +488,9 @@ void testDynamicOverride() {
505488
verifyPodsStateNotChanged();
506489

507490
//wait until config is updated upto 5 minutes
508-
withStandardRetryPolicy
509-
.conditionEvaluationListener(
510-
condition -> logger.info("Waiting for server configuration to be updated"
511-
+ "(elapsed time {0} ms, remaining time {1} ms)",
512-
condition.getElapsedTimeInMS(),
513-
condition.getRemainingTimeInMS()))
514-
.until(configUpdated("100000000"));
491+
testUntil(configUpdated("100000000"),
492+
logger,
493+
"server configuration to be updated");
515494

516495
verifyConfigXMLOverride(true);
517496
verifyResourceJDBC0Override(true);

integration-tests/src/test/java/oracle/weblogic/kubernetes/ItCrossDomainTransaction.java

Lines changed: 12 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,13 @@
3333
import oracle.weblogic.kubernetes.assertions.TestAssertions;
3434
import oracle.weblogic.kubernetes.logging.LoggingFacade;
3535
import oracle.weblogic.kubernetes.utils.ExecResult;
36-
import org.awaitility.core.ConditionFactory;
3736
import org.junit.jupiter.api.BeforeAll;
3837
import org.junit.jupiter.api.DisplayName;
3938
import org.junit.jupiter.api.MethodOrderer;
4039
import org.junit.jupiter.api.Order;
4140
import org.junit.jupiter.api.Test;
4241
import org.junit.jupiter.api.TestMethodOrder;
4342

44-
import static java.util.concurrent.TimeUnit.MINUTES;
45-
import static java.util.concurrent.TimeUnit.SECONDS;
4643
import static oracle.weblogic.kubernetes.TestConstants.ADMIN_PASSWORD_DEFAULT;
4744
import static oracle.weblogic.kubernetes.TestConstants.ADMIN_USERNAME_DEFAULT;
4845
import static oracle.weblogic.kubernetes.TestConstants.DB_IMAGE_TO_USE_IN_SPEC;
@@ -61,6 +58,7 @@
6158
import static oracle.weblogic.kubernetes.utils.BuildApplication.buildApplication;
6259
import static oracle.weblogic.kubernetes.utils.CommonTestUtils.checkServiceExists;
6360
import static oracle.weblogic.kubernetes.utils.CommonTestUtils.getNextFreePort;
61+
import static oracle.weblogic.kubernetes.utils.CommonTestUtils.testUntil;
6462
import static oracle.weblogic.kubernetes.utils.DbUtils.getDBNodePort;
6563
import static oracle.weblogic.kubernetes.utils.DbUtils.startOracleDB;
6664
import static oracle.weblogic.kubernetes.utils.ExecCommand.exec;
@@ -77,7 +75,6 @@
7775
import static oracle.weblogic.kubernetes.utils.PodUtils.setPodAntiAffinity;
7876
import static oracle.weblogic.kubernetes.utils.SecretUtils.createSecretWithUsernamePassword;
7977
import static oracle.weblogic.kubernetes.utils.ThreadSafeLogger.getLogger;
80-
import static org.awaitility.Awaitility.with;
8178
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
8279
import static org.junit.jupiter.api.Assertions.assertNotEquals;
8380
import static org.junit.jupiter.api.Assertions.assertNotNull;
@@ -103,7 +100,6 @@ class ItCrossDomainTransaction {
103100
private static String opNamespace = null;
104101
private static String domain1Namespace = null;
105102
private static String domain2Namespace = null;
106-
private static ConditionFactory withStandardRetryPolicy = null;
107103
private static String domainUid1 = "domain1";
108104
private static String domainUid2 = "domain2";
109105
private static int domain1AdminServiceNodePort = -1;
@@ -126,10 +122,6 @@ class ItCrossDomainTransaction {
126122
@BeforeAll
127123
public static void initAll(@Namespaces(3) List<String> namespaces) {
128124
logger = getLogger();
129-
// create standard, reusable retry/backoff policy
130-
withStandardRetryPolicy = with().pollDelay(2, SECONDS)
131-
.and().with().pollInterval(10, SECONDS)
132-
.atMost(5, MINUTES).await();
133125

134126
// get a new unique opNamespace
135127
logger.info("Creating unique namespace for Operator");
@@ -464,17 +456,10 @@ private boolean checkLocalQueue() {
464456

465457
logger.info("curl command {0}", curlString);
466458

467-
withStandardRetryPolicy
468-
.conditionEvaluationListener(
469-
condition -> logger.info("Waiting for local queue to be updated "
470-
+ "(elapsed time {0} ms, remaining time {1} ms)",
471-
condition.getElapsedTimeInMS(),
472-
condition.getRemainingTimeInMS()))
473-
.until(assertDoesNotThrow(() -> {
474-
return () -> {
475-
return exec(new String(curlString), true).stdout().contains("Messages are distributed");
476-
};
477-
}));
459+
testUntil(
460+
() -> exec(new String(curlString), true).stdout().contains("Messages are distributed"),
461+
logger,
462+
"local queue to be updated");
478463
return true;
479464
}
480465

@@ -495,15 +480,13 @@ private static void createDomain(String domainUid, String domainNamespace, Strin
495480

496481
// wait for the domain to exist
497482
logger.info("Check for domain custom resource in namespace {0}", domainNamespace);
498-
withStandardRetryPolicy
499-
.conditionEvaluationListener(
500-
condition -> logger.info("Waiting for domain {0} to be created in namespace {1} "
501-
+ "(elapsed time {2}ms, remaining time {3}ms)",
502-
domainUid,
503-
domainNamespace,
504-
condition.getElapsedTimeInMS(),
505-
condition.getRemainingTimeInMS()))
506-
.until(domainExists(domainUid, DOMAIN_VERSION, domainNamespace));
483+
testUntil(
484+
domainExists(domainUid, DOMAIN_VERSION, domainNamespace),
485+
logger,
486+
"domain {0} to be created in namespace {1}",
487+
domainUid,
488+
domainNamespace
489+
);
507490

508491
// check admin server pod exists
509492
logger.info("Check for admin server pod {0} existence in namespace {1}",

0 commit comments

Comments
 (0)