[ILM] Relax POST policy route validation #84203
Merged
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.
Summary
After implementing #83077 I noticed that on instances of Kibana that did not know about the shrink action we are unable to update a policy through UI because of server-side validation. The thinking behind #83077 was that we want to preserve any values users may have configured through the ES API (even if Kibana does not know about it).
It seems that the simplest way to do this for now is to relax our server side policy validation. We can rely on ES to validate the policy configuration instead. The UI has control over fields it know about, the rest we pass back unaltered to ES.
Additionally, by relaxing our server-side validation we have less of a maintenance burden in case ES adds ILM policy features we have/will not support.