Skip to content

Commit 331e470

Browse files
authored
Merge pull request #220 from oracle/RMdeveloper
mostly minor edits
2 parents ab2e60d + dc2bf1c commit 331e470

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

site/developer.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Developer guide
22

3-
This page provides information for developers who wish to understand or contribute to the code.
3+
This guide provides information for developers who wish to understand or contribute to the code.
44

55
## Requirements
66

7-
The following software are required to obtain and build the operator:
7+
The following software is required to obtain and build the operator:
88

99
* Git (1.8 or later recommended)
1010
* Apache Maven (3.3 or later recommended)
@@ -77,9 +77,9 @@ These tests assume that the RBAC definitions exist on the Kubernetes cluster.
7777

7878
To create them, first, make a copy of the inputs file (`create-weblogic-operator-inputs.yaml`) and update it.
7979

80-
Next, choose and create a directory that generated operator related files will be stored in, e.g. /path/to/weblogic-operator-output-directory.
80+
Next, choose and create a directory that generated operator-related files will be stored in, for example, `/path/to/weblogic-operator-output-directory`.
8181

82-
Finally, run the operator installation script with the "generate only" option as shown below, pointing it at your inputs file and your output directory. (see the [installation](installation.md) page for details about this script and the inputs):
82+
Finally, run the operator installation script with the "generate only" option as shown below, pointing it at your inputs file and your output directory. (See the [installation](installation.md) page for details about this script and the inputs):
8383

8484
```
8585
./create-weblogic-operator.sh -g \
@@ -113,7 +113,7 @@ After you have run the build (that is, `mvn clean install`), create the Docker i
113113
docker build -t weblogic-kubernetes-operator:some-tag --no-cache=true .
114114
```
115115

116-
We recommend that you use a tag other than `latest` to make it easy to distinguish your image from the "real" one. In the example above, we just put in the GitHub ID of the developer.
116+
We recommend that you use a tag other than `latest` to make it easy to distinguish your image from the "real" one. In the example above, we used the GitHub ID of the developer.
117117

118118
Next, upload your image to your Kubernetes server as follows:
119119

@@ -125,11 +125,11 @@ scp operator.tar YOUR_USER@YOUR_SERVER:/some/path/operator.tar
125125
docker load < /some/path/operator.tar
126126
```
127127

128-
Verify that you have the right image by running `docker images | grep webloogic-kubernetes-operator` on both machines and comparing the image ID.
128+
Verify that you have the right image by running `docker images | grep webloogic-kubernetes-operator` on both machines and comparing the image IDs.
129129

130130
To create and deploy the operator, first, make a copy of the inputs file (`create-weblogic-operator-inputs.yaml`) and update it, making sure that `weblogicOperatorImagePullPolicy` is set to `Never` and `weblogicOperatorImage` matches the name you used in your `docker build` command.
131131

132-
Next, choose and create a directory that generated operator related files will be stored in, e.g. /path/to/weblogic-operator-output-directory.
132+
Next, choose and create a directory that generated operator-related files will be stored in, for example, `/path/to/weblogic-operator-output-directory`.
133133

134134
Finally, run the operator installation script to deploy the operator, pointing it at your inputs file and your output directory:
135135

@@ -145,7 +145,7 @@ Finally, run the operator installation script to deploy the operator, pointing i
145145
This project has adopted the following coding standards:
146146

147147
* All indents are two spaces.
148-
* Javadoc must be provided for all public packages, classes and methods and must include all parameters and returns. Javadoc is not required for methods that override or implement methods that are already documented.
148+
* Javadoc must be provided for all public packages, classes, and methods, and must include all parameters and returns. Javadoc is not required for methods that override or implement methods that are already documented.
149149
* All non-trivial methods should include `LOGGER.entering()` and `LOGGER.exiting()` calls.
150150
* The `LOGGER.exiting()` call should include the value that is going to be returned from the method, unless that value includes a credential or other sensitive information.
151151
* All logged messages must be internationalized using the resource bundle `src/main/resources/Operator.properties` and using a key itemized in `src/main/java/oracle/kubernetes/operator/logging/MessageKeys.java`.
@@ -156,28 +156,28 @@ This project has adopted the following coding standards:
156156

157157
This project has the following directory structure:
158158

159-
* docs: Generated javadoc and swagger
160-
* kubernetes: BASH scripts and YAML templates for operator installation and WebLogic domain creation job.
161-
* site: This documentation
162-
* src/main/java: Java source code for the operator
163-
* src/test/java: Java unit-tests for the operator
164-
* src-generated-swagger: Snapshot of Java source files generated from the domain custom resource's swagger
165-
* swagger: Swagger files for Kubernetes API server and domain custom resource
159+
* `docs`: Generated javadoc and Swagger
160+
* `kubernetes`: BASH scripts and YAML templates for operator installation and WebLogic domain creation job.
161+
* `site`: This documentation
162+
* `src/main/java`: Java source code for the operator
163+
* `src/test/java`: Java unit-tests for the operator
164+
* `src-generated-swagger`: Snapshot of Java source files generated from the domain custom resource's Swagger
165+
* `swagger`: Swagger files for the Kubernetes API server and domain custom resource
166166

167167
### Watch package
168168

169-
The Watch API in the Kubernetes Java client provides a watch capability across a specific list of resources for a limited amount of time. As such it is not ideally suited for our use case, where a continuous stream of watches was desired, with watch events generated in real time. The watch-wrapper in this repository extends the default Watch API to provide a continuous stream of watch events until the stream is specifically closed. It also provides `resourceVersion` tracking to exclude events that have already been seen. The watch-wrapper provides callbacks so events, as they occur, can trigger actions.
169+
The Watch API in the Kubernetes Java client provides a watch capability across a specific list of resources for a limited amount of time. As such, it is not ideally suited for our use case, where a continuous stream of watches is desired, with watch events generated in real time. The watch-wrapper in this repository extends the default Watch API to provide a continuous stream of watch events until the stream is specifically closed. It also provides `resourceVersion` tracking to exclude events that have already been seen. The watch-wrapper provides callbacks so events, as they occur, can trigger actions.
170170

171171
## Asynchronous call model
172172

173173
Our expectation is that certain customers will task the operator with managing thousands of WebLogic domains across dozens of Kubernetes namespaces. Therefore, we have designed the operator with an efficient user-level threads pattern based on a simplified version of the code from the JAX-WS reference implementation. We have then 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.
174174

175-
### User-level Thread Pattern
175+
### User-Level Thread Pattern
176176

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

179179
* `Engine`: The executor service and factory for `Fibers`.
180-
* `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.
180+
* `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.
181181
* `Step`: Individual CPU-bound activity in a processing flow.
182182
* `Packet`: Context of the processing flow.
183183
* `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`.
@@ -298,6 +298,6 @@ In this sample, the developer is using the pattern to list pods from the default
298298

299299
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.
300300

301-
The default behavior of `onFailure()` will retry with 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.
301+
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.
302302

303303
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.

0 commit comments

Comments
 (0)