Skip to content

Commit 656b056

Browse files
Merge branch 'develop' of https://github.com/oracle/weblogic-kubernetes-operator into coherence_test
2 parents 45b2b73 + e63f614 commit 656b056

File tree

42 files changed

+907
-59
lines changed

Some content is hidden

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

42 files changed

+907
-59
lines changed

docs-source/content/developerguide/integration-tests.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ You will need to obtain the `kube.config` file for an administrative user and ma
1515
$ mvn clean verify -P java-integration-tests
1616
```
1717

18+
For more detailed information, see [How to run the Java integration tests ](https://github.com/oracle/weblogic-kubernetes-operator/tree/master/integration-tests#how-to-run-the-java-integration-tests).
19+
1820
{{% notice note %}}
1921
When you run the integrations tests, they do a cleanup of any operator or domains on that cluster.
2022
{{% /notice %}}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
title: "Experimental features"
3+
date: 2019-08-15T13:29:04-04:00
4+
weight: 6
5+
description: "Learn about experimental features included in the operator."
6+
draft: false
7+
---
8+
9+
This section provides details of experimental features in the operator.
10+
These are features that are not considered "complete" but which are
11+
included as a "preview" to allow users to experiment with them and
12+
give feedback.
13+
14+
Experimental features are activated using the `experimental` keyword
15+
in the domain custom resource. These features are only documented
16+
in this section.
Lines changed: 228 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,228 @@
1+
---
2+
title: "Istio support"
3+
date: 2019-08-15T13:30:04-04:00
4+
weight: 1
5+
---
6+
7+
### Overview
8+
9+
WebLogic Kubernetes Operator version 2.3 includes experimental support for Istio 1.2.2.
10+
This support allows you to run the operator itself, and WebLogic domains managed by
11+
the operator with Istio sidecar injection enabled. It will allow you to use
12+
Istio gateways and virtual services to access applications deployed in these domains.
13+
If your applications have suitable tracing code in them, you will also be able to
14+
use distributed tracing, such as Jaeger, to trace requests across domains and to
15+
other components and services that have tracing enabled.
16+
17+
### Limitations
18+
19+
The current experimental support for Istio has the current limitations:
20+
21+
* It is tested only with Istio 1.2.2, however it is tested with both single and
22+
multicluster installations of Istio.
23+
* Support is provided only for domains that are stored in persistent
24+
volumes and created with the provided sample using the WLST option.
25+
We intend to support domain in image and WDT options as well, but that is not currently
26+
available.
27+
* Support is provided only for domains with a single dynamic cluster.
28+
Multiple clusters and configured clusters are not currently supported.
29+
30+
### Using the operator with experimental Istio support
31+
32+
You can deploy the operator into a namespace which has Istio automatic sidecar
33+
injection enabled. Before installing the operator, create the namespace you
34+
wish to run the operator in, and label it for automatic injection.
35+
36+
```
37+
$ kubectl create namespace weblogic-operator
38+
$ kubectl label namespace weblogic-operator istio-injection=enabled
39+
```
40+
41+
After the namespace is labeled, you can install the operator using the normal
42+
method. When the operator pod starts, you will notice that Istio automatically
43+
injects an `initContainer` called `istio-init` and the envoy container `istio-proxy`.
44+
45+
You can check this using the following commands:
46+
47+
```
48+
$ kubectl --namespace weblogic-operator get pods
49+
$ kubectl --namespace weblogic-operator get pod weblogic-operator-xxx-xxx -o yaml
50+
```
51+
52+
In the second command, change `weblogic-operator-xxx-xxx` to the name of your pod.
53+
54+
### Creating a domain with experimental Istio support
55+
56+
You can configure your domains to run with Istio automatic sidecar injection enabled.
57+
Before creating your domain, create the namespace you wish to run the domain in,
58+
and label it for automatic injection.
59+
60+
```
61+
$ kubectl create namespace domain1
62+
$ kubectl label namespace domain1 istio-injection=enabled
63+
```
64+
65+
Currently, the experimental Istio support is provided only for domains stored on
66+
persistent volumes. To enable the support for a domain, you need to add the
67+
`experimental` section to your domain custom resource YAML file as shown in the
68+
example below.
69+
70+
This *must* be done in the inputs file before running the `create-domain.sh` script
71+
in the [sample directory]({{< relref "/samples/simple/domains/domain-home-on-pv" >}})
72+
because the `create-domain.sh` script makes the necessary adjustments to the domain
73+
to make it work in an Istio environment.
74+
75+
```
76+
apiVersion: "weblogic.oracle/v5"
77+
kind: Domain
78+
metadata:
79+
name: domain2
80+
namespace: domain1
81+
labels:
82+
weblogic.resourceVersion: domain-v2
83+
weblogic.domainUID: domain2
84+
spec:
85+
... other content ...
86+
experimental:
87+
istio:
88+
enabled: true
89+
readinessPort: 8888
90+
```
91+
92+
To enable the experimental Istio support, you must include the `istio` section
93+
and you must set `enabled: true` as shown. The `readniessPort` is optional
94+
and defaults to `8888` if not provided.
95+
96+
#### How Istio-enabled domains differ from regular domains
97+
98+
Istio enforces a number of requirements on pods. When you enable Istio support, the
99+
domain on persistent volume sample scripts will make the following adjustments
100+
to your domain in order to satisy Istio's requirements:
101+
102+
* On the Admin server:
103+
* Create a channel called `istio-probe` with listen address `127.0.0.1:8888` (or
104+
the port you specified in the `readinessPort` setting).
105+
* Create a channel called `istio-t3` with listen address `127.0.0.1` and the port
106+
you specified as the admin port.
107+
* Create a channel called `istio-ldap` with listen address `127.0.0.1` and the port
108+
you specified as the admin port, with only the LDAP protocol enabled.
109+
* Create a channel called `istio-T3Channel` with listen
110+
address `127.0.0.1` and the port you specified as the T3 port.
111+
* In the server template that is used to create managed servers in clusters:
112+
* Create a channel called `istio-probe` with listen address `127.0.0.1:8888` (or
113+
the port you specified in the `readinessPort` setting) and the public address
114+
set to the Kubernetes service for the managed server.
115+
* Create a channel called `istio-t3` with listen address `127.0.0.1` and the port
116+
you specified as the admin port and the public address
117+
set to the Kubernetes service for the managed server.
118+
* Create a channel called `istio-cluster` with listen address `127.0.0.1` and the port
119+
you specified as the admin port, with only the CLUSTER_BROADCAST protocol enabled,
120+
and the public address set to the Kubernetes service for the managed server.
121+
* Create a channel called `istio-http` with listen address `127.0.0.1:31111` and the
122+
public address set to the Kubernetes service for the managed server. Note that `31111`
123+
is the Istio proxy (envoy) port.
124+
* The create domain job will be configured to disable injection of the Istio sidecar.
125+
126+
Additionally, the operator will adjust its behavior as follows when the experimental
127+
Istio support is enabled for a domain:
128+
129+
* The operator will ensure that the Istio sidecar is not injected into the introspector
130+
job's pods.
131+
132+
### Exposing applications in Istio-enabled domains
133+
134+
When a domain is running with the experimental Istio support, you should use the Istio
135+
gateway to provide external access to applications, instead of using an Ingress
136+
controller like Traefik. Using the Istio gateway will enable you to view the
137+
traffic in Kiali and to use distributed tracing all the way from the entry point to
138+
the cluster, i.e. the Istio gateway.
139+
140+
To configure external access to your domain, you need to create an Istio `gateway` and
141+
`virtualservice` as shown in the example below:
142+
143+
```
144+
---
145+
apiVersion: networking.istio.io/v1alpha3
146+
kind: Gateway
147+
metadata:
148+
name: domain1-gateway
149+
namespace: domain1
150+
spec:
151+
selector:
152+
istio: ingressgateway
153+
servers:
154+
- hosts:
155+
- '*'
156+
port:
157+
name: http
158+
number: 80
159+
protocol: HTTP
160+
---
161+
apiVersion: networking.istio.io/v1alpha3
162+
kind: VirtualService
163+
metadata:
164+
name: domain1-virtualservice
165+
namespace: domain1
166+
spec:
167+
gateways:
168+
- domain1-gateway
169+
hosts:
170+
- '*'
171+
http:
172+
- match:
173+
- uri:
174+
prefix: /
175+
- port: 8001
176+
route:
177+
- destination:
178+
host: domain1-cluster-cluster-1.domain1.svc.cluster.local
179+
port:
180+
number: 8001
181+
```
182+
183+
This example creates a gateway that will accept requests with any host name
184+
using HTTP on port 80, and a virtual service that will route all of
185+
those requests to the cluster service for `cluster-1` in `domain1` in
186+
the namespace `domain1`.
187+
188+
Please refer to the [Istio documentation](https://istio.io/docs/tasks/traffic-management/ingress/)
189+
for more information about providing ingress using Istio.
190+
191+
### Traffic management
192+
193+
Istio provides traffic management capabilities, including the ability to
194+
visualize traffic in Kiali. You do not need to change your applications to use
195+
this feature. The Istio proxy (envoy) sidecar that is injected into your pods
196+
provides this visibility. The experimental Istio support does enable
197+
traffic management. The image below shows an example with traffic
198+
flowing:
199+
200+
* In from the Istio gateway on the left.
201+
* To a domain called "bobbys-front-end".
202+
* To a non-WebLogic application, in this case a Helidon microservice
203+
called "bobbys-helidon-stock-application".
204+
* To a second domain called "bobs-bookstore".
205+
206+
In this example you can see how the traffic flows to the cluster services and
207+
then to the individual managed servers.
208+
209+
![Traffic visualization with Kiali](/weblogic-kubernetes-operator/images/kiali.png)
210+
211+
You can learn more about [Istio traffic management](https://istio.io/docs/concepts/traffic-management/)
212+
in their documentation.
213+
214+
### Distributed tracing
215+
216+
Istio provides distributed tracing capabilities, including the ability to view
217+
traces in Jaeger. In order to use distributed tracing though, you will need to
218+
instrument your WebLogic application first, for example, using the
219+
[Jaeger Java client](https://github.com/jaegertracing/jaeger-client-java).
220+
The image below shows an example of a distributed trace
221+
that shows a transaction following the same path through the system
222+
as shown in the image above.
223+
224+
![Distributed tracing with Jaeger](/weblogic-kubernetes-operator/images/jaeger.png)
225+
226+
You can learn more about [distrubting tracing in Istio](https://istio.io/docs/tasks/telemetry/distributed-tracing/)
227+
in their documentation.
228+

docs-source/static/images/jaeger.png

86.7 KB
Loading

docs-source/static/images/kiali.png

114 KB
Loading

docs/charts/index.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
11
apiVersion: v1
22
entries:
33
weblogic-operator:
4-
- created: "2019-07-25T14:26:55.411022-04:00"
4+
- created: "2019-08-16T09:50:10.645794-04:00"
55
description: Helm chart for configuring the WebLogic operator.
6-
digest: 755825da5adcc30f57bca540509813aeb8d73ddd69d85e4f30b29d73696e2ee8
6+
digest: cbc6caaa6eb28e3c7e906ede14b2ae511a0b35fc12a8e3ab629155b09993e8b2
77
name: weblogic-operator
88
urls:
99
- https://oracle.github.io/weblogic-kubernetes-operator/charts/weblogic-operator-2.3.0.tgz
1010
version: 2.3.0
11-
- created: "2019-07-25T14:26:55.408716-04:00"
11+
- created: "2019-08-16T09:50:10.643754-04:00"
1212
description: Helm chart for configuring the WebLogic operator.
1313
digest: 23d5a1c554fa8211cc1e86b7ade09460917cb2069e68fb4bfdddafc8db44fdcd
1414
name: weblogic-operator
1515
urls:
1616
- https://oracle.github.io/weblogic-kubernetes-operator/charts/weblogic-operator-2.2.1.tgz
1717
version: 2.2.1
18-
- created: "2019-07-25T14:26:55.407036-04:00"
18+
- created: "2019-08-16T09:50:10.641237-04:00"
1919
description: Helm chart for configuring the WebLogic operator.
2020
digest: bba303686cb55d84fe8c0d693a2436e7e686b028085b56e012f6381699a3911f
2121
name: weblogic-operator
2222
urls:
2323
- https://oracle.github.io/weblogic-kubernetes-operator/charts/weblogic-operator-2.2.0.tgz
2424
version: 2.2.0
25-
- created: "2019-07-25T14:26:55.405384-04:00"
25+
- created: "2019-08-16T09:50:10.638374-04:00"
2626
description: Helm chart for configuring the WebLogic operator.
2727
digest: 391e23c0969ada5f0cd2a088ddc6f11f237f57521801ed3925db2149a8437a0d
2828
name: weblogic-operator
2929
urls:
3030
- https://oracle.github.io/weblogic-kubernetes-operator/charts/weblogic-operator-2.1.tgz
3131
version: "2.1"
32-
- created: "2019-07-25T14:26:55.403824-04:00"
32+
- created: "2019-08-16T09:50:10.636172-04:00"
3333
description: Helm chart for configuring the WebLogic operator.
3434
digest: 298acda78ab73db6b7ba6f2752311bfa40c65874e03fb196b70976192211c1a5
3535
name: weblogic-operator
3636
urls:
3737
- https://oracle.github.io/weblogic-kubernetes-operator/charts/weblogic-operator-2.0.1.tgz
3838
version: 2.0.1
39-
generated: "2019-07-25T14:26:55.401818-04:00"
39+
generated: "2019-08-16T09:50:10.633063-04:00"
72 Bytes
Binary file not shown.

docs/domains/Domain.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,10 @@
249249
"description": "Domain unique identifier. Must be unique across the Kubernetes cluster. Not required. Defaults to the value of metadata.name.",
250250
"type": "string"
251251
},
252+
"experimental": {
253+
"description": "Experimental feature configurations.",
254+
"$ref": "#/definitions/Experimental"
255+
},
252256
"serverStartPolicy": {
253257
"description": "The strategy for deciding whether to start a server. Legal values are ADMIN_ONLY, NEVER, or IF_NEEDED.",
254258
"type": "string",
@@ -358,6 +362,28 @@
358362
}
359363
}
360364
},
365+
"Experimental": {
366+
"type": "object",
367+
"properties": {
368+
"istio": {
369+
"description": "Istio service mesh integration configuration.",
370+
"$ref": "#/definitions/Istio"
371+
}
372+
}
373+
},
374+
"Istio": {
375+
"type": "object",
376+
"properties": {
377+
"readinessPort": {
378+
"description": "The WebLogic readiness port for Istio. Defaults to 8888. Not required.",
379+
"type": "number"
380+
},
381+
"enabled": {
382+
"description": "True, if this domain is deployed under an Istio service mesh. Defaults to true when the \u0027istio\u0027 element is included. Not required.",
383+
"type": "boolean"
384+
}
385+
}
386+
},
361387
"KubernetesResource": {
362388
"type": "object",
363389
"properties": {

docs/domains/Domain.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ DomainSpec is a description of a domain.
2323
| `domainHome` | string | The folder for the WebLogic Domain. Not required. Defaults to /shared/domains/domains/domainUID if domainHomeInImage is false. Defaults to /u01/oracle/user_projects/domains/ if domainHomeInImage is true. |
2424
| `domainHomeInImage` | Boolean | True if this domain's home is defined in the Docker image for the domain. Defaults to true. |
2525
| `domainUID` | string | Domain unique identifier. Must be unique across the Kubernetes cluster. Not required. Defaults to the value of metadata.name. |
26+
| `experimental` | [Experimental](#experimental) | Experimental feature configurations. |
2627
| `image` | string | The WebLogic Docker image; required when domainHomeInImage is true; otherwise, defaults to container-registry.oracle.com/middleware/weblogic:12.2.1.3. |
2728
| `imagePullPolicy` | string | The image pull policy for the WebLogic Docker image. Legal values are Always, Never and IfNotPresent. Defaults to Always if image ends in :latest, IfNotPresent otherwise. |
2829
| `imagePullSecrets` | array of [Local Object Reference](k8s1.13.5.md#local-object-reference) | A list of image pull secrets for the WebLogic Docker image. |
@@ -81,6 +82,12 @@ An element representing a cluster in the domain configuration.
8182
| `serverStartPolicy` | string | The strategy for deciding whether to start a server. Legal values are NEVER, or IF_NEEDED. |
8283
| `serverStartState` | string | The state in which the server is to be started. Use ADMIN if server should start in the admin state. Defaults to RUNNING. |
8384

85+
### Experimental
86+
87+
| Name | Type | Description |
88+
| --- | --- | --- |
89+
| `istio` | [Istio](#istio) | Istio service mesh integration configuration. |
90+
8491
### Managed Server
8592

8693
ManagedServer represents the operator configuration for a single Managed Server.
@@ -176,6 +183,13 @@ ServerPod describes the configuration for a Kubernetes pod for a server.
176183
| `annotations` | Map | The annotations to be attached to generated resources. |
177184
| `labels` | Map | The labels to be attached to generated resources. The label names must not start with 'weblogic.'. |
178185

186+
### Istio
187+
188+
| Name | Type | Description |
189+
| --- | --- | --- |
190+
| `enabled` | Boolean | True, if this domain is deployed under an Istio service mesh. Defaults to true when the 'istio' element is included. Not required. |
191+
| `readinessPort` | number | The WebLogic readiness port for Istio. Defaults to 8888. Not required. |
192+
179193
### Probe Tuning
180194

181195
| Name | Type | Description |

0 commit comments

Comments
 (0)