Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions gitops-engine/pkg/diff/diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,14 +288,14 @@ func removeWebhookMutation(predictedLive, live *unstructured.Unstructured, gvkPa
// Apply the predicted live state to the live state to get a diff without mutation webhook fields
typedPredictedLive, err = typedLive.Merge(typedPredictedLive)

// After applying the predicted live to live state, this would cause any removed fields to be restored.
// We need to re-remove these from predicted live.
typedPredictedLive = typedPredictedLive.RemoveItems(comparison.Removed)

if err != nil {
return nil, fmt.Errorf("error applying predicted live to live state: %w", err)
}

// After applying the predicted live to live state, this would cause any removed fields to be restored.
// We need to re-remove these from predicted live.
typedPredictedLive = typedPredictedLive.RemoveItems(comparison.Removed)

plu := typedPredictedLive.AsValue().Unstructured()
pl, ok := plu.(map[string]any)
if !ok {
Expand Down
Loading