Skip to content

Commit

Permalink
fix issue #100 #94
Browse files Browse the repository at this point in the history
  • Loading branch information
derailed committed May 14, 2020
1 parent fd70c2d commit a3ed537
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions change_logs/release_v0.8.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ Maintenance Release!
## Resolved Bugs/PRs

- Fix concurrent map access issue
- [Issue #100](https://github.com/derailed/popeye/issues/100)
- [Issue #94](https://github.com/derailed/popeye/issues/94)

---

Expand Down
2 changes: 1 addition & 1 deletion internal/cache/pdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func (c *PodDisruptionBudget) ListPodDisruptionBudgets() map[string]*v1beta1.Pod
func (c *PodDisruptionBudget) ForLabels(labels map[string]string) *v1beta1.PodDisruptionBudget {
for _, pdb := range c.ListPodDisruptionBudgets() {
m, err := metav1.LabelSelectorAsMap(pdb.Spec.Selector)
if err == nil {
if err != nil {
continue
}
if matchLabels(labels, m) {
Expand Down
2 changes: 2 additions & 0 deletions internal/sanitize/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package sanitize

import (
"context"
"fmt"

"github.com/derailed/popeye/internal"
"github.com/derailed/popeye/internal/client"
Expand Down Expand Up @@ -91,6 +92,7 @@ func (p *Pod) Sanitize(ctx context.Context) error {
}

func (p *Pod) checkPdb(ctx context.Context, labels map[string]string) {
fmt.Println("Checking...")
if p.ForLabels(labels) == nil {
p.AddCode(ctx, 206)
}
Expand Down

0 comments on commit a3ed537

Please sign in to comment.