openrewrite / rewrite-kubernetes

OpenRewrite recipes for Kubernetes.
Apache License 2.0
9 stars 8 forks source link

Recipe to find and cap resource values that exceed a max #7

Closed jbrisbin closed 3 years ago

jbrisbin commented 3 years ago

This change includes two recipes: 1 to find resource values (either limits or requests) which exceed a given maximum and 1 to cap values that exceed the maximum down to the max.

The units in the original will be preserved, even if the unit specified in the resourceLimit is of a different type (Gi instead of M).

Depends on the helper in PR https://github.com/openrewrite/rewrite/pull/736

jkschneider commented 3 years ago

Merged with 28a2eedfe1d09cadf5c9a1e3a6bd0b0b449797b6