Adds a new CalculateOption that can be used with PodDisruptionBudget resources against k8s 1.21 and higher where the patchStrategy:"replace" is used on the Selector field.
This strategy will cause a constant diff, because the library in apimachinery doesn't check for equality in this case.
switch patchStrategy {
// The patch strategic from metadata tells us to replace the entire object instead of diffing it
case replaceDirective:
if !diffOptions.IgnoreChangesAndAdditions {
patch[key] = modifiedValue
}
What's in this PR?
Adds a new CalculateOption that can be used with PodDisruptionBudget resources against k8s 1.21 and higher where the
patchStrategy:"replace"
is used on theSelector
field.This strategy will cause a constant diff, because the library in apimachinery doesn't check for equality in this case.