Skip to content

Commit

Permalink
feat: annotation update check changed
Browse files Browse the repository at this point in the history
Signed-off-by: Dillen Padhiar <[email protected]>
  • Loading branch information
dpadhiar committed Oct 4, 2023
1 parent bd8af3c commit 5612e8b
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion pkg/reconciler/pipeline/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -534,9 +534,21 @@ func needsUpdate(old, new *dfv1.Pipeline) bool {
if !equality.Semantic.DeepEqual(old.Finalizers, new.Finalizers) {
return true
}
if !equality.Semantic.DeepEqual(old.GetAnnotations(), new.GetAnnotations()) {

oldAnnotations := old.GetAnnotations()
newAnnotations := new.GetAnnotations()
if oldAnnotations != nil && newAnnotations == nil {
return true
}
if oldAnnotations == nil && newAnnotations != nil {
return true
}

for k, v := range oldAnnotations {
if strings.Contains(k, "numaflow.numaproj.io/") && v != newAnnotations[k] {
return true
}
}
return false
}

Expand Down

0 comments on commit 5612e8b

Please sign in to comment.