tomncooper opened a new pull request, #918:
URL: https://github.com/apache/flink-kubernetes-operator/pull/918
## What is the purpose of the change
The operator currently allows the following syntax for defining flink
version specific defaults:
`kubernetes.operator.default-configuration.flink-version.v1_18.key: value`
The problem with this is that, in many cases, these defaults should be
applied to newer Flink versions as well, forcing config duplications.
This PR introduces a new "greater than" syntax for config defaults,
indicating that they should be applied to a given version and above:
`kubernetes.operator.default-configuration.flink-version.v1_18+.key: value`
In this case key:value would be applied to all Flink version greater or
equal to 1.18, unless overridden for specific versions.
## Brief change log
- Adds a new method `getRelevantVersionPrefixes`, to the
`org.apache.flink.kubernetes.operator.config.FlinkConfigManager`, which
identifies all Flink version default config prefix which are relevant to the
currently specified Flink version.
- Refactored the `FlinkVersion` enum to specify major and minor semver
integers to facilitate quick look up of relevant Flink versions when parsing
version strings.
## Verifying this change
This change added tests and can be verified as follows:
- Added additional tests in the `FlinkConfigManagerTest` class to cover the
new Regex and `getRelevantVersionPrefixes` methods.
- Updated the `testVersionNamespaceDefaultConfs` test in
`FlinkConfigManagerTest` to test the greater than version behaviour.
## 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`:
no
- 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? Update the configuration docs
--
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]