Skip to content

Commit 8c6ca1c

Browse files
committed
Merge remote-tracking branch 'origin/main' into release/4.0
2 parents a3af469 + 6142f12 commit 8c6ca1c

File tree

58 files changed

+2168
-309
lines changed

Some content is hidden

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

58 files changed

+2168
-309
lines changed

.github/workflows/publish-github-pages.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ jobs:
2323

2424
steps:
2525
- name: Checkout main
26-
uses: actions/checkout@v2.6.0
26+
uses: actions/checkout@v3
2727
with:
2828
ref: main
2929
fetch-depth: 32
3030
path: main
3131

3232
- name: Checkout gh-pages
33-
uses: actions/checkout@v2.6.0
33+
uses: actions/checkout@v3
3434
with:
3535
ref: gh-pages
3636
path: gh-pages

Jenkinsfile.kindnightly

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2022, Oracle and/or its affiliates.
1+
// Copyright (c) 2022, 2023, Oracle and/or its affiliates.
22
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
33
//
44
def kind_k8s_map = [
@@ -101,7 +101,8 @@ pipeline {
101101

102102
tools {
103103
maven 'maven-3.8.5'
104-
jdk 'jdk11'
104+
jdk 'OpenJDK 17.0.2'
105+
#jdk 'jdk11'
105106
}
106107

107108
environment {

Jenkinsfile.oke

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2022, Oracle and/or its affiliates.
1+
// Copyright (c) 2022, 2023, Oracle and/or its affiliates.
22
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
33
//
44

documentation/4.0/content/developerguide/documentation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@ update to the documentation, follow this process:
2222
```
2323

2424
3. Make your documentation updates by editing the source files in
25-
`documentation/staging/content`.
25+
`documentation/<release-version>/content`, for example `documentation/4.0/content`.
2626
{{% notice note %}}
27-
Make sure you check in the changes from the `documentation/staging/content` area _only_;
27+
Make sure you check in the changes from the `documentation/<release-version>/content` area _only_;
2828
do not build the site and check in the static files.
2929
{{% /notice %}}
3030

3131
4. If you wish to view your changes, you can run the site locally using
3232
these commands. The site will be available on the URL shown here:
3333

3434
```shell
35-
$ cd documentation/staging
35+
$ cd documentation/<release-version>
3636
$ hugo server -b http://localhost:1313/weblogic-kubernetes-operator
3737
```
3838

documentation/4.0/content/release-notes.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,6 @@ Updated several dependencies, including the Oracle Linux base for the container
449449

450450
### Known issues
451451

452-
| Issue | Description |
453-
| --- | --- |
454-
| None currently | |
452+
| Issue | Description |
453+
| --- |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
454+
| Deadlock on WebLogic Managed Coherence Server startup with Oracle Coherence 12.2.1.3.20. | Intermittently, a deadlock may occur during deployment of the `CoherenceModule`, which prevents a WebLogic Managed Coherence Server from reaching `RUNNING` state. This issue has been resolved in Oracle Coherence versions 12.2.1.4.0 and later. |

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

Lines changed: 24 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2020, 2022, Oracle and/or its affiliates.
1+
// Copyright (c) 2020, 2023, Oracle and/or its affiliates.
22
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
33

44
package oracle.weblogic.kubernetes;
@@ -61,7 +61,6 @@
6161
import static oracle.weblogic.kubernetes.TestConstants.K8S_NODEPORT_HOST;
6262
import static oracle.weblogic.kubernetes.TestConstants.KIND_REPO;
6363
import static oracle.weblogic.kubernetes.TestConstants.KUBERNETES_CLI;
64-
import static oracle.weblogic.kubernetes.TestConstants.OKD;
6564
import static oracle.weblogic.kubernetes.TestConstants.TEST_IMAGES_REPO;
6665
import static oracle.weblogic.kubernetes.TestConstants.WEBLOGIC_IMAGE_NAME;
6766
import static oracle.weblogic.kubernetes.TestConstants.WEBLOGIC_IMAGE_NAME_DEFAULT;
@@ -109,7 +108,6 @@
109108
import static oracle.weblogic.kubernetes.utils.K8sEvents.DOMAIN_ROLL_STARTING;
110109
import static oracle.weblogic.kubernetes.utils.K8sEvents.POD_CYCLE_STARTING;
111110
import static oracle.weblogic.kubernetes.utils.K8sEvents.checkEvent;
112-
import static oracle.weblogic.kubernetes.utils.LoadBalancerUtils.createIngressForDomainAndVerify;
113111
import static oracle.weblogic.kubernetes.utils.OKDUtils.createRouteForOKD;
114112
import static oracle.weblogic.kubernetes.utils.OperatorUtils.installAndVerifyOperator;
115113
import static oracle.weblogic.kubernetes.utils.PatchDomainUtils.patchDomainResource;
@@ -174,11 +172,8 @@ class ItIntrospectVersion {
174172
private static String wlsPassword = ADMIN_PASSWORD_DEFAULT;
175173

176174
private static String adminSvcExtHost = null;
177-
private static String clusterRouteHost = null;
178-
private static final String clusterServiceName = domainUid + "-cluster-" + cluster1Name;
179175

180176
private Map<String, OffsetDateTime> cl2podsWithTimeStamps = null;
181-
private Map<String, OffsetDateTime> cl1podsWithTimeStamps = null;
182177

183178
private static final String INTROSPECT_DOMAIN_SCRIPT = "introspectDomain.sh";
184179
private static final Path samplePath = Paths.get(ITTESTS_DIR, "../kubernetes/samples");
@@ -329,21 +324,10 @@ void testDomainIntrospectVersionNotRolling() {
329324
podStateNotChanged(adminServerPodName, domainUid, introDomainNamespace, adminPodCreationTime);
330325
for (int i = 1; i <= cluster1ReplicaCount; i++) {
331326
podStateNotChanged(cluster1ManagedServerPodNamePrefix + i,
332-
domainUid, introDomainNamespace, pods.get(i));
327+
domainUid, introDomainNamespace, pods.get(cluster1ManagedServerPodNamePrefix + i));
333328
}
334329

335-
//create ingress controller - OKD uses services exposed as routes
336-
if (!OKD) {
337-
Map<String, Integer> clusterNameMsPortMap = new HashMap<>();
338-
clusterNameMsPortMap.put(cluster1Name, managedServerPort);
339-
logger.info("Creating ingress for domain {0} in namespace {1}", domainUid, introDomainNamespace);
340-
createIngressForDomainAndVerify(domainUid, introDomainNamespace, clusterNameMsPortMap);
341-
} else {
342-
clusterRouteHost = createRouteForOKD(clusterServiceName, introDomainNamespace);
343-
}
344-
345-
List<String> managedServerNames = new ArrayList<String>();
346-
managedServerNames = new ArrayList<String>();
330+
List<String> managedServerNames = new ArrayList<>();
347331
for (int i = 1; i <= cluster1ReplicaCount + 1; i++) {
348332
managedServerNames.add(cluster1ManagedServerNameBase + i);
349333
}
@@ -465,7 +449,7 @@ void testDomainIntrospectVersionRolling() {
465449
"Getting admin server port failed"),
466450
"Updated admin server port is not equal to expected value");
467451

468-
List<String> managedServerNames = new ArrayList<String>();
452+
List<String> managedServerNames = new ArrayList<>();
469453
for (int i = 1; i <= cluster1ReplicaCount; i++) {
470454
managedServerNames.add(cluster1ManagedServerNameBase + i);
471455
}
@@ -586,7 +570,6 @@ void testCredentialChange() {
586570
checkPodReadyAndServiceExists(cluster1ManagedServerPodNamePrefix + i, domainUid, introDomainNamespace);
587571
}
588572

589-
DomainResource cr = assertDoesNotThrow(() -> getDomainCustomResource(domainUid, introDomainNamespace));
590573
if (cluster2Created) {
591574
// verify new cluster managed server pods are ready
592575
for (int i = 1; i <= cluster2ReplicaCount; i++) {
@@ -601,11 +584,11 @@ void testCredentialChange() {
601584
final boolean VALID = true;
602585
logger.info("Check that after patching current credentials are not valid and new credentials are");
603586
verifyCredentials(adminSvcExtHost, adminServerPodName, introDomainNamespace,
604-
ADMIN_USERNAME_DEFAULT, ADMIN_PASSWORD_DEFAULT, !VALID);
587+
ADMIN_USERNAME_DEFAULT, ADMIN_PASSWORD_DEFAULT, false);
605588
verifyCredentials(adminSvcExtHost, adminServerPodName, introDomainNamespace,
606589
ADMIN_USERNAME_PATCH, ADMIN_PASSWORD_PATCH, VALID);
607590

608-
List<String> managedServerNames = new ArrayList<String>();
591+
List<String> managedServerNames = new ArrayList<>();
609592
for (int i = 1; i <= cluster1ReplicaCount; i++) {
610593
managedServerNames.add(cluster1ManagedServerNameBase + i);
611594
}
@@ -688,7 +671,7 @@ void testCreateNewCluster() {
688671
checkPodReadyAndServiceExists(cluster2ManagedServerPodNamePrefix + i, domainUid, introDomainNamespace);
689672
}
690673

691-
List<String> managedServerNames = new ArrayList<String>();
674+
List<String> managedServerNames = new ArrayList<>();
692675
for (int i = 1; i <= cluster2ReplicaCount; i++) {
693676
managedServerNames.add(cluster2ManagedServerNameBase + i);
694677
}
@@ -725,7 +708,7 @@ void testUpdateImageName() {
725708
cluster1ManagedServerNames.add(cluster1ManagedServerNameBase + i);
726709
}
727710
// get the map with server pods and their original creation timestamps
728-
cl1podsWithTimeStamps = getPodsWithTimeStamps(introDomainNamespace, adminServerPodName,
711+
Map<String, OffsetDateTime> cl1podsWithTimeStamps = getPodsWithTimeStamps(introDomainNamespace, adminServerPodName,
729712
cluster1ManagedServerPodNamePrefix, cluster1ReplicaCount);
730713

731714
List<String> cluster2ManagedServerNames = new ArrayList<>();
@@ -753,8 +736,7 @@ void testUpdateImageName() {
753736
imageTag(imageName, imageUpdate);
754737
imageRepoLoginAndPushImageToRegistry(imageUpdate);
755738

756-
StringBuffer patchStr = null;
757-
patchStr = new StringBuffer("[{");
739+
StringBuffer patchStr = new StringBuffer("[{");
758740
patchStr.append("\"op\": \"replace\",")
759741
.append(" \"path\": \"/spec/image\",")
760742
.append("\"value\": \"")
@@ -1159,7 +1141,7 @@ private static void createDomain() {
11591141
},
11601142
logger,
11611143
"Deploying the application using Rest");
1162-
List<String> managedServerNames = new ArrayList<String>();
1144+
List<String> managedServerNames = new ArrayList<>();
11631145
for (int i = 1; i <= cluster1ReplicaCount; i++) {
11641146
managedServerNames.add(cluster1ManagedServerNameBase + i);
11651147
}
@@ -1282,7 +1264,6 @@ private void verifyIntrospectVersionLabelInPod() {
12821264
verifyIntrospectVersionLabelValue(cluster1ManagedServerPodNamePrefix + i, introspectVersion);
12831265
}
12841266

1285-
DomainResource cr = assertDoesNotThrow(() -> getDomainCustomResource(domainUid, introDomainNamespace));
12861267
if (cluster2Created) {
12871268
// verify new cluster managed server pods are ready
12881269
for (int i = 1; i <= cluster2ReplicaCount; i++) {
@@ -1299,16 +1280,23 @@ private void verifyIntrospectVersionLabelValue(String podName, String introspect
12991280
getPod(introDomainNamespace, "", podName),
13001281
"Get pod " + podName);
13011282

1302-
Map<String, String> myLabels = myPod.getMetadata().getLabels();
1283+
Map<String, String> myLabels = new HashMap<>();
1284+
if (myPod != null && myPod.getMetadata() != null) {
1285+
myLabels = myPod.getMetadata().getLabels();
1286+
}
13031287

1304-
for (Map.Entry<String, String> entry : myLabels.entrySet()) {
1305-
if (entry.getKey().equals(wlsIntroVersion)) {
1306-
logger.info("Get Spec Key:value = {0}:{1}", entry.getKey(), entry.getValue());
1307-
logger.info("Verifying weblogic.introspectVersion is set to {0}", introspectVersion);
1288+
if (myLabels != null) {
1289+
for (Map.Entry<String, String> entry : myLabels.entrySet()) {
1290+
if (entry.getKey().equals(wlsIntroVersion)) {
1291+
logger.info("Get Spec Key:value = {0}:{1}", entry.getKey(), entry.getValue());
1292+
logger.info("Verifying weblogic.introspectVersion is set to {0}", introspectVersion);
13081293

1309-
assertEquals(introspectVersion, entry.getValue(),
1310-
"Failed to set " + wlsIntroVersion + " to " + introspectVersion);
1294+
assertEquals(introspectVersion, entry.getValue(),
1295+
"Failed to set " + wlsIntroVersion + " to " + introspectVersion);
1296+
}
13111297
}
1298+
} else {
1299+
logger.info("myLabels for pod {0} in namespace {1} is null", podName, introDomainNamespace);
13121300
}
13131301
}
13141302

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

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2022, Oracle and/or its affiliates.
1+
// Copyright (c) 2022, 2023, Oracle and/or its affiliates.
22
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
33

44
package oracle.weblogic.kubernetes;
@@ -342,7 +342,8 @@ void testDomainK8sEventsNonExistingCluster() {
342342
void testK8SEventsFailedLifeCycle() {
343343
V1Patch patch;
344344
String patchStr;
345-
DomainResource domain = createDomain(domainNamespace5, domainUid, pvName5, pvcName5, "Never",
345+
String domainUid5 = domainUid + "5";
346+
DomainResource domain = createDomain(domainNamespace5, domainUid5, pvName5, pvcName5, "Never",
346347
spec -> spec.failureRetryLimitMinutes(2L));
347348
assertNotNull(domain, " Can't create domain resource");
348349

@@ -352,12 +353,12 @@ void testK8SEventsFailedLifeCycle() {
352353

353354
logger.info("Checking if the admin server {0} is shutdown in namespace {1}",
354355
adminServerPodName, domainNamespace5);
355-
checkPodDoesNotExist(adminServerPodName, domainUid, domainNamespace5);
356+
checkPodDoesNotExist(adminServerPodName, domainUid5, domainNamespace5);
356357

357358
for (int i = 1; i <= replicaCount; i++) {
358359
logger.info("Checking if the managed server {0} is shutdown in namespace {1}",
359360
managedServerPodNamePrefix + i, domainNamespace5);
360-
checkPodDoesNotExist(managedServerPodNamePrefix + i, domainUid, domainNamespace5);
361+
checkPodDoesNotExist(managedServerPodNamePrefix + i, domainUid5, domainNamespace5);
361362
}
362363

363364
logger.info("Replace the domainHome to a nonexisting location to verify the following events"
@@ -368,15 +369,15 @@ void testK8SEventsFailedLifeCycle() {
368369
logger.info("PatchStr for domainHome: {0}", patchStr);
369370

370371
patch = new V1Patch(patchStr);
371-
assertTrue(patchDomainCustomResource(domainUid, domainNamespace5, patch, V1Patch.PATCH_FORMAT_JSON_PATCH),
372+
assertTrue(patchDomainCustomResource(domainUid5, domainNamespace5, patch, V1Patch.PATCH_FORMAT_JSON_PATCH),
372373
"patchDomainCustomResource failed");
373374

374375
logger.info("verify domain changed event is logged");
375-
checkEvent(opNamespace, domainNamespace5, domainUid, DOMAIN_CHANGED, "Normal", timestamp);
376+
checkEvent(opNamespace, domainNamespace5, domainUid5, DOMAIN_CHANGED, "Normal", timestamp);
376377
logger.info("verify domain failed event");
377-
checkFailedEvent(opNamespace, domainNamespace5, domainUid, ABORTED_ERROR, "Warning", timestamp);
378+
checkFailedEvent(opNamespace, domainNamespace5, domainUid5, ABORTED_ERROR, "Warning", timestamp);
378379

379-
shutdownDomain(domainUid, domainNamespace5);
380+
shutdownDomain(domainUid5, domainNamespace5);
380381
}
381382

382383
/**
@@ -390,6 +391,8 @@ void testK8SEventsFailedLifeCycle() {
390391
void testK8SEventsMultiClusterEvents() {
391392
OffsetDateTime timestamp = now();
392393
createNewCluster();
394+
OffsetDateTime timestamp2 = now();
395+
logger.info("Scale the newly-added cluster");
393396
scaleClusterWithRestApi(domainUid, cluster2Name, 1,
394397
externalRestHttpsPort, opNamespace, opServiceAccount);
395398
logger.info("verify the Domain_Available event is generated");
@@ -403,13 +406,13 @@ void testK8SEventsMultiClusterEvents() {
403406
domainUid, DOMAIN_COMPLETED, "Normal", timestamp);
404407
logger.info("verify the ClusterCompleted event is generated");
405408
checkEvent(opNamespace, domainNamespace3,
406-
domainUid, CLUSTER_COMPLETED, "Normal", timestamp);
409+
domainUid, CLUSTER_COMPLETED, "Normal", timestamp2);
407410
logger.info("verify the only 1 Completed event for domain is generated");
408411
assertEquals(1, getOpGeneratedEventCount(domainNamespace3, domainUid,
409412
DOMAIN_COMPLETED, timestamp));
410413
logger.info("verify the only 1 ClusterCompleted event for domain is generated");
411414
assertEquals(1, getOpGeneratedEventCount(domainNamespace3, domainUid,
412-
CLUSTER_COMPLETED, timestamp));
415+
CLUSTER_COMPLETED, timestamp2));
413416
}
414417

415418
/**

0 commit comments

Comments
 (0)