Skip to content

Commit

Permalink
ignore notified.notifications.argoproj.io annotations (#71)
Browse files Browse the repository at this point in the history
Co-authored-by: Nicolas COLLET <[email protected]>
  • Loading branch information
MalibuKoKo and MalibuKoKo authored Apr 15, 2021
1 parent a027ae6 commit 4bd78ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions argocd/structure_metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,8 @@ func metadataIsInternalKey(annotationKey string) bool {
if err == nil && strings.HasSuffix(u.Hostname(), "kubernetes.io") {
return true
}
if err == nil && annotationKey == "notified.notifications.argoproj.io" {
return true
}
return false
}
1 change: 1 addition & 0 deletions argocd/structure_metadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ func TestMetadataIsInternalKey(t *testing.T) {
{"any.hostname.com/with/path", false},
{"any.kubernetes.io", true},
{"kubernetes.io", true},
{"notified.notifications.argoproj.io", true},
}
for i, tc := range testCases {
t.Run(fmt.Sprintf("%d", i), func(t *testing.T) {
Expand Down

0 comments on commit 4bd78ea

Please sign in to comment.