Skip to content

Commit

Permalink
chore: use versioned funcs of client-go
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Linkhorst committed Jul 24, 2018
1 parent d5a34a9 commit ff8ac8b
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 @@ -141,7 +141,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 @@ -169,7 +169,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 @@ -505,7 +505,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 ff8ac8b

Please # to comment.