-
Notifications
You must be signed in to change notification settings - Fork 218
refactor: renaming core classes and APIs #646
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
d478e35
refactor: renaming central classes and APIs
csviri 3b76d5e
Merge branch 'v2' into renamings-reconciler
csviri 5919eac
refactor!: moving reconciler related classes to reconciler package
csviri 74920ab
refactor: moving reconciler and related classes to separate package
csviri 3f92747
refactor!: further renamings
csviri fb58685
refactor!: renamed ConfiguredController to Controller
csviri 55b859d
Merge branch 'v2' into renamings-reconciler
csviri 6f07321
Merge branch 'v2' into renamings-reconciler
csviri 444f7d1
fix: removed unused method
csviri 8b1be24
refactor: reconcile and cleanup
csviri 424f800
refactor: EventDispatcher to ReconciliationDispatcher
csviri adc543a
refactor: associated controller to reconciler
csviri 1d148ac
fix: drawio pic
csviri 9ec3471
refactor!: renaming @Controller to @ControllerAnnotation
csviri 910293a
fix: controllerConfiguration refactor issues in docs
csviri 349fc11
refactor: image consistent naming
csviri 2e0ec8b
fix: cleanup IT
csviri 75b8e0e
fix: fix imports
csviri 8811dc3
fix: improvements
csviri 224bcdf
fix: log message for crd apply in IT
csviri 94980ee
fix: propagate cause to MissingCRD exception
csviri cadbc8a
fix: naming
csviri 0f9eaba
fix: increased minikube version
csviri 725fb06
fix: experiment with CR IT issue
csviri b51e69b
docs: comment on sleep
csviri 0521f8e
fix: formatting
csviri 4105def
refactor: rename ControllerAnnotationProcessor to ControllerConfigura…
metacosm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -130,7 +130,7 @@ dependencies { | |
``` | ||
|
||
Once you've added the dependency, define a main method initializing the Operator and registering a | ||
controller. | ||
controllerConfiguration. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same. |
||
|
||
```java | ||
public class Runner { | ||
|
@@ -146,7 +146,7 @@ The Controller implements the business logic and describes all the classes neede | |
|
||
```java | ||
|
||
@Controller | ||
@ControllerConfiguration | ||
public class WebServerController implements ResourceController<WebServer> { | ||
|
||
// Return the changed resource, so it gets updated. See javadoc for details. | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ other configuration options are provided to fine tune or turn off these features | |
## Controller Execution in a Nutshell | ||
|
||
Controller execution is always triggered by an event. Events typically come from the custom resource | ||
(i.e. custom resource is created, updated or deleted) that the controller is watching, but also from different sources | ||
(i.e. custom resource is created, updated or deleted) that the controllerConfiguration is watching, but also from different sources | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same. |
||
(see event sources). When an event is received reconciliation is executed, unless there is already a reconciliation | ||
happening for a particular custom resource. In other words it is guaranteed by the framework that no concurrent | ||
reconciliation happens for a custom resource. | ||
|
@@ -24,7 +24,7 @@ i.e. [ResourceController](https://github.com/java-operator-sdk/java-operator-sdk | |
called, a post-processing phase follows, where typically framework checks if: | ||
|
||
- an exception was thrown during execution, if yes schedules a retry. | ||
- there are new events received during the controller execution, if yes schedule the execution again. | ||
- there are new events received during the controllerConfiguration execution, if yes schedule the execution again. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same. |
||
- there is an instruction to re-schedule the execution for the future, if yes schedule a timer event with the specified | ||
delay. | ||
- if none above, the reconciliation is finished. | ||
|
@@ -45,14 +45,14 @@ Finalizers are automatically added by the framework as the first step, thus when | |
before the first reconciliation, the custom resource is updated via a Kubernetes API call. As a result of this update, the | ||
finalizer will be present. The subsequent event will be received, which will trigger the first reconciliation. | ||
|
||
The finalizer that is automatically added will be also removed after the `deleteResource` is executed on the controller. | ||
The finalizer that is automatically added will be also removed after the `deleteResource` is executed on the controllerConfiguration. | ||
However, the removal behavior can be further customized, and can be instructed to "not remove yet" - this is useful just | ||
in some specific corner cases, when there would be a long waiting period for some dependent resource cleanup. | ||
|
||
The name of the finalizers can be specified, in case it is not, a name will be generated. | ||
|
||
This behavior can be turned off, so when configured no finalizer will be added or removed. | ||
See [`@Controller`](https://github.com/java-operator-sdk/java-operator-sdk/blob/master/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/Controller.java) | ||
See [`@ControllerConfiguration`](https://github.com/java-operator-sdk/java-operator-sdk/blob/master/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/ControllerConfiguration.java) | ||
annotation for more details. | ||
|
||
### When not to Use Finalizers? | ||
|
@@ -90,7 +90,7 @@ time. | |
## Contextual Info for Logging with MDC | ||
|
||
Logging is enhanced with additional contextual information using [MDC](http://www.slf4j.org/manual.html#mdc). | ||
This following attributes are available in most parts of reconciliation logic and during the execution of the controller: | ||
This following attributes are available in most parts of reconciliation logic and during the execution of the controllerConfiguration: | ||
|
||
| MDC Key | Value added from Custom Resource | | ||
| :--- | :--- | | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...k-core/src/test/java/io/javaoperatorsdk/operator/sample/simple/DuplicateCRController.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...-core/src/test/java/io/javaoperatorsdk/operator/sample/simple/TestCustomReconcilerV2.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like you got too eager with search and replace :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's intellij too intelligent :) will fix these
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but probably we can delete Decision log since it is not used