Skip to content

Commit

Permalink
Merge pull request #227 from Cryptophobia/master
Browse files Browse the repository at this point in the history
fix(generator): fix status annot on unused ns
  • Loading branch information
Cryptophobia committed Jun 28, 2021
2 parents c990c83 + 8c2a09c commit 2bba75e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion config-reloader/datasource/kube_informer.go
Expand Up @@ -71,12 +71,18 @@ func (d *kubeInformerConnection) GetNamespaces() ([]*NamespaceConfig, error) {
}
minis := convertPodToMinis(podList)

// If the AnnotStatus is not present on ns then set IsKnownFromBefore to false
annotStatusExists := false
if _, ok := nsobj.Annotations[d.cfg.AnnotStatus]; ok {
annotStatusExists = true
}

// Create a new NamespaceConfig from the data we've processed up to now
nsconfigs = append(nsconfigs, &NamespaceConfig{
Name: ns,
FluentdConfig: configdata,
PreviousConfigHash: d.hashes[ns],
IsKnownFromBefore: true,
IsKnownFromBefore: annotStatusExists,
Labels: nsobj.Labels,
MiniContainers: minis,
})
Expand Down

0 comments on commit 2bba75e

Please sign in to comment.