Skip to content

Commit 82aa557

Browse files
committed
Merge branch 'feature/helm_operator_1_1' of https://github.com/oracle/weblogic-kubernetes-operator into feature/helm_operator_1_1
2 parents 312691e + 7adb008 commit 82aa557

File tree

5 files changed

+109
-25
lines changed

5 files changed

+109
-25
lines changed

kubernetes/charts/weblogic-domain/README.md

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -38,22 +38,17 @@ In this command, you must replace the uppercase items with your
3838
own values. The secret name will be needed when installing the helm chart.
3939

4040
## Installing the Chart
41-
Clone the git weblogic-operator repo:
4241

43-
```bash
44-
git clone https://github.com/oracle/weblogic-kubernetes-operator.git
45-
```
46-
47-
Change directory to the cloned git weblogic-operator repo:
42+
Change directory to the cloned git weblogic-kubernetes-operator repo:
4843

4944
```bash
50-
cd weblogic-operator/kubernetes/helm-charts
45+
cd kubernetes/charts
5146
```
5247

5348
To install the chart with the release `my-release`, namespace `my-namespace` and secret `my-secret' without creating a weblogic domain (such as when a WebLogic domain already exists):
5449

5550
```bash
56-
helm install weblogic-domain --name my-release --namespace my-namespace --set secretName=my-secret --set createWeblogicDomain=false
51+
helm install weblogic-domain --name my-release --namespace my-namespace --set weblogicCredentialsSecretName=my-secret --set createWeblogicDomain=false
5752
```
5853

5954
The command deploys weblogic-domain on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists
@@ -75,34 +70,42 @@ The command removes all the Kubernetes components associated with the chart and
7570
| Key | Description | Default |
7671
| -------------------------------|-----------------------------------|-----------------------|
7772
| createWeblogicDomain | Boolean indicating if a weblogic domain should be created | true |
78-
| adminNodePort | NodePort to expose for the admin server | 30701 |
7973
| adminPort | Port number for Admin Server | 7001 |
8074
| adminServerName | Name of the Admin Server | admin-server |
81-
| clusterName | Cluster name | cluster-1 |
82-
| createDomainScript | Script used to create the domain | /u01/weblogic/create-domain-script.sh |
8375
| domainName | Name of the WebLogic domain to create | base_domain |
84-
| domainUid | Unique id identifying a domain. The id must be unique across all domains in a Kubernetes cluster | domain1 |
85-
| exposeAdminT3Channel | Boolean to indicate if the channel should be exposed as a service | false |
86-
| exposeAdminNodePort | Boolean to indicate if the adminNodePort will be exposed | false |
87-
| imagePullSecretName | Name of the Kubernetes secret to access the Docker Store to pull the Weblogic Docker image | |
88-
| loadBalancer | Load balancer to deploy. Supported values are: traefik, none | traefik |
89-
| loadBalancerAdminPort | Load balancer admin port | 30315 |
90-
| loadBalancerWebPort| Load balancer web port | 30305 |
91-
| managedServerCount | Number of managed servers to generate for the domain | 2 |
92-
| managedServerStartCount | Number of managed severs to initially start for a domain | 2 |
76+
| domainUID | Unique id identifying a domain. The id must be unique across all domains in a Kubernetes cluster | domain1 (needs to uncomment) |
77+
| clusterType | Type of WebLogic Cluster. Legal values are "CONFIGURED" or "DYNAMIC" | DYNAMIC |
78+
| startupControl | Determines which WebLogic Servers the Operator will start up. Legal values are "NONE", "ALL", "ADMIN", "SPECIFIED", or "AUTO" | "AUTO" |
79+
| clusterName | Cluster name | cluster-1 |
80+
| configuredManagedServerCount | Number of managed servers to generate for the domain | 2 |
81+
| initialManagedServerReplicas | Number of managed severs to initially start for a domain | 2 |
9382
| managedServerNameBase | Base string used to generate managed server names | managed-server |
9483
| managedServerPort | Port number for each managed server | 8001 |
95-
| persistencePath | Physical path of the persistent volume storage | /scratch/k8s_dir/persistentVolume001 |
96-
| persistenceSize | Total storage allocated by the persistent volume | 10Gi |
84+
| weblogicImage | WebLogic Docker image | store/oracle/weblogic:12.2.1.3 |
85+
| weblogicDomainStorageType | Persistent volume type for the domain's storage. The value must be 'HOST_PATH' or 'NFS' | HOST_PAT |
86+
| weblogicDomainStorageNFSServer | The server name or ip address of the NFS server to use for the domain's storage | nfsServer (need to uncomment as necessary) |
87+
| weblogicDomainStoragePath | Physical path of the persistent volume storage | /scratch/k8s_dir/domain1 (need to uncomment) |
88+
| weblogicDomainStorageReclaimPolicy | Reclaim policy of the domain's persistent storage. The valid values are: 'Retain', 'Delete', and 'Recycle' | Retain |
89+
| weblogicDomainStorageSize | Total storage allocated to the domain's persistent volume | 10Gi |
9790
| productionModeEnabled | Boolean indicating if production mode is enabled for the domain | true |
98-
| secretName | Name of the Kubernetes secret for the Admin Server's username and password | domain1-weblogic-credentials |
91+
| weblogicCredentialsSecretName | Name of the Kubernetes secret for the Admin Server's username and password | domain1-weblogic-credentials |
92+
| weblogicImagePullSecretName | Name of the Kubernetes secret to access the Docker Store to pull the Weblogic Docker image | |
9993
| t3ChannelPort | Port for the T3Channel of the NetworkAccessPoint | 30012 |
10094
| t3PublicAddress | Public address for T3Channel of the NetworkAccessPoint. This value should be set to the Kubernetes server address, which you can get by running "kubectl cluster-info". If this value is not set to that address, WLST will not be able to connect from outside the Kubernetes cluster | kubernetes |
95+
| exposeAdminT3Channel | Boolean to indicate if the channel should be exposed as a service | false |
96+
| adminNodePort | NodePort to expose for the admin server | 30701 |
97+
| exposeAdminNodePort | Boolean to indicate if the adminNodePort will be exposed | false |
98+
| loadBalancer | Load balancer to deploy. Supported values are: APACHE, TRAEFIX, VOYAGER, NONE | TRAEFIK |
99+
| loadBalancerVolumePath | Docker volume path for APACHE. | |
100+
| loadBalancerExposeAdminPort| If the admin port is going to be exposed for APACHE | false |
101+
| loadBalancerWebPort| Load balancer web port | 30305 |
102+
| loadBalancerDashboardPort | Load balancer dashboard port | 30315 |
103+
| javaOptions | Java option for WebLogic Server | -Dweblogic.StdoutDebugEnabled=false |
101104

102105
Specify parameters to override default values using the `--set key=value[,key=value]` argument to helm install. For example:
103106

104107
```bash
105-
helm install weblogic-domain --name my-release --namespace my-namespace --set managedServerCount=3
108+
helm install weblogic-domain --name my-release --namespace my-namespace --set configuredManagedServerCount=3
106109
```
107110

108111
Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example:

kubernetes/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
<dependency>
5555
<groupId>io.kubernetes</groupId>
5656
<artifactId>client-java</artifactId>
57-
<version>1.0.0</version>
57+
<version>2.0.0</version>
5858
<scope>test</scope>
5959
</dependency>
6060
<dependency>

kubernetes/src/test/java/oracle/kubernetes/operator/helm/CreateDomainGeneratedFilesOptionalFeaturesDisabledIT.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66

77
import oracle.kubernetes.operator.create.CreateDomainGeneratedFilesOptionalFeaturesDisabledTestBase;
88
import org.junit.BeforeClass;
9+
import org.junit.Ignore;
910

11+
@Ignore
1012
public class CreateDomainGeneratedFilesOptionalFeaturesDisabledIT
1113
extends CreateDomainGeneratedFilesOptionalFeaturesDisabledTestBase {
1214

kubernetes/src/test/java/oracle/kubernetes/operator/helm/HelmDomainValues.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,13 @@ class HelmDomainValues extends DomainValues {
2828
loadFromMap(map, this::setManagedServerNameBase, "managedServerNameBase");
2929
loadFromMap(map, this::setWeblogicImage, "weblogicImage");
3030
loadFromMap(map, this::setWeblogicDomainStorageType, "weblogicDomainStorageType");
31+
loadFromMap(map, this::setWeblogicDomainStorageNFSServer, "weblogicDomainStorageNFSServer");
32+
loadFromMap(map, this::setWeblogicDomainStoragePath, "weblogicDomainStoragePath");
3133
loadFromMap(
3234
map, this::setWeblogicDomainStorageReclaimPolicy, "weblogicDomainStorageReclaimPolicy");
3335
loadFromMap(map, this::setWeblogicDomainStorageSize, "weblogicDomainStorageSize");
3436
loadFromMap(map, this::setWeblogicCredentialsSecretName, "weblogicCredentialsSecretName");
37+
loadFromMap(map, this::setWeblogicImagePullSecretName, "weblogicImagePullSecretName");
3538
loadFromMap(map, this::setT3PublicAddress, "t3PublicAddress");
3639
loadFromMap(map, this::setNamespace, "namespace");
3740
loadFromMap(map, this::setLoadBalancer, "loadBalancer");
@@ -90,10 +93,14 @@ Map<String, Object> createMap() {
9093
addStringMapEntry(map, this::getManagedServerNameBase, "managedServerNameBase");
9194
addStringMapEntry(map, this::getWeblogicImage, "weblogicImage");
9295
addStringMapEntry(map, this::getWeblogicDomainStorageType, "weblogicDomainStorageType");
96+
addStringMapEntry(
97+
map, this::getWeblogicDomainStorageNFSServer, "weblogicDomainStorageNFSServer");
98+
addStringMapEntry(map, this::getWeblogicDomainStoragePath, "weblogicDomainStoragePath");
9399
addStringMapEntry(
94100
map, this::getWeblogicDomainStorageReclaimPolicy, "weblogicDomainStorageReclaimPolicy");
95101
addStringMapEntry(map, this::getWeblogicDomainStorageSize, "weblogicDomainStorageSize");
96102
addStringMapEntry(map, this::getWeblogicCredentialsSecretName, "weblogicCredentialsSecretName");
103+
addStringMapEntry(map, this::getWeblogicImagePullSecretName, "weblogicImagePullSecretName");
97104
addStringMapEntry(map, this::getT3PublicAddress, "t3PublicAddress");
98105
addStringMapEntry(map, this::getNamespace, "namespace");
99106
addStringMapEntry(map, this::getLoadBalancer, "loadBalancer");

kubernetes/src/test/java/oracle/kubernetes/operator/helm/HelmDomainValuesTest.java

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,54 @@ public void whenCreatedFromMapWithWeblogicDomainStorageType_hasSpecifiedValue()
346346
assertThat(values.getWeblogicDomainStorageType(), equalTo(stringValue));
347347
}
348348

349+
// ----- weblogicDomainStorageNFSServer
350+
351+
@Test
352+
public void whenWeblogicDomainStorageNFSServerSet_createdMapContainsValue() {
353+
domainValues.weblogicDomainStorageNFSServer(stringValue);
354+
355+
assertThat(domainValues.createMap(), hasEntry("weblogicDomainStorageNFSServer", stringValue));
356+
}
357+
358+
@Test
359+
public void whenCreatedFromMapWithoutWeblogicDomainStorageNFSServer_hasEmptyString() {
360+
HelmDomainValues values = new HelmDomainValues(ImmutableMap.of());
361+
362+
assertThat(values.getWeblogicDomainStorageNFSServer(), equalTo(""));
363+
}
364+
365+
@Test
366+
public void whenCreatedFromMapWithWeblogicDomainStorageNFSServer_hasSpecifiedValue() {
367+
HelmDomainValues values =
368+
new HelmDomainValues(ImmutableMap.of("weblogicDomainStorageNFSServer", stringValue));
369+
370+
assertThat(values.getWeblogicDomainStorageNFSServer(), equalTo(stringValue));
371+
}
372+
373+
// ----- weblogicDomainStoragePath
374+
375+
@Test
376+
public void whenWeblogicDomainStoragePathSet_createdMapContainsValue() {
377+
domainValues.weblogicDomainStoragePath(stringValue);
378+
379+
assertThat(domainValues.createMap(), hasEntry("weblogicDomainStoragePath", stringValue));
380+
}
381+
382+
@Test
383+
public void whenCreatedFromMapWithoutWeblogicDomainStoragePath_hasEmptyString() {
384+
HelmDomainValues values = new HelmDomainValues(ImmutableMap.of());
385+
386+
assertThat(values.getWeblogicDomainStoragePath(), equalTo(""));
387+
}
388+
389+
@Test
390+
public void whenCreatedFromMapWithWeblogicDomainStoragePath_hasSpecifiedValue() {
391+
HelmDomainValues values =
392+
new HelmDomainValues(ImmutableMap.of("weblogicDomainStoragePath", stringValue));
393+
394+
assertThat(values.getWeblogicDomainStoragePath(), equalTo(stringValue));
395+
}
396+
349397
// ----- weblogicDomainStorageReclaimPolicy
350398

351399
@Test
@@ -461,6 +509,30 @@ public void whenCreatedFromMapWithWeblogicCredentialsSecretName_hasSpecifiedValu
461509
assertThat(values.getWeblogicCredentialsSecretName(), equalTo(stringValue));
462510
}
463511

512+
// ----- weblogicImagePullSecretName
513+
514+
@Test
515+
public void whenWeblogicImagePullSecretNameSet_createdMapContainsValue() {
516+
domainValues.weblogicImagePullSecretName(stringValue);
517+
518+
assertThat(domainValues.createMap(), hasEntry("weblogicImagePullSecretName", stringValue));
519+
}
520+
521+
@Test
522+
public void whenCreatedFromMapWithoutWeblogicImagePullSecretName_hasEmptyString() {
523+
HelmDomainValues values = new HelmDomainValues(ImmutableMap.of());
524+
525+
assertThat(values.getWeblogicImagePullSecretName(), equalTo(""));
526+
}
527+
528+
@Test
529+
public void whenCreatedFromMapWithWeblogicImagePullSecretName_hasSpecifiedValue() {
530+
HelmDomainValues values =
531+
new HelmDomainValues(ImmutableMap.of("weblogicImagePullSecretName", stringValue));
532+
533+
assertThat(values.getWeblogicImagePullSecretName(), equalTo(stringValue));
534+
}
535+
464536
// ----- t3ChannelPort
465537

466538
@Test

0 commit comments

Comments
 (0)