Skip to content

Commit 23b91d5

Browse files
committed
Merge remote-tracking branch 'origin/main' into release/4.0
2 parents d7529da + 976af45 commit 23b91d5

File tree

13 files changed

+69
-25
lines changed

13 files changed

+69
-25
lines changed

Jenkinsfile.oke

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ pipeline {
135135
)
136136
string(name: 'MONITORING_EXPORTER_WEBAPP_VERSION',
137137
description: '',
138-
defaultValue: '2.1.1'
138+
defaultValue: '2.1.2'
139139
)
140140
string(name: 'PROMETHEUS_CHART_VERSION',
141141
description: '',

documentation/domains/Domain.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -688,8 +688,8 @@
688688
"type": "object",
689689
"properties": {
690690
"image": {
691-
"default": "ghcr.io/oracle/weblogic-monitoring-exporter:2.1.1",
692-
"description": "The WebLogic Monitoring Exporter sidecar container image name. Defaults to ghcr.io/oracle/weblogic-monitoring-exporter:2.1.1",
691+
"default": "ghcr.io/oracle/weblogic-monitoring-exporter:2.1.2",
692+
"description": "The WebLogic Monitoring Exporter sidecar container image name. Defaults to ghcr.io/oracle/weblogic-monitoring-exporter:2.1.2",
693693
"type": "string"
694694
},
695695
"imagePullPolicy": {

documentation/domains/Domain.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ The current status of the operation of the WebLogic domain. Updated automaticall
126126
| Name | Type | Description |
127127
| --- | --- | --- |
128128
| `configuration` | Map | The configuration for the WebLogic Monitoring Exporter. If WebLogic Server instances are already running and have the monitoring exporter sidecar container, then changes to this field will be propagated to the exporter without requiring the restart of the WebLogic Server instances. |
129-
| `image` | string | The WebLogic Monitoring Exporter sidecar container image name. Defaults to ghcr.io/oracle/weblogic-monitoring-exporter:2.1.1 |
129+
| `image` | string | The WebLogic Monitoring Exporter sidecar container image name. Defaults to ghcr.io/oracle/weblogic-monitoring-exporter:2.1.2 |
130130
| `imagePullPolicy` | string | The image pull policy for the WebLogic Monitoring Exporter sidecar container image. Legal values are Always, Never, and IfNotPresent. Defaults to Always if image ends in :latest; IfNotPresent, otherwise. |
131131
| `port` | integer | The port exposed by the WebLogic Monitoring Exporter running in the sidecar container. Defaults to 8080. The port value must not conflict with a port used by any WebLogic Server instance, including the ports of built-in channels or network access points (NAPs). |
132132
| `resources` | [Resource Requirements](k8s1.13.5.md#resource-requirements) | Memory and CPU minimum requirements and limits for the Monitoring exporter sidecar. See `kubectl explain pods.spec.containers.resources`. |

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

Lines changed: 36 additions & 3 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;
@@ -26,6 +26,7 @@
2626
import oracle.weblogic.kubernetes.annotations.IntegrationTest;
2727
import oracle.weblogic.kubernetes.annotations.Namespaces;
2828
import oracle.weblogic.kubernetes.logging.LoggingFacade;
29+
import oracle.weblogic.kubernetes.utils.ExecCommand;
2930
import oracle.weblogic.kubernetes.utils.ExecResult;
3031
import org.junit.jupiter.api.BeforeAll;
3132
import org.junit.jupiter.api.DisplayName;
@@ -37,13 +38,15 @@
3738
import static oracle.weblogic.kubernetes.TestConstants.DOMAIN_API_VERSION;
3839
import static oracle.weblogic.kubernetes.TestConstants.IMAGE_PULL_POLICY;
3940
import static oracle.weblogic.kubernetes.TestConstants.K8S_NODEPORT_HOST;
41+
import static oracle.weblogic.kubernetes.TestConstants.KUBERNETES_CLI;
4042
import static oracle.weblogic.kubernetes.TestConstants.MII_BASIC_IMAGE_NAME;
4143
import static oracle.weblogic.kubernetes.TestConstants.MII_BASIC_IMAGE_TAG;
4244
import static oracle.weblogic.kubernetes.TestConstants.TEST_IMAGES_REPO_SECRET_NAME;
4345
import static oracle.weblogic.kubernetes.TestConstants.WEBLOGIC_IMAGE_TAG;
4446
import static oracle.weblogic.kubernetes.TestConstants.WEBLOGIC_SLIM;
4547
import static oracle.weblogic.kubernetes.actions.ActionConstants.MODEL_DIR;
4648
import static oracle.weblogic.kubernetes.actions.ActionConstants.RESOURCE_DIR;
49+
import static oracle.weblogic.kubernetes.actions.ActionConstants.WORK_DIR;
4750
import static oracle.weblogic.kubernetes.actions.TestActions.addLabelsToNamespace;
4851
import static oracle.weblogic.kubernetes.actions.TestActions.patchDomainResourceWithNewIntrospectVersion;
4952
import static oracle.weblogic.kubernetes.utils.ApplicationUtils.checkAppUsingHostHeader;
@@ -62,6 +65,7 @@
6265
import static oracle.weblogic.kubernetes.utils.DomainUtils.createDomainAndVerify;
6366
import static oracle.weblogic.kubernetes.utils.ExecCommand.exec;
6467
import static oracle.weblogic.kubernetes.utils.FileUtils.generateFileFromTemplate;
68+
import static oracle.weblogic.kubernetes.utils.FileUtils.replaceStringInFile;
6569
import static oracle.weblogic.kubernetes.utils.ImageUtils.createTestRepoSecret;
6670
import static oracle.weblogic.kubernetes.utils.IstioUtils.createAdminServer;
6771
import static oracle.weblogic.kubernetes.utils.IstioUtils.deployHttpIstioGatewayAndVirtualservice;
@@ -72,6 +76,7 @@
7276
import static oracle.weblogic.kubernetes.utils.PodUtils.setPodAntiAffinity;
7377
import static oracle.weblogic.kubernetes.utils.SecretUtils.createSecretWithUsernamePassword;
7478
import static oracle.weblogic.kubernetes.utils.ThreadSafeLogger.getLogger;
79+
import static org.apache.commons.io.FileUtils.copyFile;
7580
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
7681
import static org.junit.jupiter.api.Assertions.assertEquals;
7782
import static org.junit.jupiter.api.Assertions.assertNotNull;
@@ -126,6 +131,8 @@ public static void initAll(@Namespaces(2) List<String> namespaces) {
126131

127132
// install and verify operator
128133
installAndVerifyOperator(opNamespace, domainNamespace);
134+
135+
enableStrictMode(domainNamespace);
129136
}
130137

131138
/**
@@ -237,6 +244,17 @@ void testIstioModelInImageDomain() {
237244

238245
int istioIngressPort = getIstioHttpIngressPort();
239246
logger.info("Istio Ingress Port is {0}", istioIngressPort);
247+
248+
String curlCmd = "curl -j -sk --show-error --noproxy '*' "
249+
+ " -H 'Host: " + domainNamespace + ".org'"
250+
+ " --url http://" + K8S_NODEPORT_HOST + ":" + istioIngressPort + "/console/login/LoginForm.jsp";
251+
ExecResult result = null;
252+
logger.info("curl command {0}", curlCmd);
253+
result = assertDoesNotThrow(() -> exec(curlCmd, true));
254+
assertEquals(0, result.exitValue(), "Got expected exit value");
255+
result = assertDoesNotThrow(() -> ExecCommand.exec(KUBERNETES_CLI + " delete -f "
256+
+ Paths.get(WORK_DIR, "istio-tls-mode.yaml").toString(), true));
257+
assertEquals(0, result.exitValue(), "Got expected exit value");
240258

241259
// We can not verify Rest Management console thru Adminstration NodePort
242260
// in istio, as we can not enable Adminstration NodePort
@@ -254,7 +272,7 @@ void testIstioModelInImageDomain() {
254272
+ "/management/weblogic/latest/domainRuntime/domainSecurityRuntime?"
255273
+ "link=none";
256274

257-
ExecResult result = null;
275+
result = null;
258276
logger.info("curl command {0}", curlCmd2);
259277
result = assertDoesNotThrow(
260278
() -> exec(curlCmd2, true));
@@ -274,7 +292,7 @@ void testIstioModelInImageDomain() {
274292
}
275293

276294
Path archivePath = Paths.get(testWebAppWarLoc);
277-
ExecResult result = null;
295+
result = null;
278296
result = deployToClusterUsingRest(K8S_NODEPORT_HOST,
279297
String.valueOf(istioIngressPort),
280298
ADMIN_USERNAME_DEFAULT, ADMIN_PASSWORD_DEFAULT,
@@ -364,4 +382,19 @@ private DomainResource createDomainResource(String domainUid, String domNamespac
364382
setPodAntiAffinity(domain);
365383
return domain;
366384
}
385+
386+
private static void enableStrictMode(String namespace) {
387+
assertDoesNotThrow(() -> {
388+
copyFile(Paths.get(RESOURCE_DIR, "istio", "istio-tls-mode.yaml").toFile(),
389+
Paths.get(WORK_DIR, "istio-tls-mode.yaml").toFile());
390+
});
391+
assertDoesNotThrow(() -> {
392+
replaceStringInFile(Paths.get(WORK_DIR, "istio-tls-mode.yaml").toString(),
393+
"NAMESPACE", namespace);
394+
});
395+
ExecResult result = assertDoesNotThrow(() -> ExecCommand.exec(KUBERNETES_CLI + " apply -f "
396+
+ Paths.get(WORK_DIR, "istio-tls-mode.yaml").toString(), true));
397+
logger.info(result.stdout());
398+
logger.info(result.stderr());
399+
}
367400
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ public interface TestConstants {
281281

282282
//monitoring constants
283283
public static final String MONITORING_EXPORTER_WEBAPP_VERSION =
284-
getNonEmptySystemProperty("wko.it.monitoring.exporter.webapp.version", "2.1.1");
284+
getNonEmptySystemProperty("wko.it.monitoring.exporter.webapp.version", "2.1.2");
285285
public static final String MONITORING_EXPORTER_BRANCH =
286286
getNonEmptySystemProperty("wko.it.monitoring.exporter.branch", "main");
287287
public static final String PROMETHEUS_CHART_VERSION =
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Copyright (c) 2023, Oracle and/or its affiliates.
2+
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
3+
4+
apiVersion: security.istio.io/v1beta1
5+
kind: PeerAuthentication
6+
metadata:
7+
name: "strict-tls-policy"
8+
namespace: NAMESPACE
9+
spec:
10+
mtls:
11+
mode: STRICT

kubernetes/charts/weblogic-operator/templates/_operator-dep.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,11 +263,11 @@ spec:
263263
type: RuntimeDefault
264264
{{- with .nodeSelector }}
265265
nodeSelector:
266-
{{- toYaml . | nindent 8 }}
266+
{{- toYaml . | nindent 12 }}
267267
{{- end }}
268268
{{- with .affinity }}
269269
affinity:
270-
{{- toYaml . | nindent 8 }}
270+
{{- toYaml . | nindent 12 }}
271271
{{- end }}
272272
containers:
273273
- name: "weblogic-operator-webhook"

kubernetes/crd/cluster-crd.yaml

Lines changed: 1 addition & 1 deletion
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
apiVersion: apiextensions.k8s.io/v1

kubernetes/crd/domain-crd.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
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
apiVersion: apiextensions.k8s.io/v1
55
kind: CustomResourceDefinition
66
metadata:
77
annotations:
8-
weblogic.sha256: 5613ace711131620c27c324b75c8994cc7036312a4c9a386492ced0a9b0fb38f
8+
weblogic.sha256: fb02cf4d6a86bc94f3091999e95f502e66c540631d48b7c505b190fe8f134847
99
name: domains.weblogic.oracle
1010
spec:
1111
group: weblogic.oracle
@@ -47,9 +47,9 @@ spec:
4747
appropriate. See https://github.com/oracle/weblogic-monitoring-exporter.
4848
properties:
4949
image:
50-
default: ghcr.io/oracle/weblogic-monitoring-exporter:2.1.1
50+
default: ghcr.io/oracle/weblogic-monitoring-exporter:2.1.2
5151
description: The WebLogic Monitoring Exporter sidecar container
52-
image name. Defaults to ghcr.io/oracle/weblogic-monitoring-exporter:2.1.1
52+
image name. Defaults to ghcr.io/oracle/weblogic-monitoring-exporter:2.1.2
5353
type: string
5454
imagePullPolicy:
5555
description: The image pull policy for the WebLogic Monitoring
@@ -9594,7 +9594,7 @@ spec:
95949594
properties:
95959595
image:
95969596
description: The WebLogic Monitoring Exporter sidecar container
9597-
image name. Defaults to ghcr.io/oracle/weblogic-monitoring-exporter:2.1.1
9597+
image name. Defaults to ghcr.io/oracle/weblogic-monitoring-exporter:2.1.2
95989598
type: string
95999599
imagePullPolicy:
96009600
description: The image pull policy for the WebLogic Monitoring

kubernetes/crd/domain-crdv8.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# Copyright (c) 2020, 2021, 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
apiVersion: apiextensions.k8s.io/v1
55
kind: CustomResourceDefinition
66
metadata:
77
annotations:
8-
weblogic.sha256: f260ed89c3a2a357c339b88fee0f998eb456d31bfd50164cea3cb62b3b63fd8a
8+
weblogic.sha256: 4dfb830a302482285fe29a87207158aff738d88caa7ee6ccb9c780f415adb21c
99
name: domains.weblogic.oracle
1010
spec:
1111
group: weblogic.oracle
@@ -39,7 +39,7 @@ spec:
3939
properties:
4040
image:
4141
description: The WebLogic Monitoring Exporter sidecar container
42-
image name. Defaults to ghcr.io/oracle/weblogic-monitoring-exporter:2.1.1
42+
image name. Defaults to ghcr.io/oracle/weblogic-monitoring-exporter:2.1.2
4343
type: string
4444
imagePullPolicy:
4545
description: The image pull policy for the WebLogic Monitoring

operator/src/main/java/oracle/kubernetes/operator/KubernetesConstants.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2017, 2022, Oracle and/or its affiliates.
1+
// Copyright (c) 2017, 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.kubernetes.operator;
@@ -8,7 +8,7 @@
88
/** Kubernetes constants. */
99
public interface KubernetesConstants {
1010
String DEFAULT_IMAGE = "container-registry.oracle.com/middleware/weblogic:12.2.1.4";
11-
String DEFAULT_EXPORTER_IMAGE = "ghcr.io/oracle/weblogic-monitoring-exporter:2.1.1";
11+
String DEFAULT_EXPORTER_IMAGE = "ghcr.io/oracle/weblogic-monitoring-exporter:2.1.2";
1212
String DEFAULT_FLUENTD_IMAGE = "fluent/fluentd-kubernetes-daemonset:v1.14.5-debian-elasticsearch7-1.1";
1313
String EXPORTER_CONTAINER_NAME = "monitoring-exporter";
1414
String LATEST_IMAGE_SUFFIX = ":latest";

operator/src/main/java/oracle/kubernetes/operator/helpers/CrdHelper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2018, 2022, Oracle and/or its affiliates.
1+
// Copyright (c) 2018, 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.kubernetes.operator.helpers;
@@ -135,7 +135,7 @@ private static URI asFileURI(String fileName) throws URISyntaxException {
135135
static void writeAsYaml(URI outputFileName, Object model) {
136136
try (Writer writer = Files.newBufferedWriter(PathSupport.getPath(outputFileName))) {
137137
writer.write(
138-
"# Copyright (c) 2020, 2022, Oracle and/or its affiliates.\n"
138+
"# Copyright (c) 2020, 2023, Oracle and/or its affiliates.\n"
139139
+ "# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.\n");
140140
writer.write("\n");
141141
dumpYaml(writer, model);

operator/src/main/resources/schema/domain-crd-schemav8-3.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2020, 2021, 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
openAPIV3Schema:
44
properties:
@@ -19,7 +19,7 @@ openAPIV3Schema:
1919
properties:
2020
image:
2121
description: The WebLogic Monitoring Exporter sidecar container
22-
image name. Defaults to ghcr.io/oracle/weblogic-monitoring-exporter:2.1.1
22+
image name. Defaults to ghcr.io/oracle/weblogic-monitoring-exporter:2.1.2
2323
type: string
2424
imagePullPolicy:
2525
description: The image pull policy for the WebLogic Monitoring

0 commit comments

Comments
 (0)