Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary delete daemonset permission #140

Merged
merged 3 commits into from
Apr 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/helm/aws-node-termination-handler/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
name: aws-node-termination-handler
description: A Helm chart for the AWS Node Termination Handler
version: 0.7.3
version: 0.7.4
appVersion: 1.3.1
home: https://github.com/aws/eks-charts
icon: https://raw.githubusercontent.com/aws/eks-charts/master/docs/logo/aws.png
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ rules:
- apiGroups:
- extensions
resources:
- replicasets
- daemonsets
verbs:
- get
Expand All @@ -36,4 +35,3 @@ rules:
- daemonsets
verbs:
- get
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, why does the node termination handler need any access to daemonset or replicaset resources? AFAIK, NTH only queries Node?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I'll test it out removing those as well and see if there's any gotchas

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a small update, removing the get daemonset permissions is causing the e2e test to break so I'm looking into what's going on there. I'm not totally convinced it's a real error rather than a problem with the test

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the daemonset get permissions are required so that we can filter out the daemonsets within the RunNodeDrain call: https://github.com/kubernetes/kubernetes/blob/fb6f5d739b08e049b188806d6e33099f85fad2fe/staging/src/k8s.io/kubectl/pkg/drain/drain.go#L189

I haven't had any issues with removing the replicaset permissions though, so I'll take that out in a new revision.

- delete
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ rules:
- apiGroups:
- extensions
resources:
- replicasets
- daemonsets
verbs:
- get
Expand All @@ -36,4 +35,3 @@ rules:
- daemonsets
verbs:
- get
- delete