Skip to content

Commit 46799e2

Browse files
authored
Merge pull request #91 from ravilr/apigroup_update
use apps/v1 apigroup for DaemonSets
2 parents 2c214f9 + ffb6cb4 commit 46799e2

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.13.9-alpine3.11 AS build
1+
FROM golang:1.13.15-alpine3.11 AS build
22

33
RUN apk update && apk add git && apk add curl
44

helm/draino/templates/clusterrole.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ rules:
2424
- apiGroups: ['']
2525
resources: [pods/eviction]
2626
verbs: [create]
27-
- apiGroups: [extensions]
27+
- apiGroups: [apps]
2828
resources: [daemonsets]
2929
verbs: [get, watch, list]
3030
- apiGroups: ['*']

internal/kubernetes/podfilters.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func NewDaemonSetPodFilter(client kubernetes.Interface) PodFilterFunc {
7171

7272
// Pods pass the filter if they were created by a DaemonSet that no
7373
// longer exists.
74-
if _, err := client.ExtensionsV1beta1().DaemonSets(p.GetNamespace()).Get(c.Name, meta.GetOptions{}); err != nil {
74+
if _, err := client.AppsV1().DaemonSets(p.GetNamespace()).Get(c.Name, meta.GetOptions{}); err != nil {
7575
if apierrors.IsNotFound(err) {
7676
return true, nil
7777
}

0 commit comments

Comments
 (0)