Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Log warning re not applying resource by namespace
Browse files Browse the repository at this point in the history
We log when a resource in a manifest is dropped from sync because it's
marked as ignored; would also help troubleshooting if we log when a
resource is dropped because it's not in the allowed namespaces.
  • Loading branch information
squaremo committed May 13, 2019
1 parent 5c40b4b commit bde3ad7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cluster/kubernetes/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,11 @@ func (c *Cluster) Sync(syncSet cluster.SyncSet) error {
var errs cluster.SyncError
for _, res := range syncSet.Resources {
resID := res.ResourceID()
id := resID.String()
if !c.IsAllowedResource(resID) {
logger.Log("warning", "not applying resource; excluded by namespace constraints", "resource", id, "source", res.Source())
continue
}
id := resID.String()
// make a record of the checksum, whether we stage it to
// be applied or not, so that we don't delete it later.
csum := sha1.Sum(res.Bytes())
Expand Down

0 comments on commit bde3ad7

Please sign in to comment.