diff --git a/chaoskube/chaoskube_test.go b/chaoskube/chaoskube_test.go index 551491d1..956530d2 100644 --- a/chaoskube/chaoskube_test.go +++ b/chaoskube/chaoskube_test.go @@ -821,7 +821,7 @@ func (suite *Suite) setupWithPods(interval time.Duration, labelSelector labels.S pods := []v1.Pod{ util.NewPodBuilder("default", "foo").Build(), util.NewPodBuilder("testing", "bar").Build(), - util.NewPodBuilder("testing", "baz").Build(), // Non-running pods are ignored + util.NewPodBuilder("testing", "baz").WithPhase(v1.PodPending).Build(), // Non-running pods are ignored } for _, pod := range pods { diff --git a/util/util.go b/util/util.go index 2e1b79de..5aa6f1dc 100644 --- a/util/util.go +++ b/util/util.go @@ -17,7 +17,7 @@ const ( Kitchen24 = "15:04" // a time format that just cares about the day and month. YearDay = "Jan_2" - + // default annotation prefix for configuration overrides DefaultBaseAnnotation = "chaos.alpha.kubernetes.io" ) @@ -212,8 +212,8 @@ func NewPodBuilder(namespace string, name string) PodBuilder { Phase: v1.PodRunning, CreationTime: nil, OwnerReference: nil, - Annotations: make(map[string]string), - Labels: make(map[string]string), + Annotations: map[string]string{"chaos": name}, + Labels: map[string]string{"app": name}, } }