Skip to content

Commit 81a6618

Browse files
committed
docs: wording improvements
Signed-off-by: Attila Mészáros <[email protected]>
1 parent 2bd9c35 commit 81a6618

File tree

12 files changed

+324
-399
lines changed

12 files changed

+324
-399
lines changed

docs/content/en/docs/_index.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,34 @@ menu: {main: {weight: 1}}
55
weight: 1
66
---
77

8+
# Java Operator SDK Documentation
9+
10+
Welcome to the Java Operator SDK (JOSDK) documentation! This comprehensive guide will help you build powerful Kubernetes operators using Java.
11+
12+
## What is JOSDK?
13+
14+
The Java Operator SDK is a high-level framework designed to make implementing Kubernetes operators in Java as straightforward as possible. It provides:
15+
16+
- **Natural Java APIs** that feel familiar to Java developers
17+
- **Built-in best practices** so you can focus on your business logic
18+
- **Automatic handling** of common operator patterns and problems
19+
- **Comprehensive tooling** for testing and development
20+
21+
## Quick Navigation
22+
23+
- **[Getting Started](getting-started/)** - New to operators or JOSDK? Start here!
24+
- **[Documentation](documentation/)** - Detailed guides on all JOSDK features
25+
- **[Migration](migration/)** - Upgrading from older versions
26+
- **[FAQ](faq/)** - Common questions and answers
27+
28+
## Key Features
29+
30+
- Support for both custom and well-known Kubernetes resources
31+
- Automatic finalizer management
32+
- Event-driven reconciliation
33+
- Leader election support
34+
- Dependent resource management
35+
- Comprehensive testing utilities
36+
- Integration with popular Java frameworks
37+
838

docs/content/en/docs/contributing/_index.md

Lines changed: 40 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -3,82 +3,66 @@ title: Contributing To Java Operator SDK
33
weight: 110
44
---
55

6-
First of all, we'd like to thank you for considering contributing to the project! We really
7-
hope to create a vibrant community around this project but this won't happen without help from
8-
people like you!
6+
Thank you for considering contributing to the Java Operator SDK project! We're building a vibrant community and need help from people like you to make it happen.
97

108
## Code of Conduct
119

12-
We are serious about making this a welcoming, happy project. We will not tolerate discrimination,
13-
aggressive or insulting behaviour.
10+
We're committed to making this a welcoming, inclusive project. We do not tolerate discrimination, aggressive, or insulting behavior.
1411

15-
To this end, the project and everyone participating in it is bound by the [Code of
16-
Conduct]({{baseurl}}/coc). By participating, you are expected to uphold this code. Please report
17-
unacceptable behaviour to any of the project admins.
12+
This project and all participants are bound by our [Code of Conduct]({{baseurl}}/coc). By participating, you're expected to uphold this code. Please report unacceptable behavior to any project admin.
1813

19-
## Bugs
14+
## Reporting Bugs
2015

21-
If you find a bug,
22-
please [open an issue](https://github.com/java-operator-sdk/java-operator-sdk/issues)! Do try
23-
to include all the details needed to recreate your problem. This is likely to include:
16+
Found a bug? Please [open an issue](https://github.com/java-operator-sdk/java-operator-sdk/issues)! Include all details needed to recreate the problem:
2417

25-
- The version of the Operator SDK being used
26-
- The exact platform and version of the platform that you're running on
27-
- The steps taken to cause the bug
28-
- Reproducer code is also very welcome to help us diagnose the issue and fix it quickly
18+
- Operator SDK version being used
19+
- Exact platform and version you're running on
20+
- Steps to reproduce the bug
21+
- Reproducer code (very helpful for quick diagnosis and fixes)
2922

30-
## Building Features and Documentation
23+
## Contributing Features and Documentation
3124

32-
If you're looking for something to work on, take look at the issue tracker, in particular any items
33-
labelled [good first issue](https://github.com/java-operator-sdk/java-operator-sdk/labels/good%20first%20issue)
34-
.
35-
Please leave a comment on the issue to mention that you have started work, in order to avoid
36-
multiple people working on the same issue.
25+
Looking for something to work on? Check the issue tracker, especially items labeled [good first issue](https://github.com/java-operator-sdk/java-operator-sdk/labels/good%20first%20issue). Please comment on the issue when you start work to avoid duplicated effort.
3726

38-
If you have an idea for a feature - whether or not you have time to work on it - please also open an
39-
issue describing your feature and label it "enhancement". We can then discuss it as a community and
40-
see what can be done. Please be aware that some features may not align with the project goals and
41-
might therefore be closed. In particular, please don't start work on a new feature without
42-
discussing it first to avoid wasting effort. We do commit to listening to all proposals and will do
43-
our best to work something out!
27+
### Feature Ideas
4428

45-
Once you've got the go ahead to work on a feature, you can start work. Feel free to communicate with
46-
team via updates on the issue tracker or the [Discord channel](https://discord.gg/DacEhAy) and ask
47-
for feedback, pointers etc. Once you're happy with your code, go ahead and open a Pull Request.
29+
Have a feature idea? Open an issue labeled "enhancement" even if you can't work on it immediately. We'll discuss it as a community and see what's possible.
4830

49-
## Pull Request Process
31+
**Important**: Some features may not align with project goals. Please discuss new features before starting work to avoid wasted effort. We commit to listening to all proposals and working something out when possible.
32+
33+
### Development Process
5034

51-
First, please format your commit messages so that they follow
52-
the [conventional commit](https://www.conventionalcommits.org/en/v1.0.0/) format.
35+
Once you have approval to work on a feature:
36+
1. Communicate progress via issue updates or our [Discord channel](https://discord.gg/DacEhAy)
37+
2. Ask for feedback and pointers as needed
38+
3. Open a Pull Request when ready
39+
40+
## Pull Request Process
5341

54-
On opening a PR, a GitHub action will execute the test suite against the new code. All code is
55-
required to pass the tests, and new code must be accompanied by new tests.
42+
### Commit Messages
43+
Format commit messages following [conventional commit](https://www.conventionalcommits.org/en/v1.0.0/) format.
5644

57-
All PRs have to be reviewed and signed off by another developer before being merged. This review
58-
will likely ask for some changes to the code - please don't be alarmed or upset
59-
at this; it is expected that all PRs will need tweaks and a normal part of the process.
45+
### Testing and Review
46+
- GitHub Actions will run the test suite on your PR
47+
- All code must pass tests
48+
- New code must include new tests
49+
- All PRs require review and sign-off from another developer
50+
- Expect requests for changes - this is normal and part of the process
51+
- PRs must comply with Java Google code style
6052

61-
The PRs are checked to be compliant with the Java Google code style.
53+
### Licensing
54+
All Operator SDK code is released under the [Apache 2.0 licence](LICENSE).
6255

63-
Be aware that all Operator SDK code is released under the [Apache 2.0 licence](LICENSE).
56+
## Development Environment Setup
6457

65-
## Development environment setup
58+
### Code Style
6659

67-
### Code style
60+
SDK modules and samples follow Java Google code style. Code gets formatted automatically on every `compile`, but to avoid PR rejections due to style issues, set up your IDE:
6861

69-
The SDK modules and samples are formatted to follow the Java Google code style.
70-
On every `compile` the code gets formatted automatically, however, to make things simpler (i.e.
71-
avoid getting a PR rejected simply because of code style issues), you can import one of the
72-
following code style schemes based on the IDE you use:
62+
**IntelliJ IDEA**: Install the [google-java-format](https://plugins.jetbrains.com/plugin/8527-google-java-format) plugin
7363

74-
- for *Intellij IDEA*
75-
install [google-java-format](https://plugins.jetbrains.com/plugin/8527-google-java-format) plugin
76-
- for *Eclipse*
77-
follow [these intructions](https://github.com/google/google-java-format?tab=readme-ov-file#eclipse)
64+
**Eclipse**: Follow [these instructions](https://github.com/google/google-java-format?tab=readme-ov-file#eclipse)
7865

79-
## Thanks
66+
## Acknowledgments
8067

81-
These guidelines were based on several sources, including
82-
[Atom](https://github.com/atom/atom/blob/master/CONTRIBUTING.md), [PurpleBooth's
83-
advice](https://gist.github.com/PurpleBooth/b24679402957c63ec426) and the [Contributor
84-
Covenant](https://www.contributor-covenant.org/).
68+
These guidelines were inspired by [Atom](https://github.com/atom/atom/blob/master/CONTRIBUTING.md), [PurpleBooth's advice](https://gist.github.com/PurpleBooth/b24679402957c63ec426), and the [Contributor Covenant](https://www.contributor-covenant.org/).
Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,24 @@
11
---
22
title: Documentation
33
weight: 40
4-
---
4+
---
5+
6+
# JOSDK Documentation
7+
8+
This section contains detailed documentation for all Java Operator SDK features and concepts. Whether you're building your first operator or need advanced configuration options, you'll find comprehensive guides here.
9+
10+
## Core Concepts
11+
12+
- **[Implementing a Reconciler](reconciler/)** - The heart of any operator
13+
- **[Architecture](architecture/)** - How JOSDK works under the hood
14+
- **[Configuration](configuration/)** - Customizing operator behavior
15+
- **[Error Handling & Retries](error-handling-retries/)** - Managing failures gracefully
16+
17+
## Advanced Features
18+
19+
- **[Dependent Resources & Workflows](dependent-resource-and-workflows/)** - Managing complex resource relationships
20+
- **[Eventing](eventing/)** - Understanding the event-driven model
21+
- **[Observability](observability/)** - Monitoring and debugging your operators
22+
- **[Other Features](features/)** - Additional capabilities and integrations
23+
24+
Each guide includes practical examples and best practices to help you build robust, production-ready operators.

docs/content/en/docs/documentation/architecture.md

Lines changed: 20 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -3,62 +3,34 @@ title: Architecture and Internals
33
weight: 85
44
---
55

6-
This document gives an overview of the internal structure and components of Java Operator SDK core,
7-
in order to make it easier for developers to understand and contribute to it. This document is
8-
not intended to be a comprehensive reference, rather an introduction to the core concepts and we
9-
hope that the other parts should be fairly easy to understand. We will evolve this document
10-
based on the community's feedback.
6+
This document provides an overview of the Java Operator SDK's internal structure and components to help developers understand and contribute to the project. While not a comprehensive reference, it introduces core concepts that should make other components easier to understand.
117

128
## The Big Picture and Core Components
139

1410
![JOSDK architecture](/images/architecture.svg)
1511

16-
An [Operator](https://github.com/java-operator-sdk/java-operator-sdk/blob/main/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/Operator.java)
17-
is a set of
18-
independent [controllers](https://github.com/java-operator-sdk/java-operator-sdk/blob/main/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/Controller.java)
19-
.
20-
The `Controller` class, however, is an internal class managed by the framework itself and
21-
usually shouldn't interacted with directly by end users. It
22-
manages all the processing units involved with reconciling a single type of Kubernetes resource.
12+
An [Operator](https://github.com/java-operator-sdk/java-operator-sdk/blob/main/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/Operator.java) is a set of independent [controllers](https://github.com/java-operator-sdk/java-operator-sdk/blob/main/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/Controller.java).
2313

24-
Other components include:
14+
The `Controller` class is an internal class managed by the framework and typically shouldn't be interacted with directly. It manages all processing units involved with reconciling a single type of Kubernetes resource.
2515

26-
- [Reconciler](https://github.com/java-operator-sdk/java-operator-sdk/blob/main/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/reconciler/Reconciler.java)
27-
is the primary entry-point for the developers of the framework to implement the reconciliation
28-
logic.
29-
- [EventSource](https://github.com/java-operator-sdk/java-operator-sdk/blob/main/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/source/EventSource.java)
30-
represents a source of events that might eventually trigger a reconciliation.
31-
- [EventSourceManager](https://github.com/java-operator-sdk/java-operator-sdk/blob/main/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/EventSourceManager.java)
32-
aggregates all the event sources associated with a controller. Manages the event sources'
33-
lifecycle.
34-
- [ControllerResourceEventSource](https://github.com/java-operator-sdk/java-operator-sdk/blob/main/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/source/controller/ControllerResourceEventSource.java)
35-
is a central event source that watches the resources associated with the controller (also
36-
called primary resources) for changes, propagates events and caches the related state.
37-
- [EventProcessor](https://github.com/java-operator-sdk/java-operator-sdk/blob/main/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/EventProcessor.java)
38-
processes the incoming events and makes sure they are executed in a sequential manner, that is
39-
making sure that the events are processed in the order they are received for a given resource,
40-
despite requests being processed concurrently overall. The `EventProcessor` also takes care of
41-
re-scheduling or retrying requests as needed.
42-
- [ReconcilerDispatcher](https://github.com/java-operator-sdk/java-operator-sdk/blob/main/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/ReconciliationDispatcher.java)
43-
is responsible for dispatching requests to the appropriate `Reconciler` method and handling
44-
the reconciliation results, making the instructed Kubernetes API calls.
16+
### Core Components
17+
18+
- **[Reconciler](https://github.com/java-operator-sdk/java-operator-sdk/blob/main/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/reconciler/Reconciler.java)** - The primary entry point for developers to implement reconciliation logic
19+
- **[EventSource](https://github.com/java-operator-sdk/java-operator-sdk/blob/main/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/source/EventSource.java)** - Represents a source of events that might trigger reconciliation
20+
- **[EventSourceManager](https://github.com/java-operator-sdk/java-operator-sdk/blob/main/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/EventSourceManager.java)** - Aggregates all event sources for a controller and manages their lifecycle
21+
- **[ControllerResourceEventSource](https://github.com/java-operator-sdk/java-operator-sdk/blob/main/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/source/controller/ControllerResourceEventSource.java)** - Central event source that watches primary resources for changes, propagates events, and caches state
22+
- **[EventProcessor](https://github.com/java-operator-sdk/java-operator-sdk/blob/main/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/EventProcessor.java)** - Processes incoming events sequentially per resource while allowing concurrent overall processing. Handles rescheduling and retrying
23+
- **[ReconcilerDispatcher](https://github.com/java-operator-sdk/java-operator-sdk/blob/main/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/ReconciliationDispatcher.java)** - Dispatches requests to appropriate `Reconciler` methods and handles reconciliation results, making necessary Kubernetes API calls
4524

4625
## Typical Workflow
4726

48-
A typical workflows looks like following:
27+
A typical workflow follows these steps:
4928

50-
1. An `EventSource` produces an event, that is propagated to the `EventProcessor`.
51-
2. The resource associated with the event is read from the internal cache.
52-
3. If the resource is not already being processed, a reconciliation request is
53-
submitted to the executor service to be executed in a different thread, encapsulated in a
54-
`ControllerExecution` instance.
55-
4. This, in turns, calls the `ReconcilerDispatcher` which dispatches the call to the appropriate
56-
`Reconciler` method, passing along all the required information.
57-
5. Once the `Reconciler` is done, what happens depends on the result returned by the
58-
`Reconciler`. If needed, the `ReconcilerDispatcher` will make the appropriate calls to the
59-
Kubernetes API server.
60-
6. Once the `Reconciler` is done, the `EventProcessor` is called back to finalize the
61-
execution and update the controller's state.
62-
7. The `EventProcessor` checks if the request needs to be rescheduled or retried and if there are no
63-
subsequent events received for the same resource.
64-
8. When none of this happens, the processing of the event is finished.
29+
1. **Event Generation**: An `EventSource` produces an event and propagates it to the `EventProcessor`
30+
2. **Resource Reading**: The resource associated with the event is read from the internal cache
31+
3. **Reconciliation Submission**: If the resource isn't already being processed, a reconciliation request is submitted to the executor service in a different thread (encapsulated in a `ControllerExecution` instance)
32+
4. **Dispatching**: The `ReconcilerDispatcher` is called, which dispatches the call to the appropriate `Reconciler` method with all required information
33+
5. **Reconciler Execution**: Once the `Reconciler` completes, the `ReconcilerDispatcher` makes appropriate Kubernetes API server calls based on the returned result
34+
6. **Finalization**: The `EventProcessor` is called back to finalize execution and update the controller's state
35+
7. **Rescheduling Check**: The `EventProcessor` checks if the request needs rescheduling or retrying, and whether subsequent events were received for the same resource
36+
8. **Completion**: When no further action is needed, event processing is finished

0 commit comments

Comments
 (0)