Skip to content

Commit b8f70c5

Browse files
committed
Move Istio to Experimental
1 parent 53080b2 commit b8f70c5

File tree

9 files changed

+126
-49
lines changed

9 files changed

+126
-49
lines changed

docs/domains/Domain.json

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,9 @@
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-
"istio": {
253-
"description": "Istio service mesh integration configuration.",
254-
"$ref": "#/definitions/Istio"
252+
"experimental": {
253+
"description": "Experimental feature configurations.",
254+
"$ref": "#/definitions/Experimental"
255255
},
256256
"serverStartPolicy": {
257257
"description": "The strategy for deciding whether to start a server. Legal values are ADMIN_ONLY, NEVER, or IF_NEEDED.",
@@ -362,6 +362,15 @@
362362
}
363363
}
364364
},
365+
"Experimental": {
366+
"type": "object",
367+
"properties": {
368+
"istio": {
369+
"description": "Istio service mesh integration configuration.",
370+
"$ref": "#/definitions/Istio"
371+
}
372+
}
373+
},
365374
"Istio": {
366375
"type": "object",
367376
"properties": {

docs/domains/Domain.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ 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. |
2930
| `includeServerOutInPodLog` | Boolean | If true (the default), the server .out file will be included in the pod's stdout. |
30-
| `istio` | [Istio](#istio) | Istio service mesh integration configuration. |
3131
| `logHome` | string | The in-pod name of the directory in which to store the domain, node manager, server logs, and server *.out files |
3232
| `logHomeEnabled` | Boolean | Specified whether the log home folder is enabled. Not required. Defaults to true if domainHomeInImage is false. Defaults to false if domainHomeInImage is true. |
3333
| `managedServers` | array of [Managed Server](#managed-server) | Configuration for individual Managed Servers. |
@@ -82,11 +82,11 @@ An element representing a cluster in the domain configuration.
8282
| `serverStartPolicy` | string | The strategy for deciding whether to start a server. Legal values are NEVER, or IF_NEEDED. |
8383
| `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. |
8484

85-
### Istio
85+
### Experimental
8686

8787
| Name | Type | Description |
8888
| --- | --- | --- |
89-
| `istioEnabled` | Boolean | True, if this domain is deployed under an Istio service mesh. Defaults to true. Not required. |
89+
| `istio` | [Istio](#istio) | Istio service mesh integration configuration. |
9090

9191
### Managed Server
9292

@@ -175,6 +175,12 @@ ServerPod describes the configuration for a Kubernetes pod for a server.
175175
| `annotations` | Map | The annotations to be attached to generated resources. |
176176
| `labels` | Map | The labels to be attached to generated resources. The label names must not start with 'weblogic.'. |
177177

178+
### Istio
179+
180+
| Name | Type | Description |
181+
| --- | --- | --- |
182+
| `istioEnabled` | Boolean | True, if this domain is deployed under an Istio service mesh. Defaults to true. Not required. |
183+
178184
### Probe Tuning
179185

180186
| Name | Type | Description |

docs/domains/index.html

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,9 +1169,9 @@
11691169
"description": "Domain unique identifier. Must be unique across the Kubernetes cluster. Not required. Defaults to the value of metadata.name.",
11701170
"type": "string"
11711171
},
1172-
"istio": {
1173-
"description": "Istio service mesh integration configuration.",
1174-
"$ref": "#/definitions/Istio"
1172+
"experimental": {
1173+
"description": "Experimental feature configurations.",
1174+
"$ref": "#/definitions/Experimental"
11751175
},
11761176
"serverStartPolicy": {
11771177
"description": "The strategy for deciding whether to start a server. Legal values are ADMIN_ONLY, NEVER, or IF_NEEDED.",
@@ -1282,6 +1282,15 @@
12821282
}
12831283
}
12841284
},
1285+
"Experimental": {
1286+
"type": "object",
1287+
"properties": {
1288+
"istio": {
1289+
"description": "Istio service mesh integration configuration.",
1290+
"$ref": "#/definitions/Istio"
1291+
}
1292+
}
1293+
},
12851294
"Istio": {
12861295
"type": "object",
12871296
"properties": {

integration-tests/src/test/resources/OperatorIT.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ waitTimePod=10
1010
weblogicImageTag = 12.2.1.3
1111
weblogicImageName = container-registry.oracle.com/middleware/weblogic
1212
OCR_SERVER="container-registry.oracle.com"
13-
DOMAIN_API_VERSION = weblogic.oracle/v4
13+
DOMAIN_API_VERSION = weblogic.oracle/v5

kubernetes/samples/scripts/common/domain-template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# This is an example of how to define a Domain resource.
66
#
7-
apiVersion: "weblogic.oracle/v4"
7+
apiVersion: "weblogic.oracle/v5"
88
kind: Domain
99
metadata:
1010
name: %DOMAIN_UID%

kubernetes/samples/scripts/create-weblogic-domain/manually-create-domain/domain.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# This is an example of how to define a Domain resource. Please read through the comments which explain
66
# what updates are needed.
77
#
8-
apiVersion: "weblogic.oracle/v4"
8+
apiVersion: "weblogic.oracle/v5"
99
kind: Domain
1010
metadata:
1111
# Update this with the `domainUID` of your domain:

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ public interface KubernetesConstants {
2222
String DOMAIN_PLURAL = "domains";
2323
String DOMAIN_SINGULAR = "domain";
2424
String DOMAIN_SHORT = "dom";
25-
String DOMAIN_VERSION = "v4";
26-
String[] DOMAIN_ALTERNATE_VERSIONS = {"v2", "v3"};
25+
String DOMAIN_VERSION = "v5";
26+
String[] DOMAIN_ALTERNATE_VERSIONS = {"v2", "v3", "v4"};
2727

2828
boolean DEFAULT_INCLUDE_SERVER_OUT_IN_POD_LOG = true;
2929

model/src/main/java/oracle/kubernetes/weblogic/domain/model/DomainSpec.java

Lines changed: 8 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@ public class DomainSpec extends BaseConfiguration {
196196
@Description("Configuration for the clusters.")
197197
protected List<Cluster> clusters = new ArrayList<>();
198198

199-
@Description("Istio service mesh integration configuration.")
200-
private Istio istio;
199+
@Description("Experimental feature configurations.")
200+
private Experimental experimental;
201201

202202
/**
203203
* Adds a Cluster to the DomainSpec.
@@ -506,36 +506,9 @@ public void setConfigOverrideSecrets(@Nullable List<String> overridesSecretNames
506506
}
507507

508508
boolean istioEnabled() {
509-
return Optional.ofNullable(istio).map(i -> i.getIstioEnabled()).orElse(false);
510-
}
511-
512-
/**
513-
* Istio service mesh integration configuration.
514-
*
515-
* @return Istio service mesh integration configuration.
516-
*/
517-
public Istio getIstio() {
518-
return this.istio;
519-
}
520-
521-
/**
522-
* Istio service mesh integration configuration.
523-
*
524-
* @param istio Istio service mesh integration configuration.
525-
*/
526-
public void setIstio(Istio istio) {
527-
this.istio = istio;
528-
}
529-
530-
/**
531-
* Istio service mesh integration configuration.
532-
*
533-
* @param istio Istio service mesh integration configuration.
534-
* @return this
535-
*/
536-
public DomainSpec withIstio(Istio istio) {
537-
this.istio = istio;
538-
return this;
509+
return Optional.ofNullable(experimental)
510+
.map(e -> e.getIstio())
511+
.map(i -> i.getIstioEnabled()).orElse(false);
539512
}
540513

541514
@Override
@@ -560,7 +533,7 @@ public String toString() {
560533
.append("includeServerOutInPodLog", includeServerOutInPodLog)
561534
.append("configOverrides", configOverrides)
562535
.append("configOverrideSecrets", configOverrideSecrets)
563-
.append("istio", istio);
536+
.append("experimental", experimental);
564537

565538
return builder.toString();
566539
}
@@ -587,7 +560,7 @@ public int hashCode() {
587560
.append(includeServerOutInPodLog)
588561
.append(configOverrides)
589562
.append(configOverrideSecrets)
590-
.append(istio);
563+
.append(experimental);
591564

592565
return builder.toHashCode();
593566
}
@@ -622,7 +595,7 @@ public boolean equals(Object other) {
622595
.append(includeServerOutInPodLog, rhs.includeServerOutInPodLog)
623596
.append(configOverrides, rhs.configOverrides)
624597
.append(configOverrideSecrets, rhs.configOverrideSecrets)
625-
.append(istio, rhs.istio);
598+
.append(experimental, rhs.experimental);
626599

627600
return builder.isEquals();
628601
}
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
// Copyright 2019, Oracle Corporation and/or its affiliates. All rights reserved.
2+
// Licensed under the Universal Permissive License v 1.0 as shown at
3+
// http://oss.oracle.com/licenses/upl.
4+
5+
package oracle.kubernetes.weblogic.domain.model;
6+
7+
import oracle.kubernetes.json.Description;
8+
import org.apache.commons.lang3.builder.EqualsBuilder;
9+
import org.apache.commons.lang3.builder.HashCodeBuilder;
10+
import org.apache.commons.lang3.builder.ToStringBuilder;
11+
12+
public class Experimental {
13+
14+
@Description("Istio service mesh integration configuration.")
15+
private Istio istio;
16+
17+
/**
18+
* Istio service mesh integration configuration.
19+
*
20+
* @return Istio service mesh integration configuration.
21+
*/
22+
public Istio getIstio() {
23+
return this.istio;
24+
}
25+
26+
/**
27+
* Istio service mesh integration configuration.
28+
*
29+
* @param istio Istio service mesh integration configuration.
30+
*/
31+
public void setIstio(Istio istio) {
32+
this.istio = istio;
33+
}
34+
35+
/**
36+
* Istio service mesh integration configuration.
37+
*
38+
* @param istio Istio service mesh integration configuration.
39+
* @return this
40+
*/
41+
public Experimental withIstio(Istio istio) {
42+
this.istio = istio;
43+
return this;
44+
}
45+
46+
@Override
47+
public String toString() {
48+
ToStringBuilder builder =
49+
new ToStringBuilder(this)
50+
.append("istio", istio);
51+
52+
return builder.toString();
53+
}
54+
55+
@Override
56+
public int hashCode() {
57+
HashCodeBuilder builder =
58+
new HashCodeBuilder()
59+
.append(istio);
60+
61+
return builder.toHashCode();
62+
}
63+
64+
@Override
65+
public boolean equals(Object other) {
66+
if (other == this) {
67+
return true;
68+
}
69+
if (!(other instanceof Experimental)) {
70+
return false;
71+
}
72+
73+
Experimental rhs = ((Experimental) other);
74+
EqualsBuilder builder =
75+
new EqualsBuilder()
76+
.append(istio, rhs.istio);
77+
78+
return builder.isEquals();
79+
}
80+
}

0 commit comments

Comments
 (0)