Skip to content

Commit 60c094c

Browse files
committed
Merge branch 'develop' of https://github.com/oracle/weblogic-kubernetes-operator into chshi-OWLS-70886-svc-upt2
2 parents 0f586b7 + 893523b commit 60c094c

File tree

9 files changed

+54
-61
lines changed

9 files changed

+54
-61
lines changed

kubernetes/samples/charts/ingress-per-domain/README.md

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ To install the chart with the release name, `my-ingress`, with the given `values
1313
```
1414
# Change directory to the cloned git weblogic-kubernetes-operator repo.
1515
$ cd kubernetes/samples/charts
16-
$ helm install ingress-per-domain --name my-ingress --values values.yaml
16+
17+
# Use helm to install the chart. Use `--namespace` to specify the name of the WebLogic domain's namespace.
18+
$ helm install ingress-per-domain --name my-ingress --namespace my-domain-namespace --values values.yaml
1719
```
1820
The Ingress resource will be created in the same namespace as the WebLogic domain cluster.
1921

@@ -23,10 +25,9 @@ type: TRAEFIK
2325
2426
# WLS domain as backend to the load balancer
2527
wlsDomain:
26-
namespace: default
2728
domainUID: domain1
2829
clusterName: cluster1
29-
svcPort: 8001
30+
managedServerPort: 8001
3031
3132
# Traefik specific values
3233
traefik:
@@ -40,10 +41,9 @@ type: VOYAGER
4041
4142
# WLS domain as backend to the load balancer
4243
wlsDomain:
43-
namespace: default
4444
domainUID: domain1
4545
clusterName: cluster1
46-
svcPort: 8001
46+
managedServerPort: 8001
4747
4848
# Voyager specific values
4949
voyager:
@@ -60,15 +60,14 @@ $ helm delete --purge my-ingress
6060
## Configuration
6161
The following table lists the configurable parameters of this chart and their default values.
6262

63-
| Parameter | Description | Default |
64-
| -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- |
65-
| `type` | Type of Ingress controller. Legal values are `TRAEFIK` or `VOYAGER`. | `TRAEFIK` |
66-
| `wlsDomain.namespace` | Namespace of the WLS domain cluster. | `default` |
67-
| `wlsDomain.domainUID` | DomainUID of the WLS domain. | `domain1` |
68-
| `wlsDomain.clusterName` | Cluster name in the WLS domain. | `cluster-1` |
69-
| `wlsDomain.svcPort` | Service port of the WLS domain cluster. | `8001` |
70-
| `traefik.hostname` | Hostname to route to the WLS domain cluster. | `domain1.org` |
71-
| `voyager.webPort` | Web port to access the Voyager load balancer. | `30305` |
72-
| `voyager.statsPort` | Port to access the Voyager/HAProxy stats page. | `30315` |
63+
| Parameter | Description | Default |
64+
| --- | --- | --- |
65+
| `type` | Type of Ingress controller. Legal values are `TRAEFIK` or `VOYAGER`. | `TRAEFIK` |
66+
| `wlsDomain.domainUID` | DomainUID of the WLS domain. | `domain1` |
67+
| `wlsDomain.clusterName` | Cluster name in the WLS domain. | `cluster-1` |
68+
| `wlsDomain.managedServerPort` | Port number of the managed servers in the WLS domain cluster. | `8001` |
69+
| `traefik.hostname` | Hostname to route to the WLS domain cluster. | `domain1.org` |
70+
| `voyager.webPort` | Web port to access the Voyager load balancer. | `30305` |
71+
| `voyager.statsPort` | Port to access the Voyager/HAProxy stats page. | `30315` |
7372

7473
**Note:** The input values `domainUID` and `clusterName` will be used to generate the Kubernetes `serviceName` of the WLS cluster with the format `domainUID-cluster-clusterName`.
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
# Copyright 2018, Oracle Corporation and/or its affiliates. All rights reserved.
1+
# Copyright 2018, 2019, Oracle Corporation and/or its affiliates. All rights reserved.
22
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
33

44
{{- if eq .Values.type "TRAEFIK" }}
55
---
66
apiVersion: extensions/v1beta1
77
kind: Ingress
88
metadata:
9-
name: {{ .Release.Name }}-traefik
10-
namespace: {{ .Values.wlsDomain.namespace }}
9+
name: {{ .Values.wlsDomain.domainUID }}-traefik
10+
namespace: {{ .Release.Namespace }}
11+
labels:
12+
weblogic.resourceVersion: domain-v2
1113
spec:
1214
annotations:
1315
kubernetes.io/ingress.class: traefik
@@ -18,5 +20,5 @@ spec:
1820
- path:
1921
backend:
2022
serviceName: '{{ .Values.wlsDomain.domainUID }}-cluster-{{ .Values.wlsDomain.clusterName | lower | replace "_" "-" }}'
21-
servicePort: {{ .Values.wlsDomain.svcPort }}
23+
servicePort: {{ .Values.wlsDomain.managedServerPort }}
2224
{{- end }}

kubernetes/samples/charts/ingress-per-domain/templates/voyager-ingress.yaml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
# Copyright 2018, Oracle Corporation and/or its affiliates. All rights reserved.
1+
# Copyright 2018, 2019, Oracle Corporation and/or its affiliates. All rights reserved.
22
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
33

44
{{- if eq .Values.type "VOYAGER" }}
55
---
66
apiVersion: voyager.appscode.com/v1beta1
77
kind: Ingress
88
metadata:
9-
name: {{ .Release.Name }}-voyager
10-
namespace: {{ .Values.wlsDomain.namespace }}
9+
name: {{ .Values.wlsDomain.domainUID }}-voyager
10+
namespace: {{ .Release.Namespace }}
11+
labels:
12+
weblogic.resourceVersion: domain-v2
1113
annotations:
1214
ingress.appscode.com/type: 'NodePort'
1315
ingress.appscode.com/stats: 'true'
@@ -20,14 +22,16 @@ spec:
2022
paths:
2123
- backend:
2224
serviceName: '{{ .Values.wlsDomain.domainUID }}-cluster-{{ .Values.wlsDomain.clusterName | lower | replace "_" "-" }}'
23-
servicePort: '{{ .Values.wlsDomain.svcPort }}'
25+
servicePort: '{{ .Values.wlsDomain.managedServerPort }}'
2426

2527
---
2628
apiVersion: v1
2729
kind: Service
2830
metadata:
29-
name: {{ .Release.Name }}-voyager-stats
30-
namespace: {{ .Values.wlsDomain.namespace }}
31+
name: {{ .Values.wlsDomain.domainUID }}-voyager-stats
32+
namespace: {{ .Release.Namespace }}
33+
labels:
34+
weblogic.resourceVersion: domain-v2
3135
spec:
3236
type: NodePort
3337
ports:
@@ -38,5 +42,5 @@ spec:
3842
nodePort: {{ .Values.voyager.statsPort }}
3943
selector:
4044
origin: voyager
41-
origin-name: {{ .Release.Name }}-voyager
45+
origin-name: {{ .Values.wlsDomain.domainUID }}-voyager
4246
{{- end }}

kubernetes/samples/charts/ingress-per-domain/values.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2018 Oracle Corporation and/or its affiliates. All rights reserved.
1+
# Copyright 2018, 2019, Oracle Corporation and/or its affiliates. All rights reserved.
22
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
33

44
# Default values for ingress-per-domain.
@@ -10,10 +10,9 @@ type: TRAEFIK
1010

1111
# WLS domain as backend to the load balancer
1212
wlsDomain:
13-
namespace: default
1413
domainUID: domain1
1514
clusterName: cluster-1
16-
svcPort: 8001
15+
managedServerPort: 8001
1716

1817
# Traefik specific values
1918
traefik:

kubernetes/samples/charts/traefik/README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
This sample demonstrates how to install the Traefik ingress controller to provide
44
load balancing for WebLogic clusters.
55

6-
## Prerequisites
7-
8-
To use this sample you must download [onessl](https://github.com/kubepack/onessl) and place it in the `util` directory.
9-
106
## Install the Traefik operator with a Helm chart
117
The Traefik Helm chart is located in the official Helm project `charts` directory at https://github.com/helm/charts/tree/master/stable/traefik.
128
The chart is in the default repository for Helm.

kubernetes/samples/charts/traefik/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
image: traefik
2+
imageTag: 1.7.4
13
serviceType: NodePort
24
service:
35
nodePorts:

kubernetes/samples/charts/util/setup.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ function createVoyager() {
2525
helm install appscode/voyager --name voyager-operator --version 7.4.0 \
2626
--namespace voyager \
2727
--set cloudProvider=baremetal \
28-
--set apiserver.ca="$(${MYDIR}/onessl get kube-ca)" \
2928
--set apiserver.enableValidatingWebhook=false
3029
else
3130
echo "Voyager operator is already installed."

kubernetes/samples/charts/voyager/README.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,20 @@ AppsCode has provided a Helm chart to install Voyager. See the official installa
55

66
As a demonstration, the following are the detailed steps to install the Voyager operator by using a Helm chart on a Linux OS.
77

8-
### 1. Install Onessl
9-
Onessl is a utility provided by AppsCode. We'll use it to get a CA certificate for the Kubernetes cluster.
10-
```
11-
# The assumption is that you have added ~/bin to your PATH env.
12-
$ curl -fsSL -o onessl https://github.com/kubepack/onessl/releases/download/0.3.0/onessl-linux-amd64 \
13-
&& chmod +x onessl \
14-
&& mv onessl ~/bin
15-
```
16-
17-
### 2. Add the AppsCode chart repository
8+
### 1. Add the AppsCode chart repository
189
```
1910
$ helm repo add appscode https://charts.appscode.com/stable/
2011
$ helm repo update
2112
$ helm search appscode/voyager
2213
```
2314

24-
### 3. Install the Voyager operator
15+
### 2. Install the Voyager operator
2516
```
2617
# Kubernetes 1.9.x - 1.10.x
2718
$ kubectl create ns voyager
2819
$ helm install appscode/voyager --name voyager-operator --version 7.4.0 \
2920
--namespace voyager \
3021
--set cloudProvider=baremetal \
31-
--set apiserver.ca="$(onessl get kube-ca)" \
3222
--set apiserver.enableValidatingWebhook=false
3323
```
3424
## Optionally, download the Voyager Helm chart

site/quickstart.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ $ docker tag oracle/weblogic-kubernetes-operator:2.0-rc2 weblogic-kubernetes-ope
4040
```
4141
d. Pull the Traefik load balancer image:
4242
```
43-
$ docker pull traefik:latest
43+
$ docker pull traefik:1.7.4
4444
```
4545
e. Pull the WebLogic 12.2.1.3 install image:
4646
```
@@ -205,34 +205,36 @@ $ kubectl get services -n sample-domain1-ns
205205
```
206206

207207
d. Create an Ingress for the domain, in the domain namespace, by using the [sample](../kubernetes/samples/charts/ingress-per-domain/README.md) Helm chart:
208-
* Use `helm install`, specifying the `domainUID` (`sample-domain1`) and domain namespace (`sample-domain1-ns`) in the `values.yaml` file.
209208
```
210209
$ helm install kubernetes/samples/charts/ingress-per-domain \
211210
--name sample-domain1-ingress \
212-
--set wlsDomain.namespace=sample-domain1-ns \
211+
--namespace sample-domain1-ns \
213212
--set wlsDomain.domainUID=sample-domain1 \
214213
--set traefik.hostname=sample-domain1.org
215214
```
216215

217216
e. To confirm that the load balancer noticed the new Ingress and is successfully routing to the domain's server pods,
218217
you can hit the URL for the "WebLogic Ready App" which will return a HTTP 200 status code, as
219218
shown in the example below. If you used the host-based routing Ingress sample, you will need to
220-
provide the hostname in the `-H` option:
219+
provide the hostname in the `-H` option.
220+
221+
**NOTE**: Be sure to include the trailing forward slash on the URL, otherwise the command won't work.
222+
221223
```
222-
$ curl -v -H 'host: sample-domain1.org' http://your.server.com:30305/weblogic/
223-
*About to connect() to your.server.com port 30305 (#0)
224-
* Trying 10.196.1.64...
224+
$ curl -v -H 'host: sample-domain1.org' http://your.server.com:30305/weblogic/
225+
* About to connect() to your.server.com port 30305 (#0)
226+
* Trying 10.196.1.64...
225227
* Connected to your.server.com (10.196.1.64) port 30305 (#0)
226-
> GET /weblogic/ HTTP/1.1
227-
> User-Agent: curl/7.29.0
228-
> Accept: */*
229-
> host: domain1.org
228+
> GET /weblogic/ HTTP/1.1
229+
> User-Agent: curl/7.29.0
230+
> Accept: */*
231+
> host: domain1.org
230232
>
231-
< HTTP/1.1 200 OK
232-
< Content-Length: 0
233+
< HTTP/1.1 200 OK
234+
< Content-Length: 0
233235
< Date: Thu, 20 Dec 2018 14:52:22 GMT
234-
< Vary: Accept-Encoding
235-
<* Connection #0 to host your.server.com left intact
236+
< Vary: Accept-Encoding
237+
< * Connection #0 to host your.server.com left intact
236238
```
237239
**Note**: Depending on where your Kubernetes cluster is running, you may need to open firewall ports or
238240
update security lists to allow ingress to this port.

0 commit comments

Comments
 (0)