Open stepanstipl opened 3 years ago
Little POC to do this with rego - https://play.openpolicyagent.org/p/hVhVk5aimL
I think if done correctly this should also fix #455 ? In that one the lack of awareness of older API versions keeps the namespace of resources from being captured/reported.
As we want to provide most relevant advice to users, current implementation has its limitation as it's not able to support incremental recommendations, example being Ingress:
This does not allow to reflect the real situation where
networking.k8s.io/v1
is only available since 1.19, andnetworking.k8s.io/v1beta1
since 1.14.I.e. for someone running 1.18 we should ideally recommend upgrade to
networking.k8s.io/v1beta1
, but notv1
, as that is not available yet. To allow this type of recommendations we need to capture version evolution properly, perhaps smth. like:Maybe smth. like might be easier to work with:
We also need to support the case when a version is removed but does not have any replacement.
Do we need info when version is removed? or deprecated really? We only care if it has replacement, and perhaps removal without replacement could be smth. like:
Implementation-wise: