morhidi opened a new pull request, #351:
URL: https://github.com/apache/flink-kubernetes-operator/pull/351
## What is the purpose of the change
Enable reactive scaling for standalone deployments by detecting and handling
spec changes that do not require full application upgrades.
The standalone integration for session clusters and application clusters
allows for more efficient scaling operations when only the parallelism changes.
We should distinguish this operation in the reconciler/service and implement
this for standalone mode.
## Brief change log
- Added a new method `FlinkService.reactiveScale()` to handle reactive
scaling for standalone deployments
- Added spec change detection that results a `DiffType`. Values can be:
- `IGNORE` - the job is not upgraded
- `SCALE` - if reactive mode is enable the job is rescaled, upgraded
otherwise
- `UPGRADE` - the job is upgraded
- Added `diff` package to the public operator API, classes marked with
`@Experimental`
## Verifying this change
- New unit tests where added to cover the functionality
- Verified manually by submitting `basic-reactive.yaml` and changing the
`job.parallelism`
```
[INFO ] [default.basic-reactive-example] SCALE change(s) detected, starting
reconciliation.
[INFO ] [default.basic-reactive-example]
FlinkDeploymentSpec[job.parallelism=4] differs from
FlinkDeploymentSpec[job.parallelism=2]
[INFO ] [default.basic-reactive-example] Scaling TM replicas: actual(1) ->
desired(2)
[INFO ] [default.basic-reactive-example] Reactive scaling succeeded
```
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): no
- The public API, i.e., is any changes to the `CustomResourceDescriptors`:
yes
- Core observer or reconciler logic that is regularly executed: yes
## Documentation
- Does this pull request introduce a new feature? yes
- If yes, how is the feature documented? Generated API doc
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]