Skip to content

Commit

Permalink
Filter by owner reference last
Browse files Browse the repository at this point in the history
  • Loading branch information
multimac committed Jul 2, 2021
1 parent 4d234b2 commit 98c4db6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions chaoskube/chaoskube.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ func (c *Chaoskube) Candidates(ctx context.Context) ([]v1.Pod, error) {
pods = filterByAnnotations(pods, c.Annotations)
pods = filterByPhase(pods, v1.PodRunning)
pods = filterTerminatingPods(pods)
pods = filterByPodName(pods, c.IncludedPodNames, c.ExcludedPodNames)

pods = filterByMinimumAge(
pods,
Expand All @@ -255,9 +256,6 @@ func (c *Chaoskube) Candidates(ctx context.Context) ([]v1.Pod, error) {
c.Logger,
)

pods = filterByPodName(pods, c.IncludedPodNames, c.ExcludedPodNames)
pods = filterByOwnerReference(pods)

pods = filterByFrequency(
pods,
strings.Join([]string{c.ConfigAnnotationPrefix, "frequency"}, "/"),
Expand All @@ -266,6 +264,8 @@ func (c *Chaoskube) Candidates(ctx context.Context) ([]v1.Pod, error) {
c.Logger,
)

pods = filterByOwnerReference(pods)

return pods, nil
}

Expand Down

0 comments on commit 98c4db6

Please sign in to comment.