Skip to content

Commit ca27a7a

Browse files
committed
chore(docs): update docs
1 parent abb4c19 commit ca27a7a

File tree

3 files changed

+38
-58
lines changed

3 files changed

+38
-58
lines changed

README.md

Lines changed: 38 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,19 @@
33
[![Discord](https://img.shields.io/discord/723455000604573736.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.com/channels/723455000604573736)
44

55
Build Kubernetes Operators in Java without hassle. Inspired by [operator-sdk](https://github.com/operator-framework/operator-sdk).
6+
67

7-
| S.No. | Contents |
8-
| ----- | -------- |
9-
| [1.](#Features) | [Features](#Features) |
10-
| [2.](#Why-build-your-own-Operator) | [Why build your own Operator?](#Why-build-your-own-Operator) |
11-
| [3.](#Roadmap) | [Roadmap](#Roadmap) |
12-
| [4.](#Join-us-on-Discord) | [Join us on Discord!](#Join-us-on-Discord) |
13-
| [5.](#User-Guide) | [User Guide](#User-Guide) |
14-
| [6.](#Usage) | [Usage](#Usage) |
15-
| [7.](#Spring-Boot) | [Spring Boot](#Spring-Boot) |
16-
17-
#### Features
8+
Table of Contents
9+
==========
10+
11+
1. [Features](#Features)
12+
1. [Why build your own Operator?](#Why-build-your-own-Operator)
13+
1. [Roadmap and Release Notes](#Roadmap-and-Release-Notes)
14+
1. [Join us on Discord!](#Join-us-on-Discord)
15+
1. [User Guide](#User-Guide)
16+
1. [Usage](#Usage)
17+
18+
## Features
1819
* Framework for handling Kubernetes API events
1920
* Automatic registration of Custom Resource watches
2021
* Retry action on failure
@@ -24,37 +25,29 @@ Check out this [blog post](https://csviri.medium.com/deep-dive-building-a-kubern
2425
about the non-trivial yet common problems needed to be solved for every operator. In case you are interested how to
2526
handle more complex scenarios take a look on [event sources](https://csviri.medium.com/java-operator-sdk-introduction-to-event-sources-a1aab5af4b7b).
2627

27-
#### Why build your own Operator?
28+
## Why build your own Operator?
2829
* Infrastructure automation using the power and flexibility of Java. See [blog post](https://blog.container-solutions.com/cloud-native-java-infrastructure-automation-with-kubernetes-operators).
2930
* Provisioning of complex applications - avoiding Helm chart hell
3031
* Integration with Cloud services - e.g. Secret stores
3132
* Safer deployment of applications - only expose cluster to users by Custom Resources
3233

33-
#### Roadmap
34+
## Roadmap and Release Notes
35+
3436
* Testing of the framework and all samples while running on a real cluster.
3537
* Generate a project skeleton
3638
* Generate Java classes from CRD
37-
* Integrate with Quarkus (including native image build)
3839
* Integrate with OLM (Operator Lifecycle Manager)
3940

40-
#### Join us on Discord!
41-
42-
[Discord Invite Link](https://discord.gg/DacEhAy)
41+
#### Overview of the 1.9.0 changes
4342

44-
#### User Guide
45-
46-
You can (will) find detailed documentation [here](docs/DOCS.md).
47-
Note that these docs are currently in progress.
48-
49-
> :warning: 1.7.0 Upgrade
50-
> The 1.7.0 upgrade comes with big changes due to the update to the 5.0.0 version of the fabric8
51-
> Kubernetes client. While this should improve the user experience quite nicely, there are a couple
52-
> of things to be aware of when upgrading from a previous version as detailed below.
43+
- The Spring Boot starters have been moved to their own repositories and are now found at:
44+
- https://github.com/java-operator-sdk/operator-framework-spring-boot-starter
45+
- https://github.com/java-operator-sdk/operator-framework-spring-boot-starter-test
5346

5447
#### Overview of the 1.8.0 changes
5548

56-
- The quarkus extension has been moved to the quarkiverse and is now found at
57-
https://github.com/quarkiverse/quarkus-operator-sdk
49+
- The quarkus extension has been moved to the quarkiverse and is now found at
50+
https://github.com/quarkiverse/quarkus-operator-sdk
5851

5952
##### Overview of the 1.7.0 changes
6053

@@ -82,15 +75,18 @@ annotated and that the value corresponds to your CRD manifest. If the namespace
8275
in your request URL, don't forget that namespace-scoped Custom Resources need to implement
8376
the `Namescaped` interface.
8477

85-
#### Usage
78+
## Join us on Discord!
79+
80+
[Discord Invite Link](https://discord.gg/DacEhAy)
81+
82+
## Usage
8683

8784
We have several sample Operators under the [samples](samples) directory:
8885
* *pure-java*: Minimal Operator implementation which only parses the Custom Resource and prints to stdout.
8986
Implemented with and without Spring Boot support. The two samples share the common module.
90-
* *spring-boot-plain/auto-config*: Samples showing integration with Spring Boot.
91-
* *quarkus*: Minimal application showing automatic configuration / injection of Operator / Controllers.
87+
* *spring-boot-plain*: Sample showing integration with Spring Boot.
9288

93-
And there are more samples in the standalone [samples repo](https://github.com/java-operator-sdk/samples):
89+
There are also more samples in the standalone [samples repo](https://github.com/java-operator-sdk/samples):
9490
* *webserver*: Simple example creating an NGINX webserver from a Custom Resource containing HTML code.
9591
* *mysql-schema*: Operator managing schemas in a MySQL database.
9692
* *tomcat*: Operator with two controllers, managing Tomcat instances and Webapps for these.
@@ -133,13 +129,7 @@ The Controller implements the business logic and describes all the classes neede
133129
```java
134130
@Controller
135131
public class WebServerController implements ResourceController<WebServer> {
136-
137-
@Override
138-
public DeleteControl deleteResource(CustomService resource, Context<WebServer> context) {
139-
// ... your logic ...
140-
return DeleteControl.DEFAULT_DELETE;
141-
}
142-
132+
143133
// Return the changed resource, so it gets updated. See javadoc for details.
144134
@Override
145135
public UpdateControl<CustomService> createOrUpdateResource(CustomService resource, Context<WebServer> context) {
@@ -170,34 +160,25 @@ public class WebServerSpec {
170160
}
171161
```
172162

173-
#### Deactivating CustomResource implementations validation
163+
### Deactivating CustomResource implementations validation
174164

175165
The operator will, by default, query the deployed CRDs to check that the `CustomResource`
176166
implementations match what is known to the cluster. This requires an additional query to the cluster
177167
and, sometimes, elevated privileges for the operator to be able to read the CRDs from the cluster.
178168
This validation is mostly meant to help users new to operator development get started and avoid
179169
common mistakes. Advanced users or production deployments might want to skip this step. This is done
180-
by setting
181-
the `CHECK_CRD_ENV_KEY` environment variable to `false`. Quarkus users can also add
182-
`quarkus.operator-sdk.check-crd-and-validate-local-model=false` to their `application.properties` for the
183-
same purpose. Spring Boot users can set the property `javaoperatorsdk.check-crd-and-validate-local-model`
184-
to `false`.
170+
by setting the `CHECK_CRD_ENV_KEY` environment variable to `false`.
185171

186-
#### Automatic generation of CRDs
172+
### Automatic generation of CRDs
187173

188174
To automatically generate CRD manifests from your annotated Custom Resource classes, you only need
189175
to add the following dependencies to your project:
190176

191177
```xml
192178
<dependency>
193179
<groupId>io.fabric8</groupId>
194-
<artifactId>crd-generator</artifactId>
195-
<scope>compile</scope>
196-
</dependency>
197-
<!-- This dependency will not be needed anymore in a future release of the kubernetes-client -->
198-
<dependency>
199-
<groupId>io.fabric8</groupId>
200-
<artifactId>kubernetes-model-common</artifactId>
180+
<artifactId>crd-generator-apt</artifactId>
181+
<scope>provided</scope>
201182
</dependency>
202183
```
203184

@@ -209,8 +190,10 @@ a `mycrs` plural form will result in 2 files:
209190
- `mycrs.java-operator-sdk.io-v1.yml`
210191
- `mycrs.java-operator-sdk.io-v1beta1.yml`
211192

193+
**NOTE:**
194+
> Quarkus users using the `quarkus-operator-sdk` extension do not need to add any extra dependency to get their CRD generated as this is handled by the extension itself.
212195
213-
#### Quarkus
196+
### Quarkus
214197

215198
A [Quarkus](https://quarkus.io) extension is also provided to ease the development of Quarkus-based operators.
216199

@@ -247,7 +230,7 @@ public class QuarkusOperator implements QuarkusApplication {
247230
}
248231
```
249232

250-
#### Spring Boot
233+
### Spring Boot
251234

252235
You can also let Spring Boot wire your application together and automatically register the controllers.
253236

docs/DOCS.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ TODO: explain running operator locally against a cluster
5050
### Event Dispatching
5151
### Generation Awareness
5252

53-
## Spring Boot Support
54-
5553
## Dealing with Consistency
5654

5755
### Run Single Instance

samples/pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
<module>common</module>
1919
<module>pure-java</module>
2020
<module>spring-boot-plain</module>
21-
<!-- <module>spring-boot-auto-config</module>-->
2221
</modules>
2322

2423
<build>

0 commit comments

Comments
 (0)