You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your enhancement related to a problem? Please describe
In some situations, notably if multiple versions of a CustomResource exist, the result of CRD generation differs from run to run in the order in which the versions are added to the list. While this doesn't change the behaviour of Kubernetes, since the version order does not matter, it causes unnecessary changes if checked into git or applied to the cluster.
Describe the solution you'd like
There should be an ordered List of CR versions in the generated CRD either from oldest to newest or newest to oldest version.
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions!
The implementation uses a method from KubernetesVersionPriority to sort the versions by priority. The version with the highest priority comes first. This ensures deterministic generation und should fixfabric8io#5508.
)
* Fix CRDGeneratorTest#checkGenerationIsDeterministic and extend to test v1beta1 CRDVersion
* Add CRDGeneratorTest#checkGenerationMultipleVersionsOfCRDsIsDeterministic
* Fix broken link in JavaDoc for KubernetesVersionFactory
* Add sortByPriority for generic lists to KubernetesVersionPriority utility class
* Add SortCustomResourceDefinitionVersionDecorator to CRDGenerator
The implementation uses a method from KubernetesVersionPriority to sort the versions by priority. The version with the highest priority comes first. This ensures deterministic generation und should fix#5508.
* Add changelog for #5508
* Add license headers to SortCustomResourceDefinitionDecorators
* Add not-null check to KubernetesVersionPriority#sortByPriority
* Add NPE tests to KubernetesVersionPriorityTest
* Fix javadoc in KubernetesVersionPriority
Is your enhancement related to a problem? Please describe
In some situations, notably if multiple versions of a CustomResource exist, the result of CRD generation differs from run to run in the order in which the versions are added to the list. While this doesn't change the behaviour of Kubernetes, since the version order does not matter, it causes unnecessary changes if checked into git or applied to the cluster.
Describe the solution you'd like
There should be an ordered List of CR versions in the generated CRD either from oldest to newest or newest to oldest version.
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: