Skip to content

Commit

Permalink
Merge pull request #96 from linki/clientgo-versions
Browse files Browse the repository at this point in the history
Use versioned funcs of client-go
  • Loading branch information
linki authored Jul 30, 2018
2 parents aab1e1d + ff8ac8b commit 3273f98
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions chaoskube/chaoskube.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func (c *Chaoskube) Victim() (v1.Pod, error) {
func (c *Chaoskube) Candidates() ([]v1.Pod, error) {
listOptions := metav1.ListOptions{LabelSelector: c.Labels.String()}

podList, err := c.Client.Core().Pods(v1.NamespaceAll).List(listOptions)
podList, err := c.Client.CoreV1().Pods(v1.NamespaceAll).List(listOptions)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -173,7 +173,7 @@ func (c *Chaoskube) DeletePod(victim v1.Pod) error {
return nil
}

return c.Client.Core().Pods(victim.Namespace).Delete(victim.Name, nil)
return c.Client.CoreV1().Pods(victim.Namespace).Delete(victim.Name, nil)
}

// filterByNamespaces filters a list of pods by a given namespace selector.
Expand Down
2 changes: 1 addition & 1 deletion chaoskube/chaoskube_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ func (suite *Suite) setupWithPods(labelSelector labels.Selector, annotations lab
}

for _, pod := range pods {
_, err := chaoskube.Client.Core().Pods(pod.Namespace).Create(&pod)
_, err := chaoskube.Client.CoreV1().Pods(pod.Namespace).Create(&pod)
suite.Require().NoError(err)
}

Expand Down

0 comments on commit 3273f98

Please sign in to comment.