Skip to content

Commit

Permalink
Remove feature gate for auxiliary images and prepare for Operator 3.3…
Browse files Browse the repository at this point in the history
….0 (#2452)

* Remove feature gate for auxiliary images and prepare for Operator 3.3.0
  • Loading branch information
rjeberhard committed Jul 20, 2021
1 parent 72c46f7 commit e3713b3
Show file tree
Hide file tree
Showing 350 changed files with 28,418 additions and 215 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ You can:
The fastest way to experience the operator is to follow the [Quick Start guide](https://oracle.github.io/weblogic-kubernetes-operator/quickstart/), or you can peruse our [documentation](https://oracle.github.io/weblogic-kubernetes-operator), read our [blogs](https://blogs.oracle.com/weblogicserver/how-to-weblogic-server-on-kubernetes), or try out the [samples](https://oracle.github.io/weblogic-kubernetes-operator/samples/simple/).

***
The [current release of the operator](https://github.com/oracle/weblogic-kubernetes-operator/releases) is 3.2.5.
This release was published on June 21, 2021.
The [current release of the operator](https://github.com/oracle/weblogic-kubernetes-operator/releases) is 3.3.0.
This release was published on July 20, 2021.
***

# Documentation
Expand All @@ -36,7 +36,7 @@ Documentation for the operator is [available here](https://oracle.github.io/webl
This documentation includes information for users and for developers. It provides samples, reference material, security
information and a [Quick Start](https://oracle.github.io/weblogic-kubernetes-operator/quickstart/) guide if you just want to get up and running quickly.

Documentation for prior releases of the operator: [2.5.0](https://oracle.github.io/weblogic-kubernetes-operator/2.5/), [2.6.0](https://oracle.github.io/weblogic-kubernetes-operator/2.6/), [3.0.x](https://oracle.github.io/weblogic-kubernetes-operator/3.0/), and [3.1.x](https://oracle.github.io/weblogic-kubernetes-operator/3.1/).
Documentation for prior releases of the operator: [2.5.0](https://oracle.github.io/weblogic-kubernetes-operator/2.5/), [2.6.0](https://oracle.github.io/weblogic-kubernetes-operator/2.6/), [3.0.x](https://oracle.github.io/weblogic-kubernetes-operator/3.0/), [3.1.x](https://oracle.github.io/weblogic-kubernetes-operator/3.1/), and [3.2.x](https://oracle.github.io/weblogic-kubernetes-operator/3.2/).

# Backward compatibility guidelines

Expand Down
227 changes: 126 additions & 101 deletions THIRD_PARTY_LICENSES.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion buildDockerImage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ while getopts "t:" optname; do
esac
done

IMAGE_NAME=${name:-ghcr.io/oracle/weblogic-kubernetes-operator:3.2.5}
IMAGE_NAME=${name:-ghcr.io/oracle/weblogic-kubernetes-operator:3.3.0}
SCRIPTPATH="$( cd "$(dirname "$0")" > /dev/null 2>&1 ; pwd -P )"

# Proxy settings
Expand Down
2 changes: 1 addition & 1 deletion buildtime-reports/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<artifactId>operator-parent</artifactId>
<groupId>oracle.kubernetes</groupId>
<version>3.2.5</version>
<version>3.3.0</version>
</parent>

<artifactId>buildtime-reports</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
<p>Created with <i class="fas fa-heart"></i> from <a href="https://www.oracle.com">Oracle</a></p>
<p>&nbsp</p>
<table border="1" bgcolor="white"><tbody><tr><td align="center"><p style="color: red">
You are viewing the archived documentation for version 3.2.x.
To view the documentation for the current release, please
<a href="https://oracle.github.io/weblogic-kubernetes-operator">click here</a>
</p></td></tr></tbody></table>
<p>&nbsp</p>
<p><a href="https://github.com/oracle/weblogic-kubernetes-operator"><i class="fab fa-github"></i> GitHub repo</a></p>
<p><a href="https://weblogic-slack-inviter.herokuapp.com/"><i class="fab fa-slack"></i> Public Slack #operator</a></p>
3 changes: 3 additions & 0 deletions documentation/3.3/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"git.ignoreLimitWarning": true
}
7 changes: 7 additions & 0 deletions documentation/3.3/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# WebLogic Kubernetes Operator Documentation

***
For information on updating and contributing to the operator
documentation, see the _Documentation_ section of the
[Developer Guide](https://oracle.github.io/weblogic-kubernetes-operator/developerguide/documentation)
***
6 changes: 6 additions & 0 deletions documentation/3.3/archetypes/default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: false
---

19 changes: 19 additions & 0 deletions documentation/3.3/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# analytics
googleAnalytics = "UA-129126578-2"

baseURL = "/weblogic-kubernetes-operator/"
languageCode = "en-us"
title = "WebLogic Kubernetes Operator"

# Change the default theme to be use when building the site with Hugo
theme = "hugo-theme-learn"

publishDir = "docs"

# For search functionality
[outputs]
home = [ "HTML", "RSS", "JSON"]

[params]
# disable the copy to clipboard links
disableInlineCopyToClipBoard = true
65 changes: 65 additions & 0 deletions documentation/3.3/content/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
### WebLogic Kubernetes Operator

The WebLogic Kubernetes Operator (the “operator”) supports running your WebLogic Server and Fusion Middleware Infrastructure domains on Kubernetes, an industry standard, cloud neutral deployment platform. It lets you encapsulate your entire WebLogic Server installation and layered applications into a portable set of cloud neutral images and simple resource description files. You can run them on any on-premises or public cloud that supports Kubernetes where you've deployed the operator.

Furthermore, the operator is well suited to CI/CD processes. You can easily inject changes when moving between environments, such as from test to production. For example, you can externally inject database URLs and credentials during deployment or you can inject arbitrary changes to most WebLogic configurations.

The operator takes advantage of the [Kubernetes operator pattern](https://kubernetes.io/docs/concepts/extend-kubernetes/operator/), which means that it uses Kubernetes APIs to provide support for operations, such as: provisioning, lifecycle management, application versioning, product patching, scaling, and security. The operator also enables the use of tooling that is native to this infrastructure for monitoring, logging, tracing, and security.

You can:
* Deploy an operator that manages all WebLogic domains in all namespaces in a Kubernetes cluster, or that only manages domains in a specific subset of the namespaces, or that manages only domains that are located in the same namespace as the operator. At most, a namespace can be managed by one operator.
* Supply WebLogic domain configuration using:
* _Domain in PV_: Locates WebLogic domain homes in a Kubernetes PersistentVolume (PV). This PV can reside in an NFS file system or other Kubernetes volume types.
* _Domain in Image_: Includes a WebLogic domain home in a container image.
* _Model in Image_: Includes [WebLogic Deploy Tooling](https://oracle.github.io/weblogic-deploy-tooling/) models and archives in a container image.
* Configure deployment of WebLogic domains as a Kubernetes resource (using a Kubernetes custom resource definition).
* Override certain aspects of the WebLogic domain configuration; for example, use a different database password for different deployments.
* Start and stop servers and clusters in the domain based on declarative startup parameters and desired states.
* Scale WebLogic domains by starting and stopping Managed Servers on demand, or by integrating with a REST API to initiate scaling based on the WebLogic Diagnostics Framework (WLDF), Prometheus, Grafana, or other rules.
* Expose the WebLogic Server Administration Console outside the Kubernetes cluster, if desired.
* Expose T3 channels outside the Kubernetes domain, if desired.
* Expose HTTP paths on a WebLogic domain outside the Kubernetes domain with load balancing, and automatically update the load balancer when Managed Servers in the WebLogic domain are started or stopped.
* Publish operator and WebLogic Server logs into Elasticsearch and interact with them in Kibana.

{{% notice tip %}}
The fastest way to experience the operator is to follow the [Quick Start guide]({{< relref "/quickstart/_index.md" >}}), or you can peruse our [documentation]({{< relref "/userguide/_index.md" >}}), read our [blogs](https://blogs.oracle.com/weblogicserver/how-to-weblogic-server-on-kubernetes), or try out the [samples]({{< relref "/samples/simple/_index.md" >}}).
Also, you can step through the [Tutorial](https://github.com/oracle/weblogic-kubernetes-operator/blob/main/kubernetes/hands-on-lab/README.md)
using the operator to deploy and run a WebLogic domain container-packaged web application on an Oracle Cloud Infrastructure Container Engine for Kubernetes (OKE) cluster.
{{% /notice %}}

***
#### Current production release

The [current release of the operator](https://github.com/oracle/weblogic-kubernetes-operator/releases) is 3.3.0.
This release was published on July 20, 2021. See the [operator prerequisites]({{< relref "/userguide/prerequisites/introduction.md" >}}) and [supported environments]({{< relref "/userguide/platforms/environments.md" >}}).

***

#### Recent changes and known issues

See the [Release Notes]({{< relref "release-notes.md" >}}) for recent changes to the operator and known issues.

#### Operator earlier versions

Documentation for prior releases of the operator: [2.5.0](https://oracle.github.io/weblogic-kubernetes-operator/2.5/), [2.6.0](https://oracle.github.io/weblogic-kubernetes-operator/2.6/), [3.0.x](https://oracle.github.io/weblogic-kubernetes-operator/3.0/), and [3.1.x](https://oracle.github.io/weblogic-kubernetes-operator/3.1/).

#### Backward compatibility guidelines

Starting from the 2.0.1 release, operator releases are backward compatible with respect to the domain
resource schema, operator Helm chart input values, configuration overrides template, Kubernetes resources created
by the operator Helm chart, Kubernetes resources created by the operator, and the operator REST interface. We intend to
maintain compatibility for three releases, except in the case of a clearly communicated deprecated feature, which will be
maintained for one release after a replacement is available.

#### Getting help

See [Get help]({{< relref "userguide/introduction/get-help.md" >}}).

#### Related projects

* [Oracle Fusion Middleware on Kubernetes](https://oracle.github.io/fmw-kubernetes/)
* [WebLogic Deploy Tooling](https://oracle.github.io/weblogic-deploy-tooling/)
* [WebLogic Image Tool](https://oracle.github.io/weblogic-image-tool/)
* [WebLogic Monitoring Exporter](https://github.com/oracle/weblogic-monitoring-exporter)
* [WebLogic Logging Exporter](https://github.com/oracle/weblogic-logging-exporter)
* [WebLogic Remote Console](https://github.com/oracle/weblogic-remote-console)
12 changes: 12 additions & 0 deletions documentation/3.3/content/developerguide/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
+++
title = "Developer Guide"
date = 2019-02-22T15:27:54-05:00
weight = 7
chapter = true
pre = "<b> </b>"
+++


# Developer Guide

The Developer Guide provides information for developers who want to understand or contribute to the code.
146 changes: 146 additions & 0 deletions documentation/3.3/content/developerguide/asynchronous-call-model.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
---
title: "Asynchronous call model"
date: 2019-02-23T17:20:00-05:00
draft: false
weight: 7
---


Our expectation is that customers will task the operator with managing hundreds of WebLogic domains across dozens of Kubernetes Namespaces. Therefore, we have designed the operator with an efficient user-level threads pattern. We've used that pattern to implement an asynchronous call model for Kubernetes API requests. This call model has built-in support for timeouts, retries with exponential back-off, and lists that exceed the requested maximum size using the continuance functionality.

#### User-level thread pattern

The user-level thread pattern is implemented by the classes in the `oracle.kubernetes.operator.work` package.

* `Engine`: The executor service and factory for `Fibers`.
* `Fiber`: The user-level thread. `Fibers` represent the execution of a single processing flow through a series of `Steps`. `Fibers` may be suspended and later resumed, and do not consume a `Thread` while suspended.
* `Step`: Individual CPU-bound activity in a processing flow.
* `Packet`: Context of the processing flow.
* `NextAction`: Used by a `Step` when it returns control to the `Fiber` to indicate what should happen next. Common 'next actions' are to execute another `Step` or to suspend the `Fiber`.
* `Component`: Provider of SPI's that may be useful to the processing flow.
* `Container`: Represents the containing environment and is a `Component`.

Each `Step` has a reference to the next `Step` in the processing flow; however, `Steps` are not required to indicate that the next `Step` be invoked by the `Fiber` when the `Step` returns a `NextAction` to the `Fiber`. This leads to common use cases where `Fibers` invoke a series of `Steps` that are linked by the 'is-next' relationship, but just as commonly, use cases where the `Fiber` will invoke sets of `Steps` along a detour before returning to the normal flow.

In this sample, the caller creates an `Engine`, `Fiber`, linked set of `Step` instances, and `Packet`. The `Fiber` is then started. The `Engine` would typically be a singleton, since it's backed by a `ScheduledExecutorService`. The `Packet` would also typically be pre-loaded with values that the `Steps` would use in their `apply()` methods.

```java
static class SomeClass {
public static void main(String[] args) {
Engine engine = new Engine("worker-pool");

Fiber fiber = engine.createFiber();

Step step = new StepOne(new StepTwo(new StepThree(null)));
Packet packet = new Packet();

fiber.start(
step,
packet,
new CompletionCallback() {
@Override
public void onCompletion(Packet packet) {
// Fiber has completed successfully
}

@Override
public void onThrowable(Packet packet, Throwable throwable) {
// Fiber processing was terminated with an exception
}
});
}
}
```

`Steps` must not invoke sleep or blocking calls from within `apply()`. This prevents the worker threads from serving other `Fibers`. Instead, use asynchronous calls and the `Fiber` suspend/resume pattern. `Step` provides a method, `doDelay()`, which creates a `NextAction` to drive `Fiber` suspend/resume that is a better option than sleep precisely because the worker thread can serve other `Fibers` during the delay. For asynchronous IO or similar patterns, suspend the `Fiber`. In the callback as the `Fiber` suspends, initiate the asynchronous call. Finally, when the call completes, resume the `Fiber`. The suspend/resume functionality handles the case where resumed before the suspending callback completes.

In this sample, the step uses asynchronous file IO and the suspend/resume `Fiber` pattern.

```java
static class StepTwo extends Step {
public StepTwo(Step next) {
super(next);
}

@Override
public NextAction apply(Packet packet) {
return doSuspend((fiber) -> {
// The Fiber is now suspended
// Start the asynchronous call
try {
Path path = Paths.get(URI.create(this.getClass().getResource("/somefile.dat").toString()));
AsynchronousFileChannel fileChannel =
AsynchronousFileChannel.open(path, StandardOpenOption.READ);

ByteBuffer buffer = ByteBuffer.allocate(1024);
fileChannel.read(buffer, 0, buffer, new CompletionHandler<Integer, ByteBuffer>() {
@Override
void completed(Integer result, ByteBuffer attachment) {
// Store data in Packet and resume Fiber
packet.put("DATA_SIZE_READ", result);
packet.put("DATA_FROM_SOMEFILE", attachment);
fiber.resume(packet);
}

@Override
public void failed(Throwable exc, ByteBuffer attachment) {
// log exc
completed(0, null);
}
});
} catch (IOException e) {
// log exception
// If not resumed here, Fiber will never be resumed
}
});
}
}
```

#### Call builder pattern

The asynchronous call model is implemented by classes in the `oracle.kubernetes.operator.helpers` package, including `CallBuilder` and `ResponseStep`. The model is based on the `Fiber` suspend/resume pattern described above. `CallBuilder` provides many methods having names ending with "Async", such as `listPodAsync()` or `deleteServiceAsync()`. These methods return a `Step` that can be returned as part of a `NextAction`. When creating these `Steps`, the developer must provide a `ResponseStep`. Only `ResponseStep.onSuccess()` must be implemented; however, it is often useful to override `onFailure()` as Kubernetes treats `404 (Not Found)` as a failure.

In this sample, the developer is using the pattern to list pods from the default namespace that are labeled as part of `cluster-1`.

```java
static class StepOne extends Step {
public StepOne(Step next) {
super(next);
}

@Override
public NextAction apply(Packet packet) {
String namespace = "default";
Step step = CallBuilder.create().with($ -> {
$.labelSelector = "weblogic.clusterName=cluster-1";
$.limit = 50;
$.timeoutSeconds = 30;
}).listPodAsync(namespace, new ResponseStep<V1PodList>(next) {
@Override
public NextAction onFailure(Packet packet, ApiException e, int statusCode,
Map<String, List<String>> responseHeaders) {
if (statusCode == CallBuilder.NOT_FOUND) {
return onSuccess(packet, null, statusCode, responseHeaders);
}
return super.onFailure(packet, e, statusCode, responseHeaders);
}

@Override
NextAction onSuccess(Packet packet, V1PodList result, int statusCode,
Map<String, List<String>> responseHeaders) {
// do something with the result Pod, if not null
return doNext(packet);
}
});

return doNext(step, packet);
}
}
```

Notice that the required parameters, such as `namespace`, are method arguments, but optional parameters are designated using a simplified builder pattern using `with()` and a lambda.

The default behavior of `onFailure()` will retry with an exponential backoff the request on status codes `429 (TooManyRequests)`, `500 (InternalServerError)`, `503 (ServiceUnavailable)`, `504 (ServerTimeout)` or a simple timeout with no response from the server.

If the server responds with status code `409 (Conflict)`, then this indicates an optimistic locking failure. Common use cases are that the code read a Kubernetes object in one asynchronous step, modified the object, and attempted to replace the object in another asynchronous step; however, another activity replaced that same object in the interim. In this case, retrying the request would give the same result. Therefore, developers may provide an "on conflict" step when calling `super.onFailure()`. The conflict step will be invoked after an exponential backoff delay. In this example, that conflict step should be the step that reads the existing Kubernetes object.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: "Backward compatibility"
date: 2019-02-23T17:26:09-05:00
draft: false
weight: 9
---

Starting with the 2.0.1 release, operator releases must be backward compatible with respect to the Domain schema, operator Helm chart input values, configuration overrides template, Kubernetes resources created by the operator Helm chart, Kubernetes resources created by the operator, and the operator REST interface. We will maintain compatibility for three releases, except in the case of a clearly communicated deprecated feature, which will be maintained for one release after a replacement is available.
Loading

0 comments on commit e3713b3

Please sign in to comment.