Skip to content

Commit e808ee4

Browse files
authored
Merge pull request #16 from pusher/default-ignored-paths
Ignore kubectl last applied annotation by default
2 parents 5e76f77 + 127a8d5 commit e808ee4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/quack/quack.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ func (ah *AdmissionHook) Initialize(kubeClientConfig *restclient.Config, stopCh
4646
}
4747
ah.client = client
4848

49+
// Add lastAppliedConfigPath to ignored paths, unless it's already present
50+
if !contains(ah.IgnoredPaths, lastAppliedConfigPath) {
51+
ah.IgnoredPaths = append(ah.IgnoredPaths, lastAppliedConfigPath)
52+
}
53+
4954
glog.Info("Webhook Initialization Complete.")
5055
return nil
5156
}

0 commit comments

Comments
 (0)